org.encog.ml.data.buffer.codec
public class SQLCODEC extends Object implements DataSetCODEC
Constructor and Description |
---|
SQLCODEC(Connection theConnection,
String theSQL,
int theInputSize,
int theIdealSize)
Create a SQLNeuralDataSet based on the specified connection.
|
SQLCODEC(String theSQL,
int theInputSize,
int theIdealSize,
String theDriver,
String theURL,
String theUID,
String thePWD)
Construct a SQL dataset.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any open files.
|
int |
getFetchSize() |
int |
getIdealSize() |
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[] input,
double[] ideal,
double[] significance)
Read one record of data from an external source.
|
void |
setFetchSize(int theFetchSize) |
void |
write(double[] input,
double[] ideal,
double significance)
Write one record of data to an external destination.
|
public SQLCODEC(Connection theConnection, String theSQL, int theInputSize, int theIdealSize)
theConnection
- The connection to use.theSQL
- The SQL command to execute.theInputSize
- The size of the input data.theIdealSize
- The size of the ideal data.public SQLCODEC(String theSQL, int theInputSize, int theIdealSize, String theDriver, String theURL, String theUID, String thePWD)
theSQL
- The SQL command to execute.theInputSize
- The size of the input data.theIdealSize
- The size of the ideal data.theDriver
- The driver to use.theURL
- The database connection URL.theUID
- The database user id.thePWD
- The database password.public void close()
close
in interface DataSetCODEC
public int getIdealSize()
getIdealSize
in interface DataSetCODEC
public int getInputSize()
getInputSize
in interface DataSetCODEC
public void prepareRead()
prepareRead
in interface DataSetCODEC
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 boolean read(double[] input, double[] ideal, double[] significance)
read
in interface DataSetCODEC
input
- The input data array.ideal
- The ideal data array.significance
- The significance. The first element will be modified
to hold the significance.public void write(double[] input, double[] ideal, double significance)
write
in interface DataSetCODEC
input
- The input data array.ideal
- The ideal data array.public int getFetchSize()
public void setFetchSize(int theFetchSize)
theFetchSize
- the fetchSize to setCopyright © 2014. All Rights Reserved.