|
||||||||||
| 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 final void add(int index,
double value)
add in interface MLDataindex - The index to add to.value - The value to add.
public final void add(int index,
ComplexNumber value)
add in interface MLComplexDataindex - The index to use.value - The complex number value to add.public final void clear()
clear in interface MLDatapublic final MLData clone()
clone in interface MLDataclone in class Objectpublic final double[] getData()
getData in interface MLDatapublic final ComplexNumber[] getComplexData()
getComplexData in interface MLComplexDatapublic final double getData(int index)
getData in interface MLDataindex - The index to read.
public final ComplexNumber getComplexData(int index)
getComplexData in interface MLComplexDataindex - The index to get the complex data at.
public final void setData(double[] theData)
setData in interface MLDatatheData - An array of doubles.public final void setData(ComplexNumber[] theData)
setData in interface MLComplexDatatheData - Set the complex data array.
public final void setData(int index,
double d)
setData in interface MLDataindex - The index to to set.d - The numeric value to set.
public final void setData(int index,
ComplexNumber d)
setData in interface MLComplexDataindex - The index to set.d - The complex number.public final int size()
size in interface MLDatapublic final String toString()
toString in class Objectpublic Centroid<MLData> createCentroid()
createCentroid in interface CentroidFactory<MLData>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||