Commit 82822bb2b5dbf4531c1b243f4bb6357a4cf8028b

Authored by Scott Klum
1 parent 4eac4766

Don't need the eig prefix on std anymore, renamed

openbr/core/eigenutils.cpp
@@ -8,7 +8,7 @@ void EigenUtils::printSize(Eigen::MatrixXf X) { @@ -8,7 +8,7 @@ void EigenUtils::printSize(Eigen::MatrixXf X) {
8 qDebug() << "Rows=" << X.rows() << "\tCols=" << X.cols(); 8 qDebug() << "Rows=" << X.rows() << "\tCols=" << X.cols();
9 } 9 }
10 10
11 -float EigenUtils::eigStd(const Eigen::MatrixXf& x) { 11 +float EigenUtils::stddev(const Eigen::MatrixXf& x) {
12 return sqrt((x.array() - x.mean()).pow(2).sum() / (x.cols() * x.rows())); 12 return sqrt((x.array() - x.mean()).pow(2).sum() / (x.cols() * x.rows()));
13 } 13 }
14 14
openbr/core/eigenutils.h
@@ -77,7 +77,7 @@ namespace EigenUtils @@ -77,7 +77,7 @@ namespace EigenUtils
77 QList<QPointF> matrixToPoints(const Eigen::MatrixXf P); 77 QList<QPointF> matrixToPoints(const Eigen::MatrixXf P);
78 78
79 // Compute the element-wise standard deviation 79 // Compute the element-wise standard deviation
80 - float eigStd(const Eigen::MatrixXf& x); 80 + float stddev(const Eigen::MatrixXf& x);
81 } 81 }
82 82
83 template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols> 83 template<typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows, int _MaxCols>
openbr/plugins/eigen3.cpp
@@ -600,7 +600,7 @@ class SparseLDATransform : public Transform @@ -600,7 +600,7 @@ class SparseLDATransform : public Transform
600 600
601 //Only works on binary class problems for now 601 //Only works on binary class problems for now
602 assert(ldaOrig.projection.cols() == 1); 602 assert(ldaOrig.projection.cols() == 1);
603 - float ldaStd = EigenUtils::eigStd(ldaOrig.projection); 603 + float ldaStd = EigenUtils::stddev(ldaOrig.projection);
604 for (int i = 0; i < ldaOrig.projection.rows(); i++) 604 for (int i = 0; i < ldaOrig.projection.rows(); i++)
605 if (abs(ldaOrig.projection(i)) > varThreshold * ldaStd) 605 if (abs(ldaOrig.projection(i)) > varThreshold * ldaStd)
606 selections.append(i); 606 selections.append(i);