Implements a map of ParameterMapElement instances.
Implementation is done via an array. Via the call finalize_map(), it is sorted. Then, get() may be called. If it is called before, an error is thrown.
In finalize_map() the array is sorted. So inserting n elements is n*O(1) + O(n*log n) = O(n*log n). Getting an element is then possible in O(log n) by binary search
Definition at line 130 of file ParameterMap.h.
List of all members.
Constructor & Destructor Documentation
Member Function Documentation
Finalizes the map. Has to be called before get may be called if more than one element in map
Definition at line 179 of file ParameterMap.cpp.
Gets a specific element of the map. Note that it is SG_REF'ed finalize_map() has to be called first if more than one elements are in map
|key ||key of the element to get |
- value of the key element
Definition at line 152 of file ParameterMap.cpp.
Puts an newly allocated element into the map
|key ||key of the element |
|value ||value of the lement |
Definition at line 146 of file ParameterMap.cpp.
Member Data Documentation
variable that indicates if underlying array is sorted (and thus get may safely be called)
Definition at line 171 of file ParameterMap.h.
list of CLinearMap elements, this is always kept sorted
Definition at line 167 of file ParameterMap.h.
The documentation for this class was generated from the following files: