swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

oddles of Graph Library Questions...


From: bleydorf
Subject: oddles of Graph Library Questions...
Date: Wed, 22 Oct 1997 14:55:08 -0400

Hi,
I am in the process of converting my spatial based simulation to a graph
based simulation.  And while I understand its as simple as changing
"swarmObject" to "DiGraphNode" and adding "#import <graph.h>".  I also
wanted to get a fuller understanding of the various methods used within
the graph library.  So...

To get the graphLib to compile in Swarm 1.0.2, I had to change the line
in diGraphNode.m which set the node's x and y position (randomly) to:
"nodeItem = [[[[nodeItem setX: [uniformIntRand getIntegerWithMin:
0             withMax: [canvas getWidth]] Y:
[uniformIntRand                     getIntegerWithMin: 0 withMax:
[canvas getHeight]]]..."
Is this OK to do? (it compiled afterward).

Are other Node shapes easy to implement (other than oval or rectangle)?
How do you make new ones?

What does:
[nodeItem setMoveSel: M(agreeX: Y:)]; 
and
[nodeItem setPostMoveSel: M(updateLinks)];
do?

I would assume that -makeLinkTo creates a link directed from the "self"
node to the otherNode, while -makeLinkFrom does the oposite.

What is the difference between:
-makeLinkTo, -addTo, and -linkedTo?
 
and What is the difference between
-makeLinkFrom, -addFrom, and -linkedFrom?

I would assume that -redistribute, repositions all the nodes on a canvas
randomly, right?

What changes do I need to make to the bank Demo to get it to compile on
Swarm 1.0.2?


Thanks in advance,
Brad.


ps.  I would also appreciate any "words for the wise", suggestions, or
"watch-outs" when using the graph Library.

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.
                  ==================================


reply via email to

[Prev in Thread] Current Thread [Next in Thread]