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
10
namespace
zrythm::dsp::graph
11
{
15
class
GraphPruner
16
{
17
public
:
30
static
bool
prune_graph_to_terminals
(
31
Graph
&graph,
32
const
std::vector<std::reference_wrapper<GraphNode>> &terminal_nodes);
33
34
private
:
40
static
void
mark_upstream_nodes (
41
GraphNode
&node,
42
std::unordered_set<GraphNode *> &marked_nodes);
43
};
44
}
zrythm::dsp::graph::GraphNode
Represents a node in a DSP graph.
Definition
graph_node.h:129
zrythm::dsp::graph::GraphPruner
Helper class for pruning a graph.
Definition
graph_pruner.h:16
zrythm::dsp::graph::GraphPruner::prune_graph_to_terminals
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.
zrythm::dsp::graph::Graph
The Graph class represents a graph of DSP nodes.
Definition
graph.h:20
src
dsp
graph_pruner.h
Generated by
1.15.0