OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2005,2006,2007 INRIA | 3 * Copyright (c) 2005,2006,2007 INRIA |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as· | 6 * it under the terms of the GNU General Public License version 2 as· |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 * have been assigned. | 59 * have been assigned. |
60 * | 60 * |
61 * \param stream | 61 * \param stream |
62 * \return the number of stream indices assigned by this model | 62 * \return the number of stream indices assigned by this model |
63 */ | 63 */ |
64 int64_t AssignStreams (int64_t stream); | 64 int64_t AssignStreams (int64_t stream); |
65 private: | 65 private: |
66 /** | 66 /** |
67 * Subclasses must implement this; those not using random variables | 67 * Subclasses must implement this; those not using random variables |
68 * can return zero | 68 * can return zero |
| 69 * |
| 70 * \param stream the stream initial value |
| 71 * \returns a random number |
69 */ | 72 */ |
70 virtual int64_t DoAssignStreams (int64_t stream) = 0; | 73 virtual int64_t DoAssignStreams (int64_t stream) = 0; |
71 }; | 74 }; |
72 | 75 |
73 /** | 76 /** |
74 * \ingroup propagation | 77 * \ingroup propagation |
75 * | 78 * |
76 * \brief the propagation delay is random | 79 * \brief the propagation delay is random |
77 */ | 80 */ |
78 class RandomPropagationDelayModel : public PropagationDelayModel | 81 class RandomPropagationDelayModel : public PropagationDelayModel |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 */ | 126 */ |
124 double GetSpeed (void) const; | 127 double GetSpeed (void) const; |
125 private: | 128 private: |
126 virtual int64_t DoAssignStreams (int64_t stream); | 129 virtual int64_t DoAssignStreams (int64_t stream); |
127 double m_speed; //!< speed | 130 double m_speed; //!< speed |
128 }; | 131 }; |
129 | 132 |
130 } // namespace ns3 | 133 } // namespace ns3 |
131 | 134 |
132 #endif /* PROPAGATION_DELAY_MODEL_H */ | 135 #endif /* PROPAGATION_DELAY_MODEL_H */ |
OLD | NEW |