aGrUM  0.14.2
edgeGraphPart_tpl.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 
28 // to ease parsing by IDE
30 
31 namespace gum {
32 
33  template < typename VAL >
34  INLINE EdgeProperty< VAL > EdgeGraphPart::edgesProperty(VAL (*f)(const Edge&),
35  Size size) const {
36  return __edges.hashMap(f, size);
37  }
38 
39  template < typename VAL >
40  INLINE EdgeProperty< VAL > EdgeGraphPart::edgesProperty(const VAL& val,
41  Size size) const {
42  return __edges.hashMap(val, size);
43  }
44 
45  template < typename VAL >
46  INLINE List< VAL > EdgeGraphPart::listMapEdges(VAL (*f)(const Edge&)) const {
47  return __edges.listMap(f);
48  }
49 
50 } /* namespace gum */
51 
52 #endif // DOXYGEN_SHOULD_SKIP_THIS
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
EdgeProperty< VAL > edgesProperty(VAL(*f)(const Edge &), Size size=0) const
a method to create a hashMap of VAL from a set of edges (using for every edge, say x...
List< VAL > listMapEdges(VAL(*f)(const Edge &)) const
a method to create a list of VAL from a set of edges (using for every edge, say x, the VAL f(x))
HashTable< Key, NewKey, NewAlloc > hashMap(NewKey(*f)(const Key &), Size capacity=0) const
Creates a hashtable of NewKey from the set.
Definition: set_tpl.h:835
List< NewKey, NewAlloc > listMap(NewKey(*f)(const Key &)) const
A method to create a List of NewKey from the set.
Definition: set_tpl.h:881
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:45
EdgeSet __edges
the set of all the edges contained within the EdgeGraphPart