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

◆ combine()

template<typename D , typename R , typename BinaryOp >
Tendency< D, R > MayaFlux::Kinesis::combine ( const Tendency< D, R > &  a,
const Tendency< D, R > &  b,
BinaryOp  op 
)

Combine two tendencies with a binary operation on their outputs.

Template Parameters
DShared domain type
RShared range type
BinaryOpCallable: (R, R) -> R
Parameters
aFirst tendency
bSecond tendency
opBinary combiner
Returns
Combined tendency

Definition at line 65 of file Tendency.hpp.

66{
67 return { .fn = [a, b, op](const D& d) -> R {
68 return op(a(d), b(d));
69 } };
70}
size_t a
size_t b

References a, b, and MayaFlux::Kinesis::Tendency< D, R >::fn.