farm-ng-core
farm_ng::time_series Namespace Reference

Classes

struct  MaxGap
 
struct  NearnessThreshold
 

Functions

template<class TType >
auto getStamp (TType const &value) -> double
 Non-intrusive way to add getStamp function to a type needed for StampedValue concept. More...
 
template<class TType >
auto interpolate (TType const &foo_from_bar, TType const &foo_from_daz, double p=0.5) -> TType
 
template<>
auto getStamp< StampedFoo > (StampedFoo const &foo) -> double
 
template<>
auto getStamp< StampedInterpolative > (StampedInterpolative const &foo) -> double
 
template<>
auto interpolate< StampedInterpolative > (StampedInterpolative const &lhs, StampedInterpolative const &rhs, double p) -> StampedInterpolative
 
 TEST (interpolative_time_series, unit)
 
 TEST (interpolative_time_series, regression)
 

Variables

template<class TType >
concept StampedValue
 StampedValue is a type that has a timestamp. More...
 
template<class TType >
concept InterpolativeValue
 Interpolative is a type which can be interpolated. More...
 

Function Documentation

◆ getStamp()

template<class TType >
auto farm_ng::time_series::getStamp ( TType const &  value) -> double

Non-intrusive way to add getStamp function to a type needed for StampedValue concept.

The default implementation assumes a member variable called stamp of type double.

◆ getStamp< StampedFoo >()

template<>
auto farm_ng::time_series::getStamp< StampedFoo > ( StampedFoo const &  foo) -> double

◆ getStamp< StampedInterpolative >()

template<>
auto farm_ng::time_series::getStamp< StampedInterpolative > ( StampedInterpolative const &  foo) -> double

◆ interpolate()

template<class TType >
auto farm_ng::time_series::interpolate ( TType const &  foo_from_bar,
TType const &  foo_from_daz,
double  p = 0.5 
) -> TType

◆ interpolate< StampedInterpolative >()

◆ TEST() [1/2]

farm_ng::time_series::TEST ( interpolative_time_series  ,
regression   
)

◆ TEST() [2/2]

farm_ng::time_series::TEST ( interpolative_time_series  ,
unit   
)

Variable Documentation

◆ InterpolativeValue

template<class TType >
concept farm_ng::time_series::InterpolativeValue
Initial value:
= StampedValue<TType> &&
requires(TType m, double p) {
{ interpolate<TType>(m, m, p) } -> sophus::concepts::ConvertibleTo<TType>;
}

Interpolative is a type which can be interpolated.

◆ StampedValue

template<class TType >
concept farm_ng::time_series::StampedValue
Initial value:
= requires(TType m) {
{ getStamp<TType>(m) } -> sophus::concepts::ConvertibleTo<double>;
}

StampedValue is a type that has a timestamp.