From 1374bce8491af2c73ed6232c032d74f152a00527 Mon Sep 17 00:00:00 2001
From: Christian Beckmann <c.beckmann@donders.ru.nl>
Date: Sun, 30 Sep 2012 08:09:51 +0000
Subject: [PATCH] new -d

---
 meldata.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meldata.cc b/meldata.cc
index 26a2a33..eb72dfb 100644
--- a/meldata.cc
+++ b/meldata.cc
@@ -294,6 +294,10 @@ namespace Melodic{
       		opts.pca_dim.set_T(order);
 			PPCA=tmpPPCA;
   		}
+	  	if(opts.pca_dim.value() < 0){
+      		opts.pca_dim.set_T(min(order,-1*opts.pca_dim.value()));
+			PPCA=tmpPPCA;
+  		}
     	order = opts.pca_dim.value();
 		if(opts.debug.value())
 			message(endl << "Model order : "<<order<<endl<<endl);
-- 
GitLab