Skip to content

Commit

Permalink
Merge branch 'master' of github.com:edrosten/TooN
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Rosten committed Dec 19, 2012
2 parents ab98755 + bcbe114 commit b9e3264
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions irls.h
Expand Up @@ -47,7 +47,7 @@ namespace TooN {
double sd_inlier; ///< The inlier standard deviation, \f$\sigma\f$.
inline Precision reweight(Precision x) {return 1/(sd_inlier+fabs(x));} ///< Returns \f$w(x)\f$.
inline Precision true_scale(Precision x) {return reweight(x) - fabs(x)*reweight(x)*reweight(x);} ///< Returns \f$w(x) + xw'(x)\f$.
inline Precision objective(Precision x) {return fabs(x) + sd_inlier*log(sd_inlier*reweight(x));} ///< Returns \f$\int xw(x)dx\f$.
inline Precision objective(Precision x) {return fabs(x) + sd_inlier*::log(sd_inlier*reweight(x));} ///< Returns \f$\int xw(x)dx\f$.
};

/// Robust reweighting (type II) for IRLS.
Expand All @@ -60,7 +60,7 @@ namespace TooN {
Precision sd_inlier; ///< The inlier standard deviation squared, \f$\sigma\f$.
inline Precision reweight(Precision d){return 1/(sd_inlier+d*d);} ///< Returns \f$w(x)\f$.
inline Precision true_scale(Precision d){return d - 2*d*reweight(d);} ///< Returns \f$w(x) + xw'(x)\f$.
inline Precision objective(Precision d){return 0.5 * log(1 + d*d/sd_inlier);} ///< Returns \f$\int xw(x)dx\f$.
inline Precision objective(Precision d){return 0.5 * ::log(1 + d*d/sd_inlier);} ///< Returns \f$\int xw(x)dx\f$.
};

/// A reweighting class representing no reweighting in IRLS.
Expand Down

0 comments on commit b9e3264

Please sign in to comment.