Package com.neuralnetwork.shared.links

Examples of com.neuralnetwork.shared.links.ILink


   */
  @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


   */
  @Test
    public final void testGetAge() {
    IHiddenNeuron h = new HiddenNeuron();
    IHiddenNeuron t = new HiddenNeuron();
    ILink l = new Link(h, t, new OneValue());
    l.updateWeight(new DoubleValue(-WEIGHT_TEST_VALUE2));
    l.updateWeight(new DoubleValue(-WEIGHT_TEST_VALUE2));
    l.updateWeight(new DoubleValue(-WEIGHT_TEST_VALUE2));
    l.updateWeight(new DoubleValue(-WEIGHT_TEST_VALUE2));
    assertEquals(l.getAge(), 2 * 2);
  }
 
View Full Code Here

  @Test
  public final void testAddInputLinkINeuronIValueOfQ() {
    Neuron n = new InputNeuron();
    Neuron m = new InputNeuron();
    n.addInputLink(m, new DoubleValue(TEST_VALUE1));
    ILink l = n.getInputLink(0);
    assertEquals(l.getWeight(), new DoubleValue(TEST_VALUE1));
    assertEquals(l.getHead(), n);
    assertEquals(l.getTail(), m);
  }
View Full Code Here

  @Test
  public final void testAddInputLinkINeuron() {
    Neuron n = new InputNeuron();
    Neuron m = new InputNeuron();
    n.addInputLink(m);
    ILink l = n.getInputLink(0);
    assertEquals(l.getHead(), n);
    assertEquals(l.getTail(), m);
  }
View Full Code Here

  @Test
  public final void testGetInputLink() {
    Neuron n = new InputNeuron();
    Neuron m = new InputNeuron();
    n.addInputLink(m);
    ILink l = n.getInputLink(0);
    assertEquals(l.getHead(), n);
    assertEquals(l.getTail(), m);
  }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.shared.links.ILink

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.