features
Class Feature

java.lang.Object
  extended by features.Feature

public class Feature
extends java.lang.Object

Feature defines a feature vector, which is a float[] vector and some other characteristics to make it a feature vector. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.


Field Summary
 java.lang.String name
           
 double performance
           
 float[] vector
           
 
Constructor Summary
Feature(java.lang.String name, byte[] vector)
           
Feature(java.lang.String name, double performance)
           
Feature(java.lang.String name, float[] vector)
           
 
Method Summary
static java.util.Vector<Feature> add(java.util.Vector<Feature> features, Feature newfeature)
          Add the elements in newfeatures to features.
static java.util.Vector<Feature> add(java.util.Vector<Feature> features, Feature[] newfeatures)
          Add the elements in newfeatures to features.
static java.util.Vector<Feature> add(java.util.Vector<Feature> features, java.util.Vector<Feature> newfeatures)
          Add the elements in newfeatures to features.
 int length()
           
static java.lang.String[] list(java.util.Vector fs)
           
static boolean listContains(java.util.Vector fs, java.lang.String s)
           
 double performance()
           
 float[] toArray()
           
static float[][] toMatrix(java.util.Vector features)
           
 java.lang.String toString()
           
static java.lang.String[] toString(java.util.Vector features)
           
 void unitvar()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vector

public float[] vector

name

public java.lang.String name

performance

public double performance
Constructor Detail

Feature

public Feature(java.lang.String name,
               double performance)

Feature

public Feature(java.lang.String name,
               float[] vector)

Feature

public Feature(java.lang.String name,
               byte[] vector)
Method Detail

unitvar

public void unitvar()

toArray

public float[] toArray()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

performance

public double performance()

list

public static java.lang.String[] list(java.util.Vector fs)

listContains

public static boolean listContains(java.util.Vector fs,
                                   java.lang.String s)

length

public int length()

toMatrix

public static float[][] toMatrix(java.util.Vector features)

add

public static java.util.Vector<Feature> add(java.util.Vector<Feature> features,
                                            Feature[] newfeatures)
Add the elements in newfeatures to features.


add

public static java.util.Vector<Feature> add(java.util.Vector<Feature> features,
                                            Feature newfeature)
Add the elements in newfeatures to features.


add

public static java.util.Vector<Feature> add(java.util.Vector<Feature> features,
                                            java.util.Vector<Feature> newfeatures)
Add the elements in newfeatures to features.


toString

public static java.lang.String[] toString(java.util.Vector features)