diva.sketch.features
Class PathLengthFE

java.lang.Object
  extended by diva.sketch.features.PathLengthFE
All Implemented Interfaces:
FeatureExtractor

public class PathLengthFE
extends Object
implements FeatureExtractor

PathLengthFE computes the path length of a stroke by enumerating over the points in the stroke and summing up the distances between every two consecutive points. One of Rubine's features.

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

Constructor Summary
PathLengthFE()
           
 
Method Summary
 double apply(TimedStroke s)
          Return the path length of a stroke by enumerating over the points in the stroke and summing up the distances between every two consecutive points.
 String getName()
          Return the name of this feature extractor.
static double pathLength(TimedStroke s)
          Return the path length of a stroke by enumerating over the points in the stroke and summing up the distances between every two consecutive points.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathLengthFE

public PathLengthFE()
Method Detail

apply

public double apply(TimedStroke s)
Return the path length of a stroke by enumerating over the points in the stroke and summing up the distances between every two consecutive points.

Specified by:
apply in interface FeatureExtractor

getName

public String getName()
Return the name of this feature extractor.

Specified by:
getName in interface FeatureExtractor

pathLength

public static final double pathLength(TimedStroke s)
Return the path length of a stroke by enumerating over the points in the stroke and summing up the distances between every two consecutive points.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.