pub struct Merger {
pub series: TimeSeries,
pub data: Vec<(f64, f64)>,
/* private fields */
}
Expand description
Merges multiple time series into one, but can only merge time series of the same length or the same multiple. the point is: it will always yield complete seasons if you use a season on the as_time_series method with the same length as the base. Once time series have been merged they can only be separated using season, but this doesnt affect the merger. but don’t worry, merger only uses clones ;)
If you just need to append data to an existing time series then used the push func in the time series, you dumb thing.
Fields§
§series: TimeSeries
§data: Vec<(f64, f64)>
Implementations§
Source§impl Merger
impl Merger
Sourcepub fn new(base: &TimeSeries) -> Self
pub fn new(base: &TimeSeries) -> Self
Creates a new Merger using a timeseries as a base, or first season
pub fn merge_with(self, series: &TimeSeries) -> Self
Sourcepub fn merge_len(&self) -> usize
pub fn merge_len(&self) -> usize
Returns the lenght that any time series to merge must have (the base length)
pub fn as_time_series(&self) -> TimeSeries
Auto Trait Implementations§
impl Freeze for Merger
impl RefUnwindSafe for Merger
impl Send for Merger
impl Sync for Merger
impl Unpin for Merger
impl UnwindSafe for Merger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more