public ParametricCubicSplineInterpolationInterpolatedData(ParametricCubicSplineInterpolationCurveParam curveParam)
 {
     this.curveParam = curveParam;
     PiecewiseIntervalPolynomialCurveElement xCurve = GenerateCurve(curveParam.XParam);
     PiecewiseIntervalPolynomialCurveElement yCurve = GenerateCurve(curveParam.YParam);
     curve = new ParametricCubicSplineInterpolationCurveElement(xCurve, yCurve);
 }
 public ParametricCubicSplineInterpolationCurve(ICurveParam curveParam)
 {
     if (canDrawCurve(curveParam))
     {
         canDraw = true;
         this.curveParam = (ParametricCubicSplineInterpolationCurveParam)curveParam;
     }
 }
Exemplo n.º 3
0
 public void DrawPCSICurve(string curveName, int borderConditionType, string val1, string val2, string val3, string val4)
 {
     BaseDataPointList pointList = this.basePoints;
     double subVal1 = 0, subVal2 = 0, subVal3 = 0, subVal4 = 0;
     if (borderConditionType != 2)
     {
         if (!Double.TryParse(val1, out subVal1) || !Double.TryParse(val2, out subVal2))
         {
             throw new ArgumentException("The left or right border can't be recognized.");
         }
         if (borderConditionType == 3)
         {
             if (!Double.TryParse(val3, out subVal3) || !Double.TryParse(val4, out subVal4))
             {
                 throw new ArgumentException("The left or right border can't be recognized.");
             }
         }
     }
     ParametricCubicSplineInterpolationCurveParam curveParam = new ParametricCubicSplineInterpolationCurveParam(pointList.Points, (PCSIBorderConditionType)borderConditionType, new DoubleExtension(subVal1), new DoubleExtension(subVal2), new DoubleExtension(subVal3), new DoubleExtension(subVal4));
     ParametricCubicSplineInterpolationCurve curve = new ParametricCubicSplineInterpolationCurve(curveParam);
     DrawLines(curveName, curve.sampleCurvePoints());
 }