pub struct MultiColorTimeSeries<'a, P: PassbandTrait + 'a, T: Float> { /* private fields */ }Expand description
The self-referencing struct.
Implementations§
Source§impl<'a, P, T> MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
impl<'a, P, T> MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
pub fn total_lenu(&self) -> usize
pub fn total_lenf(&self) -> T
pub fn passband_count(&self) -> usize
Sourcepub fn from_map(map: impl Into<BTreeMap<P, TimeSeries<'a, T>>>) -> Self
pub fn from_map(map: impl Into<BTreeMap<P, TimeSeries<'a, T>>>) -> Self
Build from an owned BTreeMap. Clones K passband keys into passband_vec.
Sourcepub fn from_flat(
t: impl Into<DataSample<'a, T>>,
m: impl Into<DataSample<'a, T>>,
w: impl Into<DataSample<'a, T>>,
passband: impl AsRef<[P]>,
) -> Self
pub fn from_flat( t: impl Into<DataSample<'a, T>>, m: impl Into<DataSample<'a, T>>, w: impl Into<DataSample<'a, T>>, passband: impl AsRef<[P]>, ) -> Self
Build from flat arrays, deduplicating passbands automatically.
Sourcepub fn from_flat_with_passband_vec(
t: impl Into<DataSample<'a, T>>,
m: impl Into<DataSample<'a, T>>,
w: impl Into<DataSample<'a, T>>,
passband: impl AsRef<[P]>,
uniq_passbands: Vec<P>,
) -> Self
pub fn from_flat_with_passband_vec( t: impl Into<DataSample<'a, T>>, m: impl Into<DataSample<'a, T>>, w: impl Into<DataSample<'a, T>>, passband: impl AsRef<[P]>, uniq_passbands: Vec<P>, ) -> Self
Build from flat arrays with a pre-built sorted unique passband vec.
Each item in passband is matched into uniq_passbands by binary search
with no extra clones for the N-length array.
Sourcepub fn from_flat_borrowed(
t: impl Into<DataSample<'a, T>>,
m: impl Into<DataSample<'a, T>>,
w: impl Into<DataSample<'a, T>>,
passband: Vec<&'a P>,
uniq_passbands: &'a [P],
) -> Self
pub fn from_flat_borrowed( t: impl Into<DataSample<'a, T>>, m: impl Into<DataSample<'a, T>>, w: impl Into<DataSample<'a, T>>, passband: Vec<&'a P>, uniq_passbands: &'a [P], ) -> Self
Build from flat arrays with a fully borrowed passband slice — zero passband clones.
uniq_passbands— the K unique passbands, borrowed with'a.passband— per-observation references intouniq_passbands, also'a.
The caller must ensure uniq_passbands is sorted and every element of passband
is present in uniq_passbands (verified by binary search at construction time).
Sourcepub fn with_mapping_mut<R>(
&mut self,
f: impl FnOnce(&mut MappedMultiColorTimeSeries<'_, 'a, P, T>) -> R,
) -> R
pub fn with_mapping_mut<R>( &mut self, f: impl FnOnce(&mut MappedMultiColorTimeSeries<'_, 'a, P, T>) -> R, ) -> R
Run a closure with mutable access to the mapping representation.
Converts to MappingFlat or Mapping if currently Flat.
pub fn mapping(&self) -> Option<&MappedMultiColorTimeSeries<'_, 'a, P, T>>
pub fn with_flat_mut<R>( &mut self, f: impl FnOnce(&mut FlatMultiColorTimeSeries<'_, 'a, P, T>) -> R, ) -> R
pub fn flat(&self) -> Option<&FlatMultiColorTimeSeries<'_, 'a, P, T>>
pub fn passbands(&self) -> impl Iterator<Item = &P>
Sourcepub fn insert(
&mut self,
passband: P,
ts: TimeSeries<'a, T>,
) -> Option<TimeSeries<'a, T>>
pub fn insert( &mut self, passband: P, ts: TimeSeries<'a, T>, ) -> Option<TimeSeries<'a, T>>
Inserts a new passband / time-series pair, converting to mapping form.
Trait Implementations§
Source§impl<'a, P, T> Clone for MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
impl<'a, P, T> Clone for MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
Source§impl<'a, P: PassbandTrait + 'a + Debug, T: Float + Debug> Debug for MultiColorTimeSeries<'a, P, T>
impl<'a, P: PassbandTrait + 'a + Debug, T: Float + Debug> Debug for MultiColorTimeSeries<'a, P, T>
Source§impl<'a, P, T> Default for MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
impl<'a, P, T> Default for MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
Source§impl<'a, P: PassbandTrait + 'a, T: Float> Drop for MultiColorTimeSeries<'a, P, T>
impl<'a, P: PassbandTrait + 'a, T: Float> Drop for MultiColorTimeSeries<'a, P, T>
Source§impl<'a, P, T> From<BTreeMap<P, TimeSeries<'a, T>>> for MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
impl<'a, P, T> From<BTreeMap<P, TimeSeries<'a, T>>> for MultiColorTimeSeries<'a, P, T>where
P: PassbandTrait,
T: Float,
Source§fn from(map: BTreeMap<P, TimeSeries<'a, T>>) -> Self
fn from(map: BTreeMap<P, TimeSeries<'a, T>>) -> Self
Auto Trait Implementations§
impl<'a, P, T> Freeze for MultiColorTimeSeries<'a, P, T>
impl<'a, P, T> RefUnwindSafe for MultiColorTimeSeries<'a, P, T>
impl<'a, P, T> Send for MultiColorTimeSeries<'a, P, T>
impl<'a, P, T> Sync for MultiColorTimeSeries<'a, P, T>
impl<'a, P, T> Unpin for MultiColorTimeSeries<'a, P, T>
impl<'a, P, T> UnsafeUnpin for MultiColorTimeSeries<'a, P, T>
impl<'a, P, T> UnwindSafe for MultiColorTimeSeries<'a, P, T>
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more