[Ns-bugs] [Bug 1003] Cached PropagationLossModel
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Wed Oct 6 01:50:07 PDT 2010
http://www.nsnam.org/bugzilla/show_bug.cgi?id=1003
Nicola Baldo <nbaldo at cttc.es> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|nbaldo at cttc.es |mathieu.lacage at sophia.inria
| |.fr
--- Comment #3 from Nicola Baldo <nbaldo at cttc.es> 2010-10-06 04:50:06 EDT ---
I like very much the idea!
As for the implementation, I have a few comments:
1) can you please also modify the implementation of the pre-existing code as
follows?
void
MatrixPropagationLossModel::SetLoss (Ptr<Node> a, Ptr<Node> b, double loss,
bool symmetric)
{
Ptr<MobilityModel> ma = a->GetObject<MobilityModel> ();
Ptr<MobilityModel> mb = b->GetObject<MobilityModel> ();
SetLoss (ma, mb, loss, symmetric);
}
So that we reuse code instead of duplicating it;
2) some proposed renaming:
PropagationLossCachedEvaluator
--> PropagationLossCache
MatrixPropagationLossModel::ContainsPair ()
--> MatrixPropagationLossModel::IsLossSet ()
(for analogy with MatrixPropagationLossModel::SetLoss ())
3) it would be nice if you could provide an example program using this
propagation loss model.
Once the above issues are properly addressed, I think it should be ok to push
this code.
(In reply to comment #2)
> this is really for nicola to review.
Ok I did it, but you're the maintainer of src/common, so it's your call :-)
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs
mailing list