public CubicInterpolationImpl(List <double> xBegin, int size, List <double> yBegin, CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftCondition, double leftConditionValue, CubicInterpolation.BoundaryCondition rightCondition, double rightConditionValue) : base(xBegin, size, yBegin) { da_ = da; monotonic_ = monotonic; leftType_ = leftCondition; rightType_ = rightCondition; leftValue_ = leftConditionValue; rightValue_ = rightConditionValue; // coefficients primitiveConst_ = new InitializedList <double>(size - 1); a_ = new InitializedList <double>(size - 1); b_ = new InitializedList <double>(size - 1); c_ = new InitializedList <double>(size - 1); monotonicityAdjustments_ = new InitializedList <bool>(size); if (leftType_ == CubicInterpolation.BoundaryCondition.Lagrange || rightType_ == CubicInterpolation.BoundaryCondition.Lagrange) { Utils.QL_REQUIRE(size >= 4, () => "Lagrange boundary condition requires at least " + "4 points (" + size.ToString() + " are given)"); } }
public Cubic(CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftCondition, double leftConditionValue, CubicInterpolation.BoundaryCondition rightCondition, double rightConditionValue) { da_ = da; monotonic_ = monotonic; leftType_ = leftCondition; rightType_ = rightCondition; leftValue_ = leftConditionValue; rightValue_ = rightConditionValue; }
public LogCubic(CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftCondition, double leftConditionValue, CubicInterpolation.BoundaryCondition rightCondition, double rightConditionValue) { da_ = da; monotonic_ = monotonic; leftType_ = leftCondition; rightType_ = rightCondition; leftValue_ = leftConditionValue; rightValue_ = rightConditionValue; }
/*! \pre the \f$ x \f$ values must be sorted. */ public LogCubicInterpolation(List <double> xBegin, int size, List <double> yBegin, CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftC, double leftConditionValue, CubicInterpolation.BoundaryCondition rightC, double rightConditionValue) { impl_ = new LogInterpolationImpl <Cubic>(xBegin, size, yBegin, new Cubic(da, monotonic, leftC, leftConditionValue, rightC, rightConditionValue)); impl_.update(); }
/*! \pre the \f$ x \f$ values must be sorted. */ public MixedLinearCubicInterpolation(List <double> xBegin, int xEnd, List <double> yBegin, int n, Behavior behavior, CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftC, double leftConditionValue, CubicInterpolation.BoundaryCondition rightC, double rightConditionValue) { impl_ = new MixedInterpolationImpl <Linear, Cubic>(xBegin, xEnd, yBegin, n, behavior, new Linear(), new Cubic(da, monotonic, leftC, leftConditionValue, rightC, rightConditionValue)); impl_.update(); }
// private CoefficientHolder coeffs_; public CubicInterpolation(List <double> xBegin, int size, List <double> yBegin, CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftCond, double leftConditionValue, CubicInterpolation.BoundaryCondition rightCond, double rightConditionValue) { impl_ = new CubicInterpolationImpl(xBegin, size, yBegin, da, monotonic, leftCond, leftConditionValue, rightCond, rightConditionValue); impl_.update(); // coeffs_ = boost::dynamic_pointer_cast<detail::CoefficientHolder>(impl_); }
public MixedLinearCubic(int n, Behavior behavior, CubicInterpolation.DerivativeApprox da, bool monotonic = true, CubicInterpolation.BoundaryCondition leftCondition = QLNet.CubicInterpolation.BoundaryCondition.SecondDerivative, double leftConditionValue = 0.0, CubicInterpolation.BoundaryCondition rightCondition = CubicInterpolation.BoundaryCondition.SecondDerivative, double rightConditionValue = 0.0) { n_ = n; behavior_ = behavior; da_ = da; monotonic_ = monotonic; leftType_ = leftCondition; rightType_ = rightCondition; leftValue_ = leftConditionValue; rightValue_ = rightConditionValue; }
public CubicInterpolationImpl(List <double> xBegin, int size, List <double> yBegin, CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftCondition, double leftConditionValue, CubicInterpolation.BoundaryCondition rightCondition, double rightConditionValue) : base(xBegin, size, yBegin) { da_ = da; monotonic_ = monotonic; leftType_ = leftCondition; rightType_ = rightCondition; leftValue_ = leftConditionValue; rightValue_ = rightConditionValue; // coefficients primitiveConst_ = new InitializedList <double>(size - 1); a_ = new InitializedList <double>(size - 1); b_ = new InitializedList <double>(size - 1); c_ = new InitializedList <double>(size - 1); monotonicityAdjustments_ = new InitializedList <bool>(size); }
public CubicInterpolationImpl(List<double> xBegin, int size, List<double> yBegin, CubicInterpolation.DerivativeApprox da, bool monotonic, CubicInterpolation.BoundaryCondition leftCondition, double leftConditionValue, CubicInterpolation.BoundaryCondition rightCondition, double rightConditionValue) : base(xBegin, size, yBegin) { da_ = da; monotonic_ = monotonic; leftType_ = leftCondition; rightType_ = rightCondition; leftValue_ = leftConditionValue; rightValue_ = rightConditionValue; // coefficients primitiveConst_ = new InitializedList<double>(size - 1); a_ = new InitializedList<double>(size - 1); b_ = new InitializedList<double>(size - 1); c_ = new InitializedList<double>(size - 1); monotonicityAdjustments_ = new InitializedList<bool>(size); }