public class PiecewiseCurve extends AbstractCurve implements CurveInterface
time parameter of the getValue(AnalyticModelInterface, double)
method falls inside a pre-defined open interval, it is delegated to the second curve,
otherwise it is delegated to the base curve.| Modifier and Type | Class and Description |
|---|---|
static class |
PiecewiseCurve.CurveBuilder
A builder (following the builder pattern) for PiecewiseCurve objects.
|
| Constructor and Description |
|---|
PiecewiseCurve(CurveInterface curveInterface,
CurveInterface fixedPartCurve,
double fixedPartStartTime,
double fixedPartEndTime) |
| Modifier and Type | Method and Description |
|---|---|
PiecewiseCurve |
clone()
Create a deep copied clone.
|
CurveInterface |
getBaseCurve() |
CurveBuilderInterface |
getCloneBuilder()
Returns a curve builder bases on a clone of this curve.
|
CurveInterface |
getCloneForParameter(double[] value)
Create a clone with a modified parameter.
|
CurveInterface |
getFixedPartCurve() |
double |
getFixedPartEndTime() |
double |
getFixedPartStartTime() |
String |
getName()
Get the name of the curve.
|
double[] |
getParameter()
Get the current parameter associated with the state of the objects.
|
LocalDate |
getReferenceDate()
Return the reference date of this curve, i.e. the date
associated with t=0.
|
double |
getValue(AnalyticModelInterface model,
double time)
Returns the value for the time using the interpolation method associated with this curve
within a given context, i.e., a model.
|
double |
getValue(double time)
Returns the value for the time using the interpolation method associated with this curve.
|
void |
setParameter(double[] parameter)
Set the current parameter and change the state of the objects.
|
String |
toString() |
getValuespublic PiecewiseCurve(CurveInterface curveInterface, CurveInterface fixedPartCurve, double fixedPartStartTime, double fixedPartEndTime)
public double[] getParameter()
ParameterObjectInterfacegetParameter in interface ParameterObjectInterfacepublic void setParameter(double[] parameter)
ParameterObjectInterfacesetParameter in interface ParameterObjectInterfaceparameter - The parameter associated with the new state of the objects.public String getName()
CurveInterfacegetName in interface CurveInterfacegetName in class AbstractCurvepublic LocalDate getReferenceDate()
CurveInterfacegetReferenceDate in interface CurveInterfacegetReferenceDate in class AbstractCurvepublic CurveInterface getBaseCurve()
public CurveInterface getFixedPartCurve()
public double getFixedPartStartTime()
public double getFixedPartEndTime()
public double getValue(double time)
CurveInterfacegetValue in interface CurveInterfacegetValue in class AbstractCurvetime - Time for which the value should be returned.public double getValue(AnalyticModelInterface model, double time)
CurveInterfacegetValue in interface CurveInterfacemodel - An analytic model providing a context.time - Time for which the value should be returned.public CurveInterface getCloneForParameter(double[] value) throws CloneNotSupportedException
ParameterObjectInterfacegetCloneForParameter in interface ParameterObjectInterfacegetCloneForParameter in interface CurveInterfacegetCloneForParameter in class AbstractCurvevalue - The new parameter.CloneNotSupportedException - Thrown, when the curve could not be cloned.public PiecewiseCurve clone() throws CloneNotSupportedException
CurveInterfaceclone in interface CurveInterfaceclone in class AbstractCurveCloneNotSupportedException - Thrown, when the curve could not be cloned.public CurveBuilderInterface getCloneBuilder() throws CloneNotSupportedException
CurveInterfacegetCloneBuilder in interface CurveInterfaceCloneNotSupportedException - Thrown, when this curve could not be cloned.public String toString()
toString in class AbstractCurveCopyright © 2017. All rights reserved.