Class ShapeFunction

java.lang.Object
  extended byShapeFunction
Direct Known Subclasses:
ShapeCall, ShapeGaussian, ShapePut, ShapeSpread, ShapeYield

public abstract class ShapeFunction
extends java.lang.Object

Abstract class for a describing initial shapes

See Also:
Solution.discretize(ShapeFunction)

Field Summary
protected  double amplitude
          The shape's vertical offset
protected  double curvature
          The shape's curvature
protected  double position
          The shape's abscissa
protected  double slope
          The shape's slope
protected  double width
          The shape's width
 
Constructor Summary
ShapeFunction()
           
 
Method Summary
abstract  double getValue(double xa)
          Evaluates the shape for a real argument
abstract  double getValue(Mesh mesh, double xa)
          Evaluates the shape on a discrete mesh point position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

position

protected double position
The shape's abscissa


amplitude

protected double amplitude
The shape's vertical offset


width

protected double width
The shape's width


slope

protected double slope
The shape's slope


curvature

protected double curvature
The shape's curvature

Constructor Detail

ShapeFunction

public ShapeFunction()
Method Detail

getValue

public abstract double getValue(double xa)
Evaluates the shape for a real argument

Parameters:
xa - The argument
Returns:
The value of the function for this argument

getValue

public abstract double getValue(Mesh mesh,
                                double xa)
Evaluates the shape on a discrete mesh point position.

Parameters:
mesh - The mesh attributes
xa - The argument
Returns:
The value of the function at this mesh point