org.apache.mahout.classifier.df.data
Class Instance
java.lang.Object
org.apache.mahout.classifier.df.data.Instance
public class Instance
- extends Object
Represents one data instance.
Method Summary |
boolean |
equals(Object obj)
|
double |
get(int index)
Return the attribute at the specified position |
int |
hashCode()
|
void |
set(int index,
double value)
Set the value at the given index |
Instance
public Instance(Vector attrs)
get
public double get(int index)
- Return the attribute at the specified position
- Parameters:
index
- position of the attribute to retrieve
- Returns:
- value of the attribute
set
public void set(int index,
double value)
- Set the value at the given index
- Parameters:
value
- a double value to set
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.