Package jline.util
Class PopulationLattice
java.lang.Object
jline.util.PopulationLattice
Data structure modeling a lattice used to describe a combination of job populations.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intComputes a hash index for a population vector within a lattice.static intComputes a hash index for a population vector using precomputed products.static MatrixInitializes a population product iterator.static MatrixAdvances to the next population state in lexicographic order.static Matrixsprod(Matrix s, Matrix S, MatrixCell D)
-
Constructor Details
-
PopulationLattice
public PopulationLattice()
-
-
Method Details
-
hashpop
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
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
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
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
-
pprodcon
-
sprod
-
sprod
-