Skip to content

Conversation

@stu241636
Copy link
Contributor

No description provided.

@stu241636
Copy link
Contributor Author

The following examples are still problematic:
Since the algorithm is fundamentally a tree-drawing algorithm, graphs which have cycles (in the undirected sense) are drawn unnaturally, as seen in the following example:

algorithm: layered
elk.direction: DOWN
nodePlacement.strategy: WALKER
nodePlacement.bk.fixedAlignment: BALANCED
cycleBreaking.strategy: MODEL_ORDER
considerModelOrder.strategy: NODES_AND_EDGES

node top
node left
node right
node bottom

edge top -> left
edge top -> right
edge left -> bottom
edge right -> bottom

Dangling nodes, which fundamentally also do not construct a tree, but which contain no cycles, are placed on top of each other:

algorithm: layered
elk.direction: DOWN
nodePlacement.strategy: WALKER
nodePlacement.bk.fixedAlignment: BALANCED
cycleBreaking.strategy: MODEL_ORDER
considerModelOrder.strategy: NODES_AND_EDGES

node n1
node n3
node n2

edge n1 -> n2
edge n3 -> n2

for (Layer l : graph.getLayers()) {
List<LNode> nodes = l.getNodes();
for (LNode n : nodes) {
LEdge[] edges = Iterables.toArray(n.getOutgoingEdges(), LEdge.class);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I read the message correctly, the second argument of toArray must be an LEdge[]?

ERROR] Line 130: The method toArray(Iterable<? extends T>, T[]) in the type Iterables is not applicable for the arguments (Iterable<LEdge>, Class<LEdge>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants