Class CBlock
java.lang.Object
solvers.linearSystem.btf.ComponentBlock
solvers.linearSystem.btf.topLevelBlocks.TopLevelBlock
solvers.linearSystem.btf.topLevelBlocks.CBlock
This class implements the Carry Forward Equations of the linear system
The Factory Methods newMacroBlock and subBlockCopy are implemented to return the correct
block type in the parallel hierarchy.
Type 2a Macro Blocks are selected for lower class linear systems
- Author:
- Jack Bradshaw
-
Field Summary
Fields inherited from class TopLevelBlock
macro_blocks, selection_policyFields inherited from class ComponentBlock
basis, cols_printed, current_class, position, qnm, size -
Constructor Summary
ConstructorsConstructorDescriptionCBlock(QNModel qnm, CoMoMBasis basis) CBlock(QNModel qnm, CoMoMBasis basis, Position position) -
Method Summary
Modifier and TypeMethodDescriptionprotected MacroBlocknewMacroBlock(Position block_position, int h) Factory Method for Macro Blocks To be overridden by subclasses in order to create the appropriate subclass of MacroBlock in the parallel hierarchy.protected TopLevelBlocksubBlockCopy(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 correct typeMethods inherited from class TopLevelBlock
addCE, addPC, findMacroBlock, initialise, multiply, printRow2, solve, subBlockMethods inherited from class ComponentBlock
getStartingCol, getStartingRow, newLine, size
-
Constructor Details
-
CBlock
public CBlock(QNModel qnm, CoMoMBasis basis) throws BTFMatrixErrorException, InternalErrorException, InconsistentLinearSystemException -
CBlock
public CBlock(QNModel qnm, CoMoMBasis basis, Position position) throws BTFMatrixErrorException, InternalErrorException, InconsistentLinearSystemException -
CBlock
- Throws:
BTFMatrixErrorException
-
-
Method Details
-
subBlockCopy
protected TopLevelBlock subBlockCopy(int current_class) throws BTFMatrixErrorException, InternalErrorException, InconsistentLinearSystemException Description copied from class:TopLevelBlockFactory Method for sub-block creation This method is to be overridden by subclasses to instantiate a copy of the current block of correct type- Specified by:
subBlockCopyin classTopLevelBlock- Parameters:
current_class- The class for which the copy is created- Returns:
- A shallow copy of calling block, for the current_class. Without macro blocks.
- Throws:
BTFMatrixErrorExceptionInternalErrorExceptionInconsistentLinearSystemException
-
newMacroBlock
protected MacroBlock newMacroBlock(Position block_position, int h) throws InternalErrorException, InconsistentLinearSystemException Description copied from class:TopLevelBlockFactory Method for Macro Blocks To be overridden by subclasses in order to create the appropriate subclass of MacroBlock in the parallel hierarchy. i.e. XBlocks are composed of XMacroBlocks- Specified by:
newMacroBlockin classTopLevelBlock- Parameters:
block_position- Starting position for the new macro blockh- Number of non-zeros associated with the macro block- Throws:
InternalErrorExceptionInconsistentLinearSystemException
-