|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdata.DataBlock
public class DataBlock
A class for holding a block of data. The implication is that the fact that the data was generated in this block is of some significance, and so the integrity of this block , in terms of the order of data points, will be honored. Inputs and outputs are stored row-wise.
| Constructor Summary | |
|---|---|
DataBlock()
Default constructor. |
|
DataBlock(cern.colt.matrix.DoubleMatrix2D x,
cern.colt.matrix.DoubleMatrix2D y)
Constructs a DataBlock with the given matrices as inputs and
outputs. |
|
DataBlock(int inputDimension,
int outputDimension,
int blocksize)
Creates a new DataBlock to hold blocksize input-output pairs, in
the corresponding number of dimensions, respectively. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
int |
getBlocksize()
Returns the block size of this DataBlock. |
DataPoint |
getDataPoint(int index)
Gets the requested DataPoint. |
cern.colt.matrix.DoubleMatrix1D |
getInput(int index)
Returns the inputs at the given index. |
int |
getInputDimension()
Returns the input dimension. |
cern.colt.matrix.DoubleMatrix2D |
getInputs()
Returns the inputs. |
cern.colt.matrix.DoubleMatrix1D |
getOutput(int index)
Returns the outputs at the given index. |
int |
getOutputDimension()
Returns the output dimension. |
cern.colt.matrix.DoubleMatrix2D |
getOutputs()
Returns the outputs. |
void |
init()
Init method. |
void |
setBlocksize(int blocksize)
Sets the block size. |
void |
setInput(int index,
double[] input)
Sets the input at the given index. |
void |
setInput(int index,
cern.colt.matrix.DoubleMatrix1D input)
Sets the input at the given index. |
void |
setInputDimension(int inputDimension)
Sets the input dimension. |
void |
setInputs(double[][] inputs)
Sets the inputs. |
void |
setInputs(cern.colt.matrix.DoubleMatrix2D inputs)
Sets the inputs. |
void |
setOutput(int index,
double[] output)
Sets the output at the given index. |
void |
setOutput(int index,
cern.colt.matrix.DoubleMatrix1D output)
Sets the output at the given index. |
void |
setOutputDimension(int outputDimension)
Sets the output dimension. |
void |
setOutputs(double[][] outputs)
Sets the outputs. |
void |
setOutputs(cern.colt.matrix.DoubleMatrix2D outputs)
Sets the outputs. |
java.lang.String |
toString()
|
void |
writeToFile(java.io.PrintWriter writer)
Writes this DataBlock to human-readable form using the given PrintWriter. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DataBlock()
public DataBlock(cern.colt.matrix.DoubleMatrix2D x,
cern.colt.matrix.DoubleMatrix2D y)
DataBlock with the given matrices as inputs and
outputs. Note: input and output matrices are interpreted row-wise: each row
is one input/output.
x - the given matrix of inputs.y - the given matrix of outputs.
public DataBlock(int inputDimension,
int outputDimension,
int blocksize)
blocksize input-output pairs, in
the corresponding number of dimensions, respectively.
inputDimension - the given input dimension.outputDimension - the given output dimension.blocksize - the given block size.| Method Detail |
|---|
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int getBlocksize()
public DataPoint getDataPoint(int index)
DataPoint.
index - the index of the desired DataPoint.
DataPoint.public cern.colt.matrix.DoubleMatrix1D getInput(int index)
index - the given index.
public int getInputDimension()
public cern.colt.matrix.DoubleMatrix2D getInputs()
public cern.colt.matrix.DoubleMatrix1D getOutput(int index)
index - the given index.
public int getOutputDimension()
public cern.colt.matrix.DoubleMatrix2D getOutputs()
public void init()
public void setBlocksize(int blocksize)
blocksize - the given block size.
public void setInput(int index,
double[] input)
index - the given index.input - the given input.
public void setInput(int index,
cern.colt.matrix.DoubleMatrix1D input)
index - the given index.input - the given input.public void setInputDimension(int inputDimension)
inputDimension - the given input dimensionpublic void setInputs(double[][] inputs)
double[][] arrays can be ragged.
Therefore, it just assigns values.
inputs - The given inputs.public void setInputs(cern.colt.matrix.DoubleMatrix2D inputs)
inputs - the given inputs.
public void setOutput(int index,
double[] output)
index - the given index.output - the given output.
public void setOutput(int index,
cern.colt.matrix.DoubleMatrix1D output)
index - the given index.output - the given output.public void setOutputDimension(int outputDimension)
outputDimension - the given output dimension.public void setOutputs(double[][] outputs)
outputs - the given outputs.public void setOutputs(cern.colt.matrix.DoubleMatrix2D outputs)
outputs - the given outputs.public void writeToFile(java.io.PrintWriter writer)
PrintWriter. This is not designed to be used for serialization.
writer - the given PrintWriter,public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||