|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.data.sparse.SparseMLData
public class SparseMLData
| Constructor Summary | |
|---|---|
SparseMLData(double[] d)
Construct this object with the specified data. |
|
SparseMLData(double[] d,
int[] i)
Construct this object with the specified data. |
|
SparseMLData(int size)
Construct this object with blank data and a specified size. |
|
SparseMLData(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()
|
int |
findIndex(int index)
|
double[] |
getData()
|
double |
getData(int index)
Get the element specified index value. |
double[] |
getSparseData()
|
int[] |
getSparseIndex()
|
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()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SparseMLData(double[] d)
d - The data to construct this object with.
public SparseMLData(double[] d,
int[] i)
d - The data to construct this object with.public SparseMLData(int size)
size - The amount of data to store.public SparseMLData(MLData d)
d - The object to be copied.| Method Detail |
|---|
public int findIndex(int index)
public void add(int index,
double value)
add in interface MLDataindex - The index to add to.value - The value to add.public void clear()
clear in interface MLDatapublic MLData clone()
clone in interface MLDataclone in class Objectpublic double[] getData()
getData in interface MLDatapublic double getData(int index)
getData in interface MLDataindex - The index to read.
public void setData(double[] theData)
setData in interface MLDatatheData - An array of doubles.
public void setData(int index,
double d)
setData in interface MLDataindex - The index to set.d - The data for the specified element.public int size()
size in interface MLDatapublic String toString()
toString in class Objectpublic int[] getSparseIndex()
public double[] getSparseData()
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 | |||||||||