GraphStream Users

Archives de la liste Aide


Re: Re: Re: Complexity of method Graph::getNode(String id)


Chronologique Discussions 
  • From: <simone.davico AT usi.ch>
  • To: graphstream-users AT litislab.fr,guilhelm.savin AT gmail.com
  • Subject: Re: Re: Re: Complexity of method Graph::getNode(String id)
  • Date: Wed, 4 Dec 2013 11:45:56 +0100 (CET)

You're right, it's a stupid idea.

My problem is that the graph is static, but when I have to retrieve a node I
don't know what the index of the node is, I only know what is its ID in the
case that the node is present.

The graph could be very huge, as I am performing instrumentation of Java
bytecode, and the nodes are representing methods. For reasons I'm not
explaining because it would take too long, it could be possible that some
methods I encounter are not in the graph, so before taking action I have to
ensure that they are by calling getNode(methodID), where ID is a unique String
based on the method signature.

Honestly I can't think of a way of knowing in advance what the corresponding
index for my ID would be, so I'm probably forced to keep complexity O(n).



Archives gérées par MHonArc 2.6.16.

Top of page