Examples of toFloatValue()


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

    if (node.getTemplate() == StandardExtensions.EXTENSION_CONST_SUPPORT) {
      if (rnd.nextDouble() < this.frequency) {
        final ExpressionValue v = node.getData()[0];
        if (v.isFloat()) {
          final double adj = rnd.nextGaussian() * this.sigma;
          node.getData()[0] = new ExpressionValue(v.toFloatValue()
              + adj);
        }
      }
    }

View Full Code Here

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

      final ProgramNode child2 = parent.getChildNode(1);

      if (child2.getName().equals("#const")) {
        final ExpressionValue v = child2.getData()[0];
        if (v.isFloat()) {
          final double v2 = v.toFloatValue();
          if (v2 < 0) {
            child2.getData()[0] = new ExpressionValue(-v2);
            parent = parent
                .getOwner()
                .getContext()
View Full Code Here

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

                new ProgramNode[] { child1,
                    child2.getChildNode(0) });
      } else if (child2.getName().equals("#const")) {
        final ExpressionValue v = child2.getData()[0];
        if (v.isFloat()) {
          final double v2 = v.toFloatValue();
          if (v2 < 0) {
            child2.getData()[0] = new ExpressionValue(-v2);
            parent = parent
                .getOwner()
                .getContext()
View Full Code Here

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

      return null;
    }

    if (parentNode.allConstDescendants()) {
      ExpressionValue v = parentNode.evaluate();
      double ck = v.toFloatValue();
     
      // do not rewrite if it produces a div by 0 or other bad result.
      if( Double.isNaN(ck) || Double.isInfinite(ck) ) {
        return result;
      }
View Full Code Here

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

    boolean success = false;

    switch (resultMapping.getVariableType()) {
    case floatingType:
      if (v.isNumeric()) {
        result.setData(0, v.toFloatValue());
        success = true;
      }
      break;
    case stringType:
      result.setData(0, v.toFloatValue());
View Full Code Here

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

        result.setData(0, v.toFloatValue());
        success = true;
      }
      break;
    case stringType:
      result.setData(0, v.toFloatValue());
      success = true;
      break;
    case booleanType:
      if (v.isBoolean()) {
        result.setData(0, v.toBooleanValue() ? 1.0 : 0.0);
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.