From 89f3aff27c77c5ea151cb93e6f6ca80104341558 Mon Sep 17 00:00:00 2001
From: Julien Michel <julien.michel@c-s.fr>
Date: Tue, 23 Oct 2007 11:58:18 +0000
Subject: [PATCH] Initialisation de valeurs manquante

---
 Code/Learning/otbSVMModel.txx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Code/Learning/otbSVMModel.txx b/Code/Learning/otbSVMModel.txx
index 9f30c2b900..59766b00b0 100644
--- a/Code/Learning/otbSVMModel.txx
+++ b/Code/Learning/otbSVMModel.txx
@@ -84,6 +84,13 @@ SVMModel<TInputPixel, TLabel>
     otbMsgDevMacro(  << "SVMModel::AllocateProblem - x done" );
     delete [] m_XSpace;
     m_XSpace = new struct svm_node[elements];
+
+    for(unsigned int i = 0;i<elements;++i)
+      {
+	m_XSpace[i].value = 0;
+	m_XSpace[i].index = -1;
+      }
+
     //free(m_XSpace);
     //m_XSpace = Malloc(struct svm_node,elements);
     //otbMsgDevMacro(  << "SVMModel::AllocateProblem - m_XSpace done" );
-- 
GitLab