equal
deleted
inserted
replaced
1698 for x > 0. |
1698 for x > 0. |
1699 */ |
1699 */ |
1700 double |
1700 double |
1701 ErlangVariableImpl::GetValue (unsigned int k, double lambda) |
1701 ErlangVariableImpl::GetValue (unsigned int k, double lambda) |
1702 { |
1702 { |
1703 // XXX: Fixme: do not create a new |
1703 /// \todo do not create a new |
1704 // RNG stream every time the function is called ! |
1704 /// RNG stream every time the function is called ! |
1705 NS_LOG_FUNCTION (this << k << lambda); |
1705 NS_LOG_FUNCTION (this << k << lambda); |
1706 ExponentialVariable exponential (lambda); |
1706 ExponentialVariable exponential (lambda); |
1707 |
1707 |
1708 double result = 0; |
1708 double result = 0; |
1709 for (unsigned int i = 0; i < k; ++i) |
1709 for (unsigned int i = 0; i < k; ++i) |
2037 { |
2037 { |
2038 os << ":" << bound; |
2038 os << ":" << bound; |
2039 } |
2039 } |
2040 return os; |
2040 return os; |
2041 } |
2041 } |
2042 // XXX: support other distributions |
2042 /// \todo support other distributions |
2043 os.setstate (std::ios_base::badbit); |
2043 os.setstate (std::ios_base::badbit); |
2044 return os; |
2044 return os; |
2045 } |
2045 } |
2046 std::istream & operator >> (std::istream &is, RandomVariable &var) |
2046 std::istream & operator >> (std::istream &is, RandomVariable &var) |
2047 { |
2047 { |
2123 } |
2123 } |
2124 } |
2124 } |
2125 else |
2125 else |
2126 { |
2126 { |
2127 NS_FATAL_ERROR ("RandomVariable deserialization not implemented for " << type); |
2127 NS_FATAL_ERROR ("RandomVariable deserialization not implemented for " << type); |
2128 // XXX: support other distributions. |
2128 /// \todo support other distributions. |
2129 } |
2129 } |
2130 return is; |
2130 return is; |
2131 } |
2131 } |
2132 |
2132 |
2133 } // namespace ns3 |
2133 } // namespace ns3 |