Class SecondaryMacroBlock
java.lang.Object
solvers.linearSystem.btf.ComponentBlock
solvers.linearSystem.btf.macroBlocks.SecondaryMacroBlock
- Direct Known Subclasses:
XSecondaryMacroBlock, YSecondaryMacroBlock
This class is an abstract super class the implements the common featrues of the SecondaryMacroBlocks
that are found in the X and Y blocks of the A matrix.
methods for their initialisation and sub copying are implemented.
The matrix is represented by a SparseBlockMatrix.
- Author:
- Jack Bradshaw
-
Field Summary
FieldsFields inherited from class ComponentBlock
basis, cols_printed, current_class, position, qnm, size -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSecondaryMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, MacroBlock block_1, MacroBlock block_2) protectedSecondaryMacroBlock(SecondaryMacroBlock full_block, int current_class) Constructor for lower classes -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract PositioncomputeDimensions(MacroBlock block_1, MacroBlock block_2) protected abstract PositioncomputeDivisions(MacroBlock block_1, MacroBlock block_2) voidmultiply(BigRational[] result) Carries out the appropriate matrix multiplication operation for the blockvoidprintRow2(int row) Prints a line of the block if the contains therow.voidsolve(BigRational[] rhs) Makes the block carry out its role in the solution of the linear systemsubBlock(int current_class, MacroBlock macro_block_1, MacroBlock macro_block_2) protected abstract SecondaryMacroBlocksubBlockCopy(int current_class) Methods inherited from class ComponentBlock
addCE, addPC, getStartingCol, getStartingRow, newLine, size
-
Field Details
-
matrix
-
-
Constructor Details
-
SecondaryMacroBlock
protected SecondaryMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, MacroBlock block_1, MacroBlock block_2) throws BTFMatrixErrorException - Throws:
BTFMatrixErrorException
-
SecondaryMacroBlock
Constructor for lower classes- Parameters:
full_block-current_class-
-
-
Method Details
-
computeDivisions
-
computeDimensions
-
multiply
Description copied from class:ComponentBlockCarries out the appropriate matrix multiplication operation for the block- Specified by:
multiplyin classComponentBlock- Parameters:
result- Result vector- Throws:
BTFMatrixErrorException
-
printRow2
public void printRow2(int row) Description copied from class:ComponentBlockPrints a line of the block if the contains therow. The number of columns printed for the current row is incremented accordingly.- Specified by:
printRow2in classComponentBlock- Parameters:
row- The absolute row of the overall matrix to be printed.
-
solve
Description copied from class:ComponentBlockMakes the block carry out its role in the solution of the linear system- Specified by:
solvein classComponentBlock- Parameters:
rhs- The intermediate basis used during the computation of the solution- Throws:
BTFMatrixErrorException
-
subBlock
public SecondaryMacroBlock subBlock(int current_class, MacroBlock macro_block_1, MacroBlock macro_block_2) -
subBlockCopy
-