What are inner|outer nodes|edges?

436 views
Skip to first unread message

Jeffrey Brown

unread,
Apr 28, 2015, 8:47:39 PM4/28/15
to scala...@googlegroups.com
Dear Graphistas,

In the documentation for scala-graph I keep finding terms like "inner node" and "outer edge". Where can I find definitions of those terms?

Googling, I eventually found Wikipedia, under "Tree (data structure)", saying that an inner node is one without children, and an outer node is one that has them -- but it's not at all clear to me that that's what the scala-graph documentation means by it. And even if that is what inner|outer nodes are, I still can't guess what inner|outer edges would be.

Thanks,
Jeff

Peter Empen

unread,
Apr 29, 2015, 3:53:46 AM4/29/15
to scala...@googlegroups.com
Hi Jeff, I tried to give the definitions on core-inner-outer. Tell me please what you are missing there.
Thanks, Peter

Jeffrey Brown

unread,
Apr 29, 2015, 3:20:00 PM4/29/15
to Peter Empen, scala...@googlegroups.com
Thanks, Peter! I had given up on that page, not understanding the table of examples it starts with; I did not realize explanation would appear later on.

It looks like an outer node is a node outside of a context of any particular graph, whereas an inner node is the way a node is represented within a graph. Every outer node equal to 3 is the same object, but two graphs G and H containing 3 would have two different inner nodes for it. Is that right? And if so, can the same be said of edges?

Peter Empen

unread,
Apr 29, 2015, 3:37:40 PM4/29/15
to scala...@googlegroups.com, empen...@gmail.com
Jeff:


It looks like an outer node is a node outside of a context of any particular graph, whereas an inner node is the way a node is represented within a graph.

Right. Outer nodes/edges are those objects you are passing to a graph for containment.
 
Every outer node equal to 3 is the same object, but two graphs G and H containing 3 would have two different inner nodes for it. Is that right? And if so, can the same be said of edges?

Basically yes. You can have several equalling object instances living around but a graph instance will contain at most one of them. Other graph instances may certainly contain one of them each, too.

You may also call inner nodes/edges the graph contetx of the original ones. We call them "inner" because they are instances of the inner trait NodeT.
 
Based on this you are welcome to clarify things on the documentation site which happens to be on GitHub as well:).

Peter

Jeffrey Brown

unread,
Apr 29, 2015, 3:55:51 PM4/29/15
to Peter Empen, scala...@googlegroups.com
It would be an honor! Would I do the editing through Github? By downloading, editing, committing and pushing the changes back up? Will I need special permissions for that?

Peter Empen

unread,
Apr 30, 2015, 6:04:58 AM4/30/15
to scala...@googlegroups.com, empen...@gmail.com
No special permissions required. You may submit a pull request at any time. After cloning you should be able to edit through GitHub directly.

Matan Safriel

unread,
Sep 13, 2015, 6:11:06 AM9/13/15
to scala-graph, empen...@gmail.com
I am favorably looking at using this library, however waking up this old thread for a moment, I think it is worth mentioning the [documentation page about this](http://www.scala-graph.org/guides/core-inner-outer.html) is extremely fuzzy and indefinitive. It appears to comprise vague statements followed by irrelevant information, e.g. "An outer node is roughly speaking..." rather than something like @Jeffrey Brown's usage oriented definition above. As it currently stands this thread might be the only place where this basic library feature is really properly described... I'll try to PR if I end up using the library. Looks like the library is otherwise marvelously architected.

Peter Empen

unread,
Sep 14, 2015, 3:18:12 PM9/14/15
to scala-graph, empen...@gmail.com
Matan,
please refer to the updated page Inner/Outer Objects and give me some feedback. You may pass suggestions for further improvement of the understandablity in any form.

Matan Safriel

unread,
Sep 17, 2015, 7:24:59 AM9/17/15
to Peter Empen, scala-graph
Feedback: perfect.

david....@gmail.com

unread,
Nov 14, 2016, 10:12:46 PM11/14/16
to scala-graph
Maybe it's my own fault, but it was more of a hunt than it might have been for me to figure out that to get the outer node wrapped by an inner node, I can just call the "value" method on the inner node. Is there a better way to do that?

Would it be appropriate to include an example of getting the outer node from an inner node in core-inner-outer? There doesn't seem to be a n toOuter method for nodes.
Thanks, David

Peter Empen

unread,
Nov 15, 2016, 1:55:01 PM11/15/16
to scala-graph
good suggestion, I'll see to it asap

Peter Empen

unread,
Dec 5, 2016, 2:55:15 PM12/5/16
to scala-graph
Done. :)
Reply all
Reply to author
Forward
0 new messages