[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461
Andrei Zavada
johnhommer at gmail.com
Fri Nov 16 00:50:10 UTC 2012
The following commit has been merged in the master branch:
commit 0f7a80bdb4f44f307b86edf935dc1200af977f3a
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Fri Oct 12 02:38:43 2012 +0300
make some ref'd float vars double & similar type discipline for some enums
diff --git a/src/expdesign/recording.hh b/src/expdesign/recording.hh
index 6e0ce92..101d4e1 100644
--- a/src/expdesign/recording.hh
+++ b/src/expdesign/recording.hh
@@ -87,11 +87,11 @@ class CRecording
// cut through, and cache it please
template <typename T>
const valarray<T>
- course( sigfile::TMetricType metric, float freq_from, float freq_upto);
+ course( sigfile::TMetricType metric, double freq_from, double freq_upto);
template <typename T>
const valarray<T>
- course( sigfile::TMetricType metric, float freq_from, float freq_upto) const;
+ course( sigfile::TMetricType metric, double freq_from, double freq_upto) const;
bool have_uc_determined() const
{
@@ -111,7 +111,7 @@ class CRecording
private:
sigfile::TMetricType
_cached_metric;
- float _cached_freq_from,
+ double _cached_freq_from,
_cached_freq_upto;
};
@@ -123,9 +123,9 @@ class CRecording
struct SSCourseParamSet {
sigfile::TMetricType
_profile_type;
- float _freq_from,
+ double _freq_from,
_freq_upto;
- float _req_percent_scored;
+ double _req_percent_scored;
size_t _swa_laden_pages_before_SWA_0;
bool _ScoreUnscoredAsWake:1;
};
@@ -148,8 +148,8 @@ class CSCourse
sigfile::TMetricType profile_type() const
{ return _profile_type; }
- float freq_from() const { return _freq_from; }
- float freq_upto() const { return _freq_upto; }
+ double freq_from() const { return _freq_from; }
+ double freq_upto() const { return _freq_upto; }
size_t sim_start() const { return _sim_start; }
size_t sim_end() const { return _sim_end; }
size_t baseline_end() const { return _baseline_end; }
@@ -244,7 +244,7 @@ class CSCourse
template <typename T>
const valarray<T>
CRecording::
-course( sigfile::TMetricType metric, float freq_from, float freq_upto)
+course( sigfile::TMetricType metric, double freq_from, double freq_upto)
{
static valarray<T>
_cached_course;
@@ -275,7 +275,7 @@ course( sigfile::TMetricType metric, float freq_from, float freq_upto)
template <typename T>
const valarray<T>
CRecording::
-course( sigfile::TMetricType metric, float freq_from, float freq_upto) const
+course( sigfile::TMetricType metric, double freq_from, double freq_upto) const
{
switch ( metric ) {
case sigfile::TMetricType::Psd:
diff --git a/src/libsigfile/psd.hh b/src/libsigfile/psd.hh
index c0906fe..454989e 100644
--- a/src/libsigfile/psd.hh
+++ b/src/libsigfile/psd.hh
@@ -37,7 +37,7 @@ namespace sigfile {
struct SFFTParamSet {
- enum TWinType {
+ enum TWinType : int {
bartlett,
blackman,
blackman_harris,
diff --git a/src/ui/expdesign.cc b/src/ui/expdesign.cc
index 02426ea..6f0776b 100644
--- a/src/ui/expdesign.cc
+++ b/src/ui/expdesign.cc
@@ -162,11 +162,11 @@ SExpDesignUI (aghui::SSessionChooser *parent,
confval::SValidator<int>("ModelRun.SWASmoothOver", (int*)&SModelrunFacility::swa_smoothover, confval::SValidator<int>::SVFRangeIn ( 1, 5)),
}),
config_keys_g ({
- confval::SValidator<float>("UltradianCycleDetectionAccuracy", &uc_accuracy_factor, confval::SValidator<float>::SVFRangeIn (0.5, 20.)),
- confval::SValidator<float>("Measurements.ProfileScalePSD", &profile_scale_psd, confval::SValidator<float>::SVFRangeIn (0., 1e10)), // can be 0, will trigger autoscale
- confval::SValidator<float>("Measurements.ProfileScaleMC", &profile_scale_mc, confval::SValidator<float>::SVFRangeIn (0., 1e10)),
- confval::SValidator<float>("Common.OperatingRangeFrom", &operating_range_from, confval::SValidator<float>::SVFRangeIn (0., 20.)),
- confval::SValidator<float>("Common.OperatingRangeUpto", &operating_range_upto, confval::SValidator<float>::SVFRangeIn (0., 20.)),
+ confval::SValidator<double>("UltradianCycleDetectionAccuracy", &uc_accuracy_factor, confval::SValidator<double>::SVFRangeIn (0.5, 20.)),
+ confval::SValidator<double>("Measurements.ProfileScalePSD", &profile_scale_psd, confval::SValidator<double>::SVFRangeIn (0., 1e10)), // can be 0, will trigger autoscale
+ confval::SValidator<double>("Measurements.ProfileScaleMC", &profile_scale_mc, confval::SValidator<double>::SVFRangeIn (0., 1e10)),
+ confval::SValidator<double>("Common.OperatingRangeFrom", &operating_range_from, confval::SValidator<double>::SVFRangeIn (0., 20.)),
+ confval::SValidator<double>("Common.OperatingRangeUpto", &operating_range_upto, confval::SValidator<double>::SVFRangeIn (0., 20.)),
})
{
nodestroy_by_cb = true;
diff --git a/src/ui/expdesign.hh b/src/ui/expdesign.hh
index 7d179ba..6f160b4 100644
--- a/src/ui/expdesign.hh
+++ b/src/ui/expdesign.hh
@@ -213,10 +213,10 @@ class SExpDesignUI
// own variables aka saved settings
sigfile::TMetricType
display_profile_type;
- float operating_range_from,
+ double operating_range_from,
operating_range_upto;
- float uc_accuracy_factor;
+ double uc_accuracy_factor;
static const array<unsigned, 4>
FFTPageSizeValues;
static const array<double, 3>
@@ -242,7 +242,7 @@ class SExpDesignUI
*const FreqBandNames[(size_t)sigfile::TBand::_total];
float freq_bands[(size_t)sigfile::TBand::_total][2];
- float profile_scale_psd,
+ double profile_scale_psd,
profile_scale_mc;
void calculate_profile_scale();
bool autoscale;
@@ -306,7 +306,7 @@ class SExpDesignUI
forward_list<confval::SValidator<string>> config_keys_s;
forward_list<confval::SValidator<int>> config_keys_d;
- forward_list<confval::SValidator<float>> config_keys_g;
+ forward_list<confval::SValidator<double>> config_keys_g;
int load_settings();
int save_settings();
--
Sleep experiment manager
More information about the debian-med-commit
mailing list