Struct light_curve_feature::features::Amplitude [−][src]
pub struct Amplitude {}
Expand description
Half amplitude of magnitude
$$ \mathrm{amplitude} \equiv \frac{\left( \max{(m)} - \min{(m)} \right)}{2} $$
- Depends on: magnitude
- Minimum number of observations: 1
- Number of features: 1
Example
use light_curve_feature::*; let amplitude = Amplitude::default(); let time = [0.0, 1.0]; // Doesn't depend on time let magn = [0.0, 2.0]; let mut ts = TimeSeries::new_without_weight(&time[..], &magn[..]); assert_eq!(vec![1.0], amplitude.eval(&mut ts).unwrap());
Implementations
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Should return the vector of feature values or EvaluatorError
Should return the vector of feature names. The length and feature order should
correspond to eval()
output Read more
Should return the vector of feature descriptions. The length and feature order should
correspond to eval()
output Read more
Should return the vector of feature values and fill invalid components with given value
Should return the size of vectors returned by eval()
and get_names()
Should return minimum time series length to successfully find feature value
Auto Trait Implementations
impl RefUnwindSafe for Amplitude
impl UnwindSafe for Amplitude
Blanket Implementations
Convert the given value into an approximately equivalent representation.
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Convert the subject into an approximately equivalent representation.
Mutably borrows from an owned value. Read more
Approximate the subject with the default scheme.
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject with a specific scheme.
Approximate the subject to a given type with the default scheme.
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Approximate the subject to a given type with a specific scheme.
Attempt to convert the subject to a given type.