|
| | Logic (double threshold=0.5) |
| | Constructs a Logic node with threshold quantization.
|
| |
| | Logic (LogicOperator op, double threshold=0.5) |
| | Constructs a Logic node with a specific boolean operator.
|
| |
| | Logic (DirectFunction function) |
| | Constructs a Logic node with a custom combinational function.
|
| |
| | Logic (MultiInputFunction function, size_t input_count) |
| | Constructs a Logic node for parallel input evaluation.
|
| |
| | Logic (SequentialFunction function, size_t history_size) |
| | Constructs a Logic node for state-based evaluation.
|
| |
| | Logic (TemporalFunction function) |
| | Constructs a Logic node for time-dependent evaluation.
|
| |
| virtual | ~Logic ()=default |
| |
| double | process_sample (double input=0.) override |
| | Processes a single input sample through the logic function.
|
| |
| std::vector< double > | process_batch (unsigned int num_samples) override |
| | Processes multiple samples in batch mode.
|
| |
| double | process_multi_input (const std::vector< double > &inputs) |
| | Processes multiple parallel inputs.
|
| |
| void | reset () |
| | Resets internal state to initial conditions.
|
| |
| void | set_threshold (double threshold, bool create_default_direct_function=false) |
| | Sets the decision boundary for binary quantization.
|
| |
| void | set_hysteresis (double low_threshold, double high_threshold, bool create_default_direct_function=false) |
| | Configures noise-resistant binary quantization with memory.
|
| |
| void | set_edge_detection (EdgeType type, double threshold=0.5) |
| | Configures digital transition detection.
|
| |
| void | set_operator (LogicOperator op, bool create_default_direct_function=false) |
| | Sets the boolean operation to perform.
|
| |
| void | set_direct_function (DirectFunction function) |
| | Sets a custom combinational logic function.
|
| |
| void | set_multi_input_function (MultiInputFunction function, size_t input_count) |
| | Sets a custom parallel input evaluation function.
|
| |
| void | set_sequential_function (SequentialFunction function, size_t history_size) |
| | Sets a custom state-based evaluation function.
|
| |
| void | set_temporal_function (TemporalFunction function) |
| | Sets a custom time-dependent evaluation function.
|
| |
| void | set_initial_conditions (const std::vector< bool > &initial_values) |
| | Preloads the state history buffer.
|
| |
| void | set_input_node (const std::shared_ptr< Node > &input_node) |
| | Sets the input node to generate logic values from.
|
| |
| LogicMode | get_mode () const |
| | Gets the current computational model.
|
| |
| LogicOperator | get_operator () const |
| | Gets the current boolean operator.
|
| |
| double | get_threshold () const |
| | Gets the decision boundary for binary quantization.
|
| |
| size_t | get_history_size () const |
| | Gets the state history buffer capacity.
|
| |
| const std::deque< bool > & | get_history () const |
| | Gets the current state history.
|
| |
| size_t | get_input_count () const |
| | Gets the number of parallel inputs expected.
|
| |
| bool | was_edge_detected () const |
| | Checks if a state transition was detected.
|
| |
| EdgeType | get_edge_type () const |
| | Gets the type of transitions being monitored.
|
| |
| void | printGraph () override |
| | Prints a visual representation of the logic function.
|
| |
| void | printCurrent () override |
| | Prints the current state and parameters.
|
| |
| void | on_tick (const NodeHook &callback) override |
| | Registers a callback for every generated sample.
|
| |
| void | on_tick_if (const NodeHook &callback, const NodeCondition &condition) override |
| | Registers a conditional callback for generated samples.
|
| |
| void | while_true (const NodeHook &callback) |
| | Registers a callback that executes continuously while output is true.
|
| |
| void | while_false (const NodeHook &callback) |
| | Registers a callback that executes continuously while output is false.
|
| |
| void | on_change_to (const NodeHook &callback, bool target_state) |
| | Registers a callback for when output changes to a specific state.
|
| |
| void | on_change (const NodeHook &callback) |
| | Registers a callback for any state change (true↔false)
|
| |
| bool | remove_hook (const NodeHook &callback) override |
| | Removes a previously registered callback.
|
| |
| bool | remove_conditional_hook (const NodeCondition &callback) override |
| | Removes a previously registered conditional callback.
|
| |
| void | remove_all_hooks () override |
| | Removes all registered callbacks.
|
| |
| void | remove_hooks_of_type (LogicEventType type) |
| |
| void | save_state () override |
| | Saves the node's current state for later restoration Recursively cascades through all connected modulator nodes Protected - only NodeSourceProcessor and NodeBuffer can call.
|
| |
| void | restore_state () override |
| | Restores the node's state from the last save Recursively cascades through all connected modulator nodes Protected - only NodeSourceProcessor and NodeBuffer can call.
|
| |
| virtual | ~Generator ()=default |
| | Virtual destructor for proper cleanup.
|
| |
| virtual void | set_amplitude (double amplitude) |
| | Sets the generator's amplitude.
|
| |
| virtual double | get_amplitude () const |
| | Gets the current base amplitude.
|
| |
| virtual void | enable_mock_process (bool mock_process) |
| | Allows RootNode to process the Generator without using the processed sample.
|
| |
| virtual bool | should_mock_process () const |
| | Checks if the generator should mock process.
|
| |
| virtual void | set_frequency (float frequency) |
| | Sets the generator's frequency.
|
| |
| virtual | ~Node ()=default |
| | Virtual destructor for proper cleanup of derived classes.
|
| |
| virtual void | reset_processed_state () |
| | Resets the processed state of the node and any attached input nodes.
|
| |
| virtual double | get_last_output () |
| | Retrieves the most recent output value produced by the node.
|
| |
| void | register_channel_usage (uint32_t channel_id) |
| | Mark the specificed channel as a processor/user.
|
| |
| void | unregister_channel_usage (uint32_t channel_id) |
| | Removes the specified channel from the usage tracking.
|
| |
| bool | is_used_by_channel (uint32_t channel_id) const |
| | Checks if the node is currently used by a specific channel.
|
| |
| void | request_reset_from_channel (uint32_t channel_id) |
| | Requests a reset of the processed state from a specific channel.
|
| |
| const std::atomic< uint32_t > & | get_channel_mask () const |
| | Retrieves the current bitmask of active channels using this node.
|
| |
| NodeContext & | get_last_context () |
| | Retrieves the last created context object.
|
| |
| void | set_gpu_compatible (bool compatible) |
| | Sets whether the node is compatible with GPU processing.
|
| |
| bool | is_gpu_compatible () const |
| | Checks if the node supports GPU processing.
|
| |
| std::span< const float > | get_gpu_data_buffer () const |
| | Provides access to the GPU data buffer.
|
| |
Digital signal processor implementing boolean logic operations.
The Logic node transforms continuous signals into discrete binary outputs using configurable boolean operations. It supports multiple computational models:
- Combinational logic: Stateless evaluation based solely on current inputs
- Sequential logic: State-based evaluation using history of previous inputs
- Temporal logic: Time-dependent evaluation with timing constraints
- Multi-input logic: Parallel evaluation of multiple input signals
Applications include:
- Binary signal generation
- Event detection and triggering
- State machine implementation
- Digital pattern recognition
- Signal quantization and discretization
- Conditional processing chains
Definition at line 162 of file Logic.hpp.