net.sf.myra.datamining.statistics
Class Curve

java.lang.Object
  extended by net.sf.myra.datamining.statistics.Curve

public class Curve
extends java.lang.Object

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero

Constructor Summary
Curve()
          Default constructor.
 
Method Summary
 void add(double x, double y)
          Adds a point with the specified (x,y) coordinates to this curve.
 void add(Point point)
          Adds the specified point to this curve.
 double area()
          Returns the estimated area under this curve.
 Point getLast()
          Returns the last point of the curve.
 Point getLast(int n)
          Returns the n-th last point of the curve.
 java.util.List<Point> getPoints()
          Returns the list of points of the curve.
 boolean isEmpty()
          Returns true if this curve contains no coordinates.
 int size()
          Returns the number of coordinaties (points) of this curve.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Curve

public Curve()
Default constructor.

Method Detail

add

public void add(Point point)
Adds the specified point to this curve.

Parameters:
point - the point to be added.

add

public void add(double x,
                double y)
Adds a point with the specified (x,y) coordinates to this curve.

Parameters:
x - the x axis value of the point.
y - the y axis value of the point.

getLast

public Point getLast()
Returns the last point of the curve.

Returns:
the last point of the curve.

getLast

public Point getLast(int n)
Returns the n-th last point of the curve.

Parameters:
n - the index of the previous point.
Returns:
the n-th last point of the curve.

getPoints

public java.util.List<Point> getPoints()
Returns the list of points of the curve.

Returns:
the list of points of the curve.

isEmpty

public boolean isEmpty()
Returns true if this curve contains no coordinates.

Returns:
true if this curve contains no coordinates; false otherwise.

area

public double area()
Returns the estimated area under this curve.

Returns:
the estimated area under this curve.

size

public int size()
Returns the number of coordinaties (points) of this curve.

Returns:
the number of coordinaties (points) of this curve.


Copyright © 2013. All Rights Reserved.