Loading...
Searching...
No Matches
NameSet Class Reference Set of strings. More...
Detailed DescriptionSet of strings. Class NameSet implements a symbol or name table. It allows to store or remove names (i.e., Names in a NameSet may be accessed via numbers from 0 through num()-1 and via DataKeys. See DataSet for a description of these concepts. At a time a NameSet can hold a maximum of max() entries. This can be reset with method reMax(). If more than max() names are added to a NameSet, it adjusts itself automatically to the required size. This implies, that references to names within a NameSet may become invalid if the NameSet is expanded. All names (i.e., the actual char strings) in a NameSet are stored in one continuous memory block of size memMax(). At one time memSize() bytes of it are used for actually saving names; the remaining memory is free to hold additional names. memRemax() can be used to reset memMax() but not lower than to memSize(). Method memPack() performs a garbage collection to gain free memory resulting from removed names. Constructor & Destructor Documentation◆ NameSet() [1/2]default constructor.
Definition at line 216 of file nameset.cpp. References factor, hashtab, max(), mem, memFactor, memmax, memused, soplex::NameSetNameHashFunction(), set, and soplex::spx_alloc(). Referenced by add(), add(), NameSet(), and operator=(). ◆ ~NameSet()
◆ NameSet() [2/2]Member Function Documentation◆ add() [1/4]
◆ add() [2/4]
◆ add() [3/4]
adds name Definition at line 40 of file nameset.cpp. References factor, hashtab, max(), mem, memFactor, memMax(), memPack(), memRemax(), memSize(), memused, reMax(), set, size(), SOPLEX_HASHTABLE_FILLFACTOR, SPX_MAXSTRLEN, and soplex::spxSnprintf(). ◆ add() [4/4]◆ clear()
◆ has() [1/3]
◆ has() [2/3]
◆ has() [3/3]
◆ isConsistent()
◆ key() [1/2]
◆ key() [2/2]
returns DataKey of the Definition at line 215 of file nameset.h. References set. Referenced by isConsistent(), memPack(), memRemax(), soplex::operator<<(), and remove(). ◆ max()
◆ memMax()
◆ memPack()
garbage collection. Definition at line 170 of file nameset.cpp. References hashtab, key(), mem, memMax(), memSize(), memused, num(), set, soplex::spx_alloc(), soplex::spx_free(), SPX_MAXSTRLEN, and soplex::spxSnprintf(). Referenced by add(). ◆ memRemax()
◆ memSize()
◆ num()
returns nr. of names in NameSet. Definition at line 185 of file nameset.h. References set. Referenced by add(), add(), isConsistent(), memPack(), memRemax(), and soplex::operator<<(). ◆ number() [1/2]
◆ number() [2/2]
◆ operator=()◆ operator[]() [1/2]
◆ operator[]() [2/2]
◆ reMax()
◆ remove() [1/6]
removes name Definition at line 97 of file nameset.cpp. ◆ remove() [2/6]
◆ remove() [3/6]
removes Definition at line 118 of file nameset.cpp. References remove(). ◆ remove() [4/6]
removes Definition at line 124 of file nameset.cpp. References remove(). ◆ remove() [5/6]
remove all entries where Definition at line 130 of file nameset.cpp. References hashtab, isConsistent(), mem, and set. ◆ remove() [6/6]
◆ size()
Member Data Documentation◆ factor
◆ hashtab
hashtable for names Every name in a NameSet is assigned a DataKey by which it can be accessed (see NameSet::operator[]()). See DataKey for a more detailed description of the concept of Keys. Definition at line 164 of file nameset.h. Referenced by add(), add(), add(), clear(), has(), isConsistent(), key(), memPack(), memRemax(), NameSet(), number(), reMax(), remove(), remove(), and remove(). ◆ mem
string memory Definition at line 157 of file nameset.h. Referenced by add(), isConsistent(), memPack(), memRemax(), NameSet(), operator[](), operator[](), remove(), remove(), and ~NameSet(). ◆ memFactor
memory extension factor for names. When the names added to a NameSet do no longer fit into the name memory (i.e. the memory for saving the strings), it is automatically resized to fit the additional names. Parameter ◆ memmax
size of string memory Definition at line 158 of file nameset.h. Referenced by isConsistent(), memMax(), memRemax(), and NameSet(). ◆ memused
◆ set
|