添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

serialzation.h头文件大概90-100行的时候,添加下面代码: 防止冲突。
#ifdef _MSC_VER  
BASIC_TYPE_SERIALIZER(unsigned __int64);
#endif 
具体位置就是在这些类型声明后面加。

// declare serializers for simple types
BASIC_TYPE_SERIALIZER(char);
BASIC_TYPE_SERIALIZER(unsigned char);
BASIC_TYPE_SERIALIZER(short);
BASIC_TYPE_SERIALIZER(unsigned short);
BASIC_TYPE_SERIALIZER(int);
BASIC_TYPE_SERIALIZER(unsigned int);
BASIC_TYPE_SERIALIZER(long);
BASIC_TYPE_SERIALIZER(unsigned long);
BASIC_TYPE_SERIALIZER(float);
BASIC_TYPE_SERIALIZER(double);
BASIC_TYPE_SERIALIZER(bool);


.serialize 左边必须有类/结构/联合 的解决方法。具体原因,记得好像是serialize的定义和64位系统的定义有冲突,解决办法是:在 serialzation.h头文件大概90-100行的时候,添加下面代码: 防止冲突。#ifdef _MSC_VER BASIC_TYPE_SERIALIZER(unsigned __int64);#endif 具体位置
matlab中存档算法代码F LAN N-近似最近邻居的快速库 F LAN N是用于在高维空间中执行快速近似最近邻居搜索的库。 它包含一组我们发现最适合最邻近搜索的算法,以及一个根据数据集自动选择最佳算法和最佳参数的系统。 F LAN N用C ++编写,包含以下语言的绑定:C,MATLAB和Python。 检查F LAN N网页。 有关如何使用该库的文档可以在发行档案中包含的doc manual.pdf文件中找到。 可以在以下论文中找到更多信息和实验结果: Marius Muja和David Lowe,“具有自动算法配置的快速近似最近邻居”,在国际计算机视觉理论与应用会议(VISAPP'09)上,2009年 可以从此处下载最新版本的F LAN N: 版本1.8.4(2013年1月15日)( 源代码 ) 如果您想尝试最新的更改或对F LAN N有所帮助,那么建议您签出git源存储库: clone git://github.com/mariusmuja/f lan n.git 如果您只想浏览存储库,可以通过转到浏览存储库。 F LAN N是根据的条款分发的。 错误 报告
如何理解后面的代码?为什么要使用template,还有using的方式等?namespace pcl { // Forward declarations template <typename T> class PointRepre se ntation; /** \brief KdTreeF LAN N is a generic type of 3D spatial locator using kD-tree structures. The class is making u se of * the F LAN N (Fast Library for Approximate Nearest Neighbor) project by Marius Muja and David Lowe. * * \author Radu B. Rusu, Marius Muja * \ingroup kdtree */ template <typename PointT, typename Dist = ::f lan n::L2_Simple<float> > class KdTreeF LAN N : public pcl::KdTree<PointT> { public: using KdTree<PointT>::input_; using KdTree<PointT>::indices_; using KdTree<PointT>::epsilon_; using KdTree<PointT>::sorted_; using KdTree<PointT>::point_repre se ntation_; using KdTree<PointT>::nearestK Se arch; using KdTree<PointT>::radius Se arch; using PointCloud = typename KdTree<PointT>::PointCloud; //相关继承 using PointCloudConstPtr = typename KdTree<PointT>::PointCloudConstPtr; using IndicesPtr = shared_ptr<std::vector<int> >; using IndicesConstPtr = shared_ptr<const std::vector<int> >; using F LAN NIndex = ::f lan n::Index<Dist>; // Boost shared pointers using Ptr = shared_ptr<KdTreeF LAN N<PointT, Dist> >; using ConstPtr = shared_ptr<const KdTreeF LAN N<PointT, Dist> >;
这段代码定义了一个名为KdTreeF LAN N的类模板,用于创建3D空间中的kD-tree 结构 。它使用了F LAN N库(Fast Library for Approximate Nearest Neighbor,快速最近邻库)来实现。通过继承pcl::KdTree<PointT>,KdTreeF LAN N类提供了最近邻搜索和半径搜索的功能。 关于模板的使用,使用类模板的主要原因是可以定义一个通用的类,而不是为每种可能类型都定义一个不同的类。这里使用了两个模板参数:PointT和Dist,分别表示点类型和距离度量类型。这样可以在实例化KdTreeF LAN N类时指定这些类型,使其适用于不同类型的点和不同的距离度量 方法 。 在该类中,使用了using关键字来引入pcl::KdTree<PointT>中的成员。例如,using KdTree<PointT>::nearestK Se arch引入了父类中的nearestK Se arch函数,使其可以在子类中使用。 另外,这段代码还使用了 C++ 11中的typedef别名,例如using PointCloudConstPtr = typename KdTree<PointT>::PointCloudConstPtr;,用于定义类型别名来简化代码中的类型声明。 最后,该类使用了F LAN N库中的::f lan n::Index<Dist>作为F LAN NIndex的类型别名。 F LAN N库提供了一些数据 结构 和算法,包括建立k-d tree,最近邻搜索等。