dbStat
Class AttributeVector

java.lang.Object
  extended bydbStat.AttributeVector

public class AttributeVector
extends java.lang.Object

Class defins a single vector that is to be used in the k-meana clustering method.

The vector contains an arbitrary number of objects stored in it, each of which is a VectorField which encapsulates a field name / value pair.

This vector is used to compare to any other vector and obtain a Euclidian similarity measure.


Field Summary
private  java.util.Vector fieldVector
          a vector containing the field name / value pairs of statistical information
private  java.lang.String identity
          the ticker who owns this vector - this is the unique owner for this object
 
Constructor Summary
AttributeVector()
          Constructor allows creation before any knowlege of the owner is known
AttributeVector(java.lang.String id)
          Creates an instance of the object with the owner initilized
 
Method Summary
 void addField(VectorField field)
          Appends a new field name / value VectorField to this collection
 VectorField getFieldByIndex(int ind)
          Gets the vector field located at the specified index
 VectorField getFieldByName(java.lang.String name)
          Gets the Vector field that has the specified attribute name specified
 java.lang.String getIdentity()
          Gets the owner of this object
 int getSize()
          Gets the number of VectorFields in this collection
 void setIdentity(java.lang.String id)
          Sets the owner of this object
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldVector

private java.util.Vector fieldVector
a vector containing the field name / value pairs of statistical information


identity

private java.lang.String identity
the ticker who owns this vector - this is the unique owner for this object

Constructor Detail

AttributeVector

public AttributeVector()
Constructor allows creation before any knowlege of the owner is known


AttributeVector

public AttributeVector(java.lang.String id)
Creates an instance of the object with the owner initilized

Parameters:
id - the ticker symbol of the owner
Method Detail

setIdentity

public void setIdentity(java.lang.String id)
Sets the owner of this object

Parameters:
id - the owner who now owns this object

getIdentity

public java.lang.String getIdentity()
Gets the owner of this object

Returns:
the ticker owner of this object

addField

public void addField(VectorField field)
Appends a new field name / value VectorField to this collection

Parameters:
field - the new statistic to add to this object

getSize

public int getSize()
Gets the number of VectorFields in this collection

Returns:
the number of elements in this collection

getFieldByIndex

public VectorField getFieldByIndex(int ind)
Gets the vector field located at the specified index

Parameters:
ind - the index which to retrieve data from
Returns:
the Vector field object present at the specified index, or null if none is present

getFieldByName

public VectorField getFieldByName(java.lang.String name)
Gets the Vector field that has the specified attribute name specified

Parameters:
name - the name of the specific statistic which to return
Returns:
the Vector field with the same field name as the specified string

toString

public java.lang.String toString()