Package com.neuralnetwork.shared.neurons

Examples of com.neuralnetwork.shared.neurons.HiddenNeuron


    }

    @Override
    public void build() {
        while (size() != getWidth()) {
            add(new HiddenNeuron());
        }
    }
View Full Code Here


   * Test method for {@link com.neuralnetwork
   * .shared.neurons.HiddenNeuron#toString()}.
   */
  @Test
  public final void testToString() {
    HiddenNeuron h = new HiddenNeuron();
    h.setValue(new OneValue());
    assertEquals(h.toString(), "HN(1.0) ");
  }
View Full Code Here

   * com.neuralnetwork.shared.neurons.INeuron,
   * com.neuralnetwork.shared.values.IValue)}.
   */
  @Test
    public final void testLink() {
    INeuron n = new HiddenNeuron();
    ILink l = new Link(n, n, new OneValue());
    assertNotNull(l);
   
    try {
      new Link(null, n, new OneValue());
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.links.Link#getHead()}.
   */
  @Test
  public final void testGetHead() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new OneValue());
    assertEquals(l.getHead(), h);
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.links.Link#getTail()}.
   */
  @Test
    public final void testGetTail() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new OneValue());
    assertEquals(l.getTail(), t);
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.links.Link#getWeight()}.
   */
  @Test
    public final void testGetWeight() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new OneValue());
    assertEquals(l.getWeight(), new OneValue());
  }
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.links.Link#setHead(com.neuralnetwork.shared.neurons.INeuron)}.
   */
  @Test
    public final void testSetHead() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new OneValue());
    l.setHead(t);
    assertEquals(l.getHead(), t);
   
    try {
View Full Code Here

   * Test method for {@link com.neuralnetwork
   * .shared.links.Link#setTail(com.neuralnetwork.shared.neurons.INeuron)}.
   */
  @Test
    public final void testSetTail() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new OneValue());
    l.setTail(h);
    assertEquals(l.getTail(), h);
   
    try {
View Full Code Here

   * .shared.links.Link#updateWeight(com.neuralnetwork
   * .shared.values.IValue)}.
   */
  @Test
    public final void testUpdateWeight() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new ZeroValue());
    l.updateWeight(new DoubleValue(WEIGHT_TEST_VALUE));
    assertEquals(l.getWeight(), new DoubleValue(WEIGHT_TEST_VALUE));
    l.updateWeight(new DoubleValue(-WEIGHT_TEST_VALUE));
    assertEquals(l.getWeight(), new DoubleValue(0.0));
View Full Code Here

   * .shared.links.Link#setWeight(com.neuralnetwork
   * .shared.values.IValue)}.
   */
  @Test
    public final void testSetWeight() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new OneValue());
    l.setWeight(new DoubleValue(WEIGHT_TEST_VALUE3));
    assertEquals(l.getWeight(), new DoubleValue(WEIGHT_TEST_VALUE3));
  }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.shared.neurons.HiddenNeuron

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.