ch.javasoft.jsmat.variable
Class MatDoubleMatrix

java.lang.Object
  extended by ch.javasoft.jsmat.variable.MatVariable
      extended by ch.javasoft.jsmat.variable.MatAllocated
          extended by ch.javasoft.jsmat.variable.MatMatrix<double[]>
              extended by ch.javasoft.jsmat.variable.MatDoubleMatrix

public class MatDoubleMatrix
extends MatMatrix<double[]>


Nested Class Summary
 
Nested classes/interfaces inherited from class ch.javasoft.jsmat.variable.MatMatrix
MatMatrix.MatGenericMatrix<A>
 
Field Summary
 
Fields inherited from class ch.javasoft.jsmat.variable.MatMatrix
mMatType
 
Fields inherited from class ch.javasoft.jsmat.variable.MatVariable
DEFAULT_NAME, mDims, mMatClass
 
Constructor Summary
MatDoubleMatrix(double[][] values)
           
MatDoubleMatrix(double[] values, boolean rowVector)
           
MatDoubleMatrix(double[] values, int[] dims)
           
MatDoubleMatrix(double[] values, int rows, int cols)
           
 
Method Summary
static MatDoubleMatrix createMatrixFromColumns(List<double[]> columns)
           
static MatDoubleMatrix createMatrixFromRows(List<double[]> rows)
           
protected  int getMatrixSize()
          Returns the matrix size, typically the overall array length of the underlying data
 int getRawDataSize()
           
 void writeRawData(DataOutput out)
          Write the raw data to the given output, excluding type, size, name etc.
 
Methods inherited from class ch.javasoft.jsmat.variable.MatMatrix
createDoubleMatrix, createDoubleMatrix, createIntMatrix, createIntMatrix, createUtf8Matrix, createUtf8Matrix
 
Methods inherited from class ch.javasoft.jsmat.variable.MatAllocated
write
 
Methods inherited from class ch.javasoft.jsmat.variable.MatVariable
checkRawDataSizeOverflow, checkValueLength, getDimLength, getFlags, getSize, writeStart
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MatDoubleMatrix

public MatDoubleMatrix(double[] values,
                       boolean rowVector)
Parameters:
values - packed by column
rowVector - true if values is row vector

MatDoubleMatrix

public MatDoubleMatrix(double[] values,
                       int rows,
                       int cols)
Parameters:
values - packed by column
rows - the number of rows
cols - the number of columns

MatDoubleMatrix

public MatDoubleMatrix(double[][] values)
Parameters:
values - rows in 1st dim, columns in 2nd

MatDoubleMatrix

public MatDoubleMatrix(double[] values,
                       int[] dims)
Parameters:
values - packed by column
dims - the dimensions
Method Detail

getMatrixSize

protected int getMatrixSize()
Description copied from class: MatMatrix
Returns the matrix size, typically the overall array length of the underlying data

Specified by:
getMatrixSize in class MatMatrix<double[]>

createMatrixFromRows

public static MatDoubleMatrix createMatrixFromRows(List<double[]> rows)
Parameters:
rows - list contains the rows

createMatrixFromColumns

public static MatDoubleMatrix createMatrixFromColumns(List<double[]> columns)

getRawDataSize

public int getRawDataSize()
Overrides:
getRawDataSize in class MatMatrix<double[]>
Returns:
size of raw data excluding type(4) and size(4) and name

writeRawData

public void writeRawData(DataOutput out)
                  throws IOException
Description copied from class: MatMatrix
Write the raw data to the given output, excluding type, size, name etc. This method is implemented by the type specific subclasses.

Specified by:
writeRawData in class MatMatrix<double[]>
Parameters:
out - the data output to write to
Throws:
IOException - if any io exception occurs