[Ns-developers] Random Variables API changes

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Jan 20 23:33:15 PST 2009


On Tue, 2009-01-20 at 11:40 -0500, Raj Bhattacharjea wrote:

> I'll admit that this suggested usage pattern was a quick idea I came
> up with to make the tree compilable.  There are some other of these
> quick ideas that need to be looked at.  The biggest of these is a
> change like the following:
> 
> - UniformVariable::GetSingleValue (0, N)
> + UniformVariable().GetValue (0, N)
> 
> I had to do this in one place to make things compile, but seems a bit
> wasteful to construct and destruct a RV in this way each time.  The
> alternative I would suggest is for each class which formerly used the
> static GetSingleValue APIs to now maintain a private RV member from
> which they can draw random variables.  The affected file is
> olsr-agent-impl.cc, so I would suggest Gustavo provides a patch if he
> doesn't like the anonymous temp variable approach I hacked in.

There should be another usage like this in the wifi code. I will fix it
once you land your patch in ns-3-dev

Mathieu

> 



More information about the Ns-developers mailing list