[med-svn] [aghermann] 14/85: random whitespace
andrei zavada
hmmr-guest at alioth.debian.org
Thu Sep 26 23:46:23 UTC 2013
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to branch master
in repository aghermann.
commit a5cef01597824a4121facf5cd34e473d94840370
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Mon Sep 9 18:53:39 2013 +0300
random whitespace
---
upstream/src/aghermann/model/achermann.hh | 14 +++----
upstream/src/aghermann/model/beersma.hh | 28 ++++++-------
upstream/src/aghermann/model/ultradian-cycle.cc | 25 ++++++-----
upstream/src/aghermann/ui/mw/measurements.cc | 2 +-
upstream/src/aghermann/ui/sf/montage-overlays.cc | 7 ++--
upstream/src/aghermann/ui/ui.cc | 18 ++++----
upstream/src/libmetrics/swu.cc | 9 ++--
upstream/src/libsigfile/source-base.cc | 18 ++++----
upstream/src/libsigfile/tsv.cc | 2 +-
upstream/src/tools/edfhed.cc | 49 +++++++++++-----------
10 files changed, 89 insertions(+), 83 deletions(-)
diff --git a/upstream/src/aghermann/model/achermann.hh b/upstream/src/aghermann/model/achermann.hh
index cc45f8a..0026620 100644
--- a/upstream/src/aghermann/model/achermann.hh
+++ b/upstream/src/aghermann/model/achermann.hh
@@ -38,7 +38,7 @@ using namespace std;
struct SControlParamSet {
- bool DBAmendment1,
+ bool DBAmendment1,
DBAmendment2,
AZAmendment1,
AZAmendment2,
@@ -95,14 +95,14 @@ class CModelRun
const SControlParamSet&, const STunableSetWithState&);
enum TModrunFlags { modrun_tried = 1 };
- int status;
+ int status;
SControlParamSet
ctl_params;
- STunableSet<TTRole::d> tstep;
- STunableSet<TTRole::l> tlo;
- STunableSet<TTRole::u> thi;
- STunableSet<TTRole::v> t0;
- STunableSetWithState tx;
+ STunableSet<TTRole::d> tstep;
+ STunableSet<TTRole::l> tlo;
+ STunableSet<TTRole::u> thi;
+ STunableSet<TTRole::v> t0;
+ STunableSetWithState tx;
int watch_simplex_move( void (*)(void*));
double snapshot();
diff --git a/upstream/src/aghermann/model/beersma.hh b/upstream/src/aghermann/model/beersma.hh
index afd5ede..ab2bdc6 100644
--- a/upstream/src/aghermann/model/beersma.hh
+++ b/upstream/src/aghermann/model/beersma.hh
@@ -32,32 +32,32 @@ namespace beersma {
struct SClassicFitWeightedData {
- size_t n;
- double *y,
- *sigma;
- int pagesize;
- double SWA_0, SWA_L;
+ size_t n;
+ double *y,
+ *sigma;
+ int pagesize;
+ double SWA_0, SWA_L;
};
struct SClassicFit {
- double r;
+ double r;
};
struct SClassicFitCtl {
SProfileParamSet
P;
- double sigma;
- size_t iterations;
+ double sigma;
+ size_t iterations;
};
class FClassicFit {
FClassicFit() = delete;
FClassicFit( const FClassicFit&) = delete;
public:
- double A, r, b;
+ double A, r, b;
FClassicFit (double A_, double r_, double b_)
: A (A_), r (r_), b (b_)
{}
@@ -77,13 +77,13 @@ classic_fit( agh::CRecording&,
struct SUltradianCycle {
- double r, T, d, b;
+ double r, T, d, b;
SUltradianCycle& operator=( const SUltradianCycle&) = default;
static constexpr double
ir = 0.0001, iT = 1., id = .1, ib = .1, // the last one is a normalized value of metric
ur = 0.010, uT = 130., ud = 60., ub = .01,
lr = 0.001, lT = 60., ld = -60., lb = .1;
- double cf;
+ double cf;
};
inline double
@@ -98,8 +98,8 @@ distance( const SUltradianCycle& lv,
}
struct SUltradianCycleDetails {
- time_t start, end;
- double max, avg;
+ time_t start, end;
+ double max, avg;
};
@@ -107,7 +107,7 @@ struct SUltradianCycleCtl {
agh::SProfileParamSet
profile_params;
- double sigma;
+ double sigma;
gsl_siman_params_t
siman_params;
// int n_tries
diff --git a/upstream/src/aghermann/model/ultradian-cycle.cc b/upstream/src/aghermann/model/ultradian-cycle.cc
index 53e0ecb..ee330e4 100644
--- a/upstream/src/aghermann/model/ultradian-cycle.cc
+++ b/upstream/src/aghermann/model/ultradian-cycle.cc
@@ -62,7 +62,7 @@ uc_cost_function( void *xp)
// F.d > F.ud || F.d < F.ld ||
// F.b > F.ub || F.b < F.lb) ) )
// return 1e9;
- double cf = 0.;
+ double cf = 0.;
for ( size_t p = 0; p < P.coursep->size(); ++p ) {
cf += gsl_pow_2( F(p*P.pagesize/60.) - (*P.coursep)[p]);
}
@@ -73,7 +73,7 @@ uc_cost_function( void *xp)
void
uc_siman_step( const gsl_rng *r, void *xp, double step_size)
{
- auto& P = *(SUltradianCyclePPack*)(xp);
+ auto& P = *(SUltradianCyclePPack*)(xp);
agh::beersma::SUltradianCycle
Xm = {P.X[0], P.X[1], P.X[2], P.X[3], NAN},
X0 = Xm;
@@ -91,7 +91,7 @@ retry:
bool go_positive = (bool)gsl_rng_uniform_int( r, 2);
- double d,
+ double d,
nudge = *ipip;
size_t nudges = 0;
do {
@@ -171,14 +171,15 @@ ultradian_cycles( agh::CRecording& M,
&course,
M.pagesize(),
&C};
+
gsl_siman_solve( agh::global::rng,
- (void*)&P, //
- uc_cost_function, // gsl_siman_Efunc_t,
- uc_siman_step, // gsl_siman_step_t
- uc_siman_metric, // gsl_siman_metric_t,
- NULL, //uc_siman_print, // gsl_siman_print_t print_position,
- NULL, NULL, NULL, // gsl_siman_copy_t copyfunc, gsl_siman_copy_construct_t copy_constructor, gsl_siman_destroy_t destructor,
- sizeof(SUltradianCyclePPack), // size_t element_size,
+ (void*)&P, //
+ uc_cost_function, // gsl_siman_Efunc_t,
+ uc_siman_step, // gsl_siman_step_t
+ uc_siman_metric, // gsl_siman_metric_t,
+ NULL, //uc_siman_print, // gsl_siman_print_t print_position,
+ NULL, NULL, NULL, // gsl_siman_copy_t copyfunc, gsl_siman_copy_construct_t copy_constructor, gsl_siman_destroy_t destructor,
+ sizeof(SUltradianCyclePPack), // size_t element_size,
C.siman_params); // gsl_siman_params_t
agh::beersma::SUltradianCycle
@@ -187,13 +188,11 @@ ultradian_cycles( agh::CRecording& M,
{
FUltradianCycle F (X);
X.cf = 0.;
- for ( size_t p = 0; p < course.size(); ++p ) {
+ for ( size_t p = 0; p < course.size(); ++p )
X.cf += gsl_pow_2( F(p*M.pagesize()/60.) - course[p]);
- }
X.cf = sqrt(X.cf);
}
-
if ( extra )
*extra = analyse_deeper( X, M, C);
diff --git a/upstream/src/aghermann/ui/mw/measurements.cc b/upstream/src/aghermann/ui/mw/measurements.cc
index e9a6367..9423288 100644
--- a/upstream/src/aghermann/ui/mw/measurements.cc
+++ b/upstream/src/aghermann/ui/mw/measurements.cc
@@ -79,7 +79,7 @@ draw_timeline( cairo_t *cr) const
memcpy( &clock_time, localtime( &_p._p.timeline_start), sizeof(clock_time));
clock_time.tm_hour = 4;
clock_time.tm_min = clock_time.tm_sec = 0;
- time_t dawn = mktime( &clock_time),
+ time_t dawn = mktime( &clock_time),
t;
bool day = false;
for ( t = dawn; t < timeline_end(); t += 3600 * 12, day = !day )
diff --git a/upstream/src/aghermann/ui/sf/montage-overlays.cc b/upstream/src/aghermann/ui/sf/montage-overlays.cc
index 8b184a7..f716fd5 100644
--- a/upstream/src/aghermann/ui/sf/montage-overlays.cc
+++ b/upstream/src/aghermann/ui/sf/montage-overlays.cc
@@ -69,8 +69,9 @@ draw_overlays( cairo_t* cr,
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
snprintf_buf( "%s", _p._p.ED->FreqBandNames[(unsigned)b]);
}
- cairo_move_to( cr, _p.da_wd - 170,
- ptop + psd.uppermost_band*12 - 12*(unsigned)b + 12);
+ cairo_move_to(
+ cr, _p.da_wd - 170,
+ ptop + psd.uppermost_band*12 - 12*(unsigned)b + 12);
cairo_show_text( cr, global::buf);
cairo_stroke( cr);
}
@@ -156,7 +157,7 @@ draw_overlays( cairo_t* cr,
// y ticks
m = 0;
while ( (++m * 1e6) < gh / factor ) {
- cairo_move_to( cr, gx-3, gy + gh - (2 + (float)m*1e6 * factor));
+ cairo_move_to( cr, gx-3, gy + gh - (2 + (float)m*1e6 * factor));
cairo_rel_line_to( cr, 3, 0);
}
cairo_stroke( cr);
diff --git a/upstream/src/aghermann/ui/ui.cc b/upstream/src/aghermann/ui/ui.cc
index c0f74cb..f8ba657 100644
--- a/upstream/src/aghermann/ui/ui.cc
+++ b/upstream/src/aghermann/ui/ui.cc
@@ -34,7 +34,7 @@ cairo_put_banner( cairo_t *cr, const float wd, const float ht,
cairo_set_source_rgba( cr, r, g, b, a);
cairo_text_extents_t extents;
cairo_text_extents( cr, text, &extents);
- double idox = wd/2 - extents.width/2,
+ double idox = wd/2 - extents.width/2,
idoy = ht/2 + extents.height/2;
cairo_move_to( cr, idox, idoy);
cairo_show_text( cr, text);
@@ -101,11 +101,13 @@ cairo_draw_envelope( cairo_t *cr, const valarray<TFloat>& V,
cairo_move_to( cr, hoff, voff);
ssize_t i = start;
for ( ; i < end; ++i )
- cairo_line_to( cr, i / dps,
- voff - V[i] * scale/2);
+ cairo_line_to(
+ cr, i / dps,
+ voff - V[i] * scale/2);
for ( --i; i > start; --i )
- cairo_line_to( cr, i / dps,
- voff + V[i] * scale/2);
+ cairo_line_to(
+ cr, i / dps,
+ voff + V[i] * scale/2);
cairo_fill( cr);
}
@@ -213,9 +215,9 @@ void
agh::ui::
set_cursor_busy( bool busy, GtkWidget *wid)
{
- static GdkCursor *cursor_busy = NULL,
- *cursor_normal = NULL;
- if ( cursor_normal == NULL) {
+ static GdkCursor *cursor_busy = nullptr,
+ *cursor_normal = nullptr;
+ if ( cursor_normal == nullptr) {
cursor_busy = gdk_cursor_new_from_name( gdk_display_get_default(), "watch");
cursor_normal = gdk_cursor_new_from_name( gdk_display_get_default(), "left_ptr");
}
diff --git a/upstream/src/libmetrics/swu.cc b/upstream/src/libmetrics/swu.cc
index 4b1fd95..7f898d8 100644
--- a/upstream/src/libmetrics/swu.cc
+++ b/upstream/src/libmetrics/swu.cc
@@ -26,9 +26,10 @@ using namespace metrics;
swu::CProfile::
CProfile (const sigfile::CTypedSource& F, const int sig_no,
const SPPack ¶ms)
- : metrics::CProfile (F, sig_no,
- params.pagesize, params.step,
- params.compute_n_bins(F().samplerate(sig_no))),
+ : metrics::CProfile (
+ F, sig_no,
+ params.pagesize, params.step,
+ params.compute_n_bins(F().samplerate(sig_no))),
Pp (params)
{
Pp.check();
@@ -147,7 +148,7 @@ export_tsv( const string& fname) const
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/source-base.cc b/upstream/src/libsigfile/source-base.cc
index 7d373fb..f2134fd 100644
--- a/upstream/src/libsigfile/source-base.cc
+++ b/upstream/src/libsigfile/source-base.cc
@@ -409,11 +409,11 @@ get_region_filtered_smpl( const int h,
// artifacts
const auto& AA = artifacts(h);
for ( const auto& A : AA() ) {
- size_t Aa = A.a * this_samplerate,
+ size_t Aa = A.a * this_samplerate,
Az = A.z * this_samplerate;
if ( unlikely (Aa >= smplz) )
break;
- size_t run = (Az - Aa),
+ size_t run = (Az - Aa),
window = min( run, this_samplerate),
t;
if ( unlikely (Az > smplz) )
@@ -424,7 +424,7 @@ get_region_filtered_smpl( const int h,
if ( run > window ) {
// construct a vector of multipliers using an INVERTED windowing function on the
// first and last windows of the run
- size_t t0;
+ size_t t0;
for ( t = 0; t < window/2; ++t )
W[t] = (1 - sigproc::winf[(size_t)AA.dampen_window_type]( t, window));
t0 = run-window; // start of the last window but one
@@ -468,12 +468,14 @@ get_region_filtered_smpl( const int h,
switch ( ff.notch_filter ) {
case SFilterPack::TNotchFilter::at50Hz:
- recp = exstrom::band_stop( recp, this_samplerate,
- 48, 52, 1, true); // hardcoded numerals spotted!
+ recp = exstrom::band_stop(
+ recp, this_samplerate,
+ 48, 52, 1, true); // hardcoded numerals spotted!
break;
case SFilterPack::TNotchFilter::at60Hz:
- recp = exstrom::band_stop( recp, this_samplerate,
- 58, 62, 1, true);
+ recp = exstrom::band_stop(
+ recp, this_samplerate,
+ 58, 62, 1, true);
break;
case SFilterPack::TNotchFilter::none:
default:
@@ -558,7 +560,7 @@ explain_status( const int status)
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
diff --git a/upstream/src/libsigfile/tsv.cc b/upstream/src/libsigfile/tsv.cc
index da8892d..3707a65 100644
--- a/upstream/src/libsigfile/tsv.cc
+++ b/upstream/src/libsigfile/tsv.cc
@@ -117,7 +117,7 @@ CTSVFile (CTSVFile&& rv)
swap( metadata, rv.metadata);
- _subtype = rv._subtype;
+ _subtype = rv._subtype;
swap( channels, rv.channels);
swap( common_annotations, rv.common_annotations);
diff --git a/upstream/src/tools/edfhed.cc b/upstream/src/tools/edfhed.cc
index 4e5de4c..28e6099 100644
--- a/upstream/src/tools/edfhed.cc
+++ b/upstream/src/tools/edfhed.cc
@@ -68,22 +68,22 @@ static struct argp argp = {
struct SSettable {
enum TField {
// note that some fields are not not included
- version_number, // [ 8],
- patient_id, // [80], // maps to subject name
- recording_id, // [80], // maps to episode_name (session_name)
- recording_date, // [ 8],
- recording_time, // [ 8],
- reserved, // [44],
-
- ch_label, // [16], // maps to channel
- ch_transducer_type, // [80],
- ch_physical_dim, // [ 8],
- ch_physical_min, // [ 8],
- ch_physical_max, // [ 8],
- ch_digital_min, // [ 8],
- ch_digital_max, // [ 8],
- ch_filtering_info, // [80],
- ch_reserved, // [32];
+ version_number,
+ patient_id,
+ recording_id,
+ recording_date,
+ recording_time,
+ reserved,
+
+ ch_label,
+ ch_transducer_type,
+ ch_physical_dim,
+ ch_physical_min,
+ ch_physical_max,
+ ch_digital_min,
+ ch_digital_max,
+ ch_filtering_info,
+ ch_reserved,
};
TField which;
int channel;
@@ -159,7 +159,7 @@ struct SArguments {
files;
std::vector<SSettable>
settables;
- bool header_only:1,
+ bool header_only:1,
with_annotations:1,
from_tree:1,
from_timestamp:1,
@@ -283,11 +283,11 @@ static int
set_session_and_episode_from_tree( sigfile::CEDFFile& F)
{
// filename can be anything, including a symlink
- bool is_path_absolute = (F.filename()[0] == '/');
+ bool is_path_absolute = (F.filename()[0] == '/');
list<string> pe = agh::fs::path_elements( string (is_path_absolute ? "" : "./") + F.filename());
- string episode = agh::fs::make_fname_base( pe.back(), ".edf", agh::fs::TMakeFnameOption::normal);
+ string episode = agh::fs::make_fname_base( pe.back(), ".edf", agh::fs::TMakeFnameOption::normal);
- string in_dir = string (is_path_absolute ? "/" : "") + agh::str::join( list<string> (pe.begin(), prev(pe.end())), "/") + "/.";
+ string in_dir = string (is_path_absolute ? "/" : "") + agh::str::join( list<string> (pe.begin(), prev(pe.end())), "/") + "/.";
// a symlink from ./filename.edf would resolve somewhere else,
// losing the right path elements, so only canonicalize_file_name
// on the dir it is in
@@ -326,9 +326,10 @@ main( int argc, char **argv)
for ( auto &fname : Opts.files )
try {
- auto F = sigfile::CEDFFile (fname,
- sigfile::CSource::no_ancillary_files |
- sigfile::CEDFFile::no_field_consistency_check);
+ auto F = sigfile::CEDFFile (
+ fname,
+ sigfile::CSource::no_ancillary_files |
+ sigfile::CEDFFile::no_field_consistency_check);
if ( Opts.settables.empty() &&
not Opts.from_timestamp && not Opts.from_tree && not Opts.to_timestamp ) {
cout << F.details(
@@ -427,7 +428,7 @@ main( int argc, char **argv)
// Local Variables:
// Mode: c++
-// indent-tabs-mode: 8
+// indent-tabs-mode: nil
// tab-width: 8
// c-basic-offset: 8
// End:
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list