Package urban.model

Source Code of urban.model.ShapeStatement

package urban.model;

import java.util.List;

import urban.shapes.Shape;
import urban.shapes.ShapeParameters;

/**
* Line of the form "%shape: 'id' A(x!1),B(x!1) := 0.4"
*/
public class ShapeStatement extends AbstractStatement implements ShapeParameterStatement {
  private final Shape s;
  private final Double e;
  private final String id;
 
  /**
   * @param id an id for the shape that can be used in other statements
   * @param expression an agent list that represents a shape
   * @param e an energy value
   */
  public ShapeStatement(String id, List<Agent> expression, Double e) {
    this.id = id;
    this.s = new Shape(expression);
    this.e = e;
  }

  @Override
  public void addParametersTo(ShapeParameters tmp) {
    tmp.shapes.put(id, s);
    tmp.epsilons.put(s, e);
  }
  @Override
  public String toString() {
    return "";
  }
}
TOP

Related Classes of urban.model.ShapeStatement

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.