Class YMicroBlock


public class YMicroBlock extends MatrixMicroBlock
This class implements the Micro Blocks of the X block of the A matrix. It extends MatrixMicroBlock and implements the methods to insert the correct coefficients into the block for given equations.
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.
    • 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
    • addCE

      public int addCE(int row, 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:
      row - 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 row, 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:
      row - 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
    • solve

      public void solve(BigRational[] rhs) throws BTFMatrixErrorException
      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
      Throws:
      BTFMatrixErrorException