#include <tetmeshlist.h>
Inheritance diagram for TET::Mesh::List< DimensionT, StorageT >:


This list is used to store mesh primitives like points, edges, or tetrahedra in a list for later reference via an index. It can also be used to store other objects besides primitives, as long as they are sortable. It is ensured that every entry in the list is unique, therefore the elements must provide an operator==().
The list can be adjusted for fast insert, which is essential during mesh setup to quickly decide whether an entry that is to be added is already contained in the list. If the list is in fast insert mode, every element is stored twice: first in a vector to ensure fast random access and additionally in a map with the element itself as the key and the index into the vector as value. This map is used to quickly (i.e. with logarithmic instead of linear search time) determine whether an element is already contained in the list.
If fast insert mode is switched off, the map is discarded and the list only has fast random access with linear search time. Note that this is a tradeoff between speed and storage requirements. Also note that in order to use fast insert, the elements must be sortable and therefore provide a sorting function less(). For polymorphic behavior, this function should be virtual and provide value semantics when applied to pointers. One way to achieve this is the use of a Value_Cmp function object.
Note that this is an abstract base class that implements the common features for unoriented as well as oriented lists.
Definition at line 75 of file tetmeshlist.h.
|
|||||
|
constant Iterator
Definition at line 83 of file tetmeshlist.h. |
|
|||||||||
|
Default constructor. By default, the list is created in fast_insertion() mode, as it is most desirable during mesh setup. After setup completion, you can reduce memory requirements by disabling fast_insertion(). Definition at line 241 of file tetmeshlist.h. References TET::Mesh::List< DimensionT, StorageT >::fastsrch, TET::Mesh::List< DimensionT, StorageT >::mp, TET::Mesh::List< DimensionT, StorageT >::nelem, and TET::Mesh::List< DimensionT, StorageT >::set_fast_insertion(). |
|
||||||||||
|
Constructor to set list into given insertion mode. Using this constructor, you can determine whether the list will be created in fast or slow insertion mode
Definition at line 250 of file tetmeshlist.h. References TET::Mesh::List< DimensionT, StorageT >::fastsrch, TET::Mesh::List< DimensionT, StorageT >::mp, TET::Mesh::List< DimensionT, StorageT >::nelem, and TET::Mesh::List< DimensionT, StorageT >::set_fast_insertion(). |
|
|||||||||
|
Destructor. Destructor to delete internal map if list was in fastInsertion() mode Definition at line 259 of file tetmeshlist.h. References TET::Mesh::List< DimensionT, StorageT >::fastsrch, and TET::Mesh::List< DimensionT, StorageT >::mp. |
|
|||||||||
|
Begin of the list. This function returns a const_iterator pointing to the first element in the list.
Definition at line 93 of file tetmeshlist.h. |
|
|||||||||
|
true, if list is empty
Definition at line 210 of file tetmeshlist.h. |
|
|||||||||
|
End of the list. This function returns a const_iterator pointing behind the last element of the list.
Definition at line 106 of file tetmeshlist.h. |
|
|||||||||
|
Insertion behavior. This indicates whether the internal map is available to ensure fast search and therefore fast insertion of elements.
Definition at line 187 of file tetmeshlist.h. |
|
|||||||||
|
Number of insertions. This returns the number of insertions into the list, which is always greater or equal to the number of elements, depending on how many elements have been inserted more than once.
Definition at line 160 of file tetmeshlist.h. |
|
|||||||||
|
mesh redundancy Mesh redundancy is a measure of how many elements of a given mesh are unique. This means, redundancy is zero if all the elements have been inserted only once. It approaches one as the number of insertions heavily exceeds the number of stored elements. Mathematically, this means:
with
Definition at line 293 of file tetmeshlist.h. References TET::Mesh::List< DimensionT, StorageT >::lst, and TET::Mesh::List< DimensionT, StorageT >::nelem. |
|
||||||||||
|
Determine insertion behavior. This lets you determine insertion behavior. With fast_insertion() set to true, insertion of elements will take place in logarithmic time at the disadvantage of increased storage requirements. If set to false, the internal map for fast lookup will be deleted to free up memory. In this state, only fast random access is available which is, however, sufficient after mesh setup.
Definition at line 267 of file tetmeshlist.h. References TET::Mesh::List< DimensionT, StorageT >::fastsrch, TET::Mesh::List< DimensionT, StorageT >::lst, and TET::Mesh::List< DimensionT, StorageT >::mp. Referenced by TET::Mesh::List< DimensionT, StorageT >::List(). |
|
|||||||||
|
Number of elements. This returns the number of unique elements, which reflects the actual storage used by the list.
Definition at line 149 of file tetmeshlist.h. |
|
|||||
|
flag to determine fast search Definition at line 226 of file tetmeshlist.h. Referenced by TET::Mesh::List< DimensionT, StorageT >::List(), TET::Mesh::List< DimensionT, StorageT >::set_fast_insertion(), and TET::Mesh::List< DimensionT, StorageT >::~List(). |
|
|||||
|
vector that holds the elements Definition at line 216 of file tetmeshlist.h. Referenced by TET::Mesh::List< DimensionT, StorageT >::redundancy(), and TET::Mesh::List< DimensionT, StorageT >::set_fast_insertion(). |
|
|||||
|
pointer to map that is used for fast insertion if fastsrch is true Definition at line 221 of file tetmeshlist.h. Referenced by TET::Mesh::List< DimensionT, StorageT >::List(), TET::Mesh::List< DimensionT, StorageT >::set_fast_insertion(), and TET::Mesh::List< DimensionT, StorageT >::~List(). |
|
|||||
|
number of total elements Definition at line 231 of file tetmeshlist.h. Referenced by TET::Mesh::List< DimensionT, StorageT >::List(), and TET::Mesh::List< DimensionT, StorageT >::redundancy(). |
1.3.6