edu.uiuc.ge.illigal.gale.data
Class Attribute

java.lang.Object
  |
  +--edu.uiuc.ge.illigal.gale.data.Attribute

public class Attribute
extends java.lang.Object

Attribute class contains the information for an attribute of the data set.

Since:
0.9alpha
Version:
0.9alpha
Author:
Xavier Llorà <xllora@illigal.ge.uiuc.edu>

Field Summary
protected  float fLowerBound
          Lower bound of the attribute
protected  float fMaxValue
          Maximum value of the attribute
protected  float fMinValue
          Minimum value of the attribute
protected  float fUpperBound
          Upper bound of the attribute
protected  java.util.Hashtable htTagsMap
          Hash table for tags translation
static int INTEGER
          Constant definition for a integer-valued attribute
protected  int iPos
          Index position
protected  int iType
          Type of the attribute
static int NOMINAL
          Constant definition for a nominal attribute
static int REAL
          Constant definition for a real-valued attribute
protected  java.lang.String sName
          The attribute name
protected  java.util.Vector vecTags
          Set of tags for nominal attributes
 
Constructor Summary
Attribute(java.lang.String name, int type, int pos, java.util.Vector tags)
          Builds and initializes an attribute
 
Method Summary
 float distance()
          Returns the distance of bounds.
 int index()
          Returns the attribute index position
 float lowerBound()
          Returns the lowerBound for an attribute.
 float maximum()
          Returns the maximum value for an attribute.
 float minimum()
          Returns the minimum value for an attribute.
 java.lang.String name()
          Returns the name of the attribute
 void setLowerBound(float lb)
          Sets the lowerBound for an attribute.
 void setMaximum(float max)
          Sets the maximum value for an attribute.
 void setMinimum(float min)
          Sets the minimum value for an attribute.
 void setUpperBound(float ub)
          Sets the upperBound for an attribute.
 java.lang.String tag(int i)
          Returns the tag for the requested nominal index.
 int tagValue(java.lang.String tag)
          Returns the index of nominal tag
 java.lang.String toString()
          Returns the string representation of the attribute
 int type()
          Returns the type of the attribute
 float upperBound()
          Returns the upperBound for an attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOMINAL

public static final int NOMINAL
Constant definition for a nominal attribute

See Also:
Constant Field Values

REAL

public static final int REAL
Constant definition for a real-valued attribute

See Also:
Constant Field Values

INTEGER

public static final int INTEGER
Constant definition for a integer-valued attribute

See Also:
Constant Field Values

sName

protected java.lang.String sName
The attribute name


iType

protected int iType
Type of the attribute


fMaxValue

protected float fMaxValue
Maximum value of the attribute


fMinValue

protected float fMinValue
Minimum value of the attribute


fUpperBound

protected float fUpperBound
Upper bound of the attribute


fLowerBound

protected float fLowerBound
Lower bound of the attribute


iPos

protected int iPos
Index position


vecTags

protected java.util.Vector vecTags
Set of tags for nominal attributes


htTagsMap

protected java.util.Hashtable htTagsMap
Hash table for tags translation

Constructor Detail

Attribute

public Attribute(java.lang.String name,
                 int type,
                 int pos,
                 java.util.Vector tags)
Builds and initializes an attribute

Parameters:
name - The attribute name
type - The attribute type
pos - The attribute position in the data set
Method Detail

name

public java.lang.String name()
Returns the name of the attribute

Returns:
the name

type

public int type()
Returns the type of the attribute

Returns:
the type

maximum

public float maximum()
Returns the maximum value for an attribute.

Returns:
the maximum value

upperBound

public float upperBound()
Returns the upperBound for an attribute.

Returns:
the upper bound

minimum

public float minimum()
Returns the minimum value for an attribute.

Returns:
the minimum value

lowerBound

public float lowerBound()
Returns the lowerBound for an attribute.

Returns:
the lower bound

setMaximum

public void setMaximum(float max)
Sets the maximum value for an attribute.

Parameters:
max - the upper bound

setUpperBound

public void setUpperBound(float ub)
Sets the upperBound for an attribute.

Parameters:
ub - the upper bound

setMinimum

public void setMinimum(float min)
Sets the minimum value for an attribute.

Parameters:
min - the upper bound

setLowerBound

public void setLowerBound(float lb)
Sets the lowerBound for an attribute.

Parameters:
lb - the lower bound

index

public int index()
Returns the attribute index position

Returns:
the index position

tag

public java.lang.String tag(int i)
Returns the tag for the requested nominal index.

Parameters:
i - the nominal index position
Returns:
the tag

tagValue

public int tagValue(java.lang.String tag)
Returns the index of nominal tag

Parameters:
tag - the tag
Returns:
the nominal index position

distance

public float distance()
Returns the distance of bounds.

Returns:
the distance

toString

public java.lang.String toString()
Returns the string representation of the attribute

Overrides:
toString in class java.lang.Object
Returns:
the string representation