Class CMacroBlock
java.lang.Object
solvers.linearSystem.btf.ComponentBlock
solvers.linearSystem.btf.macroBlocks.MacroBlock
solvers.linearSystem.btf.macroBlocks.CMacroBlock
This class implements the Macro Blocks of the Carry Forward Equations
The Factory Methods newMicroBlock and subBlockCopy are implemented to return the correct
block type in the parallel hierarchy.
Type 2a 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
ConstructorsConstructorDescriptionCMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, int h) CMacroBlock(MacroBlock full_block, int current_class) -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
CMacroBlock
public CMacroBlock(QNModel qnm, CoMoMBasis basis, Position position, int h) throws InternalErrorException, InconsistentLinearSystemException -
CMacroBlock
-
-
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.
-
newMicroBlock
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:
InternalErrorException
-