Package com.yahoo.labs.samoa.instances
Class AttributesInformation
- java.lang.Object
-
- com.yahoo.labs.samoa.instances.AttributesInformation
-
- All Implemented Interfaces:
Serializable
public class AttributesInformation extends Object implements Serializable
Class for storing the information of the attributes. It stores only information about discrete attributes and suppose that the default attribute is numeric.- Version:
- $Revision: 7 $
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Attribute[]
attributes
The attribute information.protected Attribute
defaultNumericAttribute
The attribute used for default for numerical valuesprotected int[]
indexValues
protected int
numberAttributes
The number of attributes.
-
Constructor Summary
Constructors Constructor Description AttributesInformation()
AttributesInformation(Attribute[] v, int numberAttributes)
AttributesInformation(Attribute[] v, int[] i, int numberAttributes)
AttributesInformation(AttributesInformation chunk)
AttributesInformation(List<Attribute> v, int numberAttributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attribute
attribute(int indexAttribute)
Attribute.void
deleteAttributeAt(int position)
void
insertAttributeAt(Attribute attribute, int position)
int
locateIndex(int index)
Locates the greatest index that is not greater than the given index.void
setAttributes(Attribute[] v)
Sets the attribute information.void
setAttributes(Attribute[] v, int[] indexValues)
-
-
-
Field Detail
-
attributes
protected Attribute[] attributes
The attribute information.
-
indexValues
protected int[] indexValues
-
numberAttributes
protected int numberAttributes
The number of attributes.
-
defaultNumericAttribute
protected Attribute defaultNumericAttribute
The attribute used for default for numerical values
-
-
Constructor Detail
-
AttributesInformation
public AttributesInformation(AttributesInformation chunk)
-
AttributesInformation
public AttributesInformation(Attribute[] v, int[] i, int numberAttributes)
-
AttributesInformation
public AttributesInformation(Attribute[] v, int numberAttributes)
-
AttributesInformation
public AttributesInformation()
-
-
Method Detail
-
attribute
public Attribute attribute(int indexAttribute)
Attribute.- Parameters:
indexAttribute
- the index Attribute- Returns:
- the attribute
-
setAttributes
public void setAttributes(Attribute[] v)
Sets the attribute information.- Parameters:
v
- the new attribute information
-
locateIndex
public int locateIndex(int index)
Locates the greatest index that is not greater than the given index.- Returns:
- the internal index of the attribute index. Returns -1 if no index with this property could be found
-
setAttributes
public void setAttributes(Attribute[] v, int[] indexValues)
-
deleteAttributeAt
public void deleteAttributeAt(int position)
-
insertAttributeAt
public void insertAttributeAt(Attribute attribute, int position)
-
-