Class ShapeCall

java.lang.Object
  extended byShapeFunction
      extended byShapeCall

public class ShapeCall
extends ShapeFunction

ShapeCall -- Payoff function for a call option at expiry

See Also:
Solution.discretize(ShapeFunction)

Field Summary
 
Fields inherited from class ShapeFunction
amplitude, curvature, position, slope, width
 
Constructor Summary
ShapeCall(double strike)
          Creates an instance of the class
 
Method Summary
 double getValue(double xa)
          Evaluates the shape for a real argument
 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
 

Constructor Detail

ShapeCall

public ShapeCall(double strike)
Creates an instance of the class

Parameters:
strike - The strike price
Method Detail

getValue

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

Specified by:
getValue in class ShapeFunction
Parameters:
xa - The argument
Returns:
The value of the function for this argument

getValue

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

Specified by:
getValue in class ShapeFunction
Parameters:
mesh - The mesh coordinates
xa - The argument
Returns:
The value of the function at the specified mesh location