© 2006-2007 ETH Zurich

org.ximtec.igesture.algorithm.siger
Class Statistics

java.lang.Object
  extended by org.ximtec.igesture.algorithm.siger.Statistics

public class Statistics
extends Object

Computes statistics of a textual gesture class description.

Version:
1.0 Dec 2006
Author:
Ueli Kurmann, igesture@uelikurmann.ch, Beat Signer, signer@inf.ethz.ch

Constructor Summary
Statistics(List<Direction> directions, org.sigtec.ink.Note note)
           
 
Method Summary
 int getCorners()
          Returns the number of corners
 double getDiagonal()
          Returns the number of diagonal elements
 double getEast()
          Returns the number of East directions
 double getNorth()
          Returns the number of north directions
 double getNorthEast()
          Returns the number of north/east directions
 double getNorthWest()
          Returns the number of north/west directions
 double getProximity()
          Returns the proportional distance between the first and last point
 double getSouth()
          Returns the number of south directions
 double getSouthEast()
          Returns the number of south/east directions
 double getSouthWest()
          Returns the number of south/west directions
 double getStraight()
          Returns the number of straight elements
 int getTotalDirections()
          Returns the number of direction elements
 int getTraces()
          Returns the number of traces
 double getWest()
          Returns the number of west directions
 boolean isDiagonal(Direction direction)
          Returns true if the direction is diagonal
 boolean isStraight(Direction direction)
          Returns true if the directions is straight
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Statistics

public Statistics(List<Direction> directions,
                  org.sigtec.ink.Note note)
Method Detail

getTotalDirections

public int getTotalDirections()
Returns the number of direction elements

Returns:
the number of direction elements

getStraight

public double getStraight()
Returns the number of straight elements

Returns:
the number of straight elements

getDiagonal

public double getDiagonal()
Returns the number of diagonal elements

Returns:
the number of diagonal elements

getProximity

public double getProximity()
Returns the proportional distance between the first and last point

Returns:
the proportional distance between the first and last point

getEast

public double getEast()
Returns the number of East directions

Returns:
the number of East directions

getWest

public double getWest()
Returns the number of west directions

Returns:
the number of west directions

getNorth

public double getNorth()
Returns the number of north directions

Returns:
the number of north directions

getSouth

public double getSouth()
Returns the number of south directions

Returns:
the number of south directions

getNorthWest

public double getNorthWest()
Returns the number of north/west directions

Returns:
the number of north/west directions

getSouthWest

public double getSouthWest()
Returns the number of south/west directions

Returns:
the number of south/west directions

getNorthEast

public double getNorthEast()
Returns the number of north/east directions

Returns:
the number of north/east directions

getSouthEast

public double getSouthEast()
Returns the number of south/east directions

Returns:
the number of south/east directions

getTraces

public int getTraces()
Returns the number of traces

Returns:
the number of traces

isStraight

public boolean isStraight(Direction direction)
Returns true if the directions is straight

Parameters:
direction - the direction
Returns:
true if the directions is straight

isDiagonal

public boolean isDiagonal(Direction direction)
Returns true if the direction is diagonal

Parameters:
direction - the direction
Returns:
true if the direction is diagonal

getCorners

public int getCorners()
Returns the number of corners

Returns:
the number of corners

toString

public String toString()
Overrides:
toString in class Object

© 2006-2007 ETH Zurich

Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.