Package org.encog.ml.prg.expvalue

Examples of org.encog.ml.prg.expvalue.ExpressionValue.toIntValue()


                .getFunctions()
                .factorProgramNode("+", parent.getOwner(),
                    new ProgramNode[] { child1, child2 });
          }
        } else if (v.isInt()) {
          final long v2 = v.toIntValue();
          if (v2 < 0) {
            child2.getData()[0] = new ExpressionValue(-v2);
            parent = parent
                .getOwner()
                .getContext()
View Full Code Here


                .getFunctions()
                .factorProgramNode("-", parent.getOwner(),
                    new ProgramNode[] { child1, child2 });
          }
        } else if (v.isInt()) {
          final long v2 = v.toIntValue();
          if (v2 < 0) {
            child2.getData()[0] = new ExpressionValue(-v2);
            parent = parent
                .getOwner()
                .getContext()
View Full Code Here

        success = true;
      }
      break;
    case intType:
      if (v.isNumeric()) {
        result.setData(0, v.toIntValue());
        success = true;
      }
      break;
    case enumType:
      if (v.isEnum()) {
View Full Code Here

        success = true;
      }
      break;
    case enumType:
      if (v.isEnum()) {
        result.setData(0, v.toIntValue());
        success = true;
      }
      break;
    }
View Full Code Here

  }
 
  public void testTypes() {
    ExpressionValue exp = EncogProgram.parseExpression("cint(1.2345678)");
    Assert.assertTrue(exp.isInt());
    Assert.assertEquals( 1, exp.toIntValue());
 
    exp = EncogProgram.parseExpression("cstr(1.2345678)");
    Assert.assertTrue(exp.isString());
    Assert.assertEquals( "1.2345678", exp.toStringValue());
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.