public BasisSpline(int deg, int GridSize, double a_border, double b_border) { degree = deg; Vector grid_h = Vector.CreateUniformGrid(GridSize, a_border, b_border); C = new Vector(grid_h.Length); type = BasisSplineType.ForMultyGrid; grid = new Grid(degree, grid_h.ToArray); grid.ToClassicSplineGrid(); Console.WriteLine("grid = " + grid.ToString()); }
public BasisSpline(int deg, int GridSize, double a_border, double b_border, GridType gridType) { degree = deg; Vector grid_h = Vector.CreateUniformGrid(GridSize, a_border, b_border); C = new Vector(grid_h.Length); type = BasisSplineType.ForMultyGrid; bool canInterpolate = true; grid = new Grid(degree, grid_h.ToArray); switch (gridType) { case GridType.SimpleSplineGrid: grid.ToSimpleUniformSplineGrid(); canInterpolate = false; break; case GridType.ClassicSplineGrid: grid.ToClassicSplineGrid(); break; case GridType.UniformSplineGrid: grid.ToUniformSplineGrid(); break; case GridType.ExperimentSplineGrid: grid.ToExperimentSplineGrid(); break; case GridType.MiddleUniformSplineGrid: grid.ToMiddleUniformSplineGrid(); break; case GridType.RightUniformSplineGrid: grid.ToRightUniformSplineGrid(); break; case GridType.LeftUniformSplineGrid: grid.ToLeftUniformSplineGrid(); break; default: break; } Console.WriteLine("grid = " + grid.ToString()); }