Microsimulation API

Public Member Functions | Public Attributes | List of all members
NumericInterpolate Class Reference

`#include <rcpp_table.h>`

## Public Member Functions
| NumericInterpolate ()
| NumericInterpolate (DataFrame df, int i0=0, int i1=1)
void | prepare ()
void | push_back (pair< double, double > xy)
double | approx (double xfind)
double | operator() (double xfind)
double | invert (double yfind)
double | invert (double yfind, double xentry)
double | invert_decreasing (double yfind)

## Public Attributes
NumericVector | x
NumericVector | y
NumericVector | slope
int | n

## Detailed Description

Class for numerical interpolation for x and y. Includes methods to read in x and y from a data-frame or from pairs of (x,y). Includes methods for linear approximation (approx, x->y) and inversion of increasing (invert) and decreasing (invert_decreasing) values (y->x). Includes an operator for a stepwise, left continuous function x->y.

Definition at line 52 of file rcpp_table.h.

## Constructor & Destructor Documentation

## ◆ NumericInterpolate() [1/2]

NumericInterpolate::NumericInterpolate | ( |  | ) |
| inline

Definition at line 56 of file rcpp_table.h.

## ◆ NumericInterpolate() [2/2]

NumericInterpolate::NumericInterpolate | ( | DataFrame | df,
|  | int | i0 = `0`,
|  | int | i1 = `1`
| ) |  |
| inline

Definition at line 58 of file rcpp_table.h.

## Member Function Documentation

## ◆ approx()

double NumericInterpolate::approx | ( | double | xfind | ) |
| inline

Definition at line 75 of file rcpp_table.h.

## ◆ invert() [1/2]

double NumericInterpolate::invert | ( | double | yfind | ) |
| inline

Definition at line 89 of file rcpp_table.h.

## ◆ invert() [2/2]

double NumericInterpolate::invert | ( | double | yfind,
|  | double | xentry
| ) |  |
| inline

Definition at line 98 of file rcpp_table.h.

## ◆ invert_decreasing()

double NumericInterpolate::invert_decreasing | ( | double | yfind | ) |
| inline

Definition at line 102 of file rcpp_table.h.

## ◆ operator()()

double NumericInterpolate::operator() | ( | double | xfind | ) |
| inline

Definition at line 84 of file rcpp_table.h.

## ◆ prepare()

void NumericInterpolate::prepare | ( |  | ) |
| inline

Definition at line 65 of file rcpp_table.h.

## ◆ push_back()

void NumericInterpolate::push_back | ( | pair< double, double > | xy | ) |
| inline

Definition at line 70 of file rcpp_table.h.

## Member Data Documentation

## ◆ n

int NumericInterpolate::n

Definition at line 55 of file rcpp_table.h.

## ◆ slope

NumericVector NumericInterpolate::slope

Definition at line 54 of file rcpp_table.h.

## ◆ x

NumericVector NumericInterpolate::x

Definition at line 54 of file rcpp_table.h.

## ◆ y

NumericVector NumericInterpolate::y

Definition at line 54 of file rcpp_table.h.

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

- /home/marcle/src/R/microsimulation/inst/include/rcpp_table.h