38 #ifndef PCL_ML_PERMUTOHEDRAL_H_ 39 #define PCL_ML_PERMUTOHEDRAL_H_ 42 #pragma GCC system_header 47 #include <pcl/common/eigen.h> 48 #include <boost/intrusive/hashtable.hpp> 89 init (
const std::vector<float> &feature,
const int feature_dimension,
const int N);
92 compute (std::vector<float> &out,
const std::vector<float> &in,
94 int in_offset=0,
int out_offset=0,
95 int in_size = -1,
int out_size = -1)
const;
97 initOLD (
const std::vector<float> &feature,
const int feature_dimension,
const int N);
100 computeOLD (std::vector<float> &out,
const std::vector<float> &in,
102 int in_offset=0,
int out_offset=0,
103 int in_size = -1,
int out_size = -1)
const;
113 for (
int i = 0; i <
d_; i++)
145 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
162 std::cout <<
"GROW" << std::endl;
165 short * old_keys =
keys_;
167 int old_capacity =
static_cast<int> (
capacity_);
176 for(
int i=0; i<old_capacity; i++ )
177 if (old_table[i] >= 0){
178 int e = old_table[i];
187 size_t hash(
const short * k ) {
206 return static_cast<int> (
filled_);
212 int find(
const short * k,
bool create =
false ){
231 for(
size_t i=0; i<
key_size_ && good; i++ )
Implementation of a high-dimensional gaussian filtering using the permutohedral lattice.
size_t hash(const short *k)
std::vector< Neighbors > blur_neighbors_
void initOLD(const std::vector< float > &feature, const int feature_dimension, const int N)
std::vector< float > offset_
HashTableOLD(int key_size, int n_elements)
const short * getKey(int i) const
size_t generateHashKey(const std::vector< short > &k)
Permutohedral()
Constructor for Permutohedral class.
int find(const short *k, bool create=false)
std::vector< float > baryOLD_
int N_
Number of variables.
void init(const std::vector< float > &feature, const int feature_dimension, const int N)
initialization
~Permutohedral()
Deconstructor for Permutohedral class.
void computeOLD(std::vector< float > &out, const std::vector< float > &in, int value_size, int in_offset=0, int out_offset=0, int in_size=-1, int out_size=-1) const
std::vector< float > offsetTMP_
std::vector< float > barycentric_
Neighbors(int n1=0, int n2=0)
int d_
dimension of feature
void compute(std::vector< float > &out, const std::vector< float > &in, int value_size, int in_offset=0, int out_offset=0, int in_size=-1, int out_size=-1) const
Neighbors * blur_neighborsOLD_
int M_
size of sparse discretized space