|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectat.tuwien.ifs.somtoolbox.data.InputDatum
public class InputDatum
Class representing a specific input datum.
| Field Summary | |
|---|---|
private int |
dim
|
private String |
label
|
private int |
nonZeros
|
private HashMap<Object,Object> |
properties
|
private cern.colt.matrix.DoubleMatrix1D |
vector
|
| Constructor Summary | |
|---|---|
InputDatum(String label,
double[] vector)
Constructs a new InputDatum. |
|
InputDatum(String label,
cern.colt.matrix.DoubleMatrix1D vector)
Constructs a new InputDatum. |
|
InputDatum(String label,
cern.colt.matrix.DoubleMatrix1D vector,
int nonZeros)
|
|
| Method Summary | |
|---|---|
void |
addProperty(Object key,
Object value)
Adds an arbitrary key/value property to the InputDatum. |
(package private) void |
calculateFeatureDensity()
|
boolean |
equals(Object obj)
Compares two InputDatum by both comparing the labels and vectors. |
int |
getDim()
Returns the dimensionality of the vector. |
int |
getFeatureDensity()
|
String |
getLabel()
Returns the label of the InputDatum. |
Object |
getProperty(Object key)
Returns the value of a property specified by the key or null if the key does not exist. |
cern.colt.matrix.DoubleMatrix1D |
getVector()
Returns the vector of the InputDatum. |
String |
toString()
Returns a String representation of this InputDatum as labelName[vector]. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private String label
private cern.colt.matrix.DoubleMatrix1D vector
private int dim
private HashMap<Object,Object> properties
private int nonZeros
| Constructor Detail |
|---|
public InputDatum(String label,
cern.colt.matrix.DoubleMatrix1D vector)
label - The label of the input datum. Basically this should be a sort of unique id.vector - The vector holding the values.
public InputDatum(String label,
double[] vector)
label - The label of the input datum. Basically this should be a sort of unique id.vector - The vector holding the values, this time as a double[].
public InputDatum(String label,
cern.colt.matrix.DoubleMatrix1D vector,
int nonZeros)
| Method Detail |
|---|
public String getLabel()
public cern.colt.matrix.DoubleMatrix1D getVector()
public int getDim()
public Object getProperty(Object key)
null if the key does not exist.
key - The property key.
public void addProperty(Object key,
Object value)
null, the property is removed.
key - The property key.value - The property value.public String toString()
InputDatum as labelName[vector].
toString in class Objectpublic boolean equals(Object obj)
InputDatum by both comparing the labels and vectors.
equals in class Objectpublic int getFeatureDensity()
void calculateFeatureDensity()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||