|
libtcspc C++ API
Streaming TCSPC and time tag data processing
|
Value type representing a directed acyclic graph of processors.
Each processor implements a member function auto introspect_graph() const -> processor_graph that returns an instance representing that processor and all of its downstream nodes.
The graph includes the notion of entry points in addition to nodes and (directed) edges. The entry points are the upstream-most processors represented in the graph.
The graph and its nodes are pure data types, so that they remain valid even after the processors from which they were constructed are moved or destroyed.
Public Member Functions | |
| auto | edges () const -> std::vector< std::pair< processor_node_id, processor_node_id > > |
| Return all of the edges of this graph. | |
| auto | entry_points () const -> std::vector< processor_node_id > |
| Return all of the entry points of this graph. | |
| auto | is_entry_point (processor_node_id id) const -> bool |
| Return whether the given node is an entry point of this graph. | |
| auto | node_index (processor_node_id id) const -> std::size_t |
| Return the numerical index of the given node in this graph. | |
| auto | node_info (processor_node_id id) const -> processor_info |
| Return metadata for the processor represented by the given node. | |
| auto | nodes () const -> std::vector< processor_node_id > |
| Return all of the nodes of this graph. | |
| template<typename Processor> | |
| auto | push_entry_point (Processor const *processor) -> processor_graph & |
| Add a processor node to this graph, upstream of the current entry point (if any), making it the new entry point. | |
Friends | |
| auto | merge_processor_graphs (processor_graph const &a, processor_graph const &b) -> processor_graph |
| Create a new processor graph by merging two existing ones. | |
|
inlinenodiscard |
Return all of the edges of this graph.
Each edge is a pair (source, destination).
|
inlinenodiscard |
Return all of the entry points of this graph.
|
inlinenodiscard |
Return whether the given node is an entry point of this graph.
| id | the node id |
id is an entry point of this graph
|
inlinenodiscard |
Return the numerical index of the given node in this graph.
The returned index maps bijectively to the node id within the context of this graph, so long as the graph is not modified.
| id | a node id in this graph |
|
inlinenodiscard |
Return metadata for the processor represented by the given node.
| id | a node in this graph |
|
inlinenodiscard |
Return all of the nodes of this graph.
|
inline |
Add a processor node to this graph, upstream of the current entry point (if any), making it the new entry point.
| Processor | processor type (usually deduced) |
| processor | pointer to the processor |
|
friend |
Create a new processor graph by merging two existing ones.
The resulting graph contains all of the nodes and edges of a and b. Its entry points are the union of the entry points of a and b.
| a | the first processor graph to merge |
| b | the second processor graph to merge |