mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Data Fields
m::idx::RecursiveModelIndex< Key >::LinearModel Struct Reference

#include <Index.hpp>

Collaboration diagram for m::idx::RecursiveModelIndex< Key >::LinearModel:
[legend]

Public Member Functions

 LinearModel (double slope, double intercept)
 
double operator() (const key_type x) const
 

Static Public Member Functions

static LinearModel train_linear_spline (const_iterator first, const_iterator last, const std::size_t offset=0, const double compression_factor=1.0)
 Builds a linear spline model between the first and last data point.
 
static LinearModel train_linear_regression (const_iterator first, const_iterator last, const std::size_t offset=0, const double compression_factor=1.0)
 Builds a linear regression model from all data points between the first and last .
 

Data Fields

double slope
 
double intercept
 

Detailed Description

template<arithmetic Key>
struct m::idx::RecursiveModelIndex< Key >::LinearModel

Definition at line 145 of file Index.hpp.

Constructor & Destructor Documentation

◆ LinearModel()

template<arithmetic Key>
m::idx::RecursiveModelIndex< Key >::LinearModel::LinearModel ( double  slope,
double  intercept 
)
inline

Definition at line 150 of file Index.hpp.

Member Function Documentation

◆ operator()()

template<arithmetic Key>
double m::idx::RecursiveModelIndex< Key >::LinearModel::operator() ( const key_type  x) const
inline

◆ train_linear_regression()

template<arithmetic Key>
static LinearModel m::idx::RecursiveModelIndex< Key >::LinearModel::train_linear_regression ( const_iterator  first,
const_iterator  last,
const std::size_t  offset = 0,
const double  compression_factor = 1.0 
)
inlinestatic

Builds a linear regression model from all data points between the first and last .

offset defines the first y-value. All y-values are scaled by compression_factor.

Definition at line 171 of file Index.hpp.

References m::idx::RecursiveModelIndex< Key >::LinearModel::intercept, and m::idx::RecursiveModelIndex< Key >::LinearModel::slope.

◆ train_linear_spline()

template<arithmetic Key>
static LinearModel m::idx::RecursiveModelIndex< Key >::LinearModel::train_linear_spline ( const_iterator  first,
const_iterator  last,
const std::size_t  offset = 0,
const double  compression_factor = 1.0 
)
inlinestatic

Builds a linear spline model between the first and last data point.

offset defines the first y-value. All y-values are scaled by compression_factor.

Definition at line 156 of file Index.hpp.

References m::idx::RecursiveModelIndex< Key >::LinearModel::intercept, and m::idx::RecursiveModelIndex< Key >::LinearModel::slope.

Field Documentation

◆ intercept

template<arithmetic Key>
double m::idx::RecursiveModelIndex< Key >::LinearModel::intercept

◆ slope

template<arithmetic Key>
double m::idx::RecursiveModelIndex< Key >::LinearModel::slope

The documentation for this struct was generated from the following file: