|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.data.specific.BiPolarNeuralData
public class BiPolarNeuralData
A NeuralData implementation designed to work with bipolar data. Bipolar data contains two values. True is stored as 1, and false is stored as -1.
Constructor Summary | |
---|---|
BiPolarNeuralData(boolean[] d)
Construct this object with the specified data. |
|
BiPolarNeuralData(int size)
Construct a data object with the specified size. |
Method Summary | |
---|---|
void |
add(int index,
double value)
This will throw an error, as "add" is not supported for bipolar. |
void |
clear()
Set all data to false. |
MLData |
clone()
Clone this object. |
Centroid<MLData> |
createCentroid()
Not supported. |
boolean |
getBoolean(int i)
Get the specified data item as a boolean. |
double[] |
getData()
Get the data held by this object as an array of doubles. |
double |
getData(int index)
Get the data held by the index. |
void |
setData(double[] theData)
Store the array. |
void |
setData(int index,
boolean value)
Set the specified index of this object as a boolean. |
void |
setData(int index,
double d)
Set the specified index of this object as a double. |
int |
size()
Get the size of this data object. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BiPolarNeuralData(boolean[] d)
d
- The data to create this object with.public BiPolarNeuralData(int size)
size
- The size of this data object.Method Detail |
---|
public void add(int index, double value)
add
in interface MLData
index
- Not used.value
- Not used.public void clear()
clear
in interface MLData
public MLData clone()
MLData
clone
in interface MLData
clone
in class Object
public boolean getBoolean(int i)
i
- The index to read.
public double[] getData()
getData
in interface MLData
public double getData(int index)
getData
in interface MLData
index
- The index to read.
public void setData(double[] theData)
setData
in interface MLData
theData
- The data to store.public void setData(int index, boolean value)
index
- The index to set.value
- The value to set.public void setData(int index, double d)
setData
in interface MLData
index
- The index to set.d
- The value to set.public int size()
size
in interface MLData
public String toString()
toString
in class Object
public Centroid<MLData> createCentroid()
createCentroid
in interface CentroidFactory<MLData>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |