[med-svn] [SCM] aghermann branch, master, updated. 3b87b4f8039ed683022537a0599b7dea069974d2
Andrei Zavada
johnhommer at gmail.com
Sun Sep 30 22:40:54 UTC 2012
The following commit has been merged in the master branch:
commit 2e45772e39c757ec663aba69c100cba7b8cd3a89
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Sun Sep 30 22:10:54 2012 +0300
achermann: cache last computed cf
diff --git a/src/model/achermann.cc b/src/model/achermann.cc
index 632e7a5..15bcba9 100644
--- a/src/model/achermann.cc
+++ b/src/model/achermann.cc
@@ -137,7 +137,8 @@ CModelRun (CSubject& subject, const string& session, const sigfile::SChannel& ch
tlo (ctl_params.AZAmendment1 ? _mm_list.size()-1 : 0),
thi (ctl_params.AZAmendment1 ? _mm_list.size()-1 : 0),
t0 (ctl_params.AZAmendment1 ? _mm_list.size()-1 : 0),
- tx (t0, tstep, tlo, thi)
+ tx (t0, tstep, tlo, thi),
+ cf (NAN)
{
if ( CSCourse::_status )
throw CSCourse::_status;
@@ -153,7 +154,8 @@ CModelRun (CModelRun&& rv)
tlo (rv.tlo),
thi (rv.thi),
t0 (rv.t0),
- tx (tstep, tlo, thi)
+ tx (tstep, tlo, thi),
+ cf (NAN)
{
_prepare_scores2();
}
@@ -342,7 +344,7 @@ snapshot()
#undef CF_CYCLE_COMMON_DB1
#undef CF_CYCLE_COMMON_NODB1
- return sqrt( _fit/_pages_with_SWA);
+ return cf = sqrt( _fit/_pages_with_SWA);
}
diff --git a/src/model/achermann.hh b/src/model/achermann.hh
index 3bc8fc7..0e51e76 100644
--- a/src/model/achermann.hh
+++ b/src/model/achermann.hh
@@ -105,6 +105,7 @@ class CModelRun
int watch_simplex_move( void (*)(void*));
double snapshot();
+ double cf;
// double _siman_metric( const void *xp, const void *yp) const;
// void _siman_step( const gsl_rng *r, void *xp,
diff --git a/src/ui/expdesign-simulations.cc b/src/ui/expdesign-simulations.cc
index 443f214..39b89e4 100644
--- a/src/ui/expdesign-simulations.cc
+++ b/src/ui/expdesign-simulations.cc
@@ -78,7 +78,7 @@ populate_2()
msimulations_visibility_switch_col, TRUE,
-1);
// status (put CF here)
- snprintf_buf( "CF = %g", M.snapshot());
+ snprintf_buf( "CF = %g", M.cf);
gtk_tree_store_set( mSimulations, &iter_q,
1, __buf__,
-1);
--
Sleep experiment manager
More information about the debian-med-commit
mailing list