The main class in elve, describing the graph and the numerous transformation that you can apply to it.
More...
Public Member Functions |
| Graph (const SharedData &data) |
| construct the Graph from shared GraphData
|
| Graph (const SharedData &data, const SparseData &extraData, const Aliases &aliases, const NodeIDSet &excluded={}) |
| construct the Graph from shared GraphData and extra parameters
|
const NodesByID & | nodes () const |
| get the map from NodeID to Nodes
|
const Pin | inputAlias (const Pin &id) const |
| get alias Pin for a particular Pin
|
const Pin | outputAlias (const Pin &id) const |
| get alias Pin for a particular Pin
|
size_t | nodeCount () const |
| expanded nodes count
|
SharedGraph | clusterize (size_t level) |
| apply a greedy algorithm to simplify the graph
|
SharedGraph | group (const NodeIDSet &toGroup, const NodeID &i, const NodeName &groupName) |
| group several nodes as only one node
|
SharedGraph | ungroup (const NodeID &cluster) |
| ungroup the selected group back to the initial nodes
|
SharedGraph | fastGroup (const std::vector< NodeIDSet > &groups, const NodeName &basename) |
| group several set of node in a fast way
|
NodeName | uniqueName (const NodeName &base) const |
| generate a unique name from a basename
|
NodeLevel | highestLevel () const |
| the max of all nodes levels
|
size_t | inputCount () const |
| number of inputs
|
size_t | outputCount () const |
| number of outputs
|
size_t | maxInputIndex () const |
| max index of inputs
|
size_t | maxOutputIndex () const |
| max index of outputs
|
NodeID | newID () const |
| return a new unique (in this graph) node ID
|
const SharedData & | datas () const |
| get the underlying shared GraphData
|
const SparseData & | extraData () const |
| get the extra data used in this graph
|
const Aliases & | aliases () const |
| get the alias table of this graph
|
const NodeIDSet | excluded () const |
| get the excluded set from this graph
|
const NodeData & | data (const NodeID &id) const |
| get NodeData for a particular node, including extra nodes
|
const Node & | node (const NodeID &id) const |
| get the Node from its id
|
const NodePtrs & | inputs () |
| get array of Node* containing all inputs
|
const NodePtrs & | outputs () |
| get array of Node* containing all outputs
|
QJsonObject | json () const |
| construct the json representation of the Graph
|
const QString & | filename () const |
| get the original filename of the graph
|
Static Public Member Functions |
static SharedGraph | fromJson (const QJsonObject &obj) |
| make a new shared graph from the given json
|
The main class in elve, describing the graph and the numerous transformation that you can apply to it.
Graph is the abstract part of the Graph, it contains no information about layouting or drawing. It only stores the properties of the nodes and their relation to each other as a pointer-based graph structure that speed-up the access to GraphData. And exposes nodes and connexions in a convenient way.
The pointer based representation is expanded from the GraphData and auxiliary data passed to the graph that controls how the graph expands :
- extraData : add Nodes to the graph
- aliases : maps Pin to Pin to redirect edges to other nodes, especially extra Nodes
- exluded : set of excluded Id's that prevent nodes being expanded
Layout, Selection, Looks... are stored and managed in ExtendedGraph
Definition at line 64 of file Graph.h.