Class LinearGrowth

All Implemented Interfaces:
java.lang.Iterable<Block>, java.util.Iterator<Block>

public class LinearGrowth
extends Pattern
Represents a linear growth
  • Constructor Details

    • LinearGrowth

      public LinearGrowth​(Rule rule, Grid pattern, int popPeriod)
      Constructs a linear growth
      Parameters:
      rule - The rule that the pattern works in
      pattern - The linear growth
      popPeriod - The population period of the linear growth
  • Method Details

    • toString

      public java.lang.String toString()
      Specified by:
      toString in class Pattern
    • additionalInfo

      public java.util.Map<java.lang.String,​java.lang.String> additionalInfo()
      Specified by:
      additionalInfo in class Pattern
    • setPhases

      public void setPhases​(Grid[] grids)
      Overrides:
      setPhases in class Pattern
    • deepPeriod

      public static int deepPeriod​(int[] sequence, int maxPeriod, int degree)
      Gets the period of an interleaving of degree-d polynomials. Totally not stolen from apgsearch 1.x.
      Parameters:
      sequence - The sequence of values of the polynomial
      maxPeriod - The max period of the polynomial
      degree - The degree of the polynomial
      Returns:
      Returns the period of the polynomial (-1 for no period)