|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.data.basic.BasicMLComplexData
public class BasicMLComplexData
This class implements a data object that can hold complex numbers. It implements the interface MLData, so it can be used with nearly any Encog machine learning method. However, not all Encog machine learning methods are designed to work with complex numbers. A Encog machine learning method that does not support complex numbers will only be dealing with the real-number portion of the complex number.
Constructor Summary | |
---|---|
BasicMLComplexData(ComplexNumber[] d)
Construct this object with the specified data. |
|
BasicMLComplexData(double[] d)
Construct this object with the specified data. |
|
BasicMLComplexData(int size)
Construct this object with blank data and a specified size. |
|
BasicMLComplexData(MLData d)
Construct a new BasicMLData object from an existing one. |
Method Summary | |
---|---|
void |
add(int index,
ComplexNumber value)
Add a complex number to the specified index. |
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()
Not supported. |
ComplexNumber[] |
getComplexData()
|
ComplexNumber |
getComplexData(int index)
Get the complex data at the specified index. |
double[] |
getData()
|
double |
getData(int index)
Get the element specified index value. |
void |
setData(ComplexNumber[] theData)
|
void |
setData(double[] theData)
Set all of the data as an array of doubles. |
void |
setData(int index,
ComplexNumber d)
Set a data element to a complex number. |
void |
setData(int index,
double d)
Set the data at the specified index. |
int |
size()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicMLComplexData(double[] d)
d
- The data to construct this object with.public BasicMLComplexData(ComplexNumber[] d)
d
- The data to construct this object with.public BasicMLComplexData(int size)
size
- The amount of data to store.public BasicMLComplexData(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 add(int index, ComplexNumber value)
add
in interface MLComplexData
index
- The index to use.value
- The complex number 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 ComplexNumber[] getComplexData()
getComplexData
in interface MLComplexData
public double getData(int index)
getData
in interface MLData
index
- The index to read.
public ComplexNumber getComplexData(int index)
getComplexData
in interface MLComplexData
index
- The index to get the complex data at.
public void setData(double[] theData)
setData
in interface MLData
theData
- An array of doubles.public void setData(ComplexNumber[] theData)
setData
in interface MLComplexData
theData
- Set the complex data array.public void setData(int index, double d)
setData
in interface MLData
index
- The index to to set.d
- The numeric value to set.public void setData(int index, ComplexNumber d)
setData
in interface MLComplexData
index
- The index to set.d
- The complex number.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 |