Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
graph_pruner.h
1// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include <unordered_set>
7
8#include "dsp/graph.h"
9
10namespace zrythm::dsp::graph
11{
16{
17public:
31 Graph &graph,
32 const std::vector<std::reference_wrapper<GraphNode>> &terminal_nodes);
33
34private:
40 static void mark_upstream_nodes (
41 GraphNode &node,
42 std::unordered_set<GraphNode *> &marked_nodes);
43};
44}
Represents a node in a DSP graph.
Definition graph_node.h:129
Helper class for pruning a graph.
static bool prune_graph_to_terminals(Graph &graph, const std::vector< std::reference_wrapper< GraphNode > > &terminal_nodes)
Prunes an existing graph to only include nodes that lead to specified terminals.
The Graph class represents a graph of DSP nodes.
Definition graph.h:20