diff options
author | joerg <joerg@pkgsrc.org> | 2015-06-10 15:00:31 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-06-10 15:00:31 +0000 |
commit | bc5d4b4c7b1573254da3eaf307b79fa85d06bf52 (patch) | |
tree | ff7e3ff4c913eb1aade18ee0a94e16ebf73a45d8 | |
parent | 5a58611d532241e39745d8d66ec2fb84d57f18dd (diff) | |
download | pkgsrc-bc5d4b4c7b1573254da3eaf307b79fa85d06bf52.tar.gz |
Since the code expects boost::array to win, use that explicitly.
-rw-r--r-- | math/fityk/distinfo | 3 | ||||
-rw-r--r-- | math/fityk/patches/patch-src_guess.cpp | 50 |
2 files changed, 52 insertions, 1 deletions
diff --git a/math/fityk/distinfo b/math/fityk/distinfo index 052ed533957..ea14af91560 100644 --- a/math/fityk/distinfo +++ b/math/fityk/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2014/02/24 12:35:10 wiedi Exp $ +$NetBSD: distinfo,v 1.6 2015/06/10 15:00:31 joerg Exp $ SHA1 (fityk-0.9.7.tar.bz2) = bb4d11b529c6c87c68c6f7359075915caf95a996 RMD160 (fityk-0.9.7.tar.bz2) = bd403037157b32ec7c7c6972f17116e403d099bc @@ -7,4 +7,5 @@ SHA1 (patch-aa) = c923919db013ca9ddb8370617bf0b4b0aaa31922 SHA1 (patch-src_GAfit.cpp) = 6543899d3861853d0738bbb5ced2cc9f59fda6db SHA1 (patch-src_common.h) = 1ab3f9d0c72c1f4bb0740a22ccc7960fb18b4c90 SHA1 (patch-src_eparser.cpp) = 6120b71f1bcafc1efc5b774426955084739a42c0 +SHA1 (patch-src_guess.cpp) = 2379b3bc3de4d24a8c5a2781c27b8eeccbb516c2 SHA1 (patch-src_wxgui_ceria.cpp) = d3d07180b20b563c67d1bb7316d38ef64ff91a8a diff --git a/math/fityk/patches/patch-src_guess.cpp b/math/fityk/patches/patch-src_guess.cpp new file mode 100644 index 00000000000..6ddb8d82f9e --- /dev/null +++ b/math/fityk/patches/patch-src_guess.cpp @@ -0,0 +1,50 @@ +$NetBSD: patch-src_guess.cpp,v 1.1 2015/06/10 15:00:31 joerg Exp $ + +--- src/guess.cpp.orig 2011-02-08 09:29:00.000000000 +0000 ++++ src/guess.cpp +@@ -15,11 +15,10 @@ + #include "settings.h" + + using namespace std; +-using boost::array; + +-const array<string, 3> Guess::linear_traits = ++const boost::array<string, 3> Guess::linear_traits = + {{ "slope", "intercept", "avgy" }}; +-const array<string, 4> Guess::peak_traits = ++const boost::array<string, 4> Guess::peak_traits = + {{ "center", "height", "hwhm", "area" }}; + + Guess::Guess(Settings const *settings) : settings_(settings) +@@ -97,7 +96,7 @@ double Guess::find_hwhm(int pos, double* + + // outputs vector with: center, height, hwhm, area + // returns values corresponding to peak_traits +-array<double,4> Guess::estimate_peak_parameters() ++boost::array<double,4> Guess::estimate_peak_parameters() + { + // find the highest point, which must be higher than the previous and next + // points (-> it cannot be the first/last point) +@@ -112,11 +111,11 @@ array<double,4> Guess::estimate_peak_par + double center = xx_[pos]; + double area; + double hwhm = find_hwhm(pos, &area) * settings_->width_correction; +- array<double,4> r = {{ center, height, hwhm, area }}; ++ boost::array<double,4> r = {{ center, height, hwhm, area }}; + return r; + } + +-array<double,3> Guess::estimate_linear_parameters() ++boost::array<double,3> Guess::estimate_linear_parameters() + { + double sx = 0, sy = 0, sxx = 0, syy = 0, sxy = 0; + int n = yy_.size(); +@@ -132,7 +131,7 @@ array<double,3> Guess::estimate_linear_p + double slope = (n * sxy - sx * sy) / (n * sxx - sx * sx); + double intercept = (sy - slope * sx) / n; + double avgy = sy / n; +- array<double,3> r = {{ slope, intercept, avgy }}; ++ boost::array<double,3> r = {{ slope, intercept, avgy }}; + return r; + } + |