Class XMacroBlock
java.lang.Object
solvers.linearSystem.btf.ComponentBlock
solvers.linearSystem.btf.macroBlocks.MacroBlock
solvers.linearSystem.btf.macroBlocks.XMacroBlock
This class implements the Macro Blocks of the X Block of the A matrix.
The Factory Methods newMicroBlock and subBlockCopy are implemented to return the correct
block type in the parallel hierarchy.
Type 1 Micro Blocks are selected for lower class linear systems
- Author:
- Jack Bradshaw
-
Field Summary
Fields inherited from class MacroBlock
h, micro_blocks, selection_policyFields inherited from class ComponentBlock
basis, cols_printed, current_class, position, qnm, size -
Constructor Summary
ConstructorsConstructorDescriptionXMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, int h) XMacroBlock(MacroBlock full_block, int current_class) -
Method Summary
Modifier and TypeMethodDescriptionvoidLUPDecompose(boolean in_place) protected MicroBlocknewMicroBlock(Position block_position, int h) Factory Method for Micro Blocks To be overridden by subclasses in order to create the appropriate subclass of MacroBlock in the parallel hierarchy.protected MacroBlocksubBlockCopy(int current_class) Factory Method for sub-block creation This method is to be overridden by subclasses to instantiate a copy of the current block (of the correct type) For instance, a copy of an XMacroBlocks needs to be a XMacroBlockMethods inherited from class MacroBlock
addCE, addPC, initialise, multiply, numberOfMicroBlocks, printRow2, solve, subBlockMethods inherited from class ComponentBlock
getStartingCol, getStartingRow, newLine, size
-
Constructor Details
-
XMacroBlock
public XMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, int h) throws InternalErrorException, InconsistentLinearSystemException -
XMacroBlock
-
-
Method Details
-
subBlockCopy
Description copied from class:MacroBlockFactory Method for sub-block creation This method is to be overridden by subclasses to instantiate a copy of the current block (of the correct type) For instance, a copy of an XMacroBlocks needs to be a XMacroBlock- Specified by:
subBlockCopyin classMacroBlock- Parameters:
current_class- The class for which the copy is created- Returns:
- A shallow copy of calling block, for the current_class. Without micro blocks.
-
LUPDecompose
-
newMicroBlock
protected MicroBlock newMicroBlock(Position block_position, int h) throws InconsistentLinearSystemException, InternalErrorException Description copied from class:MacroBlockFactory Method for Micro Blocks To be overridden by subclasses in order to create the appropriate subclass of MacroBlock in the parallel hierarchy. i.e. XMacroBlocks are composed of XMicroBlocks- Specified by:
newMicroBlockin classMacroBlock- Parameters:
block_position- Starting position for the new macro blockh- Number of non-zeros associated with the macro block- Throws:
InconsistentLinearSystemExceptionInternalErrorException
-