maspack.matrix
Class SparseNumberedBlockMatrix

java.lang.Object
  extended by maspack.matrix.MatrixBase
      extended by maspack.matrix.SparseMatrixBase
          extended by maspack.matrix.SparseBlockMatrix
              extended by maspack.matrix.SparseNumberedBlockMatrix
All Implemented Interfaces:
java.lang.Cloneable, LinearTransformNd, Matrix, SparseMatrix, Clonable

public class SparseNumberedBlockMatrix
extends SparseBlockMatrix

A version of SparseBlockMatrix that allows blocks to be accessed by number


Nested Class Summary
 
Nested classes/interfaces inherited from class maspack.matrix.SparseBlockMatrix
SparseBlockMatrix.PrintFormat
 
Nested classes/interfaces inherited from interface maspack.matrix.Matrix
Matrix.Partition, Matrix.WriteFormat
 
Field Summary
 
Fields inherited from class maspack.matrix.SparseBlockMatrix
warningLevel
 
Fields inherited from interface maspack.matrix.Matrix
INDEFINITE, POSITIVE_DEFINITE, SPD, SYMMETRIC
 
Constructor Summary
SparseNumberedBlockMatrix()
           
SparseNumberedBlockMatrix(int[] rowColSizes)
           
SparseNumberedBlockMatrix(int[] rowColSizes, int initialCapacity)
           
SparseNumberedBlockMatrix(int[] rowSizes, int[] colSizes)
           
SparseNumberedBlockMatrix(int[] rowSizes, int[] colSizes, int initialCapacity)
           
 
Method Summary
 int addBlock(int bi, int bj, MatrixBlock blk)
           
 void checkConsistency()
          Check that the internal structures of this matrix are consistent.
 SparseNumberedBlockMatrix clone()
          Creates a clone of this NumberedSparseBlockMatrix, along with clones of all the associated MatrixBlocks.
 MatrixBlock getBlockByNumber(int num)
           
 void removeAllBlocks()
           
 boolean removeBlock(MatrixBlock oldBlk)
           
 
Methods inherited from class maspack.matrix.SparseBlockMatrix
addCol, addCols, addNumNonZerosByCol, addNumNonZerosByRow, addNumNonZerosByRow, addRow, addRows, buildKKTSystem, colSize, colSize, createSubMatrix, createSubMatrix, elementIsNonZero, firstBlockInCol, firstBlockInRow, get, getBlock, getBlockCCSIndices, getBlockCCSIndices, getBlockCCSValues, getBlockCCSValues, getBlockCol, getBlockColOffset, getBlockColSize, getBlockCRSIndices, getBlockCRSIndices, getBlockCRSValues, getBlockCRSValues, getBlockPattern, getBlockRow, getBlockRowOffset, getBlockRowSize, getCCSIndices, getCCSValues, getColumn, getColumn, getComp, getCRSIndices, getCRSValues, getElementBlock, getRange, getRow, getRow, getSubMatrix, getSubMatrixColSize, getSubMatrixColumn, getSubMatrixRow, getSubMatrixRowSize, isVerticallyLinked, mulSubMatrixVec, numBlockCols, numBlockRows, numBlocks, numNonZeroVals, numNonZeroVals, numNonZeroVals, perturb, printBlocks, removeBlock, rowSize, rowSize, scale, scanBlocks, set, set, set, set, setColCapacity, setRandomValues, setRandomValues, setRandomValues, setRowCapacity, setSubMatrix, setVerticallyLinked, setZero, structureEquals, toString, valueIsNonZero, writeBlocks, writeBlocks, zeroColumn, zeroRow
 
Methods inherited from class maspack.matrix.SparseMatrixBase
setCCSValues, setCRSValues, setRandom, setRandom
 
Methods inherited from class maspack.matrix.MatrixBase
containsNaN, determinant, epsilonEquals, equals, frobeniusNorm, get, get, getCCSIndices, getCCSValues, getColumn, getColumn, getCRSIndices, getCRSValues, getDefaultFormat, getRow, getSize, getSubMatrix, hasNaN, idString, infinityNorm, isFixedSize, isSymmetric, mul, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, oneNorm, scan, setCRSValues, setDefaultFormat, setSize, toString, toString, toString, trace, write, write, write, write, write, writeToFile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface maspack.matrix.Matrix
determinant, epsilonEquals, equals, frobeniusNorm, get, getCCSIndices, getCCSValues, getColumn, getColumn, getCRSIndices, getCRSValues, getRow, getSize, getSubMatrix, infinityNorm, isFixedSize, isSymmetric, mul, mul, mul, mulAdd, mulAdd, mulAdd, mulTranspose, mulTranspose, mulTranspose, mulTransposeAdd, mulTransposeAdd, mulTransposeAdd, oneNorm, scan, setSize, toString, trace, write, write, write
 

Constructor Detail

SparseNumberedBlockMatrix

public SparseNumberedBlockMatrix()

SparseNumberedBlockMatrix

public SparseNumberedBlockMatrix(int[] rowColSizes)

SparseNumberedBlockMatrix

public SparseNumberedBlockMatrix(int[] rowSizes,
                                 int[] colSizes)

SparseNumberedBlockMatrix

public SparseNumberedBlockMatrix(int[] rowColSizes,
                                 int initialCapacity)

SparseNumberedBlockMatrix

public SparseNumberedBlockMatrix(int[] rowSizes,
                                 int[] colSizes,
                                 int initialCapacity)
Method Detail

addBlock

public int addBlock(int bi,
                    int bj,
                    MatrixBlock blk)
Overrides:
addBlock in class SparseBlockMatrix

removeBlock

public boolean removeBlock(MatrixBlock oldBlk)
Overrides:
removeBlock in class SparseBlockMatrix

removeAllBlocks

public void removeAllBlocks()
Overrides:
removeAllBlocks in class SparseBlockMatrix

getBlockByNumber

public MatrixBlock getBlockByNumber(int num)

checkConsistency

public void checkConsistency()
Description copied from class: SparseBlockMatrix
Check that the internal structures of this matrix are consistent. Used for testing.

Specified by:
checkConsistency in interface Matrix
Overrides:
checkConsistency in class SparseBlockMatrix

clone

public SparseNumberedBlockMatrix clone()
Creates a clone of this NumberedSparseBlockMatrix, along with clones of all the associated MatrixBlocks.

Specified by:
clone in interface Clonable
Overrides:
clone in class SparseBlockMatrix