|
||||||||||
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 java.lang.String |
label
|
private int |
nonZeros
|
private java.util.HashMap<java.lang.Object,java.lang.Object> |
properties
|
private cern.colt.matrix.DoubleMatrix1D |
vector
|
Constructor Summary | |
---|---|
InputDatum(java.lang.String label,
double[] vector)
Constructs a new InputDatum. |
|
InputDatum(java.lang.String label,
cern.colt.matrix.DoubleMatrix1D vector)
Constructs a new InputDatum. |
|
InputDatum(java.lang.String label,
cern.colt.matrix.DoubleMatrix1D vector,
int nonZeros)
|
Method Summary | |
---|---|
void |
addProperty(java.lang.Object key,
java.lang.Object value)
Adds an arbitrary key/value property to the InputDatum. |
(package private) void |
calculateFeatureDensity()
|
boolean |
equals(java.lang.Object obj)
Compares two InputDatum by both comparing the labels and vectors. |
int |
getDim()
Returns the dimensionality of the vector. |
int |
getFeatureDensity()
|
java.lang.String |
getLabel()
Returns the label of the InputDatum. |
java.lang.Object |
getProperty(java.lang.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. |
java.lang.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 java.lang.String label
private cern.colt.matrix.DoubleMatrix1D vector
private int dim
private java.util.HashMap<java.lang.Object,java.lang.Object> properties
private int nonZeros
Constructor Detail |
---|
public InputDatum(java.lang.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(java.lang.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(java.lang.String label, cern.colt.matrix.DoubleMatrix1D vector, int nonZeros)
Method Detail |
---|
public java.lang.String getLabel()
public cern.colt.matrix.DoubleMatrix1D getVector()
public int getDim()
public java.lang.Object getProperty(java.lang.Object key)
null
if the key does not exist.
key
- The property key.
public void addProperty(java.lang.Object key, java.lang.Object value)
null
, the property is removed.
key
- The property key.value
- The property value.public java.lang.String toString()
InputDatum
as labelName[vector]
.
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
InputDatum
by both comparing the labels and vectors.
equals
in class java.lang.Object
public int getFeatureDensity()
void calculateFeatureDensity()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |