DirectedGraph.h header

#include <ew/app/DirectedGraph.h>

Namespace ew::app

DirectedEdge struct

struct ew::app::DirectedEdge

A directed edge between two nodes, by id.

Members

ew::core::foundation::ContentId ew::app::graph::DirectedEdge::from

The node the edge leaves.

ew::core::foundation::ContentId ew::app::graph::DirectedEdge::to

The node the edge arrives at.

DirectedGraph struct

struct ew::app::DirectedGraph

Nodes and directed edges, and nothing else – the least a layout algorithm needs to know.

Deliberately carries no labels, names, colours or categories. The layout functions in GraphLayout.h never read any of that: they use only node ids and edge endpoints, which is what makes them reusable by anything shaped like a graph. A richer graph converts to this at the call, keeping its own vocabulary to itself.

Extracted from the entity relationship graph, whose layouts these were. Two features now lay out directed graphs – the codex relationship view and the branching-scene editor – and a second implementation of a force-directed relaxation is a second set of subtle bugs in something no reviewer can eyeball.

Members

std::vector<ew::core::foundation::ContentId> ew::app::graph::DirectedGraph::nodes

The nodes, in a caller-chosen order that the deterministic layouts depend on.

std::vector<DirectedEdge> ew::app::graph::DirectedGraph::edges

The directed edges between them.