NameSet Class Reference Set of strings.Class NameSet implements a symbol or name table. It allows to store or remove names (i.e.,
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 Documentationdefault constructor.
Definition at line 247 of file nameset.cpp. References NameSet::max(), NameSet::mem, NameSet::memmax, NameSet::memused, and soplex::spx_alloc(). Referenced by soplex::NameSetNameHashFunction().
destructor. Definition at line 259 of file nameset.cpp. References NameSet::mem, and soplex::spx_free(). Referenced by SPxBasis::readBasis(), SoPlex::readBasisFile(), SPxLPBase< R >::readLPF(), and SPxLPBase< R >::readMPS(). Member Function Documentation
Definition at line 25 of file nameset.cpp. Referenced by NameSet::add(), NameSet::has(), soplex::LPFhasRowName(), soplex::LPFreadColName(), soplex::MPSreadCols(), soplex::MPSreadRows(), SPxBasis::readBasis(), SoPlex::readBasisFile(), and SPxLPBase< R >::readLPF().
adds name Definition at line 31 of file nameset.cpp. References NameSet::factor, NameSet::hashtab, HASHTABLE_FILLFACTOR, NameSet::max(), NameSet::mem, NameSet::memFactor, NameSet::memMax(), NameSet::memPack(), NameSet::memRemax(), NameSet::memSize(), NameSet::memused, NameSet::reMax(), and NameSet::size().
Definition at line 64 of file nameset.cpp. References NameSet::add(), NameSet::hashtab, and NameSet::num(). adds all names in Definition at line 74 of file nameset.cpp. References NameSet::add(), NameSet::hashtab, and NameSet::num().
removes all names from NameSet. Definition at line 131 of file nameset.cpp. References NameSet::hashtab, and NameSet::memused. Referenced by SPxLPBase< R >::readLPF(), SPxLPBase< R >::readMPS(), and NameSet::remove().
does NameSet has a name with number Definition at line 231 of file nameset.h. Referenced by SoPlexLegacy::getColName(), soplex::getColName(), SoPlexLegacy::getRowName(), soplex::getRowName(), NameSet::isConsistent(), soplex::LPFgetRowName(), soplex::MPSgetRowName(), soplex::MPSreadRows(), SPxLPBase< R >::readLPF(), NameSet::remove(), and SoPlex::writeBasisFile().
does NameSet has a name Definition at line 237 of file nameset.h. References DataHashTable< HashItem, Info >::has().
does NameSet has a name with DataKey Definition at line 244 of file nameset.h. References NameSet::add(), and NameSet::key().
consistency check. Definition at line 264 of file nameset.cpp. References NameSet::has(), NameSet::hashtab, NameSet::key(), NameSet::mem, NameSet::memmax, NameSet::memused, MSGinconsistent, and NameSet::num(). Referenced by NameSet::remove().
returns DataKey of the Definition at line 198 of file nameset.h. Referenced by NameSet::has(), NameSet::isConsistent(), NameSet::memPack(), NameSet::memRemax(), soplex::NameSetNameHashFunction(), soplex::operator<<(), and NameSet::remove().
returns DataKey of name Definition at line 204 of file nameset.h. References DataHashTable< HashItem, Info >::get().
returns maximum nr. of names that fit into NameSet. Definition at line 174 of file nameset.h. Referenced by NameSet::add(), NameSet::NameSet(), and soplex::NameSetNameHashFunction().
returns maximum length of string memory. Definition at line 186 of file nameset.h. References NameSet::memmax. Referenced by NameSet::add(), NameSet::memPack(), and soplex::NameSetNameHashFunction().
garbage collection. Definition at line 155 of file nameset.cpp. References NameSet::hashtab, NameSet::key(), NameSet::mem, NameSet::memMax(), NameSet::memSize(), NameSet::memused, NameSet::num(), soplex::spx_alloc(), and soplex::spx_free(). Referenced by NameSet::add(), soplex::NameSetNameHashFunction(), and NameSet::remove().
resets memMax() to Definition at line 144 of file nameset.cpp. References NameSet::hashtab, NameSet::key(), NameSet::mem, NameSet::memmax, NameSet::memSize(), NameSet::num(), and soplex::spx_realloc(). Referenced by NameSet::add(), soplex::NameSetNameHashFunction(), and NameSet::remove().
returns used length of string memory. Definition at line 192 of file nameset.h. References NameSet::memused. Referenced by NameSet::add(), NameSet::memPack(), NameSet::memRemax(), and soplex::NameSetNameHashFunction().
returns nr. of names in NameSet. Definition at line 168 of file nameset.h. Referenced by NameSet::add(), NameSet::isConsistent(), soplex::LPFreadColName(), NameSet::memPack(), NameSet::memRemax(), and soplex::operator<<().
returns number of name with DataKey Definition at line 212 of file nameset.h. Referenced by soplex::LPFreadColName(), soplex::MPSreadBounds(), soplex::MPSreadCols(), soplex::MPSreadRanges(), soplex::MPSreadRhs(), soplex::MPSreadRows(), NameSet::number(), SPxBasis::readBasis(), and SoPlex::readBasisFile().
returns number of name Definition at line 218 of file nameset.h. References DataHashTable< HashItem, Info >::get(), DataHashTable< HashItem, Info >::has(), and NameSet::number(). assignment operator. Referenced by soplex::NameSetNameHashFunction().
resets max() to Definition at line 138 of file nameset.cpp. References NameSet::hashtab. Referenced by NameSet::add(), soplex::NameSetNameHashFunction(), SPxBasis::readBasis(), SoPlex::readBasisFile(), and NameSet::remove().
removes name with DataKey Definition at line 96 of file nameset.cpp. References NameSet::has(), NameSet::hashtab, and NameSet::mem.
removes Definition at line 272 of file nameset.h. References NameSet::clear(), NameSet::key(), NameSet::memPack(), NameSet::memRemax(), and NameSet::reMax().
removes name Definition at line 84 of file nameset.cpp. References NameSet::hashtab.
removes Definition at line 104 of file nameset.cpp.
removes Definition at line 110 of file nameset.cpp.
remove all entries where Definition at line 116 of file nameset.cpp. References NameSet::hashtab, NameSet::isConsistent(), and NameSet::mem.
returns maximum DataKey::idx used in NameSet. Definition at line 180 of file nameset.h. Referenced by NameSet::add(), and soplex::NameSetNameHashFunction(). Member Data Documentation
memory extension factor for entries. When more than max() names are added to a NameSet, it is automatically resized to fit the additional names. Parameter Definition at line 317 of file nameset.h. Referenced by NameSet::add(), and soplex::NameSetNameHashFunction().
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 147 of file nameset.h. Referenced by NameSet::add(), NameSet::clear(), NameSet::isConsistent(), NameSet::memPack(), NameSet::memRemax(), soplex::NameSetNameHashFunction(), NameSet::reMax(), and NameSet::remove().
string memory Definition at line 140 of file nameset.h. Referenced by NameSet::add(), NameSet::isConsistent(), NameSet::memPack(), NameSet::memRemax(), NameSet::NameSet(), soplex::NameSetNameHashFunction(), NameSet::remove(), and NameSet::~NameSet().
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 Definition at line 325 of file nameset.h. Referenced by NameSet::add(), and soplex::NameSetNameHashFunction().
size of string memory Definition at line 141 of file nameset.h. Referenced by NameSet::isConsistent(), NameSet::memMax(), NameSet::memRemax(), NameSet::NameSet(), and soplex::NameSetNameHashFunction().
size of used string memory Definition at line 142 of file nameset.h. Referenced by NameSet::add(), NameSet::clear(), NameSet::isConsistent(), NameSet::memPack(), NameSet::memSize(), NameSet::NameSet(), and soplex::NameSetNameHashFunction().
name set. Definition at line 139 of file nameset.h. Referenced by soplex::NameSetNameHashFunction(). |