Beispiel #1
0
 // set default boundary condition to be zero curvature at both ends
 public CubicSpline()
 {
     this.m_left        = CubicSpline.bd_type.second_deriv;
     this.m_right       = CubicSpline.bd_type.second_deriv;
     this.m_left_value  = 0.0;
     this.m_right_value = 0.0;
 }
Beispiel #2
0
 /// <summary>
 /// optional, but if called it has to come be before PreparePoints()
 /// </summary>
 /// <param name="left"></param>
 /// <param name="left_value"></param>
 /// <param name="right"></param>
 /// <param name="right_value"></param>
 public void SetBoundary(CubicSpline.bd_type left, double left_value, CubicSpline.bd_type right, double right_value)
 {
     Debug.Assert(m_x.Count == 0); // PreparePoints() must not have happened yet
     m_left        = left;
     m_right       = right;
     m_left_value  = left_value;
     m_right_value = right_value;
 }