pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/math/fityk Since the code expects boost::array to win,...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2325745b1d28
branches:  trunk
changeset: 652947:2325745b1d28
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Wed Jun 10 15:00:31 2015 +0000

description:
Since the code expects boost::array to win, use that explicitly.

diffstat:

 math/fityk/distinfo                    |   3 +-
 math/fityk/patches/patch-src_guess.cpp |  50 ++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 1 deletions(-)

diffs (69 lines):

diff -r 211b76427636 -r 2325745b1d28 math/fityk/distinfo
--- a/math/fityk/distinfo       Wed Jun 10 14:59:43 2015 +0000
+++ b/math/fityk/distinfo       Wed Jun 10 15:00:31 2015 +0000
@@ -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-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 -r 211b76427636 -r 2325745b1d28 math/fityk/patches/patch-src_guess.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/math/fityk/patches/patch-src_guess.cpp    Wed Jun 10 15:00:31 2015 +0000
@@ -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;
+ }
+ 



Home | Main Index | Thread Index | Old Index