gem/oq-commonlib — pull request #21 by micheles (2014-06-27 04:46:44+00:00)
Title: Decoupled the sampling logic from the GsimLogicTree class

Another step in the direction of decoupling the sampling logic for the LogicTree classes. Now the GsimLogicTree class has no knowledge of the random seed and of the number of samples. It just yields paths iteratively. It is the function `sample_one` which is able to pick up randomly one of the paths, by taking into account the weights.
In the future the same decoupling will be applied to the SourceModelLogicTree class, see https://bugs.launchpad.net/oq-engine/+bug/1323916.