Graphviz 13.0.0~dev.20241220.2304
|
#include <cghdr.h>
Data Fields | |
Dt_t | legacy |
the traditional tree of subgraphs | |
Agraphs_t | linear |
the newer contiguous collection | |
two alternative representations of a graph collection
The subgraphs of a graph have traditionally been stored in a Dt_t
. However it is much faster to iterate through a C array of the subgraphs instead of a cdt tree of them. To preserve backwards compatibility, we maintain both:
what the cgraph.h user sees: what we see internally:
Agraph_t Agraph_t ┌─────────┐ ┌─────────┐ │ … │ │ … │ ├─────────┤ ┌───────────┐ ├─────────┤ ┌───────────┐ │ g_seq ─┼───►│ Dt_t │ │ g_seq ─┼───►│ Dt_t │ ├─────────┤ └───────────┘ ├─────────┤ ├───────────┤ │ … │ │ … │ │ Agraphs_t │ └───────────┘
To facilitate this, g_seq2
can be used to access the second representation.