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

◆ Logic() [2/6]

MayaFlux::Nodes::Generator::Logic::Logic ( LogicOperator  op,
double  threshold = 0.5 
)

Constructs a Logic node with a specific boolean operator.

Parameters
opBoolean operator to apply
thresholdDecision boundary for binary quantization

Creates a Logic node configured with one of the standard boolean operations (AND, OR, XOR, etc.) using the specified threshold for binary quantization of inputs.

Definition at line 30 of file Logic.cpp.

32 , m_operator(op)
34 , m_input_count(1)
35 , m_threshold(threshold)
36 , m_low_threshold(threshold * 0.9)
37 , m_high_threshold(threshold)
41{
42 set_operator(op);
43}
size_t m_history_size
Maximum size of the history buffer.
Definition Logic.hpp:574
EdgeType m_edge_type
Type of edge to detect.
Definition Logic.hpp:579
double m_threshold
Threshold for boolean conversion.
Definition Logic.hpp:576
double m_high_threshold
High threshold for hysteresis.
Definition Logic.hpp:578
std::vector< double > m_input_buffer
Definition Logic.hpp:584
LogicOperator m_operator
Current logic operator.
Definition Logic.hpp:567
void set_operator(LogicOperator op, bool create_default_direct_function=false)
Sets the boolean operation to perform.
Definition Logic.cpp:347
double m_low_threshold
Low threshold for hysteresis.
Definition Logic.hpp:577
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:580
LogicMode m_mode
Current processing mode.
Definition Logic.hpp:566
size_t m_input_count
Expected number of inputs for multi-input mode.
Definition Logic.hpp:575
std::span< const float > get_gpu_data_buffer() const
Provides access to the GPU data buffer.
Definition Node.cpp:78
@ DIRECT
Stateless evaluation of current input only (combinational logic)