Skip to content

Commit

Permalink
added lapack check for eigenspectrum based test to solve compile error
Browse files Browse the repository at this point in the history
when not having LAPACK installed
  • Loading branch information
karlnapf committed Jun 11, 2012
1 parent 51c3b36 commit 27f5fd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/shogun/statistics/QuadraticTimeMMD.cpp
Expand Up @@ -121,6 +121,7 @@ float64_t CQuadraticTimeMMD::compute_p_value(float64_t statistic)
return result;
}

#ifdef HAVE_LAPACK
SGVector<float64_t> CQuadraticTimeMMD::sample_null_spectrum(index_t num_samples,
index_t num_eigenvalues)
{
Expand Down Expand Up @@ -182,6 +183,7 @@ SGVector<float64_t> CQuadraticTimeMMD::sample_null_spectrum(index_t num_samples,

return null_samples;
}
#endif // HAVE_LAPACK

float64_t CQuadraticTimeMMD::compute_p_value_gamma(float64_t statistic)
{
Expand Down
2 changes: 2 additions & 0 deletions src/shogun/statistics/QuadraticTimeMMD.h
Expand Up @@ -34,6 +34,7 @@ class CQuadraticTimeMMD : public CKernelTwoSampleTestStatistic
return "QuadraticTimeMMD";
};

#ifdef HAVE_LAPACK
/* returns a set of samples of an estimate of the null distribution
* using the Eigen-spectrum of the centered kernel matrix of the merged
* samples of p and q. May be used to compute p_value (easy)
Expand All @@ -52,6 +53,7 @@ class CQuadraticTimeMMD : public CKernelTwoSampleTestStatistic
*/
SGVector<float64_t> sample_null_spectrum(index_t num_samples,
index_t num_eigenvalues);
#endif // HAVE_LAPACK

/** Approximates the null-distribution by the two parameter gamma
* distribution. It works in O(m^2) where m is the number of samples
Expand Down

0 comments on commit 27f5fd1

Please sign in to comment.