Symmetric DAG #656

Merged
merged 7 commits into from Feb 2, 2017

Conversation

Projects
None yet
2 participants
@laerreal
Contributor

laerreal commented Feb 1, 2017

Current column allocation algorithm is too straightforward. It results in following issues.

Graph inclines towards one direction. I think symmetric DAG would appear more pretty.

Graph is spread enought after merging of many parallel branches. In such situation new branches may jump far enough from its forks because the fork column is far from 0 column and there is free column near 0.

The patch series targets mostly this issues.

Changing of graph alignment in commit 02818e2 breaks tag label overlapping prevention algorithm. The patch dd164d1 improves the algorithm to be adaptive to current graph alignment.

laerreal added some commits Feb 1, 2017

dag: keep maximum and minimum column index value
Signed-off-by: Efimov Vasily <real@ispras.ru>
dag: prevent tag label overlapping with respect to current DAG orient…
…ation

Currently, DAG orientation along x-axis could be easily turned by changing sign
of x_off attribute. So, row allocation algorithm must adapt to current x_off
value during prevention of label overlapping.

Signed-off-by: Efimov Vasily <real@ispras.ru>
dag: change initial frontier selection heuristic
Currently, frontier value for newly allocated column is chosen using right most
frontier value. New approach is to search for nearest allocated column and use
its frontier.
The patch also is required by consequent symmetric column allocation introduced
in consequent patches because no column may exists at left side of currently
allocating one.

Signed-off-by: Efimov Vasily <real@ispras.ru>
dag: allocate columns in both left and right directions
Signed-off-by: Efimov Vasily <real@ispras.ru>
dag: rework column allocation algorithm
The patch adds optional desired column index argument for column allocation
method.

Signed-off-by: Efimov Vasily <real@ispras.ru>
dag: make branches do not jump far from fork's column
Signed-off-by: Efimov Vasily <real@ispras.ru>
dag: update column allocation algorithm description
Signed-off-by: Efimov Vasily <real@ispras.ru>

davvid added a commit to davvid/git-cola that referenced this pull request Feb 2, 2017

Merge pull request #656 from laerreal/symmetric_dag
* laerreal/symmetric_dag:
  dag: update column allocation algorithm description
  dag: make branches do not jump far from fork's column
  dag: rework column allocation algorithm
  dag: allocate columns in both left and right directions
  dag: change initial frontier selection heuristic
  dag: prevent tag label overlapping with respect to current DAG orientation
  dag: keep maximum and minimum column index value

Signed-off-by: David Aguilar <davvid@gmail.com>
@davvid

This comment has been minimized.

Show comment
Hide comment
@davvid

davvid Feb 2, 2017

Member

Awesome, thanks!

Member

davvid commented Feb 2, 2017

Awesome, thanks!

@davvid davvid merged commit a657a94 into git-cola:master Feb 2, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment