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 INRIA | 3 * Copyright (c) 2005 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 /** | 106 /** |
107 * Get the root index of the heap. | 107 * Get the root index of the heap. |
108 * | 108 * |
109 * \returns The root index. | 109 * \returns The root index. |
110 */ | 110 */ |
111 inline uint32_t Root (void) const; | 111 inline uint32_t Root (void) const; |
112 /** | 112 /** |
113 * Return the index of the last element. | 113 * Return the index of the last element. |
114 * \returns The last index. | 114 * \returns The last index. |
115 */ | 115 */ |
116 uint32_t Last (void) const; | 116 std::size_t Last (void) const; |
117 /** | 117 /** |
118 * Test if an index is the root. | 118 * Test if an index is the root. |
119 * | 119 * |
120 * \param [in] id The index to test. | 120 * \param [in] id The index to test. |
121 * \returns \c true if the \p id is the root. | 121 * \returns \c true if the \p id is the root. |
122 */ | 122 */ |
123 inline bool IsRoot (uint32_t id) const; | 123 inline bool IsRoot (uint32_t id) const; |
124 /** | 124 /** |
125 * Test if an index is at the bottom of the heap. | 125 * Test if an index is at the bottom of the heap. |
126 * | 126 * |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 */ | 160 */ |
161 void TopDown (uint32_t start); | 161 void TopDown (uint32_t start); |
162 | 162 |
163 /** The event list. */ | 163 /** The event list. */ |
164 BinaryHeap m_heap; | 164 BinaryHeap m_heap; |
165 }; | 165 }; |
166 | 166 |
167 } // namespace ns3 | 167 } // namespace ns3 |
168 | 168 |
169 #endif /* HEAP_SCHEDULER_H */ | 169 #endif /* HEAP_SCHEDULER_H */ |
OLD | NEW |