ch.javasoft.jsmat.variable
Class MatReservedMatrix<A>

java.lang.Object
  extended by ch.javasoft.jsmat.variable.MatVariable
      extended by ch.javasoft.jsmat.variable.MatReserved
          extended by ch.javasoft.jsmat.variable.MatReservedMatrix<A>

public abstract class MatReservedMatrix<A>
extends MatReserved


Field Summary
 
Fields inherited from class ch.javasoft.jsmat.variable.MatVariable
DEFAULT_NAME, mDims, mMatClass
 
Constructor Summary
MatReservedMatrix(MatClass matClass, MatType matType, int[] dims)
           
 
Method Summary
abstract  int appendData(DataOutput out, A data)
           
static MatReservedMatrix<double[]> createDoubleMatrix(int[] dims)
           
static MatReservedMatrix<double[]> createDoubleMatrix(int rows, int cols)
           
static MatReservedMatrix<int[]> createInt32Matrix(int[] dims)
           
static MatReservedMatrix<int[]> createInt32Matrix(int rows, int cols)
           
static MatReservedMatrix<int[]> createInt8Matrix(int[] dims)
           
static MatReservedMatrix<int[]> createInt8Matrix(int rows, int cols)
           
static MatReservedMatrix<int[]> createUInt32Matrix(int[] dims)
           
static MatReservedMatrix<int[]> createUInt32Matrix(int rows, int cols)
           
static MatReservedMatrix<int[]> createUInt8Matrix(int[] dims)
           
static MatReservedMatrix<int[]> createUInt8Matrix(int rows, int cols)
           
 int getRawDataSize()
           
 void writeDataBlockEnd(DataOutput out)
          Called when the write process of the reserved variable is about to complete, that is, when ReservedWriter.close() is called.
 void writeDataBlockStart(String name, DataOutput out)
          Only the start of the data block is written here (see MatPrimitive.writeStart(MatType, DataOutput, int)).
 
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

MatReservedMatrix

public MatReservedMatrix(MatClass matClass,
                         MatType matType,
                         int[] dims)
Method Detail

getRawDataSize

public int getRawDataSize()
Specified by:
getRawDataSize in class MatVariable
Returns:
size of raw data excluding type(4) and size(4) and name

writeDataBlockStart

public void writeDataBlockStart(String name,
                                DataOutput out)
                         throws IOException
Only the start of the data block is written here (see MatPrimitive.writeStart(MatType, DataOutput, int)). The real data is appended when appendData(DataOutput, Object) is called. The write process is terminated with writeDataBlockEnd(DataOutput).

Specified by:
writeDataBlockStart in class MatReserved
Throws:
IOException

appendData

public abstract int appendData(DataOutput out,
                               A data)
                        throws IOException
Throws:
IOException

writeDataBlockEnd

public void writeDataBlockEnd(DataOutput out)
                       throws IOException
Description copied from class: MatReserved
Called when the write process of the reserved variable is about to complete, that is, when ReservedWriter.close() is called.

Specified by:
writeDataBlockEnd in class MatReserved
Throws:
IOException
See Also:
MatReserved.writeDataBlockStart(String, DataOutput)

createDoubleMatrix

public static MatReservedMatrix<double[]> createDoubleMatrix(int rows,
                                                             int cols)

createDoubleMatrix

public static MatReservedMatrix<double[]> createDoubleMatrix(int[] dims)

createInt32Matrix

public static MatReservedMatrix<int[]> createInt32Matrix(int rows,
                                                         int cols)

createInt32Matrix

public static MatReservedMatrix<int[]> createInt32Matrix(int[] dims)

createUInt32Matrix

public static MatReservedMatrix<int[]> createUInt32Matrix(int rows,
                                                          int cols)

createUInt32Matrix

public static MatReservedMatrix<int[]> createUInt32Matrix(int[] dims)

createInt8Matrix

public static MatReservedMatrix<int[]> createInt8Matrix(int rows,
                                                        int cols)

createInt8Matrix

public static MatReservedMatrix<int[]> createInt8Matrix(int[] dims)

createUInt8Matrix

public static MatReservedMatrix<int[]> createUInt8Matrix(int rows,
                                                         int cols)

createUInt8Matrix

public static MatReservedMatrix<int[]> createUInt8Matrix(int[] dims)