MTF
FGNN.h
1 #ifndef MTF_FGNN_H
2 #define MTF_FGNN_H
3 
4 #include "mtf/SM/GNN.h"
5 #include "mtf/Macros/common.h"
6 #include <flann/flann.hpp>
7 #include <memory>
8 
9 _MTF_BEGIN_NAMESPACE
10 
12 namespace gnn{
13  template<class DistType>
14  class FGNN : public GNN<DistType>{
15  public:
16  typedef std::shared_ptr<const DistType> DistTypePtr;
17  typedef typename GNN<DistType>::ParamType ParamType;
18  typedef flann::Matrix<double> flannMatT;
19  typedef flann::Matrix<int> flannResultT;
20  typedef flann::Index<DistType> flannIdxT;
21 
22  FGNN(DistTypePtr _dist_func, int _n_samples, int _n_dims,
23  bool _is_symmetrical = true, const ParamType *gnn_params = nullptr):
24  GNN<DistType>(_dist_func, _n_samples, _n_dims, _is_symmetrical, gnn_params){}
25  ~FGNN(){}
33  void buildGraph(const double *dataset, flannIdxT* flann_index,
34  const flann::SearchParams &search_params);
35  };
36 }
37 _MTF_END_NAMESPACE
38 
39 #endif
40 
Definition: FGNN.h:14
Definition: GNNParams.h:9
Definition: GNN.h:31
GNN with FLANN support.
Definition: FGNN.h:12