| Constructor and Description |
|---|
SimpleInstance(java.util.ArrayList<IAttributeValue<?>> attributeValues,
IAttributeValue<?> targetValue) |
SimpleInstance(InstanceSchema schema,
java.util.ArrayList<IAttributeValue<?>> attributeValues,
IAttributeValue<?> targetValue) |
| Modifier and Type | Method and Description |
|---|---|
double[] |
getAsDoubleVector()
Turns the instance into a double vector.
|
<T> IAttributeValue<T> |
getAttributeValue(int position,
java.lang.Class<T> type)
Getter for the value of an attribute for the given position.
|
<T> IAttributeValue<T> |
getTargetValue(java.lang.Class<T> type)
Getter for the value of the target attribute.
|
void |
setSchema(InstanceSchema schema) |
java.lang.String |
toString() |
public SimpleInstance(java.util.ArrayList<IAttributeValue<?>> attributeValues, IAttributeValue<?> targetValue)
public SimpleInstance(InstanceSchema schema, java.util.ArrayList<IAttributeValue<?>> attributeValues, IAttributeValue<?> targetValue)
public <T> IAttributeValue<T> getAttributeValue(int position, java.lang.Class<T> type)
IInstancegetAttributeValue in interface IInstanceposition - The position of the attribute within the instance.type - The type for which the attribute value shall be returned.public <T> IAttributeValue<T> getTargetValue(java.lang.Class<T> type)
IInstancegetTargetValue in interface IInstancetype - The type to bind the value of the target attribute.public void setSchema(InstanceSchema schema)
public double[] getAsDoubleVector()
throws ContainsNonNumericAttributesException
IInstancegetAsDoubleVector in interface IInstanceContainsNonNumericAttributesException - Thrown if the instance is to be converted into a double vector and still contains non-numeric attributes.public java.lang.String toString()
toString in class java.lang.Object