- java.lang.Object
-
- net.finmath.marketdata2.model.curves.AbstractCurve
-
- All Implemented Interfaces:
Cloneable,ParameterObject,Curve
- Direct Known Subclasses:
CurveInterpolation,DiscountCurveFromForwardCurve
public abstract class AbstractCurve extends Object implements Curve, Cloneable
Abstract base class for a curve. It stores the name of the curve and provides some convenient way of getting values.- Version:
- 1.0
- Author:
- Christian Fries
-
-
Constructor Summary
Constructors Constructor Description AbstractCurve(String name, LocalDate referenceDate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractCurveclone()Create a deep copied clone.CurvegetCloneForParameter(RandomVariable[] value)Create a clone with a modified parameter.StringgetName()Get the name of the curve.LocalDategetReferenceDate()Return the reference date of this curve, i.e.RandomVariablegetValue(double time)Returns the value for the time using the interpolation method associated with this curve.RandomVariable[]getValues(double[] times)Return a vector of values corresponding to a given vector of times.StringtoString()-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.marketdata2.model.curves.Curve
getCloneBuilder, getValue
-
Methods inherited from interface net.finmath.marketdata2.calibration.ParameterObject
getParameter, setParameter
-
-
-
-
Method Detail
-
getReferenceDate
public LocalDate getReferenceDate()
Description copied from interface:CurveReturn the reference date of this curve, i.e. the date associated with t=0. May be null in case the curve is not associated with a fixed date (e.g. a time homogenous model).- Specified by:
getReferenceDatein interfaceCurve- Returns:
- The date identified as t=0.
-
getValue
public RandomVariable getValue(double time)
Description copied from interface:CurveReturns the value for the time using the interpolation method associated with this curve.
-
getValues
public RandomVariable[] getValues(double[] times)
Return a vector of values corresponding to a given vector of times.- Parameters:
times- A given vector of times.- Returns:
- A vector of values corresponding to the given vector of times.
-
clone
public AbstractCurve clone() throws CloneNotSupportedException
Description copied from interface:CurveCreate a deep copied clone.- Specified by:
clonein interfaceCurve- Overrides:
clonein classObject- Returns:
- A clone (deep copied).
- Throws:
CloneNotSupportedException- Thrown, when the curve could not be cloned.
-
getCloneForParameter
public Curve getCloneForParameter(RandomVariable[] value) throws CloneNotSupportedException
Description copied from interface:ParameterObjectCreate a clone with a modified parameter.- Specified by:
getCloneForParameterin interfaceCurve- Specified by:
getCloneForParameterin interfaceParameterObject- Parameters:
value- The new parameter.- Returns:
- A clone with an otherwise modified parameter.
- Throws:
CloneNotSupportedException- Thrown, when the curve could not be cloned.
-
-