MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Nodes::Network::CombineOperator Class Referencefinal

Turns slot blocks into published outputs. More...

#include <RelationOperators.hpp>

+ Inheritance diagram for MayaFlux::Nodes::Network::CombineOperator:
+ Collaboration diagram for MayaFlux::Nodes::Network::CombineOperator:

Classes

class  Output
 One published signal. More...
 

Public Member Functions

 CombineOperator (size_t slot_count, size_t output_count=1)
 
 CombineOperator (std::shared_ptr< Kinesis::Stochastic::Weights > table)
 Combine through a table shared with other operators.
 
std::span< const double > get_output_block (size_t index) const override
 
size_t get_output_count () const override
 
std::string_view get_type_name () const override
 Type name for introspection.
 
Output & output (size_t index)
 
const Output & output (size_t index) const
 
void process (float frames) override
 Process for one batch cycle.
 
bool publishes_output () const override
 
std::optional< double > query_state (std::string_view) const override
 Query operator internal state.
 
void set_parameter (std::string_view, double) override
 
Kinesis::Stochastic::Weights::Cell weight (size_t slot, size_t output)
 One weight cell, readable and assignable from any thread.
 
const std::shared_ptr< Kinesis::Stochastic::Weights > & weights () const noexcept
 Slot-to-output weights, slot_count rows by output_count columns.
 
- Public Member Functions inherited from MayaFlux::Nodes::Network::RelationOperator
void begin_block ()
 Apply mapped parameters at the start of a block.
 
void map (std::string parameter, Source source)
 Drive an operator parameter from a source.
 
void set_slots (std::vector< RelationSlot > &slots) noexcept
 Supply the current slot storage.
 
void unmap (std::string_view parameter)
 Remove the mapping of a parameter.
 
- Public Member Functions inherited from MayaFlux::Nodes::Network::NetworkOperator
virtual void apply_one_to_one (std::string_view param, const std::shared_ptr< NodeNetwork > &source)
 Apply ONE_TO_ONE parameter mapping (per-point control)
 
virtual bool demands_full_vertex_restore () const
 Whether a downstream compute pass writes the network's vertex buffer in place each cycle, so the geometry producer must keep restoring the CPU-authoritative vertex data every frame.
 
virtual ~NetworkOperator ()=default
 

Private Attributes

std::vector< Output > m_outputs
 
std::vector< double > m_values
 
std::shared_ptr< Kinesis::Stochastic::Weights > m_weights
 

Additional Inherited Members

- Protected Member Functions inherited from MayaFlux::Nodes::Network::RelationOperator
std::span< RelationSlot > slots () const noexcept
 

Detailed Description

Turns slot blocks into published outputs.

Holds a slots-by-outputs table of weights, shareable through weights(), and one block per output. Each output is the weighted sum of slot values in that frame, or, when a combine function is set on it, the function's result over all slot values of the frame. Place after AdvanceOperator and DeriveOperator.

Construction sets weight 1.0 from every slot to output 0 and zero elsewhere. Weight cells may be written from any thread.

Note
weights() keeps the row count given at construction; it does not grow when the network's slot count does. A slot beyond that row count is simply left out of every output until weights()->assign() is called to match, which re-seeds every cell.

Definition at line 391 of file RelationOperators.hpp.


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