Method Summary |
|
public Attribute | attribute(int index) Returns the attribute with the given index. |
public Attribute | attributeSparse(int indexOfIndex) Returns the attribute with the given index. |
public Attribute | classAttribute() Returns class attribute. |
public int | classIndex() Returns the class attribute's index. |
public boolean | classIsMissing() Tests if an instance's class is missing. |
public double | classValue() Returns an instance's class value in internal format. |
public Object | copy() Produces a shallow copy of this instance. |
public Instances | dataset() Returns the dataset this instance has access to. |
public void | deleteAttributeAt(int position) Deletes an attribute at the given position (0 to
numAttributes() - 1). |
public Enumeration | enumerateAttributes() Returns an enumeration of all the attributes. |
public boolean | equalHeaders(Instance inst) Tests if the headers of two instances are equivalent. |
void | forceDeleteAttributeAt(int position) Deletes an attribute at the given position (0 to
numAttributes() - 1). |
void | forceInsertAttributeAt(int position) Inserts an attribute at the given position
(0 to numAttributes()) and sets its value to be missing. |
public boolean | hasMissingValue() Tests whether an instance has a missing value. |
public int | index(int position) Returns the index of the attribute stored at the given position. |
public void | insertAttributeAt(int position) Inserts an attribute at the given position (0 to
numAttributes()). |
public boolean | isMissing(int attIndex) Tests if a specific value is "missing". |
public boolean | isMissing(Attribute att) Tests if a specific value is "missing". |
public boolean | isMissingSparse(int indexOfIndex) Tests if a specific value is "missing". |
public static boolean | isMissingValue(double val) Tests if the given value codes "missing". |
public static void | main(String[] options) Main method for testing this class. |
public Instance | mergeInstance(Instance inst) Merges this instance with the given instance and returns
the result. |
public static double | missingValue() Returns the double that codes "missing". |
public int | numAttributes() Returns the number of attributes. |
public int | numClasses() Returns the number of class labels. |
public int | numValues() Returns the number of values present. |
final public Instances | relationalValue(int attIndex) Returns the relational value of a relational attribute. |
final public Instances | relationalValue(Attribute att) Returns the relational value of a relational attribute. |
public void | replaceMissingValues(double[] array) Replaces all missing values in the instance with the
values contained in the given array. |
public void | setClassMissing() Sets the class value of an instance to be "missing". |
public void | setClassValue(double value) Sets the class value of an instance to the given value (internal
floating-point format). |
final public void | setClassValue(String value) Sets the class value of an instance to the given value. |
final public void | setDataset(Instances instances) Sets the reference to the dataset. |
final public void | setMissing(int attIndex) Sets a specific value to be "missing". |
final public void | setMissing(Attribute att) Sets a specific value to be "missing". |
public void | setValue(int attIndex, double value) Sets a specific value in the instance to the given value
(internal floating-point format). |
final public void | setValue(int attIndex, String value) Sets a value of a nominal or string attribute to the given
value. |
final public void | setValue(Attribute att, double value) Sets a specific value in the instance to the given value
(internal floating-point format). |
final public void | setValue(Attribute att, String value) Sets a value of an nominal or string attribute to the given
value. |
public void | setValueSparse(int indexOfIndex, double value) Sets a specific value in the instance to the given value
(internal floating-point format). |
final public void | setWeight(double weight) Sets the weight of an instance. |
final public String | stringValue(int attIndex) Returns the value of a nominal, string, date, or relational attribute
for the instance as a string. |
final public String | stringValue(Attribute att) Returns the value of a nominal, string, date, or relational attribute
for the instance as a string. |
public double[] | toDoubleArray() Returns the values of each attribute as an array of doubles. |
public String | toString() Returns the description of one instance. |
final public String | toString(int attIndex) Returns the description of one value of the instance as a
string. |
final public String | toString(Attribute att) Returns the description of one value of the instance as a
string. |
public double | value(int attIndex) Returns an instance's attribute value in internal format. |
public double | value(Attribute att) Returns an instance's attribute value in internal format. |
public double | valueSparse(int indexOfIndex) Returns an instance's attribute value in internal format. |
final public double | weight() Returns the instance's weight. |