Skip to content

Force equal positions for nodes in identical layers #30

@thchr

Description

@thchr

First: thanks for a brilliant package @oxinabox - it's been extremely helpful to me lately..!

Next: I have use case where I want to enforce that certain nodes in distinct layers share the same ordering. Below is an example:

Here, I would want to constrain the orderings between nodes in layers with the same overall label (e.g., Γ) to have the same ordering of the nodes in each. In the example above, I would want the colors to be ordered identically (and ideally, to have the same y-values) in the two layers. In my example here, similar constraints apply to e.g. the H, Δ, and Λ layers.

To that end, two questions:

  1. What would be a good interface for this?
    One option would be to e.g. have something like force_equal :: Vector{Pair{Int, Int}} which forces the y-positions of the vertices in each pair to be identical. I don't know if this is compatible with the implementation though, because this does not express an ordering per se.
  2. How to best implement something like this? From my not-so-complete understanding of the algorithm, it seems it should be done by imposing a constraint of an identical ordering between layers - and then maybe afterwards equating the y-positions? Is there a more direct path?

I'd be very happy to add it to the package if I could get a bit of guidance on how to approach it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions