All Packages  Class Hierarchy  This Package  Previous  Next  Index  

Class jsvm.FeatureSet

java.lang.Object
    |
    +----jsvm.FeatureSet

public class FeatureSet
extends Object
implements Serializable
A data structure for storing feature/value pairs for an example.

Version:
$Id$
Author:
Heloise Hse (hwawen@eecs.berkeley.edu)

Constructor Index

 o FeatureSet()

Method Index

 o addFeature(long, double)
Adds a feature/value pair to the set.
 o getIds()
 o getValues()
 o maxFeatureId()
 o numFeatures()
Gets the number of features in the set
 o toString()

Constructors

 o FeatureSet
public FeatureSet()

Methods

 o getIds
public long[] getIds()
Returns:
An array of feature ID numbers.
 o getValues
public double[] getValues()
Returns:
An array of feature values.
 o addFeature
public void addFeature(long i,
                       double val)
Adds a feature/value pair to the set.

Parameters:
i - The feature ID.
val - The feature value.
 o numFeatures
public int numFeatures()
Gets the number of features in the set

Returns:
The number of features in the set.
 o maxFeatureId
public long maxFeatureId()
Returns:
The maximum feature ID number in the set.
 o toString
public String toString()
Returns:
The string representation of this feature set contents.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index