The following commit has been merged in the master branch:
commit 1022e7c50e7128ad803f27404641b1182a7bdc5b
Author: Andrei Zavada <[email protected]>
Date:   Sun Nov 11 21:07:39 2012 +0200

    ICM

diff --git a/src/metrics/Makefile.am b/src/metrics/Makefile.am
index 28fba7c..ed22f0e 100644
--- a/src/metrics/Makefile.am
+++ b/src/metrics/Makefile.am
@@ -1,8 +1,7 @@
 AM_CXXFLAGS := \
-       -Wall -std=c++0x -shared \
+       -Wall -std=c++0x \
        $(OPENMP_CXXFLAGS) \
-       -I$(top_srcdir)/src \
-       -fPIC
+       -I$(top_srcdir)/src
 
 noinst_LIBRARIES := \
        liba.a
diff --git a/src/metrics/mc.hh b/src/metrics/mc.hh
index b1b19a0..f64288c 100644
--- a/src/metrics/mc.hh
+++ b/src/metrics/mc.hh
@@ -28,8 +28,6 @@ using namespace std;
 namespace metrics {
 namespace mc {
 
-
-
 struct SPPack {
        double  scope,
                f0fc,//f0, // = 1.,
@@ -38,8 +36,15 @@ struct SPPack {
                iir_backpolate,                 // = 0.5;       // 0.0 < 
Backpolate < 1.0 on s: standard 0.5
                mc_gain;                        // = 10.0;      // Gain 
(DigiRange/PhysiRange) of MicroContinuity
        size_t  smooth_side;
+       static constexpr double freq_from = .5;
+
+       SPPack (const SPPack&) = default;
+       SPPack ()
+               {
+                       reset();
+               }
 
-       SPPack& operator=( const SPPack& rv) = default;
+       SPPack& operator=( const SPPack&) = default;
        bool operator==( const SPPack& rv) const
                {
                        return  scope == rv.scope &&
@@ -57,13 +62,6 @@ struct SPPack {
                {
                        return 5;
                }
-       static constexpr double freq_from = .5;
-
-       SPPack( const SPPack& rv) = default;
-       SPPack()
-               {
-                       reset();
-               }
 };
 
 
@@ -77,8 +75,8 @@ class CProfile
        void operator=( const CProfile&) = delete;
 
     protected:
-       CProfile( const sigfile::CSource& F, int sig_no,
-                 const SPPack &params,
+       CProfile (const sigfile::CSource&, int sig_no,
+                 const SPPack&,
                  size_t pagesize);
 
     public:
diff --git a/src/metrics/psd.hh b/src/metrics/psd.hh
index d8764de..0cff6f1 100644
--- a/src/metrics/psd.hh
+++ b/src/metrics/psd.hh
@@ -32,19 +32,30 @@ namespace metrics {
 namespace psd {
 
 
+// this is an odd bit never used in libagh
+enum TBand : unsigned short {
+       delta,
+       theta,
+       alpha,
+       beta,
+       gamma,
+       _total,
+};
+
+
+
 struct SPPack {
+       size_t  pagesize;
+       sigproc::TWinType
+               welch_window_type;
+       double  binsize;
+
        SPPack (const SPPack& rv) = default;
        SPPack ()
                {
                        reset();
                }
 
-       size_t
-       compute_n_bins( size_t samplerate) const
-               {
-                       return (samplerate * pagesize + 1) / 2 / samplerate / 
binsize;
-               }
-
        SPPack& operator=( const SPPack& rv) = default;
        bool operator==( const SPPack& rv) const
                {
@@ -52,26 +63,15 @@ struct SPPack {
                                welch_window_type == rv.welch_window_type &&
                                binsize == rv.binsize;
                }
-       void check() const;  // throws if not ok
-       void reset();
-
-       size_t  pagesize;
-       sigproc::TWinType
-               welch_window_type;
-       double  binsize;
-};
-
-
 
+       size_t
+       compute_n_bins( size_t samplerate) const
+               {
+                       return (samplerate * pagesize + 1) / 2 / samplerate / 
binsize;
+               }
 
-// this is an odd bit never used in libagh
-enum TBand : unsigned short {
-       delta,
-       theta,
-       alpha,
-       beta,
-       gamma,
-       _total,
+       void check() const;  // throws if not ok
+       void reset();
 };
 
 
@@ -83,8 +83,8 @@ class CProfile
     public SPPack {
 
     protected:
-       CProfile (const sigfile::CSource& F, int sig_no,
-                 const SPPack &fft_params);
+       CProfile (const sigfile::CSource&, int sig_no,
+                 const SPPack&);
 
     public:
        const char* method() const
@@ -107,10 +107,10 @@ class CProfile
       // obtain
        int compute( const SPPack& req_params,
                     bool force = false);
-       void compute( bool force = false)
+       int compute( bool force = false)
        // possibly reuse that already obtained unless factors affecting signal 
or fft are different
                {
-                       compute( *this, force);
+                       return compute( *this, force);
                }
 
        string fname_base() const;
diff --git a/src/metrics/swu.hh b/src/metrics/swu.hh
index 2c4aadf..a3bd467 100644
--- a/src/metrics/swu.hh
+++ b/src/metrics/swu.hh
@@ -32,30 +32,30 @@ namespace swu {
 
 
 struct SPPack {
+       size_t  pagesize;
+       double  binsize;
 
-       SPPack (const SPPack& rv) = default;
+       SPPack (const SPPack&) = default;
        SPPack ()
                {
                        reset();
                }
 
+       SPPack& operator=( const SPPack&) = default;
+       bool operator==( const SPPack& rv) const
+               {
+                       return  pagesize == rv.pagesize &&
+                               binsize == rv.binsize;
+               }
+
        size_t
        compute_n_bins( size_t samplerate) const
                {
                        return (samplerate * pagesize + 1) / 2 / samplerate / 
binsize;
                }
 
-       SPPack& operator=( const SPPack& rv) = default;
-       bool operator==( const SPPack& rv) const
-               {
-                       return  pagesize == rv.pagesize &&
-                               binsize == rv.binsize;
-               }
        void check() const;  // throws if not ok
        void reset();
-
-       size_t  pagesize;
-       double  binsize;
 };
 
 
@@ -68,8 +68,8 @@ class CProfile
     public SPPack {
 
     protected:
-       CProfile (const sigfile::CSource& F, int sig_no,
-                 const SPPack &fft_params);
+       CProfile (const sigfile::CSource&, int sig_no,
+                 const SPPack&);
 
     public:
        const char* method() const
@@ -92,9 +92,9 @@ class CProfile
       // obtain
        int compute( const SPPack& req_params,
                     bool force = false);
-       void compute( bool force = false)
+       int compute( bool force = false)
                {
-                       compute( *this, force);
+                       return compute( *this, force);
                }
 
        string fname_base() const;

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to