Class B2Block
java.lang.Object
solvers.linearSystem.btf.ComponentBlock
solvers.linearSystem.btf.topLevelBlocks.TopLevelBlock
solvers.linearSystem.btf.topLevelBlocks.B2Block
This class implements the B2 Block of the B matrix.
The Factory Methods newMacroBlock and subBlockCopy are implemented to return the correct
block type in the parallel hierarchy.
Type 1 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
ConstructorsConstructorDescriptionB2Block(QNModel qnm, CoMoMBasis basis) B2Block(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 typevoidupdate(int current_class_population) Methods inherited from class TopLevelBlock
addCE, addPC, findMacroBlock, initialise, multiply, printRow2, solve, subBlockMethods inherited from class ComponentBlock
getStartingCol, getStartingRow, newLine, size
-
Constructor Details
-
B2Block
public B2Block(QNModel qnm, CoMoMBasis basis) throws BTFMatrixErrorException, InternalErrorException, InconsistentLinearSystemException -
B2Block
public B2Block(QNModel qnm, CoMoMBasis basis, Position position) throws BTFMatrixErrorException, InternalErrorException, InconsistentLinearSystemException -
B2Block
-
-
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
-
update
public void update(int current_class_population)
-