News for hackers. Stuff that matters.
Re:Why Don’t We Have a General-Purpose Tree Editor? by sjtrny on Tuesday April 01, 2014 @08:15PM (#7512721)
Well mathematically we represent trees with matrices. So anything that can edit tabular data can edit trees.
Re:Why Don’t We Have a General-Purpose Tree Editor? by pcmonk on Tuesday April 01, 2014 @09:07PM (#7512920)
You can represent trees with matrices. You can also represent trees with bits. What we want is a representation that is both easy to read and easy to write.
Re:Why Don’t We Have a General-Purpose Tree Editor? by maaku on Tuesday April 01, 2014 @08:17PM (#7512726)
Do we? That's only one possible implementation, and not a very efficient one for most uses.
Re:Why Don’t We Have a General-Purpose Tree Editor? by sjtrny on Tuesday April 01, 2014 @08:34PM (#7512784)
Efficient in what sense? Computationally and storage wise it is the most efficient.
Re:Why Don’t We Have a General-Purpose Tree Editor? by sigstoat on Tuesday April 01, 2014 @09:42PM (#7513043)
that isn't true. there are tradeoffs between using an adjacency matrix, and other representations. different operations will be more efficient on different representations.

and in the special case of extremely sparse graphs like trees, the adjacency matrix isn't going to win very often.

your copy of CLRS should discuss all of this. and for practical uses of non-adjacency matrix representations of trees, you can take a look at every functional programming language, ever.

Re:Why Don’t We Have a General-Purpose Tree Editor? by cjfont on Tuesday April 01, 2014 @08:54PM (#7512864)
But not very human-readable and therefore it is inadequate for editing.