pruner  0.0-99
typedefs.hpp
1 
2 #ifdef PRUNER_DEBUG_ON
3 template <class T>
4 inline void print_vector(const std::vector< T > & V) {
5 
6  for (int i = 0; i < V.size(); ++i)
7  std::cout << "[" << (V.at(i)) << "]\n";
8 
9  return;
10 
11 }
12 
13 #endif
14 
15 #ifndef H_PRUNER_TYPEDEFS
16 #define H_PRUNER_TYPEDEFS 1
17 
19 
20 // Double types ----------------------------------------------------------------
22 typedef std::vector< double > v_dbl;
24 typedef std::vector< v_dbl > vv_dbl;
25 
26 // Integer types ---------------------------------------------------------------
27 
29 typedef unsigned int uint;
30 
32 typedef std::vector< uint > v_uint;
33 
35 typedef std::vector< v_uint > vv_uint;
36 
38 typedef std::vector< bool > v_bool;
39 
40 // Auxiliar functions ----------------------------------------------------------
41 template <class T>
42 inline uint find_in_vector(const std::vector< T >* x, T value) {
43 
44  for (uint i = 0u; i < x->size(); ++i)
45  if (x->at(i) == value) {
46  return i;
47  }
48 
49  return 0;
50 }
51 
52 #endif