edu.mit.sketch.geom
Class GeneralPathProcessor

java.lang.Object
  |
  +--edu.mit.sketch.geom.GeneralPathProcessor

public class GeneralPathProcessor
extends Object

Class for converting a general path object to a symbolic representation


Field Summary
static int ALPHABET_SIZE
          Converts a general path object to a symbolic representation
static int MAX_FEATURES
          Converts a general path object to a symbolic representation
 
Constructor Summary
GeneralPathProcessor()
           
 
Method Summary
static ArrayList computeFeatureVector(int[] input)
          Compute the feature vector
static ArrayList convertCubic(float begin_x, float begin_y, float[] coefficients, int length_per_symbol)
          Converts a cubic spline to a symbolic representation
static ArrayList convertLine(float begin_x, float begin_y, float[] coefficients, int length_per_symbol)
          Converts a line to a symbolic representation
static String featureString(GeneralPath general_path)
          Computes the String representation of the features for the input GeneralPath
static int stemOccurence(int[] input, int[] stem)
          Compute the number of times the stem occurs in input
static int[] toSymbolic(GeneralPath general_path)
          Converts a general path object to a symbolic representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_FEATURES

public static final int MAX_FEATURES
Converts a general path object to a symbolic representation

ALPHABET_SIZE

public static final int ALPHABET_SIZE
Converts a general path object to a symbolic representation
Constructor Detail

GeneralPathProcessor

public GeneralPathProcessor()
Method Detail

featureString

public static String featureString(GeneralPath general_path)
Computes the String representation of the features for the input GeneralPath

toSymbolic

public static int[] toSymbolic(GeneralPath general_path)
Converts a general path object to a symbolic representation

computeFeatureVector

public static ArrayList computeFeatureVector(int[] input)
Compute the feature vector

stemOccurence

public static int stemOccurence(int[] input,
                                int[] stem)
Compute the number of times the stem occurs in input

convertLine

public static ArrayList convertLine(float begin_x,
                                    float begin_y,
                                    float[] coefficients,
                                    int length_per_symbol)
Converts a line to a symbolic representation

convertCubic

public static ArrayList convertCubic(float begin_x,
                                     float begin_y,
                                     float[] coefficients,
                                     int length_per_symbol)
Converts a cubic spline to a symbolic representation