|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
39 #include <unordered_map>
42 namespace matching_blossom {
45 template<
class TWeight>
48 : std::numeric_limits<TWeight>::max();
53 template<
class K,
class V>
55 auto it = map.find(key);
56 if (it != map.end()) {
64 template<
class TWeight>
70 template<
class TWeight>
72 if (std::numeric_limits<TWeight>::is_integer) {
83 template<
typename Key,
typename Value>
85 using MapIterator =
typename std::unordered_map<Key, Value>::iterator;
91 Key*
operator->() {
return (Key*
const)&(MapIterator::operator->()->first); }
93 Key
operator*() {
return MapIterator::operator*().first; }
97 template<
typename Key,
typename Value>
99 using MapIterator =
typename std::unordered_map<Key, Value>::iterator;
105 Value*
operator->() {
return (Value*
const)&(MapIterator::operator->()->second); }
107 Value
operator*() {
return MapIterator::operator*().second; }
111 template<
template<
typename,
typename>
class Iterator,
typename Key,
typename Value>
115 std::unordered_map<Key, Value>&
m_map;
127 template<
typename Key,
typename Value>
130 template<
typename Key,
typename Value>
static const long edgeIntWeight
Corresponds to edge attribute intWeight(edge).
std::unordered_map< Key, Value > & m_map
The namespace for all OGDF objects.
Stores additional attributes of a graph (like layout information).
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Dummy class for scoped iteration of a std::unordered_map.
Includes declaration of graph class.
TWeight infinity()
Helper function to get the maximum value for a given weight type.
MapValueIterator(MapIterator it_)
typename std::unordered_map< Key, Value >::iterator MapIterator
Iterator to access the keys of a std::unordered_map.
Iterator to access the values of a std::unordered_map.
TWeight getWeight(edge e, const EdgeArray< TWeight > &weights)
Helper function to get the edge weight of e from the EdgeArray weights.
typename std::unordered_map< Key, Value >::iterator MapIterator
V * tryGetPointerFromMap(const std::unordered_map< K, V * > &map, const K &key)
Return the pointer belonging to key key int the given map map, or nullptr if key does not exist.
MapKeyIterator(MapIterator it_)
Class for the representation of edges.
int intWeight(edge e) const
Returns the (integer) weight of edge e.
Iterator< Key, Value > iterator
double doubleWeight(edge e) const
Returns the (real number) weight of edge e.
BaseIteratorContainer(std::unordered_map< Key, Value > &map)
bool has(long attr) const
Returns true iff all attributes in attr are available.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.