Index: library/tests/stresssuite/additive_generator.cpp
===================================================================
--- library/tests/stresssuite/additive_generator.cpp (revision 717)
+++ library/tests/stresssuite/additive_generator.cpp (revision 1064)
@@ -6,18 +6,18 @@
 
 void additive_generator::from_setting ( const Setting &set ) {
-	int sz;
-	UI::get ( sz, set, "size", UI::compulsory );
+    int sz;
+    UI::get ( sz, set, "size", UI::compulsory );
 
-	mat a0 = randu ( sz, sz );
-	a = a0 * a0.T();
-	vec v = randu ( sz );
-	v2 = outer_product ( v, v );
+    mat a0 = randu ( sz, sz );
+    a = a0 * a0.T();
+    vec v = randu ( sz );
+    v2 = outer_product ( v, v );
 
-	UI::get ( lambda, set, "lambda", UI::optional );
+    UI::get ( lambda, set, "lambda", UI::optional );
 }
 
 mat additive_generator::next() {
-	mat b = a;
-	a = ( 1 - lambda ) * a + lambda * v2;
-	return b;
+    mat b = a;
+    a = ( 1 - lambda ) * a + lambda * v2;
+    return b;
 }
Index: library/tests/stresssuite/arx_elem_stress.cpp
===================================================================
--- library/tests/stresssuite/arx_elem_stress.cpp (revision 1009)
+++ library/tests/stresssuite/arx_elem_stress.cpp (revision 1064)
@@ -5,47 +5,47 @@
 
 TEST ( arx_elem_stress ) {
-	// Setup model : ARX for 1D Gaussian
-	//Test constructor
-	mat V0 = 0.00001 * eye ( 2 );
-	V0 ( 0, 0 ) = 0.1; //
-	ARX Ar;
-	Ar.set_statistics ( 1, V0, -1.0 );
-	Ar.set_constant ( true );
-	Ar.validate();
+    // Setup model : ARX for 1D Gaussian
+    //Test constructor
+    mat V0 = 0.00001 * eye ( 2 );
+    V0 ( 0, 0 ) = 0.1; //
+    ARX Ar;
+    Ar.set_statistics ( 1, V0, -1.0 );
+    Ar.set_constant ( true );
+    Ar.validate();
 
-	mat mu ( 1, 1 );
-	mat R ( 1, 1 );
-	Ar.posterior().mean_mat ( mu, R );
-	cout << "Prior moments: mu=" << mu << ", R=" << R << endl;
+    mat mu ( 1, 1 );
+    mat R ( 1, 1 );
+    Ar.posterior().mean_mat ( mu, R );
+    cout << "Prior moments: mu=" << mu << ", R=" << R << endl;
 
-	int ndat = 200;
-	vec smp = randn ( ndat );
-	//
-	mat Smp = ones ( 2, ndat );
-	Smp.set_row ( 0, smp );
-	//
-	Ar.bayes_batch ( Smp );
-	// Ar is now filled with estimates of N(0,1);
-	cout << "Empirical moments: mu=" << sum ( smp ) / ndat << ", R=" << sum_sqr ( smp ) / ndat - pow ( sum ( smp ) / ndat, 2 ) << endl;
-	Ar.posterior().mean_mat ( mu, R );
-	cout << "Posterior moments: mu=" << mu << ", R=" << R << endl;
+    int ndat = 200;
+    vec smp = randn ( ndat );
+    //
+    mat Smp = ones ( 2, ndat );
+    Smp.set_row ( 0, smp );
+    //
+    Ar.bayes_batch ( Smp );
+    // Ar is now filled with estimates of N(0,1);
+    cout << "Empirical moments: mu=" << sum ( smp ) / ndat << ", R=" << sum_sqr ( smp ) / ndat - pow ( sum ( smp ) / ndat, 2 ) << endl;
+    Ar.posterior().mean_mat ( mu, R );
+    cout << "Posterior moments: mu=" << mu << ", R=" << R << endl;
 
-	//////// TEST prediction
-	vec x = linspace ( -3.0, 3.0, 100 );
-	double xstep = 6.0 / 100.0;
-	mat X ( 1, 100 );
-	mat X2 ( 2, 100 );
-	X.set_row ( 0, x );
-	X2.set_row ( 0, x );
+    //////// TEST prediction
+    vec x = linspace ( -3.0, 3.0, 100 );
+    double xstep = 6.0 / 100.0;
+    mat X ( 1, 100 );
+    mat X2 ( 2, 100 );
+    X.set_row ( 0, x );
+    X2.set_row ( 0, x );
 
-	mlstudent* Ap = Ar.predictor_student();
-	vec Ap_x = Ap->evallogcond_mat ( X, empty_vec );
-	vec ll_x = Ar.logpred_mat ( X2 , empty_vec);
+    mlstudent* Ap = Ar.predictor_student();
+    vec Ap_x = Ap->evallogcond_mat ( X, empty_vec );
+    vec ll_x = Ar.logpred_mat ( X2 , empty_vec);
 
-	cout << "normalize : " << xstep*sum ( exp ( Ap_x ) ) << endl;
-	cout << "normalize : " << xstep*sum ( exp ( ll_x ) ) << endl;
+    cout << "normalize : " << xstep*sum ( exp ( Ap_x ) ) << endl;
+    cout << "normalize : " << xstep*sum ( exp ( ll_x ) ) << endl;
 
-	it_file it ( "arx_elem_test.it" );
-	it << Name ( "Ap_x" ) << Ap_x;
-	it << Name ( "ll_x" ) << ll_x;
+    it_file it ( "arx_elem_test.it" );
+    it << Name ( "Ap_x" ) << Ap_x;
+    it << Name ( "ll_x" ) << ll_x;
 }
Index: library/tests/stresssuite/square_mat_stress.cpp
===================================================================
--- library/tests/stresssuite/square_mat_stress.cpp (revision 766)
+++ library/tests/stresssuite/square_mat_stress.cpp (revision 1064)
@@ -37,11 +37,11 @@
                   const itpp::mat &actual, double tolerance,
                   TestDetails const& details ) {
-	if ( !AreClose ( expected, actual, tolerance ) ) {
-		MemoryOutStream stream;
-		stream << "failed at " << expected.rows()
-		<< " x " << expected.cols();
-
-		results.OnTestFailure ( details, stream.GetText() );
-	}
+    if ( !AreClose ( expected, actual, tolerance ) ) {
+        MemoryOutStream stream;
+        stream << "failed at " << expected.rows()
+               << " x " << expected.cols();
+
+        results.OnTestFailure ( details, stream.GetText() );
+    }
 }
 
@@ -52,201 +52,201 @@
 template<typename TMatrix>
 void test_matrix ( int index, square_mat_point *point ) {
-	Real_Timer tt;
-
-	cout << "agenda[" << index << "]:" << endl;
-	mat A = point->get_matrix();
-	int sz = A.rows();
-	CHECK_EQUAL ( A.cols(), sz );
-
-	tt.tic();
-	TMatrix sq_mat ( A );
-	double elapsed = tt.toc();
-	cout << "ctor(" << sz << " x " << sz << "): " << elapsed << " s" << endl;
-
-	tt.tic();
-	mat res = sq_mat.to_mat();
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		CHECK_CLOSE ( A, res, epsilon );
-	}
-
-	cout << "to_mat: " << elapsed << " s" << endl;
-
-	vec v = point->get_vector();
-	double w = point->get_scalar();
-	TMatrix sq_mat2 = sq_mat;
-
-	tt.tic();
-	sq_mat2.opupdt ( v, w );
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		mat expA = A + w * outer_product ( v, v );
-		CHECK_CLOSE ( expA, sq_mat2.to_mat(), epsilon );
-	}
-
-	cout << "opupdt: " << elapsed << " s" << endl;
-
-	TMatrix invmat ( sz );
-
-	tt.tic();
-	sq_mat.inv ( invmat );
-	elapsed = tt.toc();
-
-	mat invA;
-	if ( !fast ) {
-		invA = inv ( A );
-		CHECK_CLOSE ( invA, invmat.to_mat(), epsilon );
-	}
-
-	cout << "inv: " << elapsed << " s" << endl;
-
-	tt.tic();
-	double ld = sq_mat.logdet();
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		double d = det ( A );
-		CHECK_CLOSE ( log ( d ), ld, epsilon );
-	}
-
-	cout << "logdet: " << elapsed << " s" << endl;
-
-	tt.tic();
-	double q = sq_mat.qform ( ones ( sz ) );
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		CHECK_CLOSE ( sumsum ( A ), q, epsilon );
-	}
-
-	cout << "qform(1): " << elapsed << " s" << endl;
-
-	tt.tic();
-	q = sq_mat.qform ( v );
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		double r = ( A * v ) * v;
-		CHECK_CLOSE ( r, q, epsilon );
-	}
-
-	cout << "qform(v): " << elapsed << " s" << endl;
-
-	tt.tic();
-	q = sq_mat.invqform ( v );
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		double r = ( invA * v ) * v;
-		CHECK_CLOSE ( r, q, epsilon );
-	}
-
-	cout << "invqform: " << elapsed << " s" << endl;
-
-	TMatrix twice = sq_mat;
-
-	tt.tic();
-	twice += sq_mat;
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		res = 2 * A;
-		CHECK_CLOSE ( res, twice.to_mat(), epsilon );
-	}
-
-	cout << "+=: " << elapsed << " s" << endl;
-
-	sq_mat2 = sq_mat;
-
-	tt.tic();
-	sq_mat2.mult_sym ( A );
-	elapsed = tt.toc();
-
-	if ( !fast ) {
-		res = ( A * A ) * A.T();
-		CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
-	}
-
-	cout << "^2: " << elapsed << " s" << endl;
+    Real_Timer tt;
+
+    cout << "agenda[" << index << "]:" << endl;
+    mat A = point->get_matrix();
+    int sz = A.rows();
+    CHECK_EQUAL ( A.cols(), sz );
+
+    tt.tic();
+    TMatrix sq_mat ( A );
+    double elapsed = tt.toc();
+    cout << "ctor(" << sz << " x " << sz << "): " << elapsed << " s" << endl;
+
+    tt.tic();
+    mat res = sq_mat.to_mat();
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        CHECK_CLOSE ( A, res, epsilon );
+    }
+
+    cout << "to_mat: " << elapsed << " s" << endl;
+
+    vec v = point->get_vector();
+    double w = point->get_scalar();
+    TMatrix sq_mat2 = sq_mat;
+
+    tt.tic();
+    sq_mat2.opupdt ( v, w );
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        mat expA = A + w * outer_product ( v, v );
+        CHECK_CLOSE ( expA, sq_mat2.to_mat(), epsilon );
+    }
+
+    cout << "opupdt: " << elapsed << " s" << endl;
+
+    TMatrix invmat ( sz );
+
+    tt.tic();
+    sq_mat.inv ( invmat );
+    elapsed = tt.toc();
+
+    mat invA;
+    if ( !fast ) {
+        invA = inv ( A );
+        CHECK_CLOSE ( invA, invmat.to_mat(), epsilon );
+    }
+
+    cout << "inv: " << elapsed << " s" << endl;
+
+    tt.tic();
+    double ld = sq_mat.logdet();
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        double d = det ( A );
+        CHECK_CLOSE ( log ( d ), ld, epsilon );
+    }
+
+    cout << "logdet: " << elapsed << " s" << endl;
+
+    tt.tic();
+    double q = sq_mat.qform ( ones ( sz ) );
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        CHECK_CLOSE ( sumsum ( A ), q, epsilon );
+    }
+
+    cout << "qform(1): " << elapsed << " s" << endl;
+
+    tt.tic();
+    q = sq_mat.qform ( v );
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        double r = ( A * v ) * v;
+        CHECK_CLOSE ( r, q, epsilon );
+    }
+
+    cout << "qform(v): " << elapsed << " s" << endl;
+
+    tt.tic();
+    q = sq_mat.invqform ( v );
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        double r = ( invA * v ) * v;
+        CHECK_CLOSE ( r, q, epsilon );
+    }
+
+    cout << "invqform: " << elapsed << " s" << endl;
+
+    TMatrix twice = sq_mat;
+
+    tt.tic();
+    twice += sq_mat;
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        res = 2 * A;
+        CHECK_CLOSE ( res, twice.to_mat(), epsilon );
+    }
+
+    cout << "+=: " << elapsed << " s" << endl;
+
+    sq_mat2 = sq_mat;
+
+    tt.tic();
+    sq_mat2.mult_sym ( A );
+    elapsed = tt.toc();
+
+    if ( !fast ) {
+        res = ( A * A ) * A.T();
+        CHECK_CLOSE ( res, sq_mat2.to_mat(), epsilon );
+    }
+
+    cout << "^2: " << elapsed << " s" << endl;
 }
 
 void test_agenda ( FTestMatrix test ) {
-	UIFile fag ( agenda_file_name );
-	Array<shared_ptr<square_mat_point> > mag;
-	UI::get ( mag, fag, "agenda", UI::compulsory );
-	int sz = mag.size();
-	CHECK ( sz > 0 );
-	for ( int i = 0; i < sz; ++i ) {
-		test ( i, mag ( i ).get() );
-	}
+    UIFile fag ( agenda_file_name );
+    Array<shared_ptr<square_mat_point> > mag;
+    UI::get ( mag, fag, "agenda", UI::compulsory );
+    int sz = mag.size();
+    CHECK ( sz > 0 );
+    for ( int i = 0; i < sz; ++i ) {
+        test ( i, mag ( i ).get() );
+    }
 }
 
 SUITE ( ldmat ) {
-	TEST ( agenda ) {
-		test_agenda ( test_matrix<ldmat> );
-	}
+    TEST ( agenda ) {
+        test_agenda ( test_matrix<ldmat> );
+    }
 }
 
 SUITE ( fsqmat ) {
-	TEST ( agenda ) {
-		test_agenda ( test_matrix<fsqmat> );
-	}
+    TEST ( agenda ) {
+        test_agenda ( test_matrix<fsqmat> );
+    }
 }
 
 SUITE ( chmat ) {
-	TEST ( agenda ) {
-		test_agenda ( test_matrix<chmat> );
-	}
+    TEST ( agenda ) {
+        test_agenda ( test_matrix<chmat> );
+    }
 }
 
 int main ( int argc, char const *argv[] ) {
-	bool unknown = false;
-	int update_next = 0; // 1 suite, 2 epsilon, 3 agenda file
-	const char *suite = "ldmat";
-	const char **param = argv + 1;
-	while ( *param && !unknown ) {
-		if ( update_next ) {
-			if ( update_next == 1 ) {
-				suite = *param;
-			} else if ( update_next == 2 ) {
-				double eps = atof ( *param );
-				if ( eps > 0 ) {
-					epsilon = eps;
-				} else {
-					cerr << "invalid epsilon value ignored" << endl;
-				}
-			} else {
-				agenda_file_name = *param;
-			}
-
-			update_next = 0;
-		} else {
-			if ( !strcmp ( *param, "-a" ) ) {
-				update_next = 3;
-			} else if ( !strcmp ( *param, "-c" ) ) {
-				update_next = 1;
-			} else if ( !strcmp ( *param, "-e" ) ) {
-				update_next = 2;
-			} else if ( !strcmp ( *param, "-f" ) ) {
-				fast = true;
-			} else {
-				unknown = true;
-			}
-		}
-
-		++param;
-	}
-
-	if ( unknown || update_next ) {
-		cerr << "usage: " << argv[0] << " [ -f ] [ -e epsilon ] [ -a agenda_input.cfg ] [ -c class ]" << endl;
-	} else {
-		UnitTest::TestReporterStdout reporter;
-		UnitTest::TestRunner runner ( reporter );
-		return runner.RunTestsIf ( UnitTest::Test::GetTestList(),
-		                           suite,
-		                           UnitTest::True(),
-		                           0 );
-	}
-}
+    bool unknown = false;
+    int update_next = 0; // 1 suite, 2 epsilon, 3 agenda file
+    const char *suite = "ldmat";
+    const char **param = argv + 1;
+    while ( *param && !unknown ) {
+        if ( update_next ) {
+            if ( update_next == 1 ) {
+                suite = *param;
+            } else if ( update_next == 2 ) {
+                double eps = atof ( *param );
+                if ( eps > 0 ) {
+                    epsilon = eps;
+                } else {
+                    cerr << "invalid epsilon value ignored" << endl;
+                }
+            } else {
+                agenda_file_name = *param;
+            }
+
+            update_next = 0;
+        } else {
+            if ( !strcmp ( *param, "-a" ) ) {
+                update_next = 3;
+            } else if ( !strcmp ( *param, "-c" ) ) {
+                update_next = 1;
+            } else if ( !strcmp ( *param, "-e" ) ) {
+                update_next = 2;
+            } else if ( !strcmp ( *param, "-f" ) ) {
+                fast = true;
+            } else {
+                unknown = true;
+            }
+        }
+
+        ++param;
+    }
+
+    if ( unknown || update_next ) {
+        cerr << "usage: " << argv[0] << " [ -f ] [ -e epsilon ] [ -a agenda_input.cfg ] [ -c class ]" << endl;
+    } else {
+        UnitTest::TestReporterStdout reporter;
+        UnitTest::TestRunner runner ( reporter );
+        return runner.RunTestsIf ( UnitTest::Test::GetTestList(),
+                                   suite,
+                                   UnitTest::True(),
+                                   0 );
+    }
+}
Index: library/tests/stresssuite/additive_generator.h
===================================================================
--- library/tests/stresssuite/additive_generator.h (revision 717)
+++ library/tests/stresssuite/additive_generator.h (revision 1064)
@@ -21,21 +21,21 @@
 class additive_generator : public generator {
 private:
-	itpp::mat a;
-	itpp::mat v2;
-	double lambda;
+    itpp::mat a;
+    itpp::mat v2;
+    double lambda;
 
 public:
-	additive_generator() : lambda ( 0.5 ) { }
+    additive_generator() : lambda ( 0.5 ) { }
 
-	itpp::mat next();
+    itpp::mat next();
 
-	//! Load from structure with elements:
-	//!  \code
-	//! { size = 7; // size (rows == cols) of the generated matrix
-	//!   lambda = 0.5; // weight of the added vector
-	//! }
-	//! \endcode
-	//! size is mandatory, lambda optional (with default as shown).
-	void from_setting ( const Setting &set );
+    //! Load from structure with elements:
+    //!  \code
+    //! { size = 7; // size (rows == cols) of the generated matrix
+    //!   lambda = 0.5; // weight of the added vector
+    //! }
+    //! \endcode
+    //! size is mandatory, lambda optional (with default as shown).
+    void from_setting ( const Setting &set );
 };
 
Index: library/tests/stresssuite/particle_stress.cpp
===================================================================
--- library/tests/stresssuite/particle_stress.cpp (revision 887)
+++ library/tests/stresssuite/particle_stress.cpp (revision 1064)
@@ -11,32 +11,32 @@
 
 TEST ( particle_stress ) {
-	RV x ( "1" );
-	RV xm = x;
-	xm.t_plus ( -1 );
-	const
-	RV y ( "2" );
+    RV x ( "1" );
+    RV xm = x;
+    xm.t_plus ( -1 );
+    const
+    RV y ( "2" );
 
-	mat A = "1";
-	vec vR = "1";
-	ldmat R ( vR );
+    mat A = "1";
+    vec vR = "1";
+    ldmat R ( vR );
 
-	eEmp emp;
-	euni eun;
-	eun.set_parameters ( "0", "1" );
-	emp.set_statistics ( ones ( 10 ), eun );
-	vec &v = emp._w();
-	Array<vec> &S = emp._samples();
+    eEmp emp;
+    euni eun;
+    eun.set_parameters ( "0", "1" );
+    emp.set_statistics ( ones ( 10 ), eun );
+    vec &v = emp._w();
+    Array<vec> &S = emp._samples();
 
-	for ( int i = 0; i < 10; i++ ) {
-		v ( i ) = exp ( -0.5 * sum ( pow ( S ( i ) - 1, 2.0 ) ) * 10 );
-	}
-	v /= sum ( v );
+    for ( int i = 0; i < 10; i++ ) {
+        v ( i ) = exp ( -0.5 * sum ( pow ( S ( i ) - 1, 2.0 ) ) * 10 );
+    }
+    v /= sum ( v );
 
-	cout << "p:" << S << endl;
-	cout << "w:" << v << endl;
+    cout << "p:" << S << endl;
+    cout << "w:" << v << endl;
 
-	ivec ind;
-	resample ( v, ind );
+    ivec ind;
+    resample ( v, ind );
 
-	cout << ind << endl;
+    cout << ind << endl;
 }
Index: library/tests/stresssuite/kalman_stress.cpp
===================================================================
--- library/tests/stresssuite/kalman_stress.cpp (revision 722)
+++ library/tests/stresssuite/kalman_stress.cpp (revision 1064)
@@ -10,44 +10,44 @@
 
 TEST ( kalman_stress ) {
-	// Kalman filter
-	mat A, B, C, D, R, Q, P0;
-	vec mu0;
-	mat Mu0;;
-	// input from Matlab
-	it_file fin ( "kalman_stress.it" );
+    // Kalman filter
+    mat A, B, C, D, R, Q, P0;
+    vec mu0;
+    mat Mu0;;
+    // input from Matlab
+    it_file fin ( "kalman_stress.it" );
 
-	mat Dt;
-	int Ndat;
+    mat Dt;
+    int Ndat;
 
-	bool xxx = fin.seek ( "d" );
-	if ( !xxx ) {
-		bdm_error ( "kalman_stress.it not found" );
-	}
-	fin >> Dt;
-	fin.seek ( "A" );
-	fin >> A;
-	fin.seek ( "B" );
-	fin >> B;
-	fin.seek ( "C" );
-	fin >> C;
-	fin.seek ( "D" );
-	fin >> D;
-	fin.seek ( "R" );
-	fin >> R;
-	fin.seek ( "Q" );
-	fin >> Q;
-	fin.seek ( "P0" );
-	fin >> P0;
-	fin.seek ( "mu0" );
-	fin >> Mu0;
-	mu0 = Mu0.get_col ( 0 );
+    bool xxx = fin.seek ( "d" );
+    if ( !xxx ) {
+        bdm_error ( "kalman_stress.it not found" );
+    }
+    fin >> Dt;
+    fin.seek ( "A" );
+    fin >> A;
+    fin.seek ( "B" );
+    fin >> B;
+    fin.seek ( "C" );
+    fin >> C;
+    fin.seek ( "D" );
+    fin >> D;
+    fin.seek ( "R" );
+    fin >> R;
+    fin.seek ( "Q" );
+    fin >> Q;
+    fin.seek ( "P0" );
+    fin >> P0;
+    fin.seek ( "mu0" );
+    fin >> Mu0;
+    mu0 = Mu0.get_col ( 0 );
 
-	Ndat = Dt.cols();
-	int dimx = A.rows();
+    Ndat = Dt.cols();
+    int dimx = A.rows();
 
-	// Prepare for Kalman filters in BDM:
-	RV rx ( "{x }", vec_1 ( A.cols() ) );
-	RV ru ( "{u }", vec_1 ( B.cols() ) );
-	RV ry ( "{y }", vec_1 ( C.rows() ) );
+    // Prepare for Kalman filters in BDM:
+    RV rx ( "{x }", vec_1 ( A.cols() ) );
+    RV ru ( "{u }", vec_1 ( B.cols() ) );
+    RV ry ( "{y }", vec_1 ( C.rows() ) );
 
 // 	// LDMAT
@@ -59,70 +59,70 @@
 // 	Xt.set_col( 0,KFep.mean() );
 
-	//Chol
-	KalmanCh KF;
-	KF.set_parameters ( A, B, C, D, chmat ( Q ), chmat ( R ) );
-	KF.set_statistics ( mu0, chmat ( P0 ) ); //prediction!
-	KF.set_evalll ( false );
-	KF.validate();
-	const epdf& KFep = KF.posterior();
-	mat Xt ( dimx, Ndat );
-	Xt.set_col ( 0, KFep.mean() );
+    //Chol
+    KalmanCh KF;
+    KF.set_parameters ( A, B, C, D, chmat ( Q ), chmat ( R ) );
+    KF.set_statistics ( mu0, chmat ( P0 ) ); //prediction!
+    KF.set_evalll ( false );
+    KF.validate();
+    const epdf& KFep = KF.posterior();
+    mat Xt ( dimx, Ndat );
+    Xt.set_col ( 0, KFep.mean() );
 
-	// FULL
-	KalmanFull KF2;
-	KF2.set_parameters ( A, B, C, D,  Q, R );
-	KF2.set_statistics ( mu0, P0 );
-	KF2.set_evalll ( false );
-	KF2.validate();
-	mat Xt2 ( dimx, Ndat );
-	Xt2.set_col ( 0, mu0 );
+    // FULL
+    KalmanFull KF2;
+    KF2.set_parameters ( A, B, C, D,  Q, R );
+    KF2.set_statistics ( mu0, P0 );
+    KF2.set_evalll ( false );
+    KF2.validate();
+    mat Xt2 ( dimx, Ndat );
+    Xt2.set_col ( 0, mu0 );
 
 
-	// EKF
-	shared_ptr<bilinfn> fxu = new bilinfn ( A, B );
-	shared_ptr<bilinfn> hxu = new bilinfn ( C, D );
-	EKFCh KFE;
-	KFE.set_parameters ( fxu, hxu, Q, R );
-	KFE.set_statistics ( mu0, chmat ( P0 ) );
-	KFE.set_evalll ( false );
-	KFE.validate();
-	const epdf& KFEep = KFE.posterior();
-	mat XtE ( dimx, Ndat );
-	XtE.set_col ( 0, KFEep.mean() );
+    // EKF
+    shared_ptr<bilinfn> fxu = new bilinfn ( A, B );
+    shared_ptr<bilinfn> hxu = new bilinfn ( C, D );
+    EKFCh KFE;
+    KFE.set_parameters ( fxu, hxu, Q, R );
+    KFE.set_statistics ( mu0, chmat ( P0 ) );
+    KFE.set_evalll ( false );
+    KFE.validate();
+    const epdf& KFEep = KFE.posterior();
+    mat XtE ( dimx, Ndat );
+    XtE.set_col ( 0, KFEep.mean() );
 
-	//test performance of each filter
-	Real_Timer tt;
-	vec exec_times ( 3 ); // KF, KF2, KFE
+    //test performance of each filter
+    Real_Timer tt;
+    vec exec_times ( 3 ); // KF, KF2, KFE
 
-	vec dt;
-	tt.tic();
-	for ( int t = 1; t < Ndat; t++ ) {
-		dt = Dt.get_col ( t );
-		KF.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
-		Xt.set_col ( t, KFep.mean() );
-	}
-	exec_times ( 0 ) = tt.toc();
+    vec dt;
+    tt.tic();
+    for ( int t = 1; t < Ndat; t++ ) {
+        dt = Dt.get_col ( t );
+        KF.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
+        Xt.set_col ( t, KFep.mean() );
+    }
+    exec_times ( 0 ) = tt.toc();
 
-	tt.tic();
-	for ( int t = 1; t < Ndat; t++ ) {
-		dt = Dt.get_col ( t );
-		KF2.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
-		Xt2.set_col ( t, KF2.posterior().mean() );
-	}
-	exec_times ( 1 ) = tt.toc();
+    tt.tic();
+    for ( int t = 1; t < Ndat; t++ ) {
+        dt = Dt.get_col ( t );
+        KF2.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
+        Xt2.set_col ( t, KF2.posterior().mean() );
+    }
+    exec_times ( 1 ) = tt.toc();
 
-	tt.tic();
-	for ( int t = 1; t < Ndat; t++ ) {
-		dt = Dt.get_col ( t );
-		KFE.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
-		XtE.set_col ( t, KFEep.mean() );
-	}
-	exec_times ( 2 ) = tt.toc();
+    tt.tic();
+    for ( int t = 1; t < Ndat; t++ ) {
+        dt = Dt.get_col ( t );
+        KFE.bayes ( dt.get ( 0, C.rows() - 1 ), dt.get ( C.rows(), dt.length() - 1 ) );
+        XtE.set_col ( t, KFEep.mean() );
+    }
+    exec_times ( 2 ) = tt.toc();
 
 
-	it_file fou ( "kalman_stress_res.it" );
-	fou << Name ( "xth" ) << Xt;
-	fou << Name ( "xth2" ) << Xt2;
-	fou << Name ( "xthE" ) << XtE;
-	fou << Name ( "exec_times" ) << exec_times;
+    it_file fou ( "kalman_stress_res.it" );
+    fou << Name ( "xth" ) << Xt;
+    fou << Name ( "xth2" ) << Xt2;
+    fou << Name ( "xthE" ) << XtE;
+    fou << Name ( "exec_times" ) << exec_times;
 }
Index: library/tests/stresssuite/merger_iter_stress.cpp
===================================================================
--- library/tests/stresssuite/merger_iter_stress.cpp (revision 741)
+++ library/tests/stresssuite/merger_iter_stress.cpp (revision 1064)
@@ -11,64 +11,64 @@
 TEST ( merger_iter_stress ) {
 
-	RNG_randomize();
+    RNG_randomize();
 
-	RV x ( "{x }", "1" );
-	RV y ( "{y }", "1" );
+    RV x ( "{x }", "1" );
+    RV y ( "{y }", "1" );
 
-	RV xy = x;
-	xy.add ( y );
+    RV xy = x;
+    xy.add ( y );
 
-	enorm_fsqmat_ptr f1;
-	f1->set_rv ( xy );
-	enorm_fsqmat_ptr f2;
-	f2->set_rv ( xy );
-	enorm_fsqmat_ptr f3;
-	f3->set_rv ( y );
+    enorm_fsqmat_ptr f1;
+    f1->set_rv ( xy );
+    enorm_fsqmat_ptr f2;
+    f2->set_rv ( xy );
+    enorm_fsqmat_ptr f3;
+    f3->set_rv ( y );
 
-	f1->set_parameters ( "4 3", mat ( "0.4 0.3; 0.3 0.4" ) );
-	f1->validate();
-	f2->set_parameters ( "1 3", mat ( "0.3 -0.2; -0.2 0.3" ) );
-	f2->validate();
-	f3->set_parameters ( "2", mat ( "0.4" ) );
-	f3->validate();
-	
-	pdf_array A ( 3 );
-	A ( 0 ) = f1;
-	A ( 1 ) = f2;
-	A ( 2 ) = f3;
+    f1->set_parameters ( "4 3", mat ( "0.4 0.3; 0.3 0.4" ) );
+    f1->validate();
+    f2->set_parameters ( "1 3", mat ( "0.3 -0.2; -0.2 0.3" ) );
+    f2->validate();
+    f3->set_parameters ( "2", mat ( "0.4" ) );
+    f3->validate();
 
-	int Npoints = 100;
-	mat x_grid ( 1, Npoints );
-	x_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
-	mat y_grid ( 1, Npoints );
-	y_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
+    pdf_array A ( 3 );
+    A ( 0 ) = f1;
+    A ( 1 ) = f2;
+    A ( 2 ) = f3;
 
-	mat Grid ( 2, Npoints*Npoints );
-	Grid.set_submatrix ( 0, 0, kron ( x_grid, ones ( 1, Npoints ) ) );
-	Grid.set_submatrix ( 1, 0, kron ( ones ( 1, Npoints ), y_grid ) );
+    int Npoints = 100;
+    mat x_grid ( 1, Npoints );
+    x_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
+    mat y_grid ( 1, Npoints );
+    y_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
 
-	merger_mix M ( A );
-	enorm<fsqmat> g0;
-	g0.set_rv ( xy );
-	g0.set_parameters ( vec ( "4 4" ), mat ( "1 0; 0 1" ) );
-	g0.validate();
-	
-	M.set_parameters ( 5 );
-	M.set_method ( LOGNORMAL, 1.2 );
-	M.set_support ( g0, 400 );
-	M.validate();
-	M.merge();
-	
+    mat Grid ( 2, Npoints*Npoints );
+    Grid.set_submatrix ( 0, 0, kron ( x_grid, ones ( 1, Npoints ) ) );
+    Grid.set_submatrix ( 1, 0, kron ( ones ( 1, Npoints ), y_grid ) );
 
-	MixEF &MM = M._Mix();
-	epdf* MP = MM.epredictor();//xy
+    merger_mix M ( A );
+    enorm<fsqmat> g0;
+    g0.set_rv ( xy );
+    g0.set_parameters ( vec ( "4 4" ), mat ( "1 0; 0 1" ) );
+    g0.validate();
 
-	vec Res1 = M.evallog_mat ( Grid );
-	mat Res2 = ( ( emix* ) MP )->evallog_coms ( Grid );
+    M.set_parameters ( 5 );
+    M.set_method ( LOGNORMAL, 1.2 );
+    M.set_support ( g0, 400 );
+    M.validate();
+    M.merge();
 
-	it_file it ( "merger_iter_test.it" );
-	it << Name ( "Npoints" ) << Npoints;
-	it << Name ( "Grid" ) << Grid;
-	it << Name ( "Res1" ) << Res1;
-	it << Name ( "Res2" ) << Res2;
+
+    MixEF &MM = M._Mix();
+    epdf* MP = MM.epredictor();//xy
+
+    vec Res1 = M.evallog_mat ( Grid );
+    mat Res2 = ( ( emix* ) MP )->evallog_coms ( Grid );
+
+    it_file it ( "merger_iter_test.it" );
+    it << Name ( "Npoints" ) << Npoints;
+    it << Name ( "Grid" ) << Grid;
+    it << Name ( "Res1" ) << Res1;
+    it << Name ( "Res2" ) << Res2;
 }
Index: library/tests/stresssuite/kalman_QR_stress.cpp
===================================================================
--- library/tests/stresssuite/kalman_QR_stress.cpp (revision 722)
+++ library/tests/stresssuite/kalman_QR_stress.cpp (revision 1064)
@@ -11,80 +11,80 @@
 
 TEST ( kalman_QR_stress ) {
-	// Klaman filter
-	mat A, B, C, D, R, Q, P0;
-	vec mu0;
-	mat Mu0;// read from matlab
-	// input from Matlab
-	it_file fin ( "kalman_stress.it" );
+    // Klaman filter
+    mat A, B, C, D, R, Q, P0;
+    vec mu0;
+    mat Mu0;// read from matlab
+    // input from Matlab
+    it_file fin ( "kalman_stress.it" );
 
-	mat Dt, XQRt, eR, eQ;
-	int Ndat;
+    mat Dt, XQRt, eR, eQ;
+    int Ndat;
 
-	bool xxx = fin.seek ( "d" );
-	if ( !xxx ) {
-		bdm_error ( "kalman_stress.it not found" );
-	}
-	fin >> Dt;
-	fin.seek ( "A" );
-	fin >> A;
-	fin.seek ( "B" );
-	fin >> B;
-	fin.seek ( "C" );
-	fin >> C;
-	fin.seek ( "D" );
-	fin >> D;
-	fin.seek ( "R" );
-	fin >> R;
-	fin.seek ( "Q" );
-	fin >> Q;
-	fin.seek ( "P0" );
-	fin >> P0;
-	fin.seek ( "mu0" );
-	fin >> Mu0;
-	mu0 = Mu0.get_col ( 0 );
+    bool xxx = fin.seek ( "d" );
+    if ( !xxx ) {
+        bdm_error ( "kalman_stress.it not found" );
+    }
+    fin >> Dt;
+    fin.seek ( "A" );
+    fin >> A;
+    fin.seek ( "B" );
+    fin >> B;
+    fin.seek ( "C" );
+    fin >> C;
+    fin.seek ( "D" );
+    fin >> D;
+    fin.seek ( "R" );
+    fin >> R;
+    fin.seek ( "Q" );
+    fin >> Q;
+    fin.seek ( "P0" );
+    fin >> P0;
+    fin.seek ( "mu0" );
+    fin >> Mu0;
+    mu0 = Mu0.get_col ( 0 );
 
-	Ndat = Dt.cols();
-	XQRt = zeros ( 5, Ndat );
-	mat Xt = zeros ( 2, Ndat );
+    Ndat = Dt.cols();
+    XQRt = zeros ( 5, Ndat );
+    mat Xt = zeros ( 2, Ndat );
 
 //	cout << KF;
-	RV rx ( "{x }", "2" );
-	RV ru ( "{u }", "1" );
-	RV ry ( "{y }", "1" );
-	RV rQR ( "{Q,R }", "3" );
-	//
-	KFcondQR KF;
-	// KF with R unknown
-	KF.set_parameters ( A, B, C, D, ldmat ( R ), ldmat ( Q ) );
-	KF.set_est ( mu0, ldmat ( P0 ) );
-	//
-	Kalman<ldmat> KFtr;
-	// KF with R unknown
-	KFtr.set_parameters ( A, B, C, D, ldmat ( R ), ldmat ( Q ) );
-	KFtr.set_est ( mu0, ldmat ( P0 ) );
+    RV rx ( "{x }", "2" );
+    RV ru ( "{u }", "1" );
+    RV ry ( "{y }", "1" );
+    RV rQR ( "{Q,R }", "3" );
+    //
+    KFcondQR KF;
+    // KF with R unknown
+    KF.set_parameters ( A, B, C, D, ldmat ( R ), ldmat ( Q ) );
+    KF.set_est ( mu0, ldmat ( P0 ) );
+    //
+    Kalman<ldmat> KFtr;
+    // KF with R unknown
+    KFtr.set_parameters ( A, B, C, D, ldmat ( R ), ldmat ( Q ) );
+    KFtr.set_est ( mu0, ldmat ( P0 ) );
 
-	mgamma evolQR;
-	evolQR.set_parameters ( 10.0, "1 1 1" ); //sigma = 1/10 mu
+    mgamma evolQR;
+    evolQR.set_parameters ( 10.0, "1 1 1" ); //sigma = 1/10 mu
 
-	MPF<KFcondQR> KF_QR;
-	KF_QR.set_parameters ( &evolQR, &evolQR, 100 );
-	evolQR.condition ( "1 1 1" );
-	egamma kfinit = egamma ( "10 10 10", "1 1 1" );
-	KF_QR.set_statistics ( egamma ( "10 10 10", "1 1 1" ), &KF );
-	const epdf& mpost = KF_QR.posterior();
-	const epdf& mposttr = KFtr.posterior();
+    MPF<KFcondQR> KF_QR;
+    KF_QR.set_parameters ( &evolQR, &evolQR, 100 );
+    evolQR.condition ( "1 1 1" );
+    egamma kfinit = egamma ( "10 10 10", "1 1 1" );
+    KF_QR.set_statistics ( egamma ( "10 10 10", "1 1 1" ), &KF );
+    const epdf& mpost = KF_QR.posterior();
+    const epdf& mposttr = KFtr.posterior();
 
-	XQRt.set_col ( 0, mpost.mean() );
-	Xt.set_col ( 0, mposttr.mean() );
-	for ( int t = 1; t < Ndat; t++ ) {
-		KF_QR.bayes ( Dt.get_col ( t ) );
-		KFtr.bayes ( Dt.get_col ( t ) );
+    XQRt.set_col ( 0, mpost.mean() );
+    Xt.set_col ( 0, mposttr.mean() );
+    for ( int t = 1; t < Ndat; t++ ) {
+        KF_QR.bayes ( Dt.get_col ( t ) );
+        KFtr.bayes ( Dt.get_col ( t ) );
 
-		XQRt.set_col ( t, mpost.mean() );
-		Xt.set_col ( t, mposttr.mean() );
-	}
+        XQRt.set_col ( t, mpost.mean() );
+        Xt.set_col ( t, mposttr.mean() );
+    }
 
-	it_file fou ( "kalman_stress_QR_res.it" );
-	fou << Name ( "xqrth" ) << XQRt;
-	fou << Name ( "xth" ) << Xt;
+    it_file fou ( "kalman_stress_QR_res.it" );
+    fou << Name ( "xqrth" ) << XQRt;
+    fou << Name ( "xth" ) << Xt;
 }
Index: library/tests/stresssuite/merger_2d_stress.cpp
===================================================================
--- library/tests/stresssuite/merger_2d_stress.cpp (revision 886)
+++ library/tests/stresssuite/merger_2d_stress.cpp (revision 1064)
@@ -12,59 +12,59 @@
 TEST ( merger_2d_stress ) {
 
-	RNG_randomize();
+    RNG_randomize();
 
-	RV x ( "{x }", "1" );
-	RV y ( "{y }", "1" );
+    RV x ( "{x }", "1" );
+    RV y ( "{y }", "1" );
 
-	RV xy = x;
-	xy.add ( y );
+    RV xy = x;
+    xy.add ( y );
 
-	enorm_fsqmat_ptr f1;
-	f1->set_rv ( xy );
-	enorm_fsqmat_ptr f2;
-	f2->set_rv ( xy );
+    enorm_fsqmat_ptr f1;
+    f1->set_rv ( xy );
+    enorm_fsqmat_ptr f2;
+    f2->set_rv ( xy );
 
-	mat R1 ( "0.5 0.48; 0.48 0.5" );
-	mat R2 ( "0.5 0; 0 0.1" );
-	f1->set_parameters ( "1 1", R1 );
-	f2->set_parameters ( "1 1", mat ( "0.5 0; 0 0.1" ) );
+    mat R1 ( "0.5 0.48; 0.48 0.5" );
+    mat R2 ( "0.5 0; 0 0.1" );
+    f1->set_parameters ( "1 1", R1 );
+    f2->set_parameters ( "1 1", mat ( "0.5 0; 0 0.1" ) );
 
-	pdf_array A ( 2 );
-	A ( 0 ) = f1;
-	A ( 1 ) = f2;
+    pdf_array A ( 2 );
+    A ( 0 ) = f1;
+    A ( 1 ) = f2;
 
-	int Npoints = 100;
-	mat x_grid ( 1, Npoints );
-	x_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
-	mat y_grid ( 1, Npoints );
-	y_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
+    int Npoints = 100;
+    mat x_grid ( 1, Npoints );
+    x_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
+    mat y_grid ( 1, Npoints );
+    y_grid.set_row ( 0, linspace ( -2.0, 4.0, Npoints ) );
 
-	mat Grid ( 2, Npoints*Npoints );
-	Grid.set_submatrix ( 0, 0, kron ( x_grid, ones ( 1, Npoints ) ) );
-	Grid.set_submatrix ( 1, 0, kron ( ones ( 1, Npoints ), y_grid ) );
+    mat Grid ( 2, Npoints*Npoints );
+    Grid.set_submatrix ( 0, 0, kron ( x_grid, ones ( 1, Npoints ) ) );
+    Grid.set_submatrix ( 1, 0, kron ( ones ( 1, Npoints ), y_grid ) );
 
-	merger_mix M ( A );
-	enorm<fsqmat> g0;
-	g0.set_rv ( xy );
-	g0.set_parameters ( vec ( "1 1" ), mat ( "10 0; 0 10" ) );
+    merger_mix M ( A );
+    enorm<fsqmat> g0;
+    g0.set_rv ( xy );
+    g0.set_parameters ( vec ( "1 1" ), mat ( "10 0; 0 10" ) );
 
-	M.set_parameters ( 1 );
-	M.set_method ( LOGNORMAL, 1e8 );
-	M.set_support ( g0, 400 );
-	M.merge();
+    M.set_parameters ( 1 );
+    M.set_method ( LOGNORMAL, 1e8 );
+    M.set_support ( g0, 400 );
+    M.merge();
 
-	MixEF &MM = M._Mix();
-	emix* MP = MM.epredictor(); //xy
+    MixEF &MM = M._Mix();
+    emix* MP = MM.epredictor(); //xy
 
-	vec Res1 = M.evallog_mat ( Grid );
-	mat Res2 = ( MP )->evallog_coms ( Grid );
+    vec Res1 = M.evallog_mat ( Grid );
+    mat Res2 = ( MP )->evallog_coms ( Grid );
 
-	it_file it ( "merger_2d_test.it" );
-	it << Name ( "Npoints" ) << Npoints;
-	it << Name ( "Grid" ) << Grid;
-	it << Name ( "Res1" ) << Res1;
-	it << Name ( "Res2" ) << Res2;
-	it << Name ( "S1" ) << f1->evallog_mat ( Grid );
-	it << Name ( "S2" ) << f2->evallog_mat ( Grid );
+    it_file it ( "merger_2d_test.it" );
+    it << Name ( "Npoints" ) << Npoints;
+    it << Name ( "Grid" ) << Grid;
+    it << Name ( "Res1" ) << Res1;
+    it << Name ( "Res2" ) << Res2;
+    it << Name ( "S1" ) << f1->evallog_mat ( Grid );
+    it << Name ( "S2" ) << f2->evallog_mat ( Grid );
 //	cout << ( ( enorm<ldmat>* ) ( MP->_Coms ( 0 ).get() ) )->_R().to_mat() << endl;
 }
Index: library/tests/stresssuite/resample_stress.cpp
===================================================================
--- library/tests/stresssuite/resample_stress.cpp (revision 887)
+++ library/tests/stresssuite/resample_stress.cpp (revision 1064)
@@ -12,32 +12,32 @@
 TEST ( resample_stress ) {
 
-	RV x ( "1" );
-	RV xm = x;
-	xm.t_plus ( -1 );
-	const
-	RV y ( "2" );
+    RV x ( "1" );
+    RV xm = x;
+    xm.t_plus ( -1 );
+    const
+    RV y ( "2" );
 
-	mat A = "1";
-	vec vR = "1";
-	ldmat R ( vR );
+    mat A = "1";
+    vec vR = "1";
+    ldmat R ( vR );
 
-	eEmp emp;
-	euni eun;
-	eun.set_parameters ( "0", "1" );
-	emp.set_statistics ( ones ( 10 ), eun );
-	vec &v = emp._w();
-	Array<vec> &S = emp._samples();
+    eEmp emp;
+    euni eun;
+    eun.set_parameters ( "0", "1" );
+    emp.set_statistics ( ones ( 10 ), eun );
+    vec &v = emp._w();
+    Array<vec> &S = emp._samples();
 
-	for ( int i = 0; i < 10; i++ ) {
-		v ( i ) = exp ( -0.5 * sum ( pow ( S ( i ) - 1, 2.0 ) ) * 10 );
-	}
-	v /= sum ( v );
+    for ( int i = 0; i < 10; i++ ) {
+        v ( i ) = exp ( -0.5 * sum ( pow ( S ( i ) - 1, 2.0 ) ) * 10 );
+    }
+    v /= sum ( v );
 
-	cout << "p:" << S << endl;
-	cout << "w:" << v << endl;
+    cout << "p:" << S << endl;
+    cout << "w:" << v << endl;
 
-	ivec ind;
-	resample ( v,ind );
+    ivec ind;
+    resample ( v,ind );
 
-	cout << ind << endl;
+    cout << ind << endl;
 }
Index: library/tests/stresssuite/kalman_QRexh_stress.cpp
===================================================================
--- library/tests/stresssuite/kalman_QRexh_stress.cpp (revision 721)
+++ library/tests/stresssuite/kalman_QRexh_stress.cpp (revision 1064)
@@ -11,75 +11,75 @@
 
 TEST ( kalman_QRexh_stress ) {
-	// Klaman filter
-	mat A, B, C, D, R, Q, P0;
-	vec mu0;
-	mat Mu0;// read from matlab
-	// input from Matlab
-	it_file fin ( "kalman_stress.it" );
+    // Klaman filter
+    mat A, B, C, D, R, Q, P0;
+    vec mu0;
+    mat Mu0;// read from matlab
+    // input from Matlab
+    it_file fin ( "kalman_stress.it" );
 
-	mat Dt, XQRt, eR, eQ;
-	int Ndat;
+    mat Dt, XQRt, eR, eQ;
+    int Ndat;
 
-	bool xxx = fin.seek ( "d" );
+    bool xxx = fin.seek ( "d" );
 
-	if ( !xxx ) {
-		bdm_error ( "kalman_stress.it not found" );
-	}
+    if ( !xxx ) {
+        bdm_error ( "kalman_stress.it not found" );
+    }
 
-	fin >> Dt;
+    fin >> Dt;
 
-	fin.seek ( "A" );
-	fin >> A;
-	fin.seek ( "B" );
-	fin >> B;
-	fin.seek ( "C" );
-	fin >> C;
-	fin.seek ( "D" );
-	fin >> D;
-	fin.seek ( "R" );
-	fin >> R;
-	fin.seek ( "Q" );
-	fin >> Q;
-	fin.seek ( "P0" );
-	fin >> P0;
-	fin.seek ( "mu0" );
-	fin >> Mu0;
-	mu0 = Mu0.get_col ( 0 );
+    fin.seek ( "A" );
+    fin >> A;
+    fin.seek ( "B" );
+    fin >> B;
+    fin.seek ( "C" );
+    fin >> C;
+    fin.seek ( "D" );
+    fin >> D;
+    fin.seek ( "R" );
+    fin >> R;
+    fin.seek ( "Q" );
+    fin >> Q;
+    fin.seek ( "P0" );
+    fin >> P0;
+    fin.seek ( "mu0" );
+    fin >> Mu0;
+    mu0 = Mu0.get_col ( 0 );
 
-	vec vQ1 = "0.01:0.04:1";
-	vec vQ2 = "0.01:0.04:1";
+    vec vQ1 = "0.01:0.04:1";
+    vec vQ2 = "0.01:0.04:1";
 
-	mat LL = zeros ( vQ1.length(),  vQ2.length() );
+    mat LL = zeros ( vQ1.length(),  vQ2.length() );
 
-	Ndat = Dt.cols();
+    Ndat = Dt.cols();
 
-	RV rx ( "{x}", "2" );
-	RV ru ( "{u}", "1" );
-	RV ry ( "{y}", "2" );
-	//
-	//
-	Kalman<ldmat> KFtr;
+    RV rx ( "{x}", "2" );
+    RV ru ( "{u}", "1" );
+    RV ry ( "{y}", "2" );
+    //
+    //
+    Kalman<ldmat> KFtr;
 
-	for ( int i = 0; i < vQ1.length(); i++ ) {
+    for ( int i = 0; i < vQ1.length(); i++ ) {
 
-		for ( int j = 0; j < vQ2.length(); j++ ) {
-			// KF with R unknown
-			mat Qj = Q;
-			Qj ( 0, 0 ) = vQ1 ( i );
-			Qj ( 1, 1 ) = vQ2 ( j );
-			KFtr.set_parameters ( A, B, C, D, ldmat ( R ), ldmat ( Qj ) );
-			KFtr.set_est ( mu0, ldmat ( P0 ) );
+        for ( int j = 0; j < vQ2.length(); j++ ) {
+            // KF with R unknown
+            mat Qj = Q;
+            Qj ( 0, 0 ) = vQ1 ( i );
+            Qj ( 1, 1 ) = vQ2 ( j );
+            KFtr.set_parameters ( A, B, C, D, ldmat ( R ), ldmat ( Qj ) );
+            KFtr.set_est ( mu0, ldmat ( P0 ) );
 
-			for ( int t = 1; t < Ndat; t++ ) {
-				KFtr.bayes ( Dt.get_col ( t ) );
-				LL ( i, j ) += KFtr._ll();
-			}
-		}
-	}
+            for ( int t = 1; t < Ndat; t++ ) {
+                KFtr.bayes ( Dt.get_col ( t ) );
+                LL ( i, j ) += KFtr._ll();
+            }
+        }
+    }
 
-	it_file fou ( "kalman_stress_QR_exh.it" );
+    it_file fou ( "kalman_stress_QR_exh.it" );
 
-	fou << Name ( "LL" ) << LL;
-	fou << Name ( "Q1" ) << vQ1;
-	fou << Name ( "Q2" ) << vQ2;
+    fou << Name ( "LL" ) << LL;
+    fou << Name ( "Q1" ) << vQ1;
+    fou << Name ( "Q2" ) << vQ2;
 }
Index: library/tests/stresssuite/size_generator.cpp
===================================================================
--- library/tests/stresssuite/size_generator.cpp (revision 722)
+++ library/tests/stresssuite/size_generator.cpp (revision 1064)
@@ -6,12 +6,12 @@
 
 void size_generator::from_setting ( const Setting &set ) {
-	UI::get ( sz, set, "size", UI::optional );
-	UI::get ( step, set, "step", UI::optional );
+    UI::get ( sz, set, "size", UI::optional );
+    UI::get ( step, set, "step", UI::optional );
 }
 
 mat size_generator::next() {
-	mat A0 = randu ( sz, sz );
-	mat A = A0 * A0.T();
-	sz *= step;
-	return A;
+    mat A0 = randu ( sz, sz );
+    mat A = A0 * A0.T();
+    sz *= step;
+    return A;
 }
Index: library/tests/stresssuite/mixtures_stress.cpp
===================================================================
--- library/tests/stresssuite/mixtures_stress.cpp (revision 1009)
+++ library/tests/stresssuite/mixtures_stress.cpp (revision 1064)
@@ -11,129 +11,129 @@
 
 void disp_mix2D ( const MixEF &Mi ) {
-	const eprod &ep = ( ( const eprod& ) ( Mi.posterior() ) );
-	int i;
-	mat Var ( 2, 2 ), M ( 1, 2 );
-	for ( i = 0; i < ep._rv().length() - 1; i++ ) { // -1 => last one is the weight
-		( ( egiw* ) ep.factor ( i ) )->mean_mat ( M, Var );
-		cout << "Mean: " << M << endl << "Variance: " << endl << Var << endl;
-	}
-	cout << "Weights: " << ep.factor ( i )->mean() << endl;
+    const eprod &ep = ( ( const eprod& ) ( Mi.posterior() ) );
+    int i;
+    mat Var ( 2, 2 ), M ( 1, 2 );
+    for ( i = 0; i < ep._rv().length() - 1; i++ ) { // -1 => last one is the weight
+        ( ( egiw* ) ep.factor ( i ) )->mean_mat ( M, Var );
+        cout << "Mean: " << M << endl << "Variance: " << endl << Var << endl;
+    }
+    cout << "Weights: " << ep.factor ( i )->mean() << endl;
 }
 
 mat grid2D ( const MixEF &M, const vec &xb, const vec &yb, int Ngr = 100 ) {
-	mat PPdf ( Ngr + 1, Ngr + 1 );
-	vec rgr ( 3 );
+    mat PPdf ( Ngr + 1, Ngr + 1 );
+    vec rgr ( 3 );
 
-	rgr ( 2 ) = 1;
-	int i = 0, j = 0;
-	double xstep = ( xb ( 1 ) - xb ( 0 ) ) / Ngr;
-	double ystep = ( yb ( 1 ) - yb ( 0 ) ) / Ngr;
+    rgr ( 2 ) = 1;
+    int i = 0, j = 0;
+    double xstep = ( xb ( 1 ) - xb ( 0 ) ) / Ngr;
+    double ystep = ( yb ( 1 ) - yb ( 0 ) ) / Ngr;
 
-	for ( double x = xb ( 0 ); x <= xb ( 1 ); x += xstep, i++ ) {
-		rgr ( 0 ) = x;
-		j = 0;
-		for ( double y = yb ( 0 ); y <= yb ( 1 ); y += ystep, j++ ) {
-			rgr ( 1 ) = y;
-			PPdf ( i, j ) = exp ( M.logpred ( rgr, empty_vec ) );
-		}
-	}
-	return PPdf;
+    for ( double x = xb ( 0 ); x <= xb ( 1 ); x += xstep, i++ ) {
+        rgr ( 0 ) = x;
+        j = 0;
+        for ( double y = yb ( 0 ); y <= yb ( 1 ); y += ystep, j++ ) {
+            rgr ( 1 ) = y;
+            PPdf ( i, j ) = exp ( M.logpred ( rgr, empty_vec ) );
+        }
+    }
+    return PPdf;
 }
 
 TEST ( mixtures_stress ) {
-	RV x ( "{x }", "2" );
+    RV x ( "{x }", "2" );
 
 
-	cout << "Test for estimation of a 2D Gaussian mixture" << endl;
-	///////////////////////////////////
-	// Setup model
+    cout << "Test for estimation of a 2D Gaussian mixture" << endl;
+    ///////////////////////////////////
+    // Setup model
 
-	vec m1 ( "-2 -2" );
-	vec m2 ( "2 2" );
+    vec m1 ( "-2 -2" );
+    vec m2 ( "2 2" );
 
-	fsqmat V1 ( mat ( "1 0.5; 0.5 1" ) );
-	fsqmat V2 ( mat ( "2 -0.1; -0.1 2" ) );
+    fsqmat V1 ( mat ( "1 0.5; 0.5 1" ) );
+    fsqmat V2 ( mat ( "2 -0.1; -0.1 2" ) );
 
-	enorm_fsqmat_ptr C1;
-	C1->set_rv ( x );
-	C1->set_parameters ( m1, V1 );
-	enorm_fsqmat_ptr C2;
-	C2->set_rv ( x );
-	C2->set_parameters ( m2, V2 );
+    enorm_fsqmat_ptr C1;
+    C1->set_rv ( x );
+    C1->set_parameters ( m1, V1 );
+    enorm_fsqmat_ptr C2;
+    C2->set_rv ( x );
+    C2->set_parameters ( m2, V2 );
 
-	epdf_array Sim ( 2 );
-	Sim ( 0 ) = C1;
-	Sim ( 1 ) = C2;
-	emix Simul;
-	Simul.set_rv ( x );
-	Simul._w() = "0.5 0.6";
-	Simul._Coms() = Sim;
-	Simul.validate();
+    epdf_array Sim ( 2 );
+    Sim ( 0 ) = C1;
+    Sim ( 1 ) = C2;
+    emix Simul;
+    Simul.set_rv ( x );
+    Simul._w() = "0.5 0.6";
+    Simul._Coms() = Sim;
+    Simul.validate();
 
-	// Sample parameters
-	int ndat = 100;
-	mat Smp = Simul.sample_mat ( ndat );
+    // Sample parameters
+    int ndat = 100;
+    mat Smp = Simul.sample_mat ( ndat );
 
-	cout << "Simulated means: " << m1 << " and " << m2 << endl;
-	cout << "Simulated covariances: " << endl << V1 << " and " << endl << V2 << endl;
+    cout << "Simulated means: " << m1 << " and " << m2 << endl;
+    cout << "Simulated covariances: " << endl << V1 << " and " << endl << V2 << endl;
 
-	//////////////////////////////
-	// Prepare estimator manually
+    //////////////////////////////
+    // Prepare estimator manually
 
-	// Initial values of components
-	mat V0 = 1e-4 * eye ( 3 );
-	V0 ( 0, 0 ) *= 100;
-	V0 ( 1, 1 ) *= 100;
-	mat Vp = "0 0 1; 0 0 1; 1 1 0";
-	Vp *= 5 * 1e-5;
+    // Initial values of components
+    mat V0 = 1e-4 * eye ( 3 );
+    V0 ( 0, 0 ) *= 100;
+    V0 ( 1, 1 ) *= 100;
+    mat Vp = "0 0 1; 0 0 1; 1 1 0";
+    Vp *= 5 * 1e-5;
 
-	ARX M1;
-	M1.set_statistics ( 2, V0 - Vp, 8 );
-	M1.validate();
-	ARX M2;
-	M2.set_statistics ( 2, V0 + Vp, 8 );
-	M2.validate();
+    ARX M1;
+    M1.set_statistics ( 2, V0 - Vp, 8 );
+    M1.validate();
+    ARX M2;
+    M2.set_statistics ( 2, V0 + Vp, 8 );
+    M2.validate();
 
-	// Build mixture model
-	Array<BMEF*> A ( 2 );
-	A ( 0 ) = &M1;
-	A ( 1 ) = &M2;
-	MixEF Post ( A, "0.5 0.5" );
-	cout << "Initial mixture:" << endl;
-	disp_mix2D ( Post );
+    // Build mixture model
+    Array<BMEF*> A ( 2 );
+    A ( 0 ) = &M1;
+    A ( 1 ) = &M2;
+    MixEF Post ( A, "0.5 0.5" );
+    cout << "Initial mixture:" << endl;
+    disp_mix2D ( Post );
 
-	// Add ones for constant coefficients
-	mat Data = concat_vertical ( Smp, ones ( 1, Smp.cols() ) );
-	Post.bayes ( Data , empty_vec );
+    // Add ones for constant coefficients
+    mat Data = concat_vertical ( Smp, ones ( 1, Smp.cols() ) );
+    Post.bayes ( Data , empty_vec );
 
-	cout << "Posterior mixture:" << endl;
-	disp_mix2D ( Post );
+    cout << "Posterior mixture:" << endl;
+    disp_mix2D ( Post );
 
-	//TEST random initialization
-	RNG_randomize();
-	ARX Aflat;
-	Aflat.set_statistics ( 2, V0, 7 );
-	Aflat.validate();
-	MixEF RND;
-	RND.init ( &Aflat, Data, 10 ); // already initialized!
-	cout << endl << "== Randomly initialized mixture ==" << endl;
-	cout << endl << "== INIT ==" << endl;
-	disp_mix2D ( RND );
-	mat PPdf_I = grid2D ( RND, vec_2 ( -5.0, 5.0 ), vec_2 ( -5.0, 5.0 ) );;
+    //TEST random initialization
+    RNG_randomize();
+    ARX Aflat;
+    Aflat.set_statistics ( 2, V0, 7 );
+    Aflat.validate();
+    MixEF RND;
+    RND.init ( &Aflat, Data, 10 ); // already initialized!
+    cout << endl << "== Randomly initialized mixture ==" << endl;
+    cout << endl << "== INIT ==" << endl;
+    disp_mix2D ( RND );
+    mat PPdf_I = grid2D ( RND, vec_2 ( -5.0, 5.0 ), vec_2 ( -5.0, 5.0 ) );;
 
-	RND.bayes ( Data, empty_vec );
-	cout << endl << "== BAYES ==" << endl;
-	disp_mix2D ( RND );
+    RND.bayes ( Data, empty_vec );
+    cout << endl << "== BAYES ==" << endl;
+    disp_mix2D ( RND );
 
 
-	it_file of ( "mixef_test.it", true );
-	of << Name ( "Smp" ) << Smp;
-	of << Name ( "PPdf" ) << grid2D ( Post, vec_2 ( -5.0, 5.0 ), vec_2 ( -5.0, 5.0 ) );
-	of << Name ( "PPdf_I" ) << PPdf_I;
-	of << Name ( "PPdf_RND" ) << grid2D ( RND, vec_2 ( -5.0, 5.0 ), vec_2 ( -5.0, 5.0 ) );
+    it_file of ( "mixef_test.it", true );
+    of << Name ( "Smp" ) << Smp;
+    of << Name ( "PPdf" ) << grid2D ( Post, vec_2 ( -5.0, 5.0 ), vec_2 ( -5.0, 5.0 ) );
+    of << Name ( "PPdf_I" ) << PPdf_I;
+    of << Name ( "PPdf_RND" ) << grid2D ( RND, vec_2 ( -5.0, 5.0 ), vec_2 ( -5.0, 5.0 ) );
 
-	cout << endl << "Variables written to file mixef_test.it:" << endl;
-	cout << "Smp  : data sampled from the simulator " << endl;
-	cout << "PPdf : posterior density on a grid <-5,5><-5,5>" << endl;
-	cout << "PPdf_RND : posterior density of randomly initilaized mixture on a grid <-5,5><-5,5>" << endl;
+    cout << endl << "Variables written to file mixef_test.it:" << endl;
+    cout << "Smp  : data sampled from the simulator " << endl;
+    cout << "PPdf : posterior density on a grid <-5,5><-5,5>" << endl;
+    cout << "PPdf_RND : posterior density of randomly initilaized mixture on a grid <-5,5><-5,5>" << endl;
 }
Index: library/tests/stresssuite/blas_stress.cpp
===================================================================
--- library/tests/stresssuite/blas_stress.cpp (revision 870)
+++ library/tests/stresssuite/blas_stress.cpp (revision 1064)
@@ -10,80 +10,80 @@
 
 mat matmul ( mat &A, mat &B ) {
-	mat C ( A.rows(), B.cols() );
-	int i, j, k;
-	double sum;
+    mat C ( A.rows(), B.cols() );
+    int i, j, k;
+    double sum;
 
-	for ( i = 0; i < A.rows(); i++ ) {
-		for ( j = 0; j < A.cols(); j++ ) {
-			sum = 0.0;
-			for ( k = 0; k < A.cols(); k++ ) {
-				sum += A._elem ( i, k ) * B._elem ( k, j );
-			}
-			C ( i, j ) = sum;
-		}
-	}
-	return C;
+    for ( i = 0; i < A.rows(); i++ ) {
+        for ( j = 0; j < A.cols(); j++ ) {
+            sum = 0.0;
+            for ( k = 0; k < A.cols(); k++ ) {
+                sum += A._elem ( i, k ) * B._elem ( k, j );
+            }
+            C ( i, j ) = sum;
+        }
+    }
+    return C;
 }
 
 void matmul2 ( int n,  double *A, double *B, double *C ) {
-	int i, j, k;
-	double sum;
+    int i, j, k;
+    double sum;
 
-	for ( i = 0; i < n; i++ ) {
-		for ( j = 0; j < n; j++ ) {
-			sum = 0.0;
-			for ( k = 0; k < n; k++ ) {
-				sum += A [ i*n+k ] * B [ k*n+j ];
-			}
-			C[ i*n+j] = sum;
-		}
-	}
+    for ( i = 0; i < n; i++ ) {
+        for ( j = 0; j < n; j++ ) {
+            sum = 0.0;
+            for ( k = 0; k < n; k++ ) {
+                sum += A [ i*n+k ] * B [ k*n+j ];
+            }
+            C[ i*n+j] = sum;
+        }
+    }
 //	return C;
 }
 
 TEST ( blas_stress ) {
-	Real_Timer tt;
-	vec exec_times ( 4 );
-	vec exec_times_b ( 4 );
-	vec exec_times_c ( 4 );
+    Real_Timer tt;
+    vec exec_times ( 4 );
+    vec exec_times_b ( 4 );
+    vec exec_times_c ( 4 );
 
-	mat A;
-	mat B;
-	mat C;
+    mat A;
+    mat B;
+    mat C;
 
-	vec vn = "5 50 200 500";
-	int n;
+    vec vn = "5 50 200 500";
+    int n;
 
-	for ( int i = 0; i < vn.length(); i++ ) {
-		n = (int) vn ( i );
-		A = randu ( n, n );
-		B = randu ( n, n );
+    for ( int i = 0; i < vn.length(); i++ ) {
+        n = (int) vn ( i );
+        A = randu ( n, n );
+        B = randu ( n, n );
 
-		tt.tic();
-		for ( int ii = 0; ii < 10; ii++ ) {
-			C = matmul ( A, B );
-		}
-		exec_times ( i ) = tt.toc();
+        tt.tic();
+        for ( int ii = 0; ii < 10; ii++ ) {
+            C = matmul ( A, B );
+        }
+        exec_times ( i ) = tt.toc();
 
-		tt.tic();
-		for ( int ii = 0; ii < 10; ii++ ) {
-			C = A * B;
-		}
-		exec_times_b ( i ) = tt.toc();
+        tt.tic();
+        for ( int ii = 0; ii < 10; ii++ ) {
+            C = A * B;
+        }
+        exec_times_b ( i ) = tt.toc();
 
-		C = zeros ( n, n );
-		tt.tic();
-		for ( int ii = 0; ii < 10; ii++ ) {
-			matmul2 ( n, A._data(), B._data(), C._data() );
-		}
-		exec_times_c ( i ) = tt.toc();
-	}
-	cout << exec_times << endl;
-	cout << exec_times_b << endl;
-	cout << exec_times_c << endl;
+        C = zeros ( n, n );
+        tt.tic();
+        for ( int ii = 0; ii < 10; ii++ ) {
+            matmul2 ( n, A._data(), B._data(), C._data() );
+        }
+        exec_times_c ( i ) = tt.toc();
+    }
+    cout << exec_times << endl;
+    cout << exec_times_b << endl;
+    cout << exec_times_c << endl;
 
-	it_file itf ( "blas_test.it" );
-	itf << Name ( "exec_times" ) << exec_times;
-	itf << Name ( "exec_times_b" ) << exec_times_b;
-	itf << Name ( "exec_times_c" ) << exec_times_c;
+    it_file itf ( "blas_test.it" );
+    itf << Name ( "exec_times" ) << exec_times;
+    itf << Name ( "exec_times_b" ) << exec_times_b;
+    itf << Name ( "exec_times_c" ) << exec_times_c;
 }
Index: library/tests/stresssuite/size_generator.h
===================================================================
--- library/tests/stresssuite/size_generator.h (revision 717)
+++ library/tests/stresssuite/size_generator.h (revision 1064)
@@ -21,20 +21,20 @@
 class size_generator : public generator {
 private:
-	int step;
-	int sz;
+    int step;
+    int sz;
 
 public:
-	size_generator() : step ( 7 ), sz ( step ) { }
+    size_generator() : step ( 7 ), sz ( step ) { }
 
-	itpp::mat next();
+    itpp::mat next();
 
-	//! Load from structure with elements:
-	//!  \code
-	//! { size = 7; // size (rows == cols) of the first generated matrix
-	//!   step = 7; // how many times to increase the generated matrix in every iteration
-	//! }
-	//! \endcode
-	//! Both elements are optional, with defaults as shown.
-	void from_setting ( const Setting &set );
+    //! Load from structure with elements:
+    //!  \code
+    //! { size = 7; // size (rows == cols) of the first generated matrix
+    //!   step = 7; // how many times to increase the generated matrix in every iteration
+    //! }
+    //! \endcode
+    //! Both elements are optional, with defaults as shown.
+    void from_setting ( const Setting &set );
 };
 
Index: library/tests/stresssuite/square_mat_prep.cpp
===================================================================
--- library/tests/stresssuite/square_mat_prep.cpp (revision 717)
+++ library/tests/stresssuite/square_mat_prep.cpp (revision 1064)
@@ -22,57 +22,57 @@
 
 int main ( int argc, char const *argv[] ) {
-	RNG_randomize();
+    RNG_randomize();
 
-	bool unknown = false;
-	int update_next = 0; // 1 generator file, 2 agenda file, 3 agenda length
-	const char **param = argv + 1;
-	while ( *param && !unknown ) {
-		if ( update_next ) {
-			if ( update_next == 1 ) {
-				generator_file_name = *param;
-			} else if ( update_next == 2 ) {
-				agenda_file_name = *param;
-			} else {
-				int length = atoi ( *param );
-				if ( length > 0 ) {
-					agenda_length = length;
-				} else {
-					cerr << "invalid agenda length value ignored" << endl;
-				}
-			}
+    bool unknown = false;
+    int update_next = 0; // 1 generator file, 2 agenda file, 3 agenda length
+    const char **param = argv + 1;
+    while ( *param && !unknown ) {
+        if ( update_next ) {
+            if ( update_next == 1 ) {
+                generator_file_name = *param;
+            } else if ( update_next == 2 ) {
+                agenda_file_name = *param;
+            } else {
+                int length = atoi ( *param );
+                if ( length > 0 ) {
+                    agenda_length = length;
+                } else {
+                    cerr << "invalid agenda length value ignored" << endl;
+                }
+            }
 
-			update_next = 0;
-		} else {
-			if ( !strcmp ( *param, "-a" ) ) {
-				update_next = 2;
-			} else if ( !strcmp ( *param, "-g" ) ) {
-				update_next = 1;
-			} else if ( !strcmp ( *param, "-l" ) ) {
-				update_next = 3;
-			} else {
-				unknown = true;
-			}
-		}
+            update_next = 0;
+        } else {
+            if ( !strcmp ( *param, "-a" ) ) {
+                update_next = 2;
+            } else if ( !strcmp ( *param, "-g" ) ) {
+                update_next = 1;
+            } else if ( !strcmp ( *param, "-l" ) ) {
+                update_next = 3;
+            } else {
+                unknown = true;
+            }
+        }
 
-		++param;
-	}
+        ++param;
+    }
 
-	if ( unknown || update_next ) {
-		cerr << "usage: " << argv[0] << " [ -g generator.cfg ] [ -a agenda_output.cfg ] [ -l agenda_length ]" << endl;
-	} else {
-		Array<shared_ptr<square_mat_point> > mag ( agenda_length );
+    if ( unknown || update_next ) {
+        cerr << "usage: " << argv[0] << " [ -g generator.cfg ] [ -a agenda_output.cfg ] [ -l agenda_length ]" << endl;
+    } else {
+        Array<shared_ptr<square_mat_point> > mag ( agenda_length );
 
-		UIFile gspec ( generator_file_name );
-		shared_ptr<generator> gen ( UI::build<generator> ( gspec, "generator", UI::compulsory ) );
-		for ( int i = 0; i < agenda_length; ++i ) {
-			mat m = gen->next();
-			square_mat_point *p = new square_mat_point();
-			p->set_parameters ( m, randu ( m.rows() ), randu() );
-			mag ( i ) = p;
-		}
+        UIFile gspec ( generator_file_name );
+        shared_ptr<generator> gen ( UI::build<generator> ( gspec, "generator", UI::compulsory ) );
+        for ( int i = 0; i < agenda_length; ++i ) {
+            mat m = gen->next();
+            square_mat_point *p = new square_mat_point();
+            p->set_parameters ( m, randu ( m.rows() ), randu() );
+            mag ( i ) = p;
+        }
 
-		UIFile fag;
-		UI::save ( mag, fag, "agenda" );
-		fag.save ( agenda_file_name );
-	}
+        UIFile fag;
+        UI::save ( mag, fag, "agenda" );
+        fag.save ( agenda_file_name );
+    }
 }
Index: library/tests/stresssuite/generator.h
===================================================================
--- library/tests/stresssuite/generator.h (revision 717)
+++ library/tests/stresssuite/generator.h (revision 1064)
@@ -21,9 +21,9 @@
 class generator : public bdm::root {
 public:
-	generator();
+    generator();
 
-	//! Generates a matrix. Returned matrices should become
-	//! progressively more complicated.
-	virtual itpp::mat next() = 0;
+    //! Generates a matrix. Returned matrices should become
+    //! progressively more complicated.
+    virtual itpp::mat next() = 0;
 };
 
Index: library/tests/stresssuite/arx_stress.cpp
===================================================================
--- library/tests/stresssuite/arx_stress.cpp (revision 766)
+++ library/tests/stresssuite/arx_stress.cpp (revision 1064)
@@ -17,55 +17,55 @@
 
 TEST ( arx_stress ) {
-	// Setup model
-	vec th ( "0.8 -0.3 0.4 0.01" );
-	int ord = th.length(); //auxiliary variable
-	double sqr = 0.1;
+    // Setup model
+    vec th ( "0.8 -0.3 0.4 0.01" );
+    int ord = th.length(); //auxiliary variable
+    double sqr = 0.1;
 
-	//Test constructor
-	mat V0 = 0.00001 * eye ( ord + 1 );
-	V0 ( 0 ) = 1; //
-	double nu0 = ord + 5.0;
+    //Test constructor
+    mat V0 = 0.00001 * eye ( ord + 1 );
+    V0 ( 0 ) = 1; //
+    double nu0 = ord + 5.0;
 
-	ARX Ar;
-	Ar.set_statistics ( 1, V0, nu0 );               // Estimator
-	Ar.set_constant ( false );
-	Ar.validate();
-	const epdf& f_thr = Ar.posterior();          // refrence to posterior of the estimator
+    ARX Ar;
+    Ar.set_statistics ( 1, V0, nu0 );               // Estimator
+    Ar.set_constant ( false );
+    Ar.validate();
+    const epdf& f_thr = Ar.posterior();          // refrence to posterior of the estimator
 
-	//Test estimation
-	int ndat = 100;                 // number of data records
-	vec Yt ( ndat );                // Store generated data
-	Yt.set_subvector ( 0, randn ( ord ) ); //initial values
-	vec rgr ( ord );                // regressor
+    //Test estimation
+    int ndat = 100;                 // number of data records
+    vec Yt ( ndat );                // Store generated data
+    Yt.set_subvector ( 0, randn ( ord ) ); //initial values
+    vec rgr ( ord );                // regressor
 
-	//print moments of the prior distribution
-	cout << "prior mean: " << f_thr.mean() << endl;
-	cout << "prior variance: " << f_thr.variance() << endl;
+    //print moments of the prior distribution
+    cout << "prior mean: " << f_thr.mean() << endl;
+    cout << "prior variance: " << f_thr.variance() << endl;
 
-	// cycle over time:
-	for ( int t = ord; t < ndat; t++ ) {
-		//Generate regressor
-		for ( int j = 0; j < ( ord ); j++ ) {
-			rgr ( j ) = Yt ( t - j - 1 );
-		}
-		//model
-		Yt ( t ) = th * rgr + sqr * NorRNG();
+    // cycle over time:
+    for ( int t = ord; t < ndat; t++ ) {
+        //Generate regressor
+        for ( int j = 0; j < ( ord ); j++ ) {
+            rgr ( j ) = Yt ( t - j - 1 );
+        }
+        //model
+        Yt ( t ) = th * rgr + sqr * NorRNG();
 
-		Ar.bayes ( vec_1 ( Yt ( t ) ), rgr );       // Bayes rule
+        Ar.bayes ( vec_1 ( Yt ( t ) ), rgr );       // Bayes rule
 
-		// Build predictor
-		mlstudent* 	Pr = Ar.predictor_student ( );
-		// Test similarity of likelihoods from the Bayes rule and the predictor
-		cout << "BR log-lik: " << Ar._ll();
-		cout << " , predictor ll: " <<  Pr->evallogcond ( vec_1 ( Yt ( t ) ), rgr )  << endl;
-		delete Pr;
-	}
-	//print posterior moments
-	cout << "posterior mean: " << f_thr.mean() << endl;
-	cout << "posterior variance: " << f_thr.variance() << endl;
+        // Build predictor
+        mlstudent* 	Pr = Ar.predictor_student ( );
+        // Test similarity of likelihoods from the Bayes rule and the predictor
+        cout << "BR log-lik: " << Ar._ll();
+        cout << " , predictor ll: " <<  Pr->evallogcond ( vec_1 ( Yt ( t ) ), rgr )  << endl;
+        delete Pr;
+    }
+    //print posterior moments
+    cout << "posterior mean: " << f_thr.mean() << endl;
+    cout << "posterior variance: " << f_thr.variance() << endl;
 
-	// Test brute-froce structure estimation
+    // Test brute-froce structure estimation
 
-	cout << "Structure estimation: " << endl;
-	cout << Ar.structure_est ( egiw ( 1, V0, nu0 ) ) << endl;
+    cout << "Structure estimation: " << endl;
+    cout << Ar.structure_est ( egiw ( 1, V0, nu0 ) ) << endl;
 }
Index: library/tests/stresssuite/stresssuite.cpp
===================================================================
--- library/tests/stresssuite/stresssuite.cpp (revision 722)
+++ library/tests/stresssuite/stresssuite.cpp (revision 1064)
@@ -10,16 +10,16 @@
 
 int main ( int argc, char const *argv[] ) {
-	if ( argc > 1 ) {
-		if ( !strcmp ( argv[1], "print" ) )
-			print_test_list();
-		else
-			pick_selected_tests ( argc, argv );
-	} else {
-		cout << endl << "STRESSSUITE - a program covering all BDM stress tests." << endl << endl
-		     << argv[0] << " ....................................... run all stress tests" << endl
-		     << argv[0] << " particular_test_1 particular_test_2 ... run selected stress tests" << endl
-		     << argv[0] << " print ................................. print all the implemented stress tests" << endl;
-	}
+    if ( argc > 1 ) {
+        if ( !strcmp ( argv[1], "print" ) )
+            print_test_list();
+        else
+            pick_selected_tests ( argc, argv );
+    } else {
+        cout << endl << "STRESSSUITE - a program covering all BDM stress tests." << endl << endl
+             << argv[0] << " ....................................... run all stress tests" << endl
+             << argv[0] << " particular_test_1 particular_test_2 ... run selected stress tests" << endl
+             << argv[0] << " print ................................. print all the implemented stress tests" << endl;
+    }
 
-	return run_selected_tests();
+    return run_selected_tests();
 }
