Package com.neuralnetwork.shared.values

Examples of com.neuralnetwork.shared.values.OneValue


   */
  @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
    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
    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
    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 {
      l.setHead(null);
View Full Code Here

   */
  @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 {
      l.setTail(null);
View Full Code Here

   */
  @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 testSetValue() {
    Neuron n = new InputNeuron()
    Neuron n1 = new InputNeuron();
    n.setValue(new OneValue());
    n1.setValue(new OneValue());
    assertEquals(n.getValue(), new OneValue());
    assertEquals(n1.getValue(), new OneValue());
  }
View Full Code Here

     */
    @Test
    public final void testAddValue() {
        IInputLayer l = new InputLayer(1);
        l.build();
        l.addValue(new OneValue(), 0);
        assertEquals(l.getNeuron(0).getValue(), new OneValue());
    }
View Full Code Here

TOP

Related Classes of com.neuralnetwork.shared.values.OneValue

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.