public class PiecewiseCurve extends AbstractCurve implements Curve
time parameter of the getValue(AnalyticModel, 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.Builder
A builder (following the builder pattern) for PiecewiseCurve objects.
|
| Constructor and Description |
|---|
PiecewiseCurve(Curve curve,
Curve fixedPartCurve,
double fixedPartStartTime,
double fixedPartEndTime) |
| Modifier and Type | Method and Description |
|---|---|
PiecewiseCurve |
clone()
Create a deep copied clone.
|
Curve |
getBaseCurve() |
PiecewiseCurve.Builder |
getCloneBuilder()
Returns a curve builder bases on a clone of this curve.
|
Curve |
getCloneForParameter(double[] value)
Create a clone with a modified parameter.
|
Curve |
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(AnalyticModel 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 double[] getParameter()
ParameterObjectgetParameter in interface ParameterObjectpublic void setParameter(double[] parameter)
ParameterObjectsetParameter in interface ParameterObjectparameter - The parameter associated with the new state of the objects.public String getName()
CurvegetName in interface CurvegetName in class AbstractCurvepublic LocalDate getReferenceDate()
CurvegetReferenceDate in interface CurvegetReferenceDate in class AbstractCurvepublic Curve getBaseCurve()
public Curve getFixedPartCurve()
public double getFixedPartStartTime()
public double getFixedPartEndTime()
public double getValue(double time)
CurvegetValue in interface CurvegetValue in class AbstractCurvetime - Time for which the value should be returned.public double getValue(AnalyticModel model, double time)
Curvepublic Curve getCloneForParameter(double[] value) throws CloneNotSupportedException
ParameterObjectgetCloneForParameter in interface ParameterObjectgetCloneForParameter in interface CurvegetCloneForParameter in class AbstractCurvevalue - The new parameter.CloneNotSupportedException - Thrown, when the curve could not be cloned.public PiecewiseCurve clone() throws CloneNotSupportedException
Curveclone in interface Curveclone in class AbstractCurveCloneNotSupportedException - Thrown, when the curve could not be cloned.public PiecewiseCurve.Builder getCloneBuilder() throws CloneNotSupportedException
CurvegetCloneBuilder in interface CurveCloneNotSupportedException - Thrown, when this curve could not be cloned.public String toString()
toString in class AbstractCurveCopyright © 2019. All rights reserved.