Index: library/tests/test_util.cpp
===================================================================
--- library/tests/test_util.cpp (revision 469)
+++ library/tests/test_util.cpp (revision 477)
@@ -27,115 +27,114 @@
 using itpp::mat;
 
-std::string load_test_file(const char *fname)
-{
-    char buffer[8192];
-    memset(buffer, 0, sizeof(buffer));
-    std::ifstream src(fname, std::ios_base::binary);
-    src.read(buffer, sizeof(buffer) - 1);
-    return std::string(buffer);
+std::string load_test_file ( const char *fname ) {
+	char buffer[8192];
+	memset ( buffer, 0, sizeof ( buffer ) );
+	std::ifstream src ( fname, std::ios_base::binary );
+	src.read ( buffer, sizeof ( buffer ) - 1 );
+	return std::string ( buffer );
 }
 
-bool remove_all(const char *path) {
-    DIR *dir;
-    dirent *de;
+bool remove_all ( const char *path ) {
+	DIR *dir;
+	dirent *de;
 
-    bool rv = true;
-    if ((dir = opendir(path)) != 0) {
-        try {
-	    std::string top(path);
-	    top += "/";
+	bool rv = true;
+	if ( ( dir = opendir ( path ) ) != 0 ) {
+		try {
+			std::string top ( path );
+			top += "/";
 
-	    while ((de = readdir(dir)) != 0) {
-		if (strcmp(de->d_name, ".") && strcmp(de->d_name, "..")) {
-		    std::string subpath(top);
-		    subpath += de->d_name;
-		    remove_all(subpath.c_str());
+			while ( ( de = readdir ( dir ) ) != 0 ) {
+				if ( strcmp ( de->d_name, "." ) && strcmp ( de->d_name, ".." ) ) {
+					std::string subpath ( top );
+					subpath += de->d_name;
+					remove_all ( subpath.c_str() );
+				}
+			}
+		} catch ( ... ) {
+			closedir ( dir );
+			throw;
 		}
-	    }
-	} catch (...) {
-	    closedir(dir);
-	    throw;
+
+		closedir ( dir );
+
+		if ( rmdir ( path ) ) {
+			std::string msg = "can't remove dir ";
+			msg += path;
+			throw std::runtime_error ( msg );
+		}
+	} else {
+		if ( errno == ENOTDIR ) {
+			if ( unlink ( path ) ) {
+				std::string msg = "can't remove file ";
+				msg += path;
+				throw std::runtime_error ( msg );
+			}
+		} else {
+			if ( errno != ENOENT ) {
+				std::string msg = "can't remove ";
+				msg += path;
+				throw std::runtime_error ( msg );
+			} else {
+				// it wasn't there in the first place
+				rv = false;
+			}
+		}
 	}
 
-	closedir(dir);
-
-	if (rmdir(path)) {
-	    std::string msg = "can't remove dir ";
-	    msg += path;
-	    throw std::runtime_error(msg);
-	}
-    } else { 
-        if (errno == ENOTDIR) {
-	    if (unlink(path)) {
-  	        std::string msg = "can't remove file ";
-		msg += path;
-		throw std::runtime_error(msg);
-	    }
-	} else {
-	    if (errno != ENOENT) {
-	        std::string msg = "can't remove ";
-		msg += path;
-		throw std::runtime_error(msg);
-	    } else {
-	        // it wasn't there in the first place
-	        rv = false;
-	    }
-	}
-    }
-
-    return rv;
+	return rv;
 }
 
-double normcoef(const epdf *ep, const vec &xb, const vec &yb,
-		int xn, int yn) {
-    mat Pdf(xn + 1, yn + 1);
-    vec rgr(2);
+double normcoef ( const epdf *ep, const vec &xb, const vec &yb,
+                  int xn, int yn ) {
+	mat Pdf ( xn + 1, yn + 1 );
+	vec rgr ( 2 );
 
-    double xstep = (xb(1) - xb(0)) / xn;
-    double ystep = (yb(1) - yb(0)) / yn;
+	double xstep = ( xb ( 1 ) - xb ( 0 ) ) / xn;
+	double ystep = ( yb ( 1 ) - yb ( 0 ) ) / yn;
 
-    double x = xb(0);
-    for (int i = 0; i <= xn; x += xstep, i++) {
-        rgr(0) = x;
-	double y = yb(0);
-	for (int j = 0; j <= yn; y += ystep, j++) {
-	    rgr(1) = y;
-	    Pdf(i, j) = exp(ep->evallog(rgr));
+	double x = xb ( 0 );
+	for ( int i = 0; i <= xn; x += xstep, i++ ) {
+		rgr ( 0 ) = x;
+		double y = yb ( 0 );
+		for ( int j = 0; j <= yn; y += ystep, j++ ) {
+			rgr ( 1 ) = y;
+			Pdf ( i, j ) = exp ( ep->evallog ( rgr ) );
+		}
 	}
-    }
 
-    return sumsum(Pdf) * xstep * ystep;
+	return sumsum ( Pdf ) * xstep * ystep;
 }
 
-vec num_mean2(const epdf *ep, const vec &xb, const vec &yb,
-	      int xn, int yn) {
-    mat Pdf(xn + 1, yn + 1);
-    vec rgr(2);
+vec num_mean2 ( const epdf *ep, const vec &xb, const vec &yb,
+                int xn, int yn ) {
+	mat Pdf ( xn + 1, yn + 1 );
+	vec rgr ( 2 );
 
-    double xstep = (xb(1) - xb(0)) / xn;
-    double ystep = (yb(1) - yb(0)) / yn;
+	double xstep = ( xb ( 1 ) - xb ( 0 ) ) / xn;
+	double ystep = ( yb ( 1 ) - yb ( 0 ) ) / yn;
 
-    vec Mu(xn + 1);
-    vec Si(yn + 1);
+	vec Mu ( xn + 1 );
+	vec Si ( yn + 1 );
 
-    double x = xb(0);
-    for (int i = 0; i <= xn; x += xstep, i++) {
-        Mu(i) = x;
-	rgr(0) = x;
-	double y = yb(0);
-	for (int j = 0; j <= yn; y += ystep, j++) {
-	    Si(j) = y;
-	    rgr(1) = y;
-	    Pdf(i, j) = exp(ep->evallog(rgr));
+	double x = xb ( 0 );
+	for ( int i = 0; i <= xn; x += xstep, i++ ) {
+		Mu ( i ) = x;
+		rgr ( 0 ) = x;
+		double y = yb ( 0 );
+		for ( int j = 0; j <= yn; y += ystep, j++ ) {
+			Si ( j ) = y;
+			rgr ( 1 ) = y;
+			Pdf ( i, j ) = exp ( ep->evallog ( rgr ) );
+		}
 	}
-    }
 
-    vec fm = sum(Pdf, 2);
-    double sfm = sum(fm);
-    vec fs = sum(Pdf, 1);
-    double sfs = sum(fs);
-    double vi0 = Mu * fm / sfm;
-    double vi1 = Si * fs / sfs;
-    return vec_2(vi0, vi1);
+	vec fm = sum ( Pdf, 2 );
+	double sfm = sum ( fm );
+	vec fs = sum ( Pdf, 1 );
+	double sfs = sum ( fs );
+	double vi0 = Mu * fm / sfm;
+	double vi1 = Si * fs / sfs;
+	return vec_2 ( vi0, vi1 );
 }
 
