fix typename issues

and a few conversion warnings
This commit is contained in:
Jane Tournois 2017-04-13 14:45:09 +02:00 committed by Simon Giraudot
parent bd29e2a7cd
commit e511de6eb8
3 changed files with 13 additions and 13 deletions

View File

@ -114,7 +114,7 @@ public:
/// \cond SKIP_IN_MANUAL
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)
return 0.;
else
@ -159,7 +159,7 @@ public:
/// \cond SKIP_IN_MANUAL
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)
return 0.;
else
@ -205,7 +205,7 @@ public:
/// \cond SKIP_IN_MANUAL
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)
return 0.;
else
@ -250,7 +250,7 @@ public:
/// \cond SKIP_IN_MANUAL
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));
}
/// \endcond
@ -292,7 +292,7 @@ public:
/// \cond SKIP_IN_MANUAL
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)
return 0.;
else
@ -337,7 +337,7 @@ public:
/// \cond SKIP_IN_MANUAL
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
|| ev[1] < 1e-15
|| ev[2] < 1e-15)
@ -429,7 +429,7 @@ public:
/// \cond SKIP_IN_MANUAL
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)
return 0.;
else

View File

@ -106,7 +106,7 @@ public:
class K_neighbor_query
{
public:
typedef Point_set_neighborhood::Point value_type; ///<
typedef typename Point_set_neighborhood::Point value_type; ///<
private:
const Point_set_neighborhood& neighborhood;
std::size_t k;
@ -139,7 +139,7 @@ public:
class Range_neighbor_query
{
public:
typedef Point_set_neighborhood::Point value_type; ///<
typedef typename Point_set_neighborhood::Point value_type; ///<
private:
const Point_set_neighborhood& neighborhood;
float radius;

View File

@ -329,7 +329,7 @@ public:
};
std::vector<Feature_training> feature_train;
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);
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"))
{
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);
if (found != map_n2f.end())
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"))
{
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);
std::size_t l = 0;
if (found != map_n2l.end())
@ -783,7 +783,7 @@ public:
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);
std::size_t f = 0;
if (found2 != map_n2f.end())