GraphView inputs/outputs ordering
-
Review changes -
-
Download -
Patches
-
Plain diff
This MR pretty much solves issues #54 (closed) and #52 (closed).
What is in this MR?
- GraphView has now ordered inputs and outputs, with a default ordering mechanism;
- GraphView inputs and outputs order can be set by the user;
- Simplified MetaOperator to use GraphView inputs/outputs ordering;
- Added graph/Testing.hpp for random DAG generation;
- Updated graph visualization (
GraphView::save()
). - Updated
GraphView::replace()
static member function to take ordering into account;
Properties
- Stable inputs/outputs: when adding/removing nodes, the relative ordering of the remaining inputs/outputs is not altered.
- If a node is added to an input or output of the GraphView, its own input/output replaces the previous one at the same position (see GraphView.cpp#839 and GraphView.cpp#908);
- If a node is added to multiple input/output of the GraphView, its own input/output replaces the previous ones at the position of the first previous input/output (see GraphView.cpp#815 and GraphView.cpp#879);
- If the added node creates new inputs/outputs, they are added after of the existing ones.
- The default inputs/outputs ordering is independent of the nodes construction order, but depends on the order of addition to the GraphView. If a (unordered) set of nodes is added to the GraphView, a ranking algorithm is used to determine a default addition order (see GraphView.cpp#419). Ranking, and therefore inputs/outputs ordering, is unique if the following conditions are met:
- A "root node", or "starting node", is defined OR there is only a single node without any parent in the graph;
- There is no independent graph, i.e. a group of nodes forming a graph without any path to the starting node.
It is therefore possible, most of the cases, to construct a GraphView from a (unordered) set of nodes (i.e. add the set of nodes to a empty, newly constructed GraphView) with a deterministic and unique node ranking and inputs/outputs ordering for a given topoplogy.
Edited by Maxence Naud
Merge request reports
Compare and
- version 2292738e81
- version 21928ea252
- version 20da960c9c
- version 19631de16f
- version 18a25416e4
- version 17c413f115
- version 16a7e545ce
- version 15d17dbfb3
- version 144ff979a6
- version 13bfa7580b
- version 1224cf3e0a
- version 11cb4952a7
- version 1004410d9a
- version 942c099f3
- version 8d0097894
- version 7b5cc6cca
- version 61f2d196d
- version 5a8337fd1
- version 4b92b7f38
- version 3c1ab7a5e
- version 2ca2b839b
- version 1d64f9665
- main (base)
- latest version89cadd1432 commits,
- version 2292738e8131 commits,
- version 21928ea25230 commits,
- version 20da960c9c24 commits,
- version 19631de16f23 commits,
- version 18a25416e422 commits,
- version 17c413f11518 commits,
- version 16a7e545ce17 commits,
- version 15d17dbfb316 commits,
- version 144ff979a615 commits,
- version 13bfa7580b14 commits,
- version 1224cf3e0a13 commits,
- version 11cb4952a712 commits,
- version 1004410d9a11 commits,
- version 942c099f310 commits,
- version 8d00978949 commits,
- version 7b5cc6cca8 commits,
- version 61f2d196d7 commits,
- version 5a8337fd16 commits,
- version 4b92b7f385 commits,
- version 3c1ab7a5e4 commits,
- version 2ca2b839b3 commits,
- version 1d64f96652 commits,
Compare changes
- Side-by-side
- Inline
Files
62Loading