Class PopulationLattice
-
- All Implemented Interfaces:
public class PopulationLatticeData structure modeling a lattice used to describe a combination of job populations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPopulationLattice.sprodResult
-
Constructor Summary
Constructors Constructor Description PopulationLattice()
-
Method Summary
Modifier and Type Method Description static inthashpop(Matrix n, Matrix N)Computes a hash index for a population vector within a lattice. static inthashpop(Matrix n, Matrix N, int R, Matrix prods)Computes a hash index for a population vector using precomputed products. static Matrixpprod(Matrix n)Initializes a population product iterator. static Matrixpprod(Matrix n, Matrix N)Advances to the next population state in lexicographic order. static Matrixpprodcon(Matrix n, Matrix lb, Matrix ub)static PopulationLattice.sprodResultsprod(int M, Matrix N)static PopulationLattice.sprodResultsprod(Matrix s, Matrix S, MatrixCell D)-
-
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 vectorN- 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 vectorN- the maximum population vector (unused in this overload)R- the number of job classesprods- 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 stateN- the maximum population bounds- Returns:
next population state, or null if enumeration is complete
-
sprod
static PopulationLattice.sprodResult sprod(int M, Matrix N)
-
sprod
static PopulationLattice.sprodResult sprod(Matrix s, Matrix S, MatrixCell D)
-
-
-
-