Exemple #1
0
        public XABRInterpolationImpl(List <double> xBegin, int size, List <double> yBegin, double t,
                                     double forward, List <double?> _params,
                                     List <bool> paramIsFixed, bool vegaWeighted,
                                     EndCriteria endCriteria,
                                     OptimizationMethod optMethod,
                                     double errorAccept, bool useMaxError, int maxGuesses, List <double?> addParams = null,
                                     XABRConstraint constraint = null)
            : base(xBegin, size, yBegin)
        {
            endCriteria_  = endCriteria ?? new EndCriteria(60000, 100, 1e-8, 1e-8, 1e-8);
            optMethod_    = optMethod ?? new LevenbergMarquardt(1e-8, 1e-8, 1e-8);
            errorAccept_  = errorAccept;
            useMaxError_  = useMaxError;
            maxGuesses_   = maxGuesses;
            forward_      = forward;
            vegaWeighted_ = vegaWeighted;
            constraint_   = constraint ?? new NoXABRConstraint();

            coeff_          = new XABRCoeffHolder <Model>(t, forward, _params, paramIsFixed, addParams);
            coeff_.weights_ = new InitializedList <double>(size, 1.0 / size);
        }
Exemple #2
0
 public virtual void config <Model>(ProjectedCostFunction costFunction, XABRCoeffHolder <Model> coeff,
                                    double forward)
     where Model : IModel, new ()
 {
 }