Package vash.operation

Examples of vash.operation.OpParams


    ops = new HashMap<Operation, OpParams>();
    if(algo.equals("1") || algo.equals("1-fast")) {
      minDepth = 2;
      maxDepth = 8;
      // color
      ops.put(Operation.RGB,         new OpParams(1.0));
      // arith
      ops.put(Operation.ABSOLUTE,     new OpParams(0.5));
      ops.put(Operation.ADD,         new OpParams(0.5));
      ops.put(Operation.DIVIDE,       new OpParams(0.5));
      ops.put(Operation.EXPONENTIATE,    new OpParams(0.5));
      ops.put(Operation.INVERT,      new OpParams(0.5));
      ops.put(Operation.MODULUS,      new OpParams(0.5));
      ops.put(Operation.MULTIPLY,      new OpParams(0.5));
      // trig
      ops.put(Operation.SINC,        new OpParams(0.0));
      ops.put(Operation.SINE,        new OpParams(0.0));
      ops.put(Operation.SPIRAL,      new OpParams(0.1));
      ops.put(Operation.SQUIRCLE,      new OpParams(2.0));
      // leaf
      ops.put(Operation.CONST,      new OpParams(0.0));
      ops.put(Operation.FLOWER,      new OpParams(3.5));
      ops.put(Operation.GRADIENT_RADIAL,  new OpParams(1.0));
      ops.put(Operation.ELLIPSE,      new OpParams(0.0));
      ops.put(Operation.GRADIENT_LINEAR,  new OpParams(1.0));
      ops.put(Operation.POLAR_THETA,    new OpParams(2.0));
    } else if(algo.equals("1.1")) {
      minDepth = 2;
      maxDepth = 8;
      // color
      ops.put(Operation.RGB,         new OpParams(1.0, 3.0));
      // arith
      ops.put(Operation.ABSOLUTE,     new OpParams(0.2, 0.9));
      ops.put(Operation.ADD,         new OpParams(0.3, 3.0));
      ops.put(Operation.DIVIDE,       new OpParams(0.3, 3.0));
      ops.put(Operation.EXPONENTIATE,    new OpParams(0.5, 3.0));
      ops.put(Operation.INVERT,      new OpParams(0.1, 3.0));
      ops.put(Operation.MODULUS,      new OpParams(0.5, 3.0));
      ops.put(Operation.MULTIPLY,      new OpParams(0.3, 3.0));
      // trig
      ops.put(Operation.SINC,        new OpParams(0.0, 0.0));
      ops.put(Operation.SINE,        new OpParams(0.0, 0.0));
      ops.put(Operation.SPIRAL,      new OpParams(0.2, 2.0));
      ops.put(Operation.SQUIRCLE,      new OpParams(2.0, 1.8));
      // leaf
      ops.put(Operation.CONST,      new OpParams(0.0, 0.0));
      ops.put(Operation.FLOWER,      new OpParams(3.5, 3.0));
      ops.put(Operation.GRADIENT_RADIAL,  new OpParams(1.0, 3.0));
      ops.put(Operation.ELLIPSE,      new OpParams(2.0, 3.0));
      ops.put(Operation.GRADIENT_LINEAR,  new OpParams(1.0, 3.0));
      ops.put(Operation.POLAR_THETA,    new OpParams(2.0, 3.0));
    } else {
      throw new InvalidAlgorithmException("Unrecognized algorithm string: \"" + algo + "\"");
    }

    this.animationMode = null;
View Full Code Here


   * Get the relative frequency of appearance of the given node type.
   * @param op
   * @return
   */
  public double getOperationRatio(Operation op) {
    OpParams p = this.ops.get(op);
    return p.ratio;
  }
View Full Code Here

   * Get the maximum channel count the given operation can appear in.
   * @param op
   * @return
   */
  public double getOperationChannels(Operation op) {
    OpParams p = this.ops.get(op);
    return p.channels;
  }
View Full Code Here

TOP

Related Classes of vash.operation.OpParams

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.