aGrUM  0.14.2
arcGraphPart_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 ArcProperty< VAL > ArcGraphPart::arcsProperty(VAL (*f)(const Arc&),
35  Size size) const {
36  return __arcs.hashMap(f, size);
37  }
38 
39  template < typename VAL >
40  INLINE ArcProperty< VAL > ArcGraphPart::arcsProperty(const VAL& val,
41  Size size) const {
42  return __arcs.hashMap(val, size);
43  }
44 
46  template < typename VAL >
47  INLINE List< VAL > ArcGraphPart::listMapArcs(VAL (*f)(const Arc&)) const {
48  return __arcs.listMap(f);
49  }
50 
51 } /* namespace gum */
52 
53 #endif // DOXYGEN_SHOULD_SKIP_THIS
ArcProperty< VAL > arcsProperty(VAL(*f)(const Arc &), Size size=0) const
a method to create a hashMap of VAL from a set of arcs (using for every arc, say x, the VAL f(x))
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
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
List< VAL > listMapArcs(VAL(*f)(const Arc &)) const
a method to create a list of VAL from a set of arcs (using for every arc, say x, the VAL f(x)) ...
Set< Arc > __arcs
the set of all the arcs contained within the ArcGraphPart
Definition: arcGraphPart.h:266