Package jline.util

Class PopulationLattice

java.lang.Object
jline.util.PopulationLattice

public class PopulationLattice extends Object
Data structure modeling a lattice used to describe a combination of job populations.
  • Constructor Details

    • PopulationLattice

      public PopulationLattice()
  • Method Details

    • hashpop

      public static int hashpop(Matrix n, Matrix N)
      Computes a hash index for a population vector within a lattice. Maps a population vector to a unique index in the lattice space.
      Parameters:
      n - the current population vector
      N - the maximum population vector (lattice bounds)
      Returns:
      unique hash index for the population state
    • hashpop

      public static int hashpop(Matrix n, Matrix N, int R, Matrix prods)
      Computes a hash index for a population vector using precomputed products. Optimized version that uses precomputed product values for efficiency.
      Parameters:
      n - the current population vector
      N - the maximum population vector (unused in this overload)
      R - the number of job classes
      prods - precomputed product values for hash computation
      Returns:
      unique hash index for the population state
    • pprod

      public static Matrix pprod(Matrix n)
      Initializes a population product iterator. Returns a zero matrix to start iterating through population states.
      Parameters:
      n - the maximum population vector
      Returns:
      initial state (zero matrix) for population iteration
    • pprod

      public static Matrix pprod(Matrix n, Matrix N)
      Advances to the next population state in lexicographic order. Generates the next non-negative vector less than or equal to N.
      Parameters:
      n - the current population state
      N - the maximum population bounds
      Returns:
      next population state, or null if enumeration is complete
    • pprodcon

      public static Matrix pprodcon(Matrix n, Matrix lb, Matrix ub)
    • sprod

      public static PopulationLattice.sprodResult sprod(int M, Matrix N)
    • sprod

      public static PopulationLattice.sprodResult sprod(Matrix s, Matrix S, MatrixCell D)