Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cycles should be displayed inside the associated cluster #101

Closed
srid opened this issue Apr 14, 2020 · 7 comments
Closed

Cycles should be displayed inside the associated cluster #101

srid opened this issue Apr 14, 2020 · 7 comments
Labels
Graph Zettel Graph related

Comments

@srid
Copy link
Owner

srid commented Apr 14, 2020

Cycles are currently shown globally. But they must appear within their associated cluster.

To do this:

  • Make mother return the list of subgraphs (instead of list of lists of zids)
  • For each cluster, detect cycles and display them in the cluster's view.
@srid srid added the Graph Zettel Graph related label Apr 14, 2020
@srid srid added this to the 0.4 milestone Apr 14, 2020
@srid srid removed this from the 0.4 milestone May 8, 2020
@clojj
Copy link
Contributor

clojj commented Jun 14, 2020

@srid
So conceptually, cycles are Ok with Zettelkasten philosophy ?
If not, could you provide a link/information about Zettelkasten being driected acyclic graphs ?

@Nadrieril
Copy link
Contributor

That's a good question: why should cycles be displayed as an error at all? They're quite natural

@srid
Copy link
Owner Author

srid commented Jun 14, 2020

@clojj There are two graphs here, conceptually:

  • Zettelkasten connections graph: this is not acyclic.
  • Zettelkasten folgezettel graph, which is a subset of the above, and should be acyclic (because it builds a heterarchy, which is a DAG).

The former includes "?cf" links (which can cyclically link to notes), while the later does not.

See Folgezettel Heterarchy.


If you can understand what a folgezettel connection (as distinct from an ordinary connection (i.e., cf)) means, then you can see how a folgezettel heterarchy cannot be cyclic.

@srid
Copy link
Owner Author

srid commented Jun 14, 2020

Example of folgezettel heterarchy from my public zettelkasten: https://www.srid.ca/z-index.html

@Nadrieril
Copy link
Contributor

Ah, I finally understand the distinction... I think it would be helpful to link to the documentation in the error message about cycles if it's not already the case.
That said, does it make semantic sense to ask the user to break a cycle at a potentially arbitrary point? Might it be possible to handle cycles in the folgezettel graph? If we do, a user can still break the cycle manually if they desire, but I find it annoying to force them to.

Here is how I think we could handle it. We would first compute the DAG of strongly connected components. When displaying the tree, you just follow the graph as before from the roots of that DAG. Since there is already a system to not display subtrees twice, I don't think cycles would break anything. The only problem is if a root is itself part of a cycle (i.e. a root component has more than one node), but then I think it's fine to break the cycle arbitrarily. The user can always break the cycle manually if needed.

@clojj
Copy link
Contributor

clojj commented Jun 14, 2020

@clojj There are two graphs here, conceptually:

* Zettelkasten connections graph: this is **not acyclic**.

* Zettelkasten folgezettel graph, which is a _subset_ of the above, and should be acyclic (because it builds a heterarchy, which is a DAG).

The former includes "?cf" links (which can cyclically link to notes), while the later does not.

See Folgezettel Heterarchy.

If you can understand what a folgezettel connection (as distinct from an ordinary connection (i.e., cf)) means, then you can see how a folgezettel heterarchy cannot be cyclic.

@srid thx for clarification !

@srid
Copy link
Owner Author

srid commented Jul 20, 2020

neuron doesn't look for cycles anymore.

@srid srid closed this as completed Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph Zettel Graph related
Projects
None yet
Development

No branches or pull requests

3 participants