#include <stdlib.h>
#include <vector>
#include <utility>
#include <gmapping/utils/gvalues.h>
Go to the source code of this file.
|  | 
| typedef std::pair< uint, uint > | UIntPair | 
|  | 
|  | 
| template<class Iterator > | 
| double | neff (const Iterator &begin, const Iterator &end) | 
|  | 
| template<typename WeightVector > | 
| void | normalizeWeights (WeightVector &weights, unsigned int size, double minWeight) | 
|  | 
| template<typename Vector > | 
| void | repeatIndexes (Vector &dest, const std::vector< int > &indexes, const Vector &particles) | 
|  | 
| template<typename Vector > | 
| void | repeatIndexes (Vector &dest, const std::vector< int > &indexes2, const Vector &particles, const std::vector< int > &indexes) | 
|  | 
| template<class WeightVector > | 
| void | resample (std::vector< int > &indexes, const WeightVector &weights, unsigned int nparticles=0) | 
|  | 
| template<class OutputIterator , class Iterator > | 
| void | rle (OutputIterator &out, const Iterator &begin, const Iterator &end) | 
|  | 
| template<class OutputIterator , class Iterator , class Numeric > | 
| void | toLogForm (OutputIterator &out, const Iterator &begin, const Iterator &end, Numeric lmax) | 
|  | 
| template<class OutputIterator , class Iterator > | 
| double | toNormalForm (OutputIterator &out, const Iterator &begin, const Iterator &end) | 
|  | 
◆ UIntPair
the particle class has to be convertible into numeric data type; That means that a particle must define the Numeric conversion operator; operator Numeric() const. that returns the weight, and the method setWeight(Numeric) that sets the weight. 
Definition at line 20 of file pf.h.
 
 
◆ neff()
template<class Iterator > 
      
        
          | double neff | ( | const Iterator & | begin, | 
        
          |  |  | const Iterator & | end | 
        
          |  | ) |  |  | 
      
 
Definition at line 135 of file pf.h.
 
 
◆ normalizeWeights()
template<typename WeightVector > 
      
        
          | void normalizeWeights | ( | WeightVector & | weights, | 
        
          |  |  | unsigned int | size, | 
        
          |  |  | double | minWeight | 
        
          |  | ) |  |  | 
      
 
Definition at line 83 of file pf.h.
 
 
◆ repeatIndexes() [1/2]
template<typename Vector > 
      
        
          | void repeatIndexes | ( | Vector & | dest, | 
        
          |  |  | const std::vector< int > & | indexes, | 
        
          |  |  | const Vector & | particles | 
        
          |  | ) |  |  | 
      
 
Definition at line 105 of file pf.h.
 
 
◆ repeatIndexes() [2/2]
template<typename Vector > 
      
        
          | void repeatIndexes | ( | Vector & | dest, | 
        
          |  |  | const std::vector< int > & | indexes2, | 
        
          |  |  | const Vector & | particles, | 
        
          |  |  | const std::vector< int > & | indexes | 
        
          |  | ) |  |  | 
      
 
Definition at line 123 of file pf.h.
 
 
◆ resample()
template<class WeightVector > 
      
        
          | void resample | ( | std::vector< int > & | indexes, | 
        
          |  |  | const WeightVector & | weights, | 
        
          |  |  | unsigned int | nparticles = 0 | 
        
          |  | ) |  |  | 
      
 
Definition at line 48 of file pf.h.
 
 
◆ rle()
template<class OutputIterator , class Iterator > 
      
        
          | void rle | ( | OutputIterator & | out, | 
        
          |  |  | const Iterator & | begin, | 
        
          |  |  | const Iterator & | end | 
        
          |  | ) |  |  | 
      
 
Definition at line 151 of file pf.h.
 
 
◆ toLogForm()
template<class OutputIterator , class Iterator , class Numeric > 
      
        
          | void toLogForm | ( | OutputIterator & | out, | 
        
          |  |  | const Iterator & | begin, | 
        
          |  |  | const Iterator & | end, | 
        
          |  |  | Numeric | lmax | 
        
          |  | ) |  |  | 
      
 
Definition at line 38 of file pf.h.
 
 
◆ toNormalForm()
template<class OutputIterator , class Iterator > 
      
        
          | double toNormalForm | ( | OutputIterator & | out, | 
        
          |  |  | const Iterator & | begin, | 
        
          |  |  | const Iterator & | end | 
        
          |  | ) |  |  | 
      
 
Definition at line 23 of file pf.h.