algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::math::Observed Struct Reference

A series split into zero-filled values and a presence mask, for sums that skip gaps. More...

#include <algotradelib/src/math/eigen.hpp>

Public Attributes

Vector values_
 The input, with every unobserved entry replaced by 0.
Vector present_
 1 where the input is observed and 0 where it is not.

Detailed Description

A series split into zero-filled values and a presence mask, for sums that skip gaps.

Made by observed_parts(). Over any range, values_.segment(first, length).sum() is the sum of the observed entries and present_.segment(first, length).sum() is how many there are. Deviations from a mean work the same way, because an absent entry contributes exactly zero:

const Scalar squared = (parts.values_.segment(first, length) -
mean * parts.present_.segment(first, length)).squaredNorm();
double Scalar
The floating-point type the analytics and math layers compute in (double).
Definition scalar.hpp:18

Definition at line 100 of file eigen.hpp.

Member Data Documentation

◆ present_

Vector algotradelib::math::Observed::present_

1 where the input is observed and 0 where it is not.

Definition at line 104 of file eigen.hpp.

Referenced by algotradelib::math::observed_parts().

◆ values_

Vector algotradelib::math::Observed::values_

The input, with every unobserved entry replaced by 0.

Definition at line 102 of file eigen.hpp.

Referenced by algotradelib::math::observed_parts().


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