Skip to content

Commit

Permalink
Adding exports for kdtree class to dll
Browse files Browse the repository at this point in the history
Adding Doxygen documentation for kdtree class
  • Loading branch information
zcobell committed Apr 15, 2019
1 parent 1647be9 commit 15b2819
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ADCIRCModules.doxy
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ EXCLUDE_PATTERNS =
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories use the pattern */test/*

EXCLUDE_SYMBOLS = MeshImpl GriddataImpl HarmonicsRecordImpl HarmonicsOutputImpl NodalAttributesImpl ElementTable IO split StringConversion
EXCLUDE_SYMBOLS = MeshImpl GriddataImpl HarmonicsRecordImpl HarmonicsOutputImpl NodalAttributesImpl IO StringConversion Kdtree_impl

# The EXAMPLE_PATH tag can be used to specify one or more files or directories
# that contain example code fragments that are included (see the \include
Expand Down
26 changes: 19 additions & 7 deletions src/kdtree.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,33 @@

#include <cstddef>
#include <vector>
#include "adcircmodules_global.h"

class Kdtree_impl;

/**
* @class Kdtree
* @author Zachary Cobell
* @brief Class that handles neighbor searching using nanoflann
* @copyright Copyright 2018 Zachary Cobell. All Rights Reserved. This project
* is released under the terms of the GNU General Public License v3
*
*/
class Kdtree {
public:
Kdtree();
~Kdtree();
ADCIRCMODULES_EXPORT Kdtree();
ADCIRCMODULES_EXPORT ~Kdtree();

enum _errors { NoError, SizeMismatch };

int build(std::vector<double> &x, std::vector<double> &y);
size_t findNearest(double x, double y);
std::vector<size_t> findXNearest(double x, double y, size_t n);
std::vector<size_t> findWithinRadius(double x, double y, const double radius);
bool initialized();
ADCIRCMODULES_EXPORT int build(std::vector<double> &x,
std::vector<double> &y);
ADCIRCMODULES_EXPORT size_t findNearest(double x, double y);
ADCIRCMODULES_EXPORT std::vector<size_t> findXNearest(double x, double y,
size_t n);
ADCIRCMODULES_EXPORT std::vector<size_t> findWithinRadius(
double x, double y, const double radius);
ADCIRCMODULES_EXPORT bool initialized();

private:
Kdtree_impl *m_ptr;
Expand Down

0 comments on commit 15b2819

Please sign in to comment.