[jgrapht-developers] subclassing CrossComponetIterator
Brought to you by:
barak_naveh,
perfecthash
From: gu b. <bou...@ya...> - 2005-06-17 09:43:21
|
Hi, I want to subclass CrossComponetIterator in order to take into account forbidden vertices and forbidden edges. Actually, here what I want : - I do not want to change the structure of the graph via removeVertex and remmoveEdge because it is slow (regarding to CPU time). - I want to prevent somme edges from being traversed and I say "this edge is forbidden". - For some vertices I do not want at all to examine its edges ant I say "this vertex is forbidden". Here ideas I have to tackle this matter (but it will need to modify few lines of the core jgrapht source code) : - for the 3d point : let the method addUnseenChildrenOf be protected (instead of private) such that I could override it like that : "if vertex is forbidden then do nothing else super.addUnseenChildrenOf". - for the 2d point : add a protected method "edgesOfIterator(Vertex)" and a graph member instead of "Specifics" classes (each time we used Specifics, it is to iterate over the edges of a vertex depending on the directed/undirected feature of the graph). Thus I would have to override this "edgesOfIterator" and ignore forbidden edges when returning the "next" edge. What do you think about it ? If you agree with me, I would appreciate if these changes could be in the next 0.6 release. Thanks Guillaume ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com |