Compounds | |
| struct | Generic::name_match |
| struct | Generic::unary_virtual_function |
Functions | |
| template<classkey_type, classdata_type> void | delete_contents (std::map<key_type, data_type*>& m) |
| Specialization of general delete_contents algorithm for a map of pointers. More... | |
| template<classT1, classT2> pair<const T1, T2> | make_pair_leftconst (const T1& x, const T2& y) |
| Variant of make_pair which keeps the left item const; useful for maps. More... | |
| template<classT, classC, classN> void | insert_named (C& container, const N& name, T* objptr) |
| Insert a named object into any pointer container supporting push_back, overwriting and deleting any existing object with that name (using the objects name() function). More... | |
| template<classT, classC, classN> const T* | find_named (const C& container, const N& name) |
| Returns a pointer to the first object found with the given name() in the given container. More... | |
| template<classT> T | sum (const vector<T>& A) |
| Sum of the elements of a vector. More... | |
| template<classT> const T | crop (const T lower, const T upper, const T x) |
| Crops to the given (inclusive) range, truncating at each end of the range. More... | |
| template<classT> const T | wrap (const T lower, const T upper, const T x) |
| Circularly aliases (wraps) to the given (inclusive) range, as angles do. More... | |
| template<classContainer> void | delete_contents (Container& c) |
| Deletes all pointed-to items and removes them from the given container; any standard container of pointers should work. More... | |
| template<classForwardIterator, classT> void | lower_threshold (ForwardIterator first, ForwardIterator last, const T& threshold, const T& new_value) |
| Apply a lower threshold to any container, with a cropping value that can be different from the threshold. More... | |
| template<classForwardIterator, classT> void | upper_threshold (ForwardIterator first, ForwardIterator last, const T& threshold, const T& new_value) |
| Apply an upper threshold to any container, with a cropping value that can be different from the threshold. More... | |
|
||||||||
|
Crops to the given (inclusive) range, truncating at each end of the range.
Definition at line 40 of file genericalgs.h. Referenced by Plot::ColorLookupTable::operator()(). |
|
||||
|
Deletes all pointed-to items and removes them from the given container; any standard container of pointers should work.
Definition at line 64 of file genericalgs.h. |
|
||||
|
Specialization of general delete_contents algorithm for a map of pointers.
Definition at line 24 of file generic_stdlib.h. Referenced by PointerMap::erase(), Retinal_Composite::remove_all(), and WorldViews::uninit(). |
|
||||||
|
Returns a pointer to the first object found with the given name() in the given container.
Definition at line 95 of file generic_stdlib.h. |
|
||||||||
|
Insert a named object into any pointer container supporting push_back, overwriting and deleting any existing object with that name (using the objects name() function). Since the existing object may be deleted, the container must own the objects to which it points. Definition at line 77 of file generic_stdlib.h. Referenced by FixedWtRegion::add_input(). |
|
||||||||||
|
Apply a lower threshold to any container, with a cropping value that can be different from the threshold.
Definition at line 79 of file genericalgs.h. Referenced by Retina::activate(), and FixedWtRegion::activate(). |
|
||||||
|
Variant of make_pair which keeps the left item const; useful for maps.
Definition at line 36 of file generic_stdlib.h. |
|
||||
|
Sum of the elements of a vector.
Definition at line 105 of file generic_stdlib.h. |
|
||||||||||
|
Apply an upper threshold to any container, with a cropping value that can be different from the threshold.
Definition at line 90 of file genericalgs.h. |
|
||||||||
|
Circularly aliases (wraps) to the given (inclusive) range, as angles do. I have no idea how I came up with this algorithm; it can probably be simplified. Files using this routine will need to include <cmath> Definition at line 51 of file genericalgs.h. |
1.2.1 written by Dimitri van Heesch,
© 1997-2000