Add kernel_pca (which required sparse) to default build, modify a few things (ticket #13 is related) so it compiles fine

This commit is contained in:
Ryan Curtin
2010-04-14 22:49:39 +00:00
parent 20ac49f85f
commit 4daef98a6d
3 changed files with 24 additions and 7 deletions
+15 -2
View File
@@ -38,7 +38,7 @@ set(MLPACK_STD_LIBS fastlib lapack blas ) ##! this ordering matters :(
set( DIRS
allkfn
allknn allnn
# disk_allnn #requires mmanager
# disk_allnn # does not compile, perhaps due to an API change
emst
fastica
hmm
@@ -46,7 +46,7 @@ set( DIRS
# isonmf ## nothing here yet
kalman
kde
# kernel_pca # requires sparse
# kernel_pca # requires sparse
#mog # requires optimization
# mlpackdemo ## matlab routines
#mvu # requires optimization
@@ -59,6 +59,10 @@ set( DIRS
svm
)
if(WITH_SPARSE)
set(DIRS ${DIRS} kernel_pca)
endif()
foreach(dir ${DIRS})
add_subdirectory(${dir})
endforeach()
@@ -66,6 +70,15 @@ endforeach()
# MLPACK_SRCS is set in the subdirectories
add_library(mlpack ${MLPACK_SRCS})
add_dependencies(mlpack fastlib)
target_link_libraries(mlpack
fastlib
)
if(WITH_SPARSE)
target_link_libraries(mlpack
${TRILINOS_LIBS}
)
endif()
# move header files to the right directory
file(GLOB_RECURSE INCLUDE_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.h)
+6 -3
View File
@@ -10,11 +10,14 @@
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include "fastlib/fastlib.h"
#include "fastlib/la/matrix.h"
#include "fastlib/sparse/sparse_matrix.h"
#include <fastlib/fastlib.h>
#include <fastlib/la/matrix.h>
#include "mlpack/allknn/allknn.h"
// sparse_matrix.h undefines LI; see #13
// so we must include allknn.h (which uses LI) first
#include <fastlib/sparse/sparse_matrix.h>
class KernelPCATest;
/**
* KernelPCA class is the main class that implements several spectral methods
@@ -17,9 +17,10 @@
*/
#include "kernel_pca.h"
#include "fastlib/fastlib.h"
#include "fastlib/base/test.h"
#include <vector>
#include <fastlib/fastlib.h>
#include <fastlib/base/test.h>
#include <fastlib/base/common.h>
class KernelPCATest {
public: