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

specify nodes as truncation points for deep ancestries #9

Open
JeffreyBenjaminBrown opened this issue Aug 21, 2016 · 2 comments
Open

Comments

@JeffreyBenjaminBrown
Copy link
Member

I often want to look at something's ancestor's in as much detail as possible, except where those ancestries reach certain nodes that arise frequently in the display (and which, presumably, I already remember what lies beyond). This would be for that.

I could easily code a stupid version, that asks Smsn to do all the extra work, and then filters out in Emacs ancestors lying beyond the cutoff nodes. (And I might! But it seems like a more responsible use of my time, though, to learn the Java side ...)

@JeffreyBenjaminBrown
Copy link
Member Author

Ideally, I think, one would keep a set of special parents in the graph the children of which were commonly used truncation thresholds. This would be a step toward representing queries about the graph in the graph.

@joshsh
Copy link
Member

joshsh commented Aug 21, 2016

As I see it, a dynamic/generalized view contains a list of children for each node which is determined by some function of (atom, atom's context in graph, node's context in tree). For simple views, the function gives you all children or direct ancestors of a node, up to a given depth. You are suggesting a function which gives you all children or ancestors, conditional on some stop criterion.

See LatexWriter in the latest, which does something like this. I have refactored this class to make the recursion clearer. The output delves as deep into the graph as necessary, where some atoms are recursive in the view and others aren't. We might want to follow a similar pattern for general views.

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

No branches or pull requests

2 participants