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

◆ Logic() [1/6]

MayaFlux::Nodes::Generator::Logic::Logic ( double  threshold = 0.5)
explicit

Constructs a Logic node with threshold quantization.

Parameters
thresholdDecision boundary for binary quantization

Creates a basic binary quantizer that outputs 1.0 when input exceeds the threshold and 0.0 otherwise.

Definition at line 11 of file Logic.cpp.

15 , m_input_count(1)
16 , m_threshold(threshold)
17 , m_low_threshold(threshold * 0.9)
18 , m_high_threshold(threshold)
20 , m_edge_detected(false)
21 , m_hysteresis_state(false)
22 , m_temporal_time(0.0)
23{
24 m_direct_function = [this](double input) {
25 return input > m_threshold;
26 };
27}
DirectFunction m_direct_function
Function for direct mode.
Definition Logic.hpp:561
size_t m_history_size
Maximum size of the history buffer.
Definition Logic.hpp:566
EdgeType m_edge_type
Type of edge to detect.
Definition Logic.hpp:571
double m_threshold
Threshold for boolean conversion.
Definition Logic.hpp:568
double m_temporal_time
Time tracking for temporal mode.
Definition Logic.hpp:574
double m_high_threshold
High threshold for hysteresis.
Definition Logic.hpp:570
LogicOperator m_operator
Current logic operator.
Definition Logic.hpp:560
double m_low_threshold
Low threshold for hysteresis.
Definition Logic.hpp:569
bool m_edge_detected
Whether an edge was detected in the last processing.
Definition Logic.hpp:572
bool m_hysteresis_state
State for hysteresis operator.
Definition Logic.hpp:573
LogicMode m_mode
Current processing mode.
Definition Logic.hpp:559
size_t m_input_count
Expected number of inputs for multi-input mode.
Definition Logic.hpp:567
@ DIRECT
Stateless evaluation of current input only (combinational logic)
@ THRESHOLD
Binary quantization - true when input exceeds threshold.

References m_direct_function, and m_threshold.