ch.javasoft.jsmat.variable
Class MatAllocated
java.lang.Object
ch.javasoft.jsmat.variable.MatVariable
ch.javasoft.jsmat.variable.MatAllocated
- Direct Known Subclasses:
- MatCell, MatMatrix, MatStructure
public abstract class MatAllocated
- extends MatVariable
MatAllocated is a variable which allocates space and data. Such
variables are the most simple to use, e.g. to allocate
matrix variables by passing the data they represent.
For large matrices, MatReserved variables might be preferable since
they only reserve space, but do not allocate it.
|
Constructor Summary |
MatAllocated(MatClass matClass,
int[] dims)
Constructor for subclasses with matrix class and dimensions |
|
Method Summary |
void |
write(String name,
DataOutput out)
Writes the data to the given data output. |
protected abstract void |
writeRawData(DataOutput out)
Write the raw data to the given output, excluding type, size, name etc. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatAllocated
public MatAllocated(MatClass matClass,
int[] dims)
- Constructor for subclasses with matrix class and dimensions
- Parameters:
matClass - the matrix class constantdims - the matrix dimensions
writeRawData
protected abstract void writeRawData(DataOutput out)
throws IOException
- Write the raw data to the given output, excluding type, size, name etc.
This method is implemented by the type specific subclasses.
- Parameters:
out - the data output to write to
- Throws:
IOException - if any io exception occurs
write
public void write(String name,
DataOutput out)
throws IOException
- Writes the data to the given data output. At the end of this method,
writeRawData(DataOutput) is called to write the type specific
data.
- Throws:
IOException