gov.sandia.cognition.math.matrix.mtj
Class SparseMatrixFactoryMTJ

java.lang.Object
  extended by gov.sandia.cognition.math.matrix.MatrixFactory<SparseMatrix>
      extended by gov.sandia.cognition.math.matrix.mtj.SparseMatrixFactoryMTJ
All Implemented Interfaces:
Serializable

public class SparseMatrixFactoryMTJ
extends MatrixFactory<SparseMatrix>

Factory for MTJ's flexible sparse row matrix

Since:
1.0
Author:
Kevin R. Dixon
See Also:
Serialized Form

Field Summary
static SparseMatrixFactoryMTJ INSTANCE
          Default instance of this
 
Fields inherited from class gov.sandia.cognition.math.matrix.MatrixFactory
DEFAULT_DENSE_INSTANCE, DEFAULT_DIAGONAL_INSTANCE, DEFAULT_SPARSE_INSTANCE
 
Constructor Summary
SparseMatrixFactoryMTJ()
          Creates a new instance of SparseMatrixFactoryMTJ
 
Method Summary
 SparseMatrix copyMatrix(Matrix m)
          Creates a deep copy new Matrix given another, argument is unchanged
 SparseMatrix createMatrix(int numRows, int numColumns)
          Creates an empty Matrix of the specified dimensions, all elements must be all zeros!
 SparseColumnMatrix createWrapper(no.uib.cipr.matrix.sparse.FlexCompColMatrix internalMatrix)
          Creates a new wrapper for a sparse column MTJ matrix.
 SparseRowMatrix createWrapper(no.uib.cipr.matrix.sparse.FlexCompRowMatrix internalMatrix)
          Creates a new wrapper for a sparse row MTJ matrix.
 
Methods inherited from class gov.sandia.cognition.math.matrix.MatrixFactory
copyArray, copyColumnVectors, copyColumnVectors, copyRowVectors, copyRowVectors, createDiagonal, createIdentity, createMatrix, createUniformRandom, getDefault, getDenseDefault, getDiagonalDefault, getSparseDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final SparseMatrixFactoryMTJ INSTANCE
Default instance of this

Constructor Detail

SparseMatrixFactoryMTJ

public SparseMatrixFactoryMTJ()
Creates a new instance of SparseMatrixFactoryMTJ

Method Detail

copyMatrix

public SparseMatrix copyMatrix(Matrix m)
Description copied from class: MatrixFactory
Creates a deep copy new Matrix given another, argument is unchanged

Specified by:
copyMatrix in class MatrixFactory<SparseMatrix>
Parameters:
m - Matrix to copy
Returns:
Deep copy of the given Matrix

createMatrix

public SparseMatrix createMatrix(int numRows,
                                 int numColumns)
Description copied from class: MatrixFactory
Creates an empty Matrix of the specified dimensions, all elements must be all zeros!

Specified by:
createMatrix in class MatrixFactory<SparseMatrix>
Parameters:
numRows - number of rows in the Matrix
numColumns - number of columns in the Matrix
Returns:
All-zero empty Matrix of the specified dimensions

createWrapper

public SparseColumnMatrix createWrapper(no.uib.cipr.matrix.sparse.FlexCompColMatrix internalMatrix)
Creates a new wrapper for a sparse column MTJ matrix.

Parameters:
internalMatrix - The MTJ matrix to wrap.
Returns:
A wrapper of the given MTJ matrix.

createWrapper

public SparseRowMatrix createWrapper(no.uib.cipr.matrix.sparse.FlexCompRowMatrix internalMatrix)
Creates a new wrapper for a sparse row MTJ matrix.

Parameters:
internalMatrix - The MTJ matrix to wrap.
Returns:
A wrapper of the given MTJ matrix.