Re: [jgrapht-developers] RandomGraphGenerator behavior
Brought to you by:
barak_naveh,
perfecthash
From: assaf l. <ass...@ya...> - 2006-04-29 18:55:22
|
It sounds like a possible feature. If it will be decided to allow it ,the changes should be minor: change documentation change resetRandomSeed to be public (and rename it to a better public name) delete the call to it in the generateGraph method. However , you will destory the behaviour of tests/code which use it , so make sure to update tests and make it clear to the community that such change will effect thier code and that whoever uses it , must fix their code. I do not know what is the policy about API change of this code , which is not officialy released , John V. Sichi might answer that. about changing it to interface , I got no particular issues. Charles Fry <cf...@us...> wrote: It seems to me that the RandomGraphGenerator specification is incorrect. It currently generates the same graph over and over on subsequent calls to generateGraph(), and I argue that it should rather produce (probably) different graphs on each call to generateGraph(). I don't recall any discussion about the class, but it may have occured before I joined the group. In any case, I need to extend RandomGraphGenerator, and I would very much like to see its specification improved. :-) The closest parallels that I can find in Java itself are Random and SecureRandom, which generate random numbers as opposed to random graphs. Their model is to construct a single instance of Random, and then to generate a (probably) different random number on each subsequent method invocation. It is possible to reseed the random number generator (or to seed the constructor) to obtain duplicible results. I argue that RandomGraphGenerator should do the same. It should be possible to construct an instance either with or without specifying a seed, and then to reseed the instance at will. But between reseedings, succesive calls to generateGraph should create (probably) different graphs. I also propose that RandomGraphGenerator be turned into an interface (following the specification outlined above, which I would be glad to turn into code), which could then be implemented by the current generator, as well as the currently experimental UniformRandomGraphGenerator and PartiteRandomGraphGenerator (shouldn't that be Bipartite?), in addition to some new RandomGraphGenerators that I plan to write (RegularRandomGraphGenerator and MOutRandomGraphGenerator to begin with, though PreferentialAttachmentRandomGraphGenerator would be nice, if not verbosely named). Charles -- My job is Keeping faces clean And nobody knows De stubble I've seen Burma-Shave http://burma-shave.org/jingles/1950/my_job_is ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ jgrapht-developers mailing list jgr...@li... https://lists.sourceforge.net/lists/listinfo/jgrapht-developers --------------------------------- Get amazing travel prices for air and hotel in one click on Yahoo! FareChase |