GNU Radio's CCSDS Package
example.h
Go to the documentation of this file.
1 /* File : example.h */
2 
3 #include <map>
4 #include <string>
5 
6 template<class Key, class Value>
7 std::map<Key,Value> half_map(const std::map<Key,Value>& v) {
8  typedef typename std::map<Key,Value>::const_iterator iter;
9  std::map<Key,Value> w;
10  for (iter i = v.begin(); i != v.end(); ++i) {
11  w[i->first] = (i->second)/2;
12  }
13  return w;
14 }
15 
16 
17 
std::map< Key, Value > half_map(const std::map< Key, Value > &v)
Definition: example.h:7