Esempio n. 1
0
        public Vector GetAllBasis(double x)
        {
            Vector B = new Vector(grid.OriginalCount);

            for (int i = 0; i < B.Length; i++)
            {
                B[i] = DeBoorMethods.DeBoorB(x, grid, degree, i);
            }
            return(B);
        }
Esempio n. 2
0
        public Vector GetVectorBasis(Vector x_knots, int index)
        {
            Vector f = new Vector(x_knots.Length);


            for (int i = 0; i < f.Length; i++)
            {
                f[i] = DeBoorMethods.DeBoorB(x_knots[i], grid, degree, index);
            }
            return(f);
        }
Esempio n. 3
0
        public double SlowCalculateSpline(double x)
        {
            double S = 0d;
            double B = 0;

            for (int i = 0; i < C.Length; i++)
            {
                B  = DeBoorMethods.DeBoorB(x, grid, degree, i);
                S += C[i] * B;
            }
            return(S);
        }
Esempio n. 4
0
 public double GetBasis(double x, int index)
 {
     return(DeBoorMethods.DeBoorB(x, grid, degree, index));
 }