Class XSecondaryMacroBlock
java.lang.Object
solvers.linearSystem.btf.ComponentBlock
solvers.linearSystem.btf.macroBlocks.SecondaryMacroBlock
solvers.linearSystem.btf.macroBlocks.XSecondaryMacroBlock
This class extends SecondaryMacroBlock to specify behavior specific to the Secondary Macro Blocks of the X Block.
This includes inserting the correct coefficients for given equations and computing its size and position.
- Author:
- Jack Bradshaw
-
Field Summary
Fields inherited from class SecondaryMacroBlock
matrixFields inherited from class ComponentBlock
basis, cols_printed, current_class, position, qnm, size -
Constructor Summary
ConstructorsConstructorDescriptionXSecondaryMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, MacroBlock block_1, MacroBlock block_2) XSecondaryMacroBlock(XSecondaryMacroBlock full_block, int current_class) -
Method Summary
Modifier and TypeMethodDescriptionintaddCE(int row, PopulationChangeVector n, int queue) Inserts CE at the given row (of the overall matrix)intaddPC(int row, PopulationChangeVector n, int _class) Adds the appropriate coefficients of a Population Constraint to the blockprotected PositioncomputeDimensions(MacroBlock block_1, MacroBlock block_2) protected PositioncomputeDivisions(MacroBlock block_1, MacroBlock block_2) protected SecondaryMacroBlocksubBlockCopy(int current_class) Methods inherited from class SecondaryMacroBlock
multiply, printRow2, solve, subBlockMethods inherited from class ComponentBlock
getStartingCol, getStartingRow, newLine, size
-
Constructor Details
-
XSecondaryMacroBlock
public XSecondaryMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, MacroBlock block_1, MacroBlock block_2) throws BTFMatrixErrorException - Throws:
BTFMatrixErrorException
-
XSecondaryMacroBlock
-
-
Method Details
-
subBlockCopy
- Specified by:
subBlockCopyin classSecondaryMacroBlock
-
addCE
Inserts CE at the given row (of the overall matrix)- Specified by:
addCEin classComponentBlock- Parameters:
row-n- the n valuequeue-row-- Returns:
- Throws:
InternalErrorException
-
addPC
public int addPC(int row, PopulationChangeVector n, int _class) throws BTFMatrixErrorException, InternalErrorException Description copied from class:ComponentBlockAdds the appropriate coefficients of a Population Constraint to the block- Specified by:
addPCin classComponentBlock- Parameters:
row- Carries information on where to insert the equation depending on the context (can be interpreted differently by subclasses)n- The Population Change Vector n to which the equation relates_class- The class r to which the equation relates; 1 <= r <= R- Returns:
- The row at which the equation was inserted
- Throws:
BTFMatrixErrorExceptionInternalErrorException
-
computeDivisions
- Specified by:
computeDivisionsin classSecondaryMacroBlock
-
computeDimensions
- Specified by:
computeDimensionsin classSecondaryMacroBlock
-