IGraphedElement.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package interfaces;
  2. public interface IGraphedElement {
  3. public static final boolean STRETCH_BY_DEFAULT=false;
  4. public static final int STANDARD_GRAPH_ACCURACY=100;
  5. /**
  6. * Sets the local period of the element.
  7. * If the simulation has 100 steps and the local period is 50,
  8. * then there will be two full cycles during the simulation.
  9. * @param period The local period for this element.
  10. */
  11. void setLocalPeriod(int period);
  12. /**
  13. * Used to query the local period of an element.
  14. * @return The local period of this element.
  15. * This should return the set local period,
  16. * which may be anything, even if the component is set to be "stretching",
  17. * that is,
  18. * acting as if the local period was the same
  19. * as the number of total iterations for this simulation.
  20. */
  21. int getLocalPeriod();
  22. /**
  23. * @return Whether the given graph points
  24. * should be stretched(or compressed) over the entire simulation.
  25. * as opposed to repeated once the period is over.
  26. */
  27. boolean isStretching();
  28. /**
  29. * Adjusts whether the element should act
  30. * as if local period was the same as the simulation's number of iterations.
  31. * @param stretch
  32. */
  33. void setStretching(boolean stretch);
  34. }