Rerun C++ SDK
Loading...
Searching...
No Matches
rerun::archetypes::GraphEdges Struct Reference

Archetype: A list of edges in a graph. More...

#include <rerun/archetypes/graph_edges.hpp>

Public Types

using IndicatorComponent = rerun::components::IndicatorComponent< IndicatorComponentName >
 Indicator component, used to identify the archetype when converting to a list of components.
 

Public Member Functions

 GraphEdges (GraphEdges &&other)=default
 
 GraphEdges (Collection< rerun::components::GraphEdge > _edges)
 
GraphEdges with_graph_type (rerun::components::GraphType _graph_type) &&
 Specifies if the graph is directed or undirected.
 

Public Attributes

Collection< rerun::components::GraphEdgeedges
 A list of node tuples.
 
std::optional< rerun::components::GraphTypegraph_type
 Specifies if the graph is directed or undirected.
 

Static Public Attributes

static constexpr const char IndicatorComponentName []
 

Detailed Description

Archetype: A list of edges in a graph.

By default, edges are undirected.

Example

Simple directed graph

image

#include <rerun.hpp>
int main() {
const auto rec = rerun::RecordingStream("rerun_example_graph_directed");
rec.spawn().exit_on_failure();
rec.log(
"simple",
rerun::GraphNodes({"a", "b", "c"})
.with_positions({{0.0, 100.0}, {-100.0, 0.0}, {100.0, 0.0}})
.with_labels({"A", "B", "C"}),
rerun::GraphEdges({{"a", "b"}, {"b", "c"}, {"c", "a"}})
// Graphs are undirected by default.
);
}
A RecordingStream handles everything related to logging data into Rerun.
Definition recording_stream.hpp:60
@ Directed
The graph has directed edges.
Archetype: A list of edges in a graph.
Definition graph_edges.hpp:47
GraphEdges with_graph_type(rerun::components::GraphType _graph_type) &&
Specifies if the graph is directed or undirected.
Definition graph_edges.hpp:73
Archetype: A list of nodes in a graph with optional labels, colors, etc.
Definition graph_nodes.hpp:49

Member Function Documentation

◆ with_graph_type()

GraphEdges rerun::archetypes::GraphEdges::with_graph_type ( rerun::components::GraphType  _graph_type) &&
inline

Specifies if the graph is directed or undirected.

If no components::GraphType is provided, the graph is assumed to be undirected.

Member Data Documentation

◆ graph_type

std::optional<rerun::components::GraphType> rerun::archetypes::GraphEdges::graph_type

Specifies if the graph is directed or undirected.

If no components::GraphType is provided, the graph is assumed to be undirected.

◆ IndicatorComponentName

constexpr const char rerun::archetypes::GraphEdges::IndicatorComponentName[]
staticconstexpr
Initial value:
=
"rerun.components.GraphEdgesIndicator"

The documentation for this struct was generated from the following file: