kokkoras wrote:So, in my app, being able to have orphans is vital. Since I use TSimpleGraph for the visual part, It is clear that in my objects (concepts, relations, arrows, CGs) I use the kind of lists you requested for traversing my graphs, preventing deletion of objects, joining graphs, etc.
So, we have reached a point that personal requirements lead each one at different direction. In such cases the library either gets specialized by following one's requirements, or stays general enough (i.e. library) to satisfy both, at least in the base level.
kokkoras wrote:I am visualizing conceptual graphs (CGs) (a kind of semantic networks used for knowledge representation). CGs contail concepts (rectangles) and relations (ovals). These can be connected with arrows (links) but it is possible to have free concepts. For example, the concept [student] means that there is an entity called student. [student: #Fotis] is an individual who is student. The CG: [Cat]->(on)->[Mat] says that some cat is on the mat. When I delete the relation (on) I want concepts [Cat] and [Mat] to stay on place. And the story goes like this. So, in my app, being able to have orphans is vital. Since I use TSimpleGraph for the visual part, It is clear that in my objects (concepts, relations, arrows, CGs) I use the kind of lists you requested for traversing my graphs, preventing deletion of objects, joining graphs, etc.
Adem wrote:I have one simple worry, though: I need an algorithm/method of relocating the nodes so that they dont overlap and that the most relevant nodes stay closer.
Do you know of such a thing?
Kambiz wrote:You are out of topic, aren't you?
Kambiz wrote:Adem, I think you are more focused on your current case. SimpleGraph supposed to be a general purpose library and should kept generalized.
Kambiz wrote:Object Deletion:
In the new release, there would be a new OnCanDelete event. This event is raised if Delete method of the object is called. Calling Free method of the object, releases the object without triggering the event.
Kambiz wrote:Auto Orphan Removal:
Which object is an Orphan? A link not hooked to any node, a link not connecting two nodes, a node not connected to any link, or a node not connected to any node via a link?
In my point of view, if somebody needs "Auto Orpan Removal", it's better to write his/her specific code in OnObjectRemove event. A more complex code is more difficult to maintain and improve.
Kambiz wrote:Tracking objects used as hook:
In v2.0, when an object that is used as a hook is released, the interface doesn't release Unhook event. This bug will be fixed for the new release, and seems this bug is cause of some posts in this thread.
Kambiz wrote:The "Two List" solution is only very good for traversing the graph and doesn't provide any aid for adding new features.
Kambiz wrote:Because I'm more interested to provide a generic graph component, and in the other hand there's only two votes, I go for "Three List" solution. Having two more list has some overloads, but provides much more flexibility.
Kambiz wrote:In the other hand, the overload is almost nothig for less than few thousnds objects on the graph. I don't think someone uses even more than a few hundreds objects on a graph.
Kambiz wrote:For the new release I've added some new events, which may make your job much easier.
Adem wrote:I am confused by this 'hook' metaphor. What is a hook??
Do you call a TGraphLink between any 2 TGraphNodes a hook. If not what is it?
Adem wrote:Plus, why does the Source and Target be at the ends of Polyline.
Adem wrote:BTW, as I mentioned above, can you somehow separte the logic between the Polyline stuff and the nodes a TGraphLink connects to. For all I can see, PolyLine stuff is a special case of Line and that alone could make it something like TSomekindOfLine whose sole purpose is to draw a fancy line between 2 nodes.
Users browsing this forum: Google [Bot] and 2 guests