Git Product home page Git Product logo

nvmd / libkdtree Goto Github PK

View Code? Open in Web Editor NEW
60.0 6.0 25.0 403 KB

libkdtree++ is an STL-like C++ template container implementation of k-dimensional space sorting, using a kd-tree. It sports a theoretically unlimited number of dimensions, and can store any data structure. Fork of the project once available from http://libkdtree.alioth.debian.org/

License: Other

C++ 49.58% Shell 18.62% Python 16.05% CMake 1.21% Makefile 13.17% M4 0.51% Nix 0.85%
kd-tree data-structures

libkdtree's People

Contributors

madduck avatar nvmd avatar paulharris avatar poelmanc avatar sbougerel avatar schreiberx avatar wrichert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libkdtree's Issues

Compile error: error C2220: the following warning is treated as an error

I met this problem in windows and there are two ways to solve this problem:

  1. In 'CMakeLists.txt', comment lines 12, 15, and 18:
if (WIN32)

   # Maximum warning level
#   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")

   # Be strict about warnings... make them errors
#   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")

   # Detect 64-bit portability issues
#   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wp64")
  1. In 'test_kdtree.cpp', cast the double value when initializing the triplet to int:
tree_type tree(std::ptr_fun(tac));
     tree.insert( triplet((int)28.771200,(int)16.921600,(int)-2.665970) );
     tree.insert( triplet((int)28.553101,(int)18.649700,(int)-2.155560) );
     tree.insert( triplet((int)28.107500,(int)20.341400,(int)-1.188940) );
     tree.optimise();

     std::deque< triplet > vectors;
     triplet sv((int)18.892500,(int)20.341400,(int)-1.188940);

issue mac os x clang-600.0.56

$ clang++ --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix

$ clang++ --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix

$ make
Scanning dependencies of target test_find_within_range
[ 33%] Building CXX object examples/CMakeFiles/test_find_within_range.dir/test_find_within_range.cpp.o
Linking CXX executable test_find_within_range
[ 33%] Built target test_find_within_range
Scanning dependencies of target test_hayne
[ 66%] Building CXX object examples/CMakeFiles/test_hayne.dir/test_hayne.cpp.o
Linking CXX executable test_hayne
[ 66%] Built target test_hayne
Scanning dependencies of target test_kdtree
[100%] Building CXX object examples/CMakeFiles/test_kdtree.dir/test_kdtree.cpp.o
/libkdtree/examples/test_kdtree.cpp:29:29: warning: expression result unused [-Wunused-value]
registered.insert(this).second;
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
/libkdtree/examples/test_kdtree.cpp:39:29: warning: expression result unused [-Wunused-value]
registered.insert(this).second;
~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~
In file included from /libkdtree/examples/test_kdtree.cpp:6:
/libkdtree/kdtree++/kdtree.hpp:126:34: error: no matching constructor for initialization of
'std::__1::pointer_to_binary_function<triplet, unsigned long, double>'
KDTree(_Acc const& __acc = _Acc(), _Dist const& __dist = _Dist(),
^
/libkdtree/examples/test_kdtree.cpp:231:13: note: in instantiation of default function argument expression for 'KDTree<3,
triplet, std::__1::pointer_to_binary_function<triplet, unsigned long, double>, KDTree::squared_difference<double, double>, std::__1::less,
std::__1::allocatorKDTree::_Node >' required here
tree_type assigned;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1052:40: note: candidate constructor not
viable: requires single argument '__f', but no arguments were provided
_LIBCPP_INLINE_VISIBILITY explicit pointer_to_binary_function(_Result (*__f)(_Arg1, _Arg2))
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1047:29: note: candidate constructor
(the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
class _LIBCPP_TYPE_VIS_ONLY pointer_to_binary_function

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.