|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.data.basic.BasicMLData
public class BasicMLData
Basic implementation of the MLData interface that stores the data in an array.
Constructor Summary | |
---|---|
BasicMLData(double[] d)
Construct this object with the specified data. |
|
BasicMLData(int size)
Construct this object with blank data and a specified size. |
|
BasicMLData(MLData d)
Construct a new BasicMLData object from an existing one. |
Method Summary | |
---|---|
void |
add(int index,
double value)
Add a value to the specified index. |
void |
clear()
Clear any data to zero. |
MLData |
clone()
Clone this object. |
Centroid<MLData> |
createCentroid()
|
double[] |
getData()
|
double |
getData(int index)
Get the element specified index value. |
MLData |
minus(MLData o)
Subtract one data element from another. |
MLData |
plus(MLData o)
Add one data element to another. |
void |
setData(double[] theData)
Set all of the data as an array of doubles. |
void |
setData(int index,
double d)
Set the specified element. |
int |
size()
|
MLData |
times(double d)
Multiply one data element with another. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicMLData(double[] d)
d
- The data to construct this object with.public BasicMLData(int size)
size
- The amount of data to store.public BasicMLData(MLData d)
d
- The object to be copied.Method Detail |
---|
public void add(int index, double value)
add
in interface MLData
index
- The index to add to.value
- The value to add.public void clear()
clear
in interface MLData
public MLData clone()
clone
in interface MLData
clone
in class Object
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
- An array of doubles.public void setData(int index, double d)
setData
in interface MLData
index
- The index to set.d
- The data for the specified element.public int size()
size
in interface MLData
public String toString()
toString
in class Object
public Centroid<MLData> createCentroid()
createCentroid
in interface CentroidFactory<MLData>
public MLData plus(MLData o)
o
- The other data element
public MLData times(double d)
d
- The other data element
public MLData minus(MLData o)
o
- The other data element
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |