Class MatrixMicroBlock
java.lang.Object
solvers.linearSystem.btf.ComponentBlock
solvers.linearSystem.btf.microBlocks.MicroBlock
solvers.linearSystem.btf.microBlocks.MatrixMicroBlock
- Direct Known Subclasses:
XMicroBlock, YMicroBlock
This class extends to MicroBlock class to provided extra functionality common to
the XMicroBlocks and YMicroBlocks that are both based on matrix data structrues.
An array is used as the under;lying data structure and the print and multiply methods are implemented at this level,
- Author:
- Jack Bradshaw
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BigRational[][]The underlying arrayprotected intThe row at which to insert next equationFields inherited from class ComponentBlock
basis, cols_printed, current_class, position, qnm, size -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMatrixMicroBlock(QNModel qnm, CoMoMBasis basis, Position position, int h) MatrixMicroBlock(MatrixMicroBlock micro_block, int current_class) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidInitialise any underlying data structuresvoidmultiply(BigRational[] result) Carries out the appropriate matrix multiplication operation for the blockprotected BigRationalmultiplyRow(int index) voidprintRow2(int row) Prints a line of the block if the contains therow.Methods inherited from class MicroBlock
computeDimensions, initialise, subBlock, subBlockCopyMethods inherited from class ComponentBlock
addCE, addPC, getStartingCol, getStartingRow, newLine, size, solve
-
Field Details
-
row
protected int rowThe row at which to insert next equation -
array
The underlying array
-
-
Constructor Details
-
MatrixMicroBlock
-
MatrixMicroBlock
-
-
Method Details
-
initialiseDataStructures
protected void initialiseDataStructures()Description copied from class:MicroBlockInitialise any underlying data structures- Specified by:
initialiseDataStructuresin classMicroBlock
-
multiplyRow
- Throws:
UndefinedMultiplyException
-
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.
-