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

◆ DeriveOperator() [3/3]

template<typename Gate >
requires (std::invocable<Gate&, const std::vector<double>&, std::span<double>> && std::same_as<std::invoke_result_t<Gate&, const std::vector<double>&, std::span<double>>, bool>)
MayaFlux::Nodes::Network::DeriveOperator::DeriveOperator ( size_t  target,
std::vector< size_t >  inputs,
Gate  function,
std::vector< double >  coefficients 
)
inline
Parameters
targetIndex of the slot written
inputsIndices of the slots read
functionCallable returning exactly bool, taking the input values of one frame as a const std::vector<double>& and the coefficients as a std::span<double>
coefficientsStarting coefficients, owned by this operator

Definition at line 323 of file RelationOperators.hpp.

324 : m_target(target)
325 , m_inputs(std::move(inputs))
326 , m_values(m_inputs.size(), 0.0)
327 , m_coefficients(std::move(coefficients))
328 , m_kernel([gate = std::move(function)](const std::vector<double>& values, std::span<double> coefs) {
329 return gate(values, coefs) ? 1.0 : 0.0;
330 })
331 , m_gate(true)
332 {
333 }
std::vector< std::byte > values
Definition VDBWriter.cpp:26

References values.