pub fn new(timeline: &'a Timeline, values: Vec<T>) -> Result<Self, TimeSeriesError> {
        if values.len() != timeline.len {
            return Err(TimeSeriesError::TimelineDoesNotMatchValues);
        }
        Ok(TimeSeries::new_unchecked(timeline, values))
    }
/// Create a new TimeSeries object
///
/// This method will throw an error if the length of the timeline provided and the
/// length of the value vector do not match
Create a new TimeSeries object
This method will throw an error if the length of the timeline provided and the
length of the value vector do not match
Create a new TimeSeries object This method will throw an error if the length of the timeline provided and the length of the value vector do not match
pub fn new(timeline: &'a Timeline, values: Vec<T>) -> Result<Self, TimeSeriesError> {
        if values.len() != timeline.len {
            return Err(TimeSeriesError::TimelineDoesNotMatchValues);
        }
        Ok(TimeSeries::new_unchecked(timeline, values))
    }
pub fn new ( timeline : & ' a Timeline , values : Vec < T > ) -> Result < Self , TimeSeriesError > { if values . len ( ) != timeline . len { return Err ( TimeSeriesError :: TimelineDoesNotMatchValues ) ; } Ok ( TimeSeries :: new_unchecked ( timeline , values ) ) }
Create a new TimeSeries object
This method will throw an error if the length of the timeline provided and the
length of the value vector do not match
Create a new TimeSeries object This method will throw an error if the length of the timeline provided and the length of the value vector do not match
timeline
&'a Timeline
values
Vec<T>
timeline
&'a Timeline
values
Vec<T>