Skip to content

Commit

Permalink
+ QDA include to avoid failure in buildbot and ~ ndarray destroy -> free
Browse files Browse the repository at this point in the history
  • Loading branch information
iglesias committed Mar 26, 2012
1 parent 388d734 commit 8d16f45
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/shogun/classifier/QDA.cpp
Expand Up @@ -13,7 +13,10 @@
#ifdef HAVE_LAPACK

#include <shogun/classifier/QDA.h>
#include <shogun/features/Features.h>
#include <shogun/machine/Machine.h>
#include <shogun/mathematics/Math.h>
#include <shogun/mathematics/lapack.h>

using namespace shogun;

Expand Down Expand Up @@ -56,8 +59,8 @@ void CQDA::cleanup()
if ( m_store_covs )
m_covs.destroy_ndarray();

m_covs.destroy_ndarray();
m_M.destroy_ndarray();
m_covs.free_ndarray();
m_M.free_ndarray();
m_means.free_matrix();
m_slog.free_vector();

Expand Down Expand Up @@ -209,7 +212,7 @@ bool CQDA::train_machine(CFeatures* data)
cov_dims[0] = m_dim;
cov_dims[1] = m_dim;
cov_dims[2] = m_num_classes;
m_covs = SGNDArray< float64_t >(cov_dims, 3);
m_covs = SGNDArray< float64_t >(cov_dims, 3, true);
}

m_means = SGMatrix< float64_t >(m_dim, m_num_classes, true);
Expand Down Expand Up @@ -295,7 +298,7 @@ bool CQDA::train_machine(CFeatures* data)
M_dims[0] = m_dim;
M_dims[1] = m_dim;
M_dims[2] = m_num_classes;
m_M = SGNDArray< float64_t >(M_dims, 3);
m_M = SGNDArray< float64_t >(M_dims, 3, true);

m_slog = SGVector< float32_t >(m_num_classes, true);
m_slog.zero();
Expand Down

0 comments on commit 8d16f45

Please sign in to comment.