org.encog.ml.data.buffer.codec
public class ArrayDataCODEC extends Object implements DataSetCODEC
Constructor and Description |
---|
ArrayDataCODEC()
Default constructor.
|
ArrayDataCODEC(double[][] theInput,
double[][] theIdeal)
Construct an array CODEC.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any open files.
|
double[][] |
getIdeal() |
int |
getIdealSize() |
double[][] |
getInput() |
int |
getInputSize() |
void |
prepareRead()
Prepare to read from an external data source.
|
void |
prepareWrite(int recordCount,
int theInputSize,
int theIdealSize)
Prepare to write to an external data destination.
|
boolean |
read(double[] theInput,
double[] theIdeal,
double[] significance)
Read one record of data from an external source.
|
void |
write(double[] theInput,
double[] theIdeal,
double significance)
Write one record of data to an external destination.
|
public ArrayDataCODEC(double[][] theInput, double[][] theIdeal)
theInput
- The input array.theIdeal
- The ideal array.public ArrayDataCODEC()
public int getInputSize()
getInputSize
in interface DataSetCODEC
public int getIdealSize()
getIdealSize
in interface DataSetCODEC
public boolean read(double[] theInput, double[] theIdeal, double[] significance)
read
in interface DataSetCODEC
theInput
- The input data array.theIdeal
- The ideal data array.significance
- The significance. The first element will be modified
to hold the significance.public void write(double[] theInput, double[] theIdeal, double significance)
write
in interface DataSetCODEC
theInput
- The input data array.theIdeal
- The ideal data array.public void prepareWrite(int recordCount, int theInputSize, int theIdealSize)
prepareWrite
in interface DataSetCODEC
recordCount
- The total record count, that will be written.theInputSize
- The input size.theIdealSize
- The ideal size.public double[][] getInput()
public double[][] getIdeal()
public void prepareRead()
prepareRead
in interface DataSetCODEC
public void close()
close
in interface DataSetCODEC
Copyright © 2014. All Rights Reserved.