Gaia
view.h
1 /*
2  * Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
3  *
4  * This file is part of Gaia
5  *
6  * Gaia is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Affero General Public License as published by the Free
8  * Software Foundation (FSF), either version 3 of the License, or (at your
9  * option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14  * details.
15  *
16  * You should have received a copy of the Affero GNU General Public License
17  * version 3 along with this program. If not, see http://www.gnu.org/licenses/
18  */
19 
20 #ifndef GAIA_STL_VIEW_H
21 #define GAIA_STL_VIEW_H
22 
23 #include <vector>
24 #include "origtypes.h"
25 
26 namespace gaia2std {
27 
28 typedef std::pair<std::string, float> Result;
29 typedef std::vector<Result> SearchResults;
30 
31 
32 class View {
33  DECLARE_PROXY(View);
34 
35  public:
36  View(const DataSet* dataset);
37 
38  SearchResults nnSearch(const Point& p, const DistanceFunction& dfunc,
39  int numNeighbors, const std::string& filter = "");
40 
41  SearchResults nnSearch(const std::string& id, const DistanceFunction& dfunc,
42  int numNeighbors, const std::string& filter = "");
43 
44 };
45 
46 
47 } // namespace gaia2std
48 
49 #endif // GAIA_STL_VIEW_H
Definition: distancefunction.h:28
Definition: baseexception.h:26
Definition: view.h:32
Definition: dataset.h:31
Definition: point.h:28