コード例 #1
0
        public BSpline RegressBSpline(int degree, double[] pointsX, double[] pointsY, double[] inputKnots)
        {
            var lines = new List <Line>();
            Tuple <double[], int[]>    knotsAndIndexesInPointsX;
            Tuple <double[], double[]> controlPointsAndAuxKnots;
            //double x = 0;
            //double y = 0;
            // var previous = new Point();
            //var current = new Point();
            int numberOfIntervals = inputKnots.Length - 1;

            knotsAndIndexesInPointsX = ArrayMyUtils.FindNearestValuesAndIndexes(pointsX, inputKnots);
            controlPointsAndAuxKnots = _bSplineEngine.FunctionApproximationControlPointsAndAuxiliaryKnots(degree, pointsX, pointsY, knotsAndIndexesInPointsX.Item1, knotsAndIndexesInPointsX.Item2);

            return(InteractiveBSpline(degree, controlPointsAndAuxKnots.Item1, controlPointsAndAuxKnots.Item2, true));
        }