pub fn solve(&mut self) -> Spline {
        if self.dirty {
            self.segments = self.initial_segs();
            self.ths = self.initial_ths();
            self.dths = vec![0.0; self.ths.len()];
            self.update_segs();
            for i in 0..10 {
                let err = self.iterate(i);
                eprintln!("err = {}", err);
                self.adjust_tensions(i);
                self.update_segs();
            }
            self.dirty = false;
        }

        Spline {
            segments: Cow::Borrowed(self.segments.as_slice()),
            is_closed: self.is_closed,
        }
    }
/// Returns the solved spline based on the current elements.
///
/// The returned [`Spline`] borrows data from `self`; if you need an
/// owned version you can call [`Spline::into_owned`].
Returns the solved spline based on the current elements.
Returns the solved spline based on the current elements .
pub fn solve(&mut self) -> Spline {
        if self.dirty {
            self.segments = self.initial_segs();
            self.ths = self.initial_ths();
            self.dths = vec![0.0; self.ths.len()];
            self.update_segs();
            for i in 0..10 {
                let err = self.iterate(i);
                eprintln!("err = {}", err);
                self.adjust_tensions(i);
                self.update_segs();
            }
            self.dirty = false;
        }
        Spline {
            segments: Cow::Borrowed(self.segments.as_slice()),
            is_closed: self.is_closed,
        }
    }
pub fn solve ( & mut self ) -> Spline { if self . dirty { self . segments = self . initial_segs ( ) ; self . ths = self . initial_ths ( ) ; self . dths = vec ! [ 0.0 self ths len ( ) ] ; self . update_segs ( ) ; for i in 0 .. 10 { let err = self . iterate ( i ) ; eprintln ! ( " " err ) ; self . adjust_tensions ( i ) ; self . update_segs ( ) ; } self . dirty = false ; } Spline { segments : Cow :: Borrowed ( self . segments . as_slice ( ) ) , is_closed : self . is_closed , } }
Returns the solved spline based on the current elements.
Returns the solved spline based on the current elements .
&mut self
&mut self