[Ns-bugs] [Bug 133] automate memory management of RandomVariable

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Fri Feb 8 11:26:51 PST 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=133





------- Comment #7 from mathieu.lacage at sophia.inria.fr  2008-02-08 14:26 -------
(In reply to comment #6)
> Just to be clear on declaration semantics, I now do the following to get
> different distributions:
> 
> RandomVariable x = UniformVariableImpl(); 
> RandomVariable y(ParetoVariableImpl());
> //etc
> 
> Correct?  My only issue then is the fact that user code may have to include

nope :)

> classes with the word "Impl" in the name which is scary.  Perhaps the
> RandomVariableBase subclasses could leave off the Impl naming?

The user code stays the same and does this:

RandomVariable x = UniformVariable ();

The UniformVariable class constructor calls RandomVariable (new
UniformVariableImpl ()) but this is done behind the scene on behalf of the
user.

> Other than this clarification, I wouldn't be opposed to having this merged for
> this month's release.

What you suggest could be used to achieve the same syntax I think but I have
not tried to implement it. Do you see this as a more desirable solution and do
you want me to attempt to implement it ?


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list