org.encog.ml.data.basic
public class BasicMLData extends Object implements MLData, Serializable, Cloneable
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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() |
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.public void add(int index, double value)
public MLData clone()
public double[] getData()
public double getData(int index)
public void setData(double[] theData)
public void setData(int index, double d)
public int size()
public Centroid<MLData> createCentroid()
createCentroid
in interface CentroidFactory<MLData>
public MLData plus(MLData o)
o
- The other data elementpublic MLData times(double d)
d
- The other data elementCopyright © 2014. All Rights Reserved.