net.finmath.marketdata.model.curves
Class AbstractCurve
- java.lang.Object
-
- net.finmath.marketdata.model.curves.AbstractCurve
-
- All Implemented Interfaces:
- java.lang.Cloneable, ParameterObjectInterface, CurveInterface
- Direct Known Subclasses:
- Curve, CurveFromProductOfCurves, DiscountCurveFromForwardCurve, DiscountCurveFromProductOfCurves, DiscountCurveNelsonSiegelSvensson, ForwardCurveNelsonSiegelSvensson, IndexCurveFromDiscountCurve, PiecewiseCurve, SeasonalCurve
public abstract class AbstractCurve extends java.lang.Object implements CurveInterface, java.lang.Cloneable
Abstract base class for a curve. It stores the name of the curve and provides some convenient way of getting values.
-
-
Constructor Summary
Constructors Constructor and Description AbstractCurve(java.lang.String name, java.util.Calendar referenceDate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AbstractCurveclone()Create a deep copied clone.CurveInterfacegetCloneForParameter(double[] value)Create a clone with a modified parameter.java.lang.StringgetName()Get the name of the curve.java.util.CalendargetReferenceDate()Return the reference date of this curve, i.e.doublegetValue(double time)Returns the value for the time using the interpolation method associated with this curve.double[]getValues(double[] times)Return a vector of values corresponding to a given vector of times.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.marketdata.model.curves.CurveInterface
getCloneBuilder, getValue
-
Methods inherited from interface net.finmath.marketdata.calibration.ParameterObjectInterface
getParameter, setParameter
-
-
-
-
Constructor Detail
-
AbstractCurve
public AbstractCurve(java.lang.String name, java.util.Calendar referenceDate)- Parameters:
name- The name of this curve.referenceDate- The reference date of this curve.
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:CurveInterfaceGet the name of the curve.- Specified by:
getNamein interfaceCurveInterface- Returns:
- The name of this curve
-
getReferenceDate
public java.util.Calendar getReferenceDate()
Description copied from interface:CurveInterfaceReturn the reference date of this curve, i.e. the date associated with t=0.- Specified by:
getReferenceDatein interfaceCurveInterface- Returns:
- The date identified as t=0.
-
getValue
public double getValue(double time)
Description copied from interface:CurveInterfaceReturns the value for the time using the interpolation method associated with this curve.- Specified by:
getValuein interfaceCurveInterface- Parameters:
time- Time for which the value should be returned.- Returns:
- The value at the give time.
-
getValues
public double[] 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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
clone
public AbstractCurve clone() throws java.lang.CloneNotSupportedException
Description copied from interface:CurveInterfaceCreate a deep copied clone.- Specified by:
clonein interfaceCurveInterface- Overrides:
clonein classjava.lang.Object- Returns:
- A clone (deep copied).
- Throws:
java.lang.CloneNotSupportedException- Thrown, when the curve could not be cloned.
-
getCloneForParameter
public CurveInterface getCloneForParameter(double[] value) throws java.lang.CloneNotSupportedException
Description copied from interface:ParameterObjectInterfaceCreate a clone with a modified parameter.- Specified by:
getCloneForParameterin interfaceParameterObjectInterface- Specified by:
getCloneForParameterin interfaceCurveInterface- Parameters:
value- The new parameter.- Returns:
- A clone with an otherwise modified parameter.
- Throws:
java.lang.CloneNotSupportedException- Thrown, when the curve could not be cloned.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG