Package jline.util

Class PopulationLattice

  • All Implemented Interfaces:

    
    public class PopulationLattice
    
                        

    Data structure modeling a lattice used to describe a combination of job populations.

    • Constructor Detail

      • PopulationLattice

        PopulationLattice()
    • Method Detail

      • hashpop

         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

         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

         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

         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