mirror of https://github.com/CGAL/cgal
parent
bd29e2a7cd
commit
e511de6eb8
|
|
@ -114,7 +114,7 @@ public:
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
||||||
{
|
{
|
||||||
const typename Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
const Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
||||||
if (ev[2] < 1e-15)
|
if (ev[2] < 1e-15)
|
||||||
return 0.;
|
return 0.;
|
||||||
else
|
else
|
||||||
|
|
@ -159,7 +159,7 @@ public:
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
||||||
{
|
{
|
||||||
const typename Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
const Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
||||||
if (ev[2] < 1e-15)
|
if (ev[2] < 1e-15)
|
||||||
return 0.;
|
return 0.;
|
||||||
else
|
else
|
||||||
|
|
@ -205,7 +205,7 @@ public:
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
||||||
{
|
{
|
||||||
const typename Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
const Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
||||||
if (ev[2] < 1e-15)
|
if (ev[2] < 1e-15)
|
||||||
return 0.;
|
return 0.;
|
||||||
else
|
else
|
||||||
|
|
@ -250,7 +250,7 @@ public:
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
||||||
{
|
{
|
||||||
const typename Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
const Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
||||||
return (std::pow (std::fabs(ev[0] * ev[1] * ev[2]), 0.333333333));
|
return (std::pow (std::fabs(ev[0] * ev[1] * ev[2]), 0.333333333));
|
||||||
}
|
}
|
||||||
/// \endcond
|
/// \endcond
|
||||||
|
|
@ -292,7 +292,7 @@ public:
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
||||||
{
|
{
|
||||||
const typename Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
const Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
||||||
if (ev[2] < 1e-15)
|
if (ev[2] < 1e-15)
|
||||||
return 0.;
|
return 0.;
|
||||||
else
|
else
|
||||||
|
|
@ -337,7 +337,7 @@ public:
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
||||||
{
|
{
|
||||||
const typename Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
const Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
||||||
if (ev[0] < 1e-15
|
if (ev[0] < 1e-15
|
||||||
|| ev[1] < 1e-15
|
|| ev[1] < 1e-15
|
||||||
|| ev[2] < 1e-15)
|
|| ev[2] < 1e-15)
|
||||||
|
|
@ -429,7 +429,7 @@ public:
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
virtual float get_value (const Local_eigen_analysis& eigen, std::size_t i)
|
||||||
{
|
{
|
||||||
const typename Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
const Local_eigen_analysis::Eigenvalues& ev = eigen.eigenvalue(i);
|
||||||
if (ev[0] + ev[1] + ev[2] < 1e-15)
|
if (ev[0] + ev[1] + ev[2] < 1e-15)
|
||||||
return 0.;
|
return 0.;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ public:
|
||||||
class K_neighbor_query
|
class K_neighbor_query
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Point_set_neighborhood::Point value_type; ///<
|
typedef typename Point_set_neighborhood::Point value_type; ///<
|
||||||
private:
|
private:
|
||||||
const Point_set_neighborhood& neighborhood;
|
const Point_set_neighborhood& neighborhood;
|
||||||
std::size_t k;
|
std::size_t k;
|
||||||
|
|
@ -139,7 +139,7 @@ public:
|
||||||
class Range_neighbor_query
|
class Range_neighbor_query
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Point_set_neighborhood::Point value_type; ///<
|
typedef typename Point_set_neighborhood::Point value_type; ///<
|
||||||
private:
|
private:
|
||||||
const Point_set_neighborhood& neighborhood;
|
const Point_set_neighborhood& neighborhood;
|
||||||
float radius;
|
float radius;
|
||||||
|
|
|
||||||
|
|
@ -329,7 +329,7 @@ public:
|
||||||
};
|
};
|
||||||
std::vector<Feature_training> feature_train;
|
std::vector<Feature_training> feature_train;
|
||||||
std::size_t nb_trials = 100;
|
std::size_t nb_trials = 100;
|
||||||
float wmin = 1e-5, wmax = 1e5;
|
float wmin = 1e-5f, wmax = 1e5f;
|
||||||
float factor = std::pow (wmax/wmin, 1. / (float)nb_trials);
|
float factor = std::pow (wmax/wmin, 1. / (float)nb_trials);
|
||||||
|
|
||||||
for (std::size_t j = 0; j < m_features.size(); ++ j)
|
for (std::size_t j = 0; j < m_features.size(); ++ j)
|
||||||
|
|
@ -748,7 +748,7 @@ public:
|
||||||
BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.features"))
|
BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.features"))
|
||||||
{
|
{
|
||||||
std::string name = v.second.get<std::string>("name");
|
std::string name = v.second.get<std::string>("name");
|
||||||
typename std::map<std::string, std::size_t>::iterator
|
std::map<std::string, std::size_t>::iterator
|
||||||
found = map_n2f.find (name);
|
found = map_n2f.find (name);
|
||||||
if (found != map_n2f.end())
|
if (found != map_n2f.end())
|
||||||
m_weights[found->second] = v.second.get<float>("weight");
|
m_weights[found->second] = v.second.get<float>("weight");
|
||||||
|
|
@ -763,7 +763,7 @@ public:
|
||||||
BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.labels"))
|
BOOST_FOREACH(boost::property_tree::ptree::value_type &v, tree.get_child("classification.labels"))
|
||||||
{
|
{
|
||||||
std::string label_name = v.second.get<std::string>("name");
|
std::string label_name = v.second.get<std::string>("name");
|
||||||
typename std::map<std::string, std::size_t>::iterator
|
std::map<std::string, std::size_t>::iterator
|
||||||
found = map_n2l.find (label_name);
|
found = map_n2l.find (label_name);
|
||||||
std::size_t l = 0;
|
std::size_t l = 0;
|
||||||
if (found != map_n2l.end())
|
if (found != map_n2l.end())
|
||||||
|
|
@ -783,7 +783,7 @@ public:
|
||||||
|
|
||||||
std::string feature_name = v2.second.get<std::string>("name");
|
std::string feature_name = v2.second.get<std::string>("name");
|
||||||
|
|
||||||
typename std::map<std::string, std::size_t>::iterator
|
std::map<std::string, std::size_t>::iterator
|
||||||
found2 = map_n2f.find (feature_name);
|
found2 = map_n2f.find (feature_name);
|
||||||
std::size_t f = 0;
|
std::size_t f = 0;
|
||||||
if (found2 != map_n2f.end())
|
if (found2 != map_n2f.end())
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue