|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.neural.data.basic.BasicNeuralData
public class BasicNeuralData
Basic implementation of the NeuralData interface that stores the data in an array.
| Constructor Summary | |
|---|---|
BasicNeuralData(double[] d)
Construct this object with the specified data. |
|
BasicNeuralData(int size)
Construct this object with blank data and a specified size. |
|
BasicNeuralData(NeuralData d)
Construct a new BasicNeuralData object from an existing one. |
|
| Method Summary | |
|---|---|
void |
add(int index,
double value)
Add a value to the specified index. |
void |
clear()
Set all data to zero. |
NeuralData |
clone()
Clone this object. |
double[] |
getData()
Get the data as an array. |
double |
getData(int index)
Get a data value at the specified index. |
void |
setData(double[] data)
Set the entire data array. |
void |
setData(int index,
double d)
Set the data element specified by the index. |
int |
size()
Get the number of data elements present. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicNeuralData(double[] d)
d - The data to construct this object with.public BasicNeuralData(int size)
size - The amount of data to store.public BasicNeuralData(NeuralData d)
d - The object to be copied.| Method Detail |
|---|
public void add(int index,
double value)
add in interface NeuralDataindex - The index to add to.value - The value to add.public void clear()
clear in interface NeuralDatapublic NeuralData clone()
NeuralData
clone in interface NeuralDataclone in class Objectpublic double[] getData()
getData in interface NeuralDatapublic double getData(int index)
getData in interface NeuralDataindex - The index to read.
public void setData(double[] data)
setData in interface NeuralDatadata - The data to store.
public void setData(int index,
double d)
setData in interface NeuralDataindex - The data element to set.d - The new value for the specified data element.public int size()
size in interface NeuralDatapublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||