MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ delta()

Eigen::VectorXd MayaFlux::Kinesis::FeatureMetric::delta ( const Eigen::VectorXd & a,
const Eigen::VectorXd & b ) const
inlinenodiscard

Componentwise difference, wrapped on any axis with a period.

Parameters
aLeft operand
bRight operand
Returns
a - b, with each wrapping axis taken the short way round

Definition at line 67 of file FeatureExtent.hpp.

68 {
69 Eigen::VectorXd d = a - b;
70 if (periods.size() == d.size()) {
71 for (Eigen::Index i = 0; i < d.size(); ++i) {
72 const double p = periods(i);
73 if (p > 0.0) {
74 d(i) = std::remainder(d(i), p);
75 }
76 }
77 }
78 return d;
79 }
Eigen::VectorXd periods
Per-axis wrap period. Zero or empty means the axis is linear.

References periods.

Referenced by distance_sq(), and MayaFlux::Kinesis::membership().

Here is the caller graph for this function: