Class CMicroBlock


public class CMicroBlock extends MicroBlock
This class implements the Micro Blocks of the Carry Forward Equations componet of the Linear System.
Author:
Jack Bradshaw
  • Constructor Details

  • Method Details

    • subBlockCopy

      protected MicroBlock subBlockCopy(int current_class)
      Description copied from class: MicroBlock
      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 XMicroBlocks needs to be a XMicroBlock
      Specified by:
      subBlockCopy in class MicroBlock
      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.
    • initialiseDataStructures

      protected void initialiseDataStructures() throws InternalErrorException
      Description copied from class: MicroBlock
      Initialise any underlying data structures
      Specified by:
      initialiseDataStructures in class MicroBlock
      Throws:
      InternalErrorException
    • computeDimensions

      protected void computeDimensions()
      Description copied from class: MicroBlock
      Computes the dimensions of block and stores them in the member field size
      Specified by:
      computeDimensions in class MicroBlock
    • printRow2

      public void printRow2(int row)
      Description copied from class: ComponentBlock
      Prints a line of the block if the contains the row. The number of columns printed for the current row is incremented accordingly.
      Specified by:
      printRow2 in class ComponentBlock
      Parameters:
      row - The absolute row of the overall matrix to be printed.
    • addCE

      public int addCE(int position, PopulationChangeVector n, int queue) throws BTFMatrixErrorException, InternalErrorException
      Description copied from class: ComponentBlock
      Adds the appropriate coefficients of a Convolution Expression to the block
      Specified by:
      addCE in class ComponentBlock
      Parameters:
      position - Carries information on where to insert the equation depending on the context (can be interpreted differently by subclasses)
      n - The Population Change Vector n to which the equation relates
      queue - The queue k to which the equation relates; 1 <= k <= M
      Returns:
      The row at which the equation was inserted
      Throws:
      BTFMatrixErrorException
      InternalErrorException
    • addPC

      public int addPC(int position, PopulationChangeVector n, int _class) throws BTFMatrixErrorException, InternalErrorException
      Description copied from class: ComponentBlock
      Adds the appropriate coefficients of a Population Constraint to the block
      Specified by:
      addPC in class ComponentBlock
      Parameters:
      position - Carries information on where to insert the equation depending on the context (can be interpreted differently by subclasses)
      n - The Population Change Vector n to which the equation relates
      _class - The class r to which the equation relates; 1 <= r <= R
      Returns:
      The row at which the equation was inserted
      Throws:
      BTFMatrixErrorException
      InternalErrorException
    • multiply

      public void multiply(BigRational[] result) throws BTFMatrixErrorException
      Description copied from class: ComponentBlock
      Carries out the appropriate matrix multiplication operation for the block
      Specified by:
      multiply in class ComponentBlock
      Parameters:
      result - Result vector
      Throws:
      BTFMatrixErrorException
    • solve

      public void solve(BigRational[] rhs)
      Description copied from class: ComponentBlock
      Makes the block carry out its role in the solution of the linear system
      Specified by:
      solve in class ComponentBlock
      Parameters:
      rhs - The intermediate basis used during the computation of the solution