|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.data.buffer.EncogEGBFile
public class EncogEGBFile
Used to access an Encog Binary Training file (*.EGB).
| Field Summary | |
|---|---|
static int |
DOUBLE_SIZE
The size of a double. |
static int |
HEADER_SIZE
The size of the file header. |
| Constructor Summary | |
|---|---|
EncogEGBFile(File theFile)
Construct an EGB file. |
|
| Method Summary | |
|---|---|
void |
addColumn(int col,
boolean isInput)
Add a column. |
void |
addRow(int row)
Add a row. |
void |
close()
Close the file. |
void |
create(int theInputCount,
int theIdealCount)
Create a new RGB file. |
void |
deleteCol(int col)
Delete a column. |
void |
deleteRow(int row)
Delete a row. |
FileChannel |
getFc()
|
File |
getFile()
|
ByteBuffer |
getHeaderBuffer()
|
int |
getIdealCount()
|
int |
getInputCount()
|
int |
getNumberOfRecords()
|
RandomAccessFile |
getRaf()
|
ByteBuffer |
getRecordBuffer()
|
int |
getRecordCount()
|
int |
getRecordSize()
|
void |
open()
OPen an existing EGB file. |
double |
read()
Read a single double. |
void |
read(double[] d)
Read an array of doubles. |
void |
read(int row,
double[] d)
Read a double array at the specified record. |
double |
read(int row,
int col)
Read a row and column. |
void |
setLocation(int row)
Set the current location to the specified row. |
void |
write(byte b)
Write a byte. |
void |
write(double d)
|
void |
write(double[] v)
Write an array. |
void |
write(int row,
double[] v)
Write an array at the specified record. |
void |
write(int row,
int col,
double v)
Write the specified row and column. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DOUBLE_SIZE
public static final int HEADER_SIZE
| Constructor Detail |
|---|
public EncogEGBFile(File theFile)
theFile - The file.| Method Detail |
|---|
public final void addColumn(int col,
boolean isInput)
col - THe column to add.isInput - Is this an input column?public final void addRow(int row)
row - Where to add the row.public final void close()
public final void create(int theInputCount,
int theIdealCount)
theInputCount - The input count.theIdealCount - The ideal count.public final void deleteCol(int col)
col - The column to delete.public final void deleteRow(int row)
row - The row to delete.public final FileChannel getFc()
public final File getFile()
public final ByteBuffer getHeaderBuffer()
public final int getIdealCount()
public final int getInputCount()
public final int getNumberOfRecords()
public final RandomAccessFile getRaf()
public final ByteBuffer getRecordBuffer()
public final int getRecordCount()
public final int getRecordSize()
public final void open()
public final double read()
public final void read(double[] d)
d - The array to read into.
public final void read(int row,
double[] d)
row - The record to read.d - The array to read into.
public final double read(int row,
int col)
row - The row to read.col - The column to read.
public final void setLocation(int row)
row - The row.public final void write(byte b)
b - The byte to write.public final void write(double[] v)
v - The array to write.
public final void write(int row,
double[] v)
row - The record to write.v - The array to write.
public final void write(int row,
int col,
double v)
row - The row.col - The column.v - The value.public void write(double d)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||