diff --git a/examples/undocumented/csharp_modular/CMakeLists.txt.old b/examples/undocumented/csharp_modular/CMakeLists.txt.old index 7d64fa0870e..96a75854afc 100644 --- a/examples/undocumented/csharp_modular/CMakeLists.txt.old +++ b/examples/undocumented/csharp_modular/CMakeLists.txt.old @@ -1,6 +1,6 @@ FILE(GLOB TARGETS_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.cs) LIST(REMOVE_ITEM TARGETS_SRC Load.cs) -IF (NOT USE_SVMLIGHT) +IF (NOT SHOGUN_USE_SVMLIGHT) LIST(REMOVE_ITEM TARGETS_SRC regression_svrlight_modular.cs) ENDIF() diff --git a/examples/undocumented/libshogun/classifier_gaussian_process_binary_classification.cpp b/examples/undocumented/libshogun/classifier_gaussian_process_binary_classification.cpp index d092eec87d7..516601dccf3 100644 --- a/examples/undocumented/libshogun/classifier_gaussian_process_binary_classification.cpp +++ b/examples/undocumented/libshogun/classifier_gaussian_process_binary_classification.cpp @@ -10,7 +10,7 @@ #include // Eigen3 is required for working with this example -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -126,4 +126,4 @@ int main(int argc, char **argv) return 0; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/examples/undocumented/libshogun/classifier_knn.cpp b/examples/undocumented/libshogun/classifier_knn.cpp index 8d845d47d42..ad032f47e9d 100644 --- a/examples/undocumented/libshogun/classifier_knn.cpp +++ b/examples/undocumented/libshogun/classifier_knn.cpp @@ -24,7 +24,7 @@ int main(int, char*[]) { init_shogun_with_defaults(); -#ifdef HAVE_LAPACK /* because of CDataGenerator::generate_gaussians */ +#ifdef SHOGUN_HAVE_LAPACK /* because of CDataGenerator::generate_gaussians */ // Labels and features containers SGVector lab(CLASSES*NUM); @@ -53,7 +53,7 @@ int main(int, char*[]) SG_UNREF(knn) SG_UNREF(output) -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ exit_shogun(); return 0; diff --git a/examples/undocumented/libshogun/classifier_lda.cpp b/examples/undocumented/libshogun/classifier_lda.cpp index 501bc4982e6..908bedfd4df 100644 --- a/examples/undocumented/libshogun/classifier_lda.cpp +++ b/examples/undocumented/libshogun/classifier_lda.cpp @@ -29,8 +29,8 @@ using namespace shogun; void test() { -#ifdef HAVE_LAPACK -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 SGVector< float64_t > lab(CLASSES*NUM); SGMatrix< float64_t > feat(DIMS, CLASSES*NUM); diff --git a/examples/undocumented/libshogun/classifier_qda.cpp b/examples/undocumented/libshogun/classifier_qda.cpp index d651be94d72..9e9d415aca8 100644 --- a/examples/undocumented/libshogun/classifier_qda.cpp +++ b/examples/undocumented/libshogun/classifier_qda.cpp @@ -24,8 +24,8 @@ using namespace shogun; void test() { -#ifdef HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK SGVector< float64_t > lab(CLASSES*NUM); SGMatrix< float64_t > feat(DIMS, CLASSES*NUM); @@ -53,8 +53,8 @@ void test() // Free memory SG_UNREF(output); SG_UNREF(qda); -#endif // HAVE_LAPACK -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK +#endif // SHOGUN_HAVE_EIGEN3 } int main(int argc, char ** argv) diff --git a/examples/undocumented/libshogun/classifier_svmlight_string_features_precomputed_kernel.cpp b/examples/undocumented/libshogun/classifier_svmlight_string_features_precomputed_kernel.cpp index 252e1b627ac..67885707bae 100644 --- a/examples/undocumented/libshogun/classifier_svmlight_string_features_precomputed_kernel.cpp +++ b/examples/undocumented/libshogun/classifier_svmlight_string_features_precomputed_kernel.cpp @@ -17,7 +17,7 @@ using namespace shogun; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT void test_svmlight() { /* data is random length strings with only zeros (A) or ones (B) */ diff --git a/examples/undocumented/libshogun/converter_diffusionmaps.cpp b/examples/undocumented/libshogun/converter_diffusionmaps.cpp index 958ac9f00cb..803924f6274 100644 --- a/examples/undocumented/libshogun/converter_diffusionmaps.cpp +++ b/examples/undocumented/libshogun/converter_diffusionmaps.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_factoranalysis.cpp b/examples/undocumented/libshogun/converter_factoranalysis.cpp index ab681d08c63..3fc8bc02074 100644 --- a/examples/undocumented/libshogun/converter_factoranalysis.cpp +++ b/examples/undocumented/libshogun/converter_factoranalysis.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_hessianlocallylinearembedding.cpp b/examples/undocumented/libshogun/converter_hessianlocallylinearembedding.cpp index 3462b424333..e6198963ce3 100644 --- a/examples/undocumented/libshogun/converter_hessianlocallylinearembedding.cpp +++ b/examples/undocumented/libshogun/converter_hessianlocallylinearembedding.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_isomap.cpp b/examples/undocumented/libshogun/converter_isomap.cpp index 066b1137569..630985c3818 100644 --- a/examples/undocumented/libshogun/converter_isomap.cpp +++ b/examples/undocumented/libshogun/converter_isomap.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_jade_bss.cpp b/examples/undocumented/libshogun/converter_jade_bss.cpp index 12193c7b729..25b95f30cd3 100644 --- a/examples/undocumented/libshogun/converter_jade_bss.cpp +++ b/examples/undocumented/libshogun/converter_jade_bss.cpp @@ -16,7 +16,7 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -100,15 +100,15 @@ void test() return; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 int main(int argc, char ** argv) { init_shogun_with_defaults(); -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 test(); -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 exit_shogun(); return 0; diff --git a/examples/undocumented/libshogun/converter_kernellocallylinearembedding.cpp b/examples/undocumented/libshogun/converter_kernellocallylinearembedding.cpp index 74e4469a7b8..7b96b8cbe2c 100644 --- a/examples/undocumented/libshogun/converter_kernellocallylinearembedding.cpp +++ b/examples/undocumented/libshogun/converter_kernellocallylinearembedding.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_laplacianeigenmaps.cpp b/examples/undocumented/libshogun/converter_laplacianeigenmaps.cpp index 53b469d7283..80766b966af 100644 --- a/examples/undocumented/libshogun/converter_laplacianeigenmaps.cpp +++ b/examples/undocumented/libshogun/converter_laplacianeigenmaps.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_linearlocaltangentspacealignment.cpp b/examples/undocumented/libshogun/converter_linearlocaltangentspacealignment.cpp index c5b2aec1f0c..1941a08b599 100644 --- a/examples/undocumented/libshogun/converter_linearlocaltangentspacealignment.cpp +++ b/examples/undocumented/libshogun/converter_linearlocaltangentspacealignment.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_localitypreservingprojections.cpp b/examples/undocumented/libshogun/converter_localitypreservingprojections.cpp index 8ba4f6c55e1..d0e508264f2 100644 --- a/examples/undocumented/libshogun/converter_localitypreservingprojections.cpp +++ b/examples/undocumented/libshogun/converter_localitypreservingprojections.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_locallylinearembedding.cpp b/examples/undocumented/libshogun/converter_locallylinearembedding.cpp index 811090c4981..ffae2bb3279 100644 --- a/examples/undocumented/libshogun/converter_locallylinearembedding.cpp +++ b/examples/undocumented/libshogun/converter_locallylinearembedding.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_localtangentspacealignment.cpp b/examples/undocumented/libshogun/converter_localtangentspacealignment.cpp index daf9bda1347..dd5acd3a909 100644 --- a/examples/undocumented/libshogun/converter_localtangentspacealignment.cpp +++ b/examples/undocumented/libshogun/converter_localtangentspacealignment.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_multidimensionalscaling.cpp b/examples/undocumented/libshogun/converter_multidimensionalscaling.cpp index edbae4f8df7..82718f96058 100644 --- a/examples/undocumented/libshogun/converter_multidimensionalscaling.cpp +++ b/examples/undocumented/libshogun/converter_multidimensionalscaling.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_neighborhoodpreservingembedding.cpp b/examples/undocumented/libshogun/converter_neighborhoodpreservingembedding.cpp index 5c1412ecfcf..0269426119e 100644 --- a/examples/undocumented/libshogun/converter_neighborhoodpreservingembedding.cpp +++ b/examples/undocumented/libshogun/converter_neighborhoodpreservingembedding.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/converter_stochasticproximityembedding.cpp b/examples/undocumented/libshogun/converter_stochasticproximityembedding.cpp index 33e9e7a1eb7..732b68a89f7 100644 --- a/examples/undocumented/libshogun/converter_stochasticproximityembedding.cpp +++ b/examples/undocumented/libshogun/converter_stochasticproximityembedding.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/evaluation_cross_validation_regression.cpp b/examples/undocumented/libshogun/evaluation_cross_validation_regression.cpp index bd23569bf46..2db554e99d3 100644 --- a/examples/undocumented/libshogun/evaluation_cross_validation_regression.cpp +++ b/examples/undocumented/libshogun/evaluation_cross_validation_regression.cpp @@ -26,7 +26,7 @@ void print_message(FILE* target, const char* str) void test_cross_validation() { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /* data matrix dimensions */ index_t num_vectors=100; index_t num_features=1; @@ -111,7 +111,7 @@ void test_cross_validation() SG_UNREF(result); SG_UNREF(cross); SG_UNREF(features); -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ } int main(int argc, char **argv) diff --git a/examples/undocumented/libshogun/library_hdf5.cpp b/examples/undocumented/libshogun/library_hdf5.cpp index fa72a5e7135..f3b3454ee28 100644 --- a/examples/undocumented/libshogun/library_hdf5.cpp +++ b/examples/undocumented/libshogun/library_hdf5.cpp @@ -10,7 +10,7 @@ using namespace shogun; int main(int argc, char** argv) { init_shogun_with_defaults(); -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 CHDF5File* hdf = new CHDF5File((char*) "../data/australian.libsvm.h5",'r', "/data/data"); float64_t* mat; int32_t num_feat; diff --git a/examples/undocumented/libshogun/library_mldatahdf5.cpp b/examples/undocumented/libshogun/library_mldatahdf5.cpp index eb5a1b1a2fb..5934a443e6f 100644 --- a/examples/undocumented/libshogun/library_mldatahdf5.cpp +++ b/examples/undocumented/libshogun/library_mldatahdf5.cpp @@ -10,7 +10,7 @@ using namespace shogun; int main(int argc, char** argv) { init_shogun_with_defaults(); -#if defined(HAVE_HDF5) && defined( HAVE_CURL) +#if defined(SHOGUN_HAVE_HDF5) && defined( SHOGUN_HAVE_CURL) CMLDataHDF5File* hdf = new CMLDataHDF5File((char *)"australian", "/data/data"); float64_t* mat=NULL; int32_t num_feat; @@ -27,7 +27,7 @@ int main(int argc, char** argv) SG_FREE(mat); SG_UNREF(hdf); -#endif // HAVE_CURL && HAVE_HDF5 +#endif // SHOGUN_HAVE_CURL && SHOGUN_HAVE_HDF5 exit_shogun(); return 0; } diff --git a/examples/undocumented/libshogun/mathematics_lapack.cpp b/examples/undocumented/libshogun/mathematics_lapack.cpp index ed1c23867f9..6c0a7ec00dd 100644 --- a/examples/undocumented/libshogun/mathematics_lapack.cpp +++ b/examples/undocumented/libshogun/mathematics_lapack.cpp @@ -18,7 +18,7 @@ using namespace shogun; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK bool is_equal(float64_t a, float64_t b, float64_t eps) { @@ -189,13 +189,13 @@ void test_lapack() delete[] double_eigenvalues; delete[] double_matrix; } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK int main(int argc, char** argv) { init_shogun_with_defaults(); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SG_SPRINT("checking lapack\n"); test_lapack(); @@ -204,7 +204,7 @@ int main(int argc, char** argv) SG_SPRINT("matrix_multiply\n"); test_matrix_multiply(); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK exit_shogun(); return 0; diff --git a/examples/undocumented/libshogun/modelselection_grid_search_linear.cpp b/examples/undocumented/libshogun/modelselection_grid_search_linear.cpp index 805a6ecd189..5d78938c683 100644 --- a/examples/undocumented/libshogun/modelselection_grid_search_linear.cpp +++ b/examples/undocumented/libshogun/modelselection_grid_search_linear.cpp @@ -46,7 +46,7 @@ int main(int argc, char **argv) { init_shogun(&print_message, &print_message, &print_message); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK int32_t num_subsets=5; int32_t num_vectors=11; @@ -109,7 +109,7 @@ int main(int argc, char **argv) SG_UNREF(result); SG_UNREF(best_combination); SG_UNREF(grid_search); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK exit_shogun(); return 0; diff --git a/examples/undocumented/libshogun/modelselection_parameter_tree.cpp b/examples/undocumented/libshogun/modelselection_parameter_tree.cpp index fc48fcb98c5..83c8cde85f3 100644 --- a/examples/undocumented/libshogun/modelselection_parameter_tree.cpp +++ b/examples/undocumented/libshogun/modelselection_parameter_tree.cpp @@ -185,7 +185,7 @@ CModelSelectionParameters* create_param_tree_3() return root; } -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 CModelSelectionParameters* create_param_tree_4a() { CModelSelectionParameters* root=new CModelSelectionParameters(); @@ -364,7 +364,7 @@ int main(int argc, char **argv) test_tree(tree); SG_UNREF(tree); -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 tree=create_param_tree_4a(); SG_REF(tree); test_tree(tree); diff --git a/examples/undocumented/libshogun/parameter_modsel_parameters.cpp b/examples/undocumented/libshogun/parameter_modsel_parameters.cpp index 27c9bd7b1de..098d72e630a 100644 --- a/examples/undocumented/libshogun/parameter_modsel_parameters.cpp +++ b/examples/undocumented/libshogun/parameter_modsel_parameters.cpp @@ -52,7 +52,7 @@ int main(int argc, char** argv) { init_shogun(&print_message); -#ifndef HAVE_LAPACK +#ifndef SHOGUN_HAVE_LAPACK CSGObject* object; object=new CLibSVM(); @@ -78,7 +78,7 @@ int main(int argc, char** argv) object=new CMinkowskiMetric(); print_modsel_parameters(object); SG_UNREF(object); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK exit_shogun(); return 0; diff --git a/examples/undocumented/libshogun/regression_gaussian_process_ard.cpp b/examples/undocumented/libshogun/regression_gaussian_process_ard.cpp index 47afdfbad85..8a20be98b26 100644 --- a/examples/undocumented/libshogun/regression_gaussian_process_ard.cpp +++ b/examples/undocumented/libshogun/regression_gaussian_process_ard.cpp @@ -10,7 +10,7 @@ #include // temporally disabled, since API was changed -#if defined(HAVE_EIGEN3) && defined(HAVE_NLOPT) && 0 +#if defined(SHOGUN_HAVE_EIGEN3) && defined(SHOGUN_HAVE_NLOPT) && 0 #include #include diff --git a/examples/undocumented/libshogun/regression_gaussian_process_fitc.cpp b/examples/undocumented/libshogun/regression_gaussian_process_fitc.cpp index de843a83f90..966f956d2d4 100644 --- a/examples/undocumented/libshogun/regression_gaussian_process_fitc.cpp +++ b/examples/undocumented/libshogun/regression_gaussian_process_fitc.cpp @@ -10,7 +10,7 @@ #include // temporally disabled, since API was changed -#if defined(HAVE_EIGEN3) && defined(HAVE_NLOPT) && 0 +#if defined(SHOGUN_HAVE_EIGEN3) && defined(SHOGUN_HAVE_NLOPT) && 0 #include #include diff --git a/examples/undocumented/libshogun/regression_gaussian_process_gaussian.cpp b/examples/undocumented/libshogun/regression_gaussian_process_gaussian.cpp index 84d4b7a4f66..c2abe63aeb3 100644 --- a/examples/undocumented/libshogun/regression_gaussian_process_gaussian.cpp +++ b/examples/undocumented/libshogun/regression_gaussian_process_gaussian.cpp @@ -10,7 +10,7 @@ #include // temporally disabled, since API was changed -#if defined(HAVE_EIGEN3) && defined(HAVE_NLOPT) && 0 +#if defined(SHOGUN_HAVE_EIGEN3) && defined(SHOGUN_HAVE_NLOPT) && 0 #include #include diff --git a/examples/undocumented/libshogun/regression_gaussian_process_laplace.cpp b/examples/undocumented/libshogun/regression_gaussian_process_laplace.cpp index aaed6687cb5..ef096ad2e37 100644 --- a/examples/undocumented/libshogun/regression_gaussian_process_laplace.cpp +++ b/examples/undocumented/libshogun/regression_gaussian_process_laplace.cpp @@ -10,7 +10,7 @@ #include // temporally disabled, since API was changed -#if defined(HAVE_EIGEN3) && defined(HAVE_NLOPT) && 0 +#if defined(SHOGUN_HAVE_EIGEN3) && defined(SHOGUN_HAVE_NLOPT) && 0 #include #include diff --git a/examples/undocumented/libshogun/regression_gaussian_process_product.cpp b/examples/undocumented/libshogun/regression_gaussian_process_product.cpp index 4a41c57b52f..cf2159553ee 100644 --- a/examples/undocumented/libshogun/regression_gaussian_process_product.cpp +++ b/examples/undocumented/libshogun/regression_gaussian_process_product.cpp @@ -8,7 +8,7 @@ */ #include -#if defined(HAVE_EIGEN3) && defined(HAVE_NLOPT) +#if defined(SHOGUN_HAVE_EIGEN3) && defined(SHOGUN_HAVE_NLOPT) #include #include #include diff --git a/examples/undocumented/libshogun/regression_gaussian_process_simple_exact.cpp b/examples/undocumented/libshogun/regression_gaussian_process_simple_exact.cpp index 150d658269a..77bf9c5e555 100644 --- a/examples/undocumented/libshogun/regression_gaussian_process_simple_exact.cpp +++ b/examples/undocumented/libshogun/regression_gaussian_process_simple_exact.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/examples/undocumented/libshogun/regression_gaussian_process_sum.cpp b/examples/undocumented/libshogun/regression_gaussian_process_sum.cpp index a99763aa4cb..1da338ba5d9 100644 --- a/examples/undocumented/libshogun/regression_gaussian_process_sum.cpp +++ b/examples/undocumented/libshogun/regression_gaussian_process_sum.cpp @@ -8,7 +8,7 @@ */ #include -#if defined(HAVE_EIGEN3) && defined(HAVE_NLOPT) +#if defined(SHOGUN_HAVE_EIGEN3) && defined(SHOGUN_HAVE_NLOPT) #include #include #include @@ -303,9 +303,9 @@ int main(int argc, char **argv) return 0; } -#else // HAVE_EIGEN3 && HAVE_NLOPT +#else // SHOGUN_HAVE_EIGEN3 && SHOGUN_HAVE_NLOPT int main(int argc, char **argv) { return 0; } -#endif // HAVE_EIGEN3 && HAVE_NLOPT +#endif // SHOGUN_HAVE_EIGEN3 && SHOGUN_HAVE_NLOPT diff --git a/examples/undocumented/libshogun/so_fg_model.cpp b/examples/undocumented/libshogun/so_fg_model.cpp index dbe09352c7f..d2733c8c267 100644 --- a/examples/undocumented/libshogun/so_fg_model.cpp +++ b/examples/undocumented/libshogun/so_fg_model.cpp @@ -108,7 +108,7 @@ void test(int32_t num_samples) factortype->set_w(w); model->add_factor_type(factortype); -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK // create primal mosek solver CPrimalMosekSOSVM* primcp = new CPrimalMosekSOSVM(model, labels); SG_REF(primcp); @@ -152,7 +152,7 @@ void test(int32_t num_samples) sgd->get_w().display_vector("w_sgd"); w_truth.display_vector("w_truth"); -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK // Evaluation PrimalMosek CStructuredLabels* labels_primcp = CLabelsFactory::to_structured(primcp->apply()); SG_REF(labels_primcp); @@ -211,7 +211,7 @@ void test(int32_t num_samples) ave_loss_sgd = acc_loss_sgd / static_cast(num_samples); SG_SPRINT("sgd solver: average training loss = %f\n", ave_loss_sgd); -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK SG_UNREF(labels_primcp); SG_UNREF(primcp); #endif diff --git a/examples/undocumented/libshogun/so_hmsvm_mosek_simple.cpp b/examples/undocumented/libshogun/so_hmsvm_mosek_simple.cpp index 1cb41a44747..1bc631963d3 100644 --- a/examples/undocumented/libshogun/so_hmsvm_mosek_simple.cpp +++ b/examples/undocumented/libshogun/so_hmsvm_mosek_simple.cpp @@ -10,7 +10,7 @@ using namespace shogun; int main(int argc, char ** argv) { init_shogun_with_defaults(); -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK // Create structured labels CSequenceLabels* labels = new CSequenceLabels(5, 2); @@ -60,7 +60,7 @@ int main(int argc, char ** argv) SG_UNREF(sosvm); SG_UNREF(model); -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ exit_shogun(); return 0; diff --git a/examples/undocumented/libshogun/statistics.cpp b/examples/undocumented/libshogun/statistics.cpp index 82ed8d50f13..235a840447a 100644 --- a/examples/undocumented/libshogun/statistics.cpp +++ b/examples/undocumented/libshogun/statistics.cpp @@ -311,7 +311,7 @@ void test_inverse_gamma_cdf() ASSERT(difference<=10E-16); } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK void test_covariance_matrix() { SGMatrix X(2,3); @@ -327,7 +327,7 @@ void test_covariance_matrix() ASSERT(cov.matrix[i]==0.5); } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK int main(int argc, char **argv) { @@ -346,9 +346,9 @@ int main(int argc, char **argv) test_error_function(); test_error_function_complement(); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK test_covariance_matrix(); -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK exit_shogun(); diff --git a/examples/undocumented/libshogun/structure_hmsvm_mosek.cpp b/examples/undocumented/libshogun/structure_hmsvm_mosek.cpp index 2d2345ba3c2..375470bebaf 100644 --- a/examples/undocumented/libshogun/structure_hmsvm_mosek.cpp +++ b/examples/undocumented/libshogun/structure_hmsvm_mosek.cpp @@ -9,7 +9,7 @@ using namespace shogun; int main(int argc, char ** argv) { init_shogun_with_defaults(); -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK int32_t num_examples = 10; int32_t example_length = 250; @@ -43,7 +43,7 @@ int main(int argc, char ** argv) SG_UNREF(labels); // because model->get_labels() increased the count SG_UNREF(sosvm); -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ exit_shogun(); return 0; diff --git a/include/shogun/base/SGRefObject.h b/include/shogun/base/SGRefObject.h index f6dddfc4c6d..1323e45bfe2 100644 --- a/include/shogun/base/SGRefObject.h +++ b/include/shogun/base/SGRefObject.h @@ -26,7 +26,7 @@ namespace shogun // define reference counter macros // -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING #define SG_REF(x) { if (x) (x)->ref(); } #define SG_UNREF(x) { if (x) { if ((x)->unref()==0) (x)=NULL; } } #define SG_UNREF_NO_NULL(x) { if (x) { (x)->unref(); } } @@ -55,7 +55,7 @@ class SGRefObject /** destructor */ virtual ~SGRefObject(); -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING /** increase reference counter * * @return reference count @@ -74,7 +74,7 @@ class SGRefObject * @return reference count */ int32_t unref(); -#endif //USE_REFERENCE_COUNTING +#endif // SHOGUN_USE_REFERENCE_COUNTING /** Returns the name of the SGSerializable instance. It MUST BE * the CLASS NAME without the prefixed `C'. diff --git a/include/shogun/classifier/GaussianProcessBinaryClassification.h b/include/shogun/classifier/GaussianProcessBinaryClassification.h index 83b747091db..ed7546a4140 100644 --- a/include/shogun/classifier/GaussianProcessBinaryClassification.h +++ b/include/shogun/classifier/GaussianProcessBinaryClassification.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -110,5 +110,5 @@ class CGaussianProcessBinaryClassification : public CGaussianProcessMachine } }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _GAUSSIANPROCESSCLASSIFICATION_H_ */ diff --git a/include/shogun/classifier/LDA.h b/include/shogun/classifier/LDA.h index abee3c61466..1e896bd2e64 100644 --- a/include/shogun/classifier/LDA.h +++ b/include/shogun/classifier/LDA.h @@ -13,7 +13,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include diff --git a/include/shogun/classifier/LPBoost.h b/include/shogun/classifier/LPBoost.h index 43e3d851be2..d93b0c02632 100644 --- a/include/shogun/classifier/LPBoost.h +++ b/include/shogun/classifier/LPBoost.h @@ -12,7 +12,7 @@ #define _LPBOOST_H___ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX #include #include @@ -122,5 +122,5 @@ class CLPBoost : public CLinearMachine }; } -#endif //USE_CPLEX +#endif // SHOGUN_USE_CPLEX #endif //_LPBOOST_H___ diff --git a/include/shogun/classifier/LPM.h b/include/shogun/classifier/LPM.h index 23e65e1dbde..7741caa2d3d 100644 --- a/include/shogun/classifier/LPM.h +++ b/include/shogun/classifier/LPM.h @@ -12,7 +12,7 @@ #define _LPM_H___ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX #include #include @@ -104,5 +104,5 @@ class CLPM : public CLinearMachine float64_t epsilon; }; } -#endif //USE_CPLEX +#endif // SHOGUN_USE_CPLEX #endif //_LPM_H___ diff --git a/include/shogun/classifier/mkl/MKL.h b/include/shogun/classifier/mkl/MKL.h index c63f02b38c0..e8ed6d3d5bb 100644 --- a/include/shogun/classifier/mkl/MKL.h +++ b/include/shogun/classifier/mkl/MKL.h @@ -13,11 +13,11 @@ #include -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK #include #endif -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX extern "C" { #include } @@ -409,7 +409,7 @@ class CMKL : public CSVM /** initialize solver such as glpk or cplex */ void init_solver(); -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX /** init cplex * * @return if init was successful @@ -426,7 +426,7 @@ class CMKL : public CSVM bool cleanup_cplex(); #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK /** init glpk * * @return if init was successful @@ -484,14 +484,14 @@ class CMKL : public CSVM /** measures training time for use with get_max_train_time() */ CTime training_time_clock; -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX /** env */ CPXENVptr env; /** lp */ CPXLPptr lp_cplex; #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK /** lp */ glp_prob* lp_glpk; diff --git a/include/shogun/classifier/svm/CPLEXSVM.h b/include/shogun/classifier/svm/CPLEXSVM.h index c1296dc3815..2aa881c5e21 100644 --- a/include/shogun/classifier/svm/CPLEXSVM.h +++ b/include/shogun/classifier/svm/CPLEXSVM.h @@ -12,7 +12,7 @@ #define _CPLEXSVM_H___ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX #include #include diff --git a/include/shogun/classifier/svm/NewtonSVM.h b/include/shogun/classifier/svm/NewtonSVM.h index 25dd40e920d..f60d952a242 100644 --- a/include/shogun/classifier/svm/NewtonSVM.h +++ b/include/shogun/classifier/svm/NewtonSVM.h @@ -18,7 +18,7 @@ namespace shogun { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** @brief NewtonSVM, * In this Implementation linear SVM is trained in its primal form using Newton-like iterations. * This Implementation is ported from the Olivier Chapelles fast newton based SVM solver, Which could be found here :http://mloss.org/software/view/30/ @@ -121,6 +121,6 @@ class CNewtonSVM : public CLinearMachine /** if bias is used */ bool use_bias; }; -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK } #endif //_NEWTONSVM_H___ diff --git a/include/shogun/classifier/svm/QPBSVMLib.h b/include/shogun/classifier/svm/QPBSVMLib.h index e1e754b556d..50f79d96fc5 100644 --- a/include/shogun/classifier/svm/QPBSVMLib.h +++ b/include/shogun/classifier/svm/QPBSVMLib.h @@ -114,7 +114,7 @@ class CQPBSVMLib: public CSGObject int32_t qpbsvm_gradient_descent( float64_t *x, float64_t *Nabla, int32_t *ptr_t, float64_t **ptr_History, int32_t verb); -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX /** Usage: exitflag = qpbsvm_cplex(UB, dim, tmax, tolabs, tolrel, tolKKT, x, Nabla, &t, &History, verb ) */ int32_t qpbsvm_cplex( diff --git a/include/shogun/classifier/svm/SVMLight.h b/include/shogun/classifier/svm/SVMLight.h index ff23b67b850..dec279f50b0 100644 --- a/include/shogun/classifier/svm/SVMLight.h +++ b/include/shogun/classifier/svm/SVMLight.h @@ -24,7 +24,7 @@ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include #include @@ -693,5 +693,5 @@ class CSVMLight : public CSVM bool mkl_converged; }; } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #endif //_SVMLight_H___ diff --git a/include/shogun/classifier/svm/SVMLightOneClass.h b/include/shogun/classifier/svm/SVMLightOneClass.h index bf798ad70fc..0d1e3942a17 100644 --- a/include/shogun/classifier/svm/SVMLightOneClass.h +++ b/include/shogun/classifier/svm/SVMLightOneClass.h @@ -14,11 +14,11 @@ #include #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT namespace shogun { /** @brief Trains a one class C SVM @@ -65,5 +65,5 @@ class CSVMLightOneClass: public CSVMLight virtual bool train_machine(CFeatures* data=NULL); }; } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #endif // _SVMLIGHTONECLASS_H___ diff --git a/include/shogun/clustering/GMM.h b/include/shogun/clustering/GMM.h index 8beb1867b05..857e370a74b 100644 --- a/include/shogun/clustering/GMM.h +++ b/include/shogun/clustering/GMM.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -251,5 +251,5 @@ class CGMM : public CDistribution SGVector m_coefficients; }; } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK #endif //_GMM_H__ diff --git a/include/shogun/converter/DiffusionMaps.h b/include/shogun/converter/DiffusionMaps.h index c948b35dcba..56979a78405 100644 --- a/include/shogun/converter/DiffusionMaps.h +++ b/include/shogun/converter/DiffusionMaps.h @@ -12,7 +12,7 @@ #define DIFFUSIONMAPS_H_ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -97,5 +97,5 @@ class CDiffusionMaps: public CEmbeddingConverter }; } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ #endif /* DIFFUSIONMAPS_H_ */ diff --git a/include/shogun/converter/FactorAnalysis.h b/include/shogun/converter/FactorAnalysis.h index f266110e449..e95de964205 100644 --- a/include/shogun/converter/FactorAnalysis.h +++ b/include/shogun/converter/FactorAnalysis.h @@ -11,7 +11,7 @@ #ifndef FACTOR_ANALYSIS_H_ #define FACTOR_ANALYSIS_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -84,5 +84,5 @@ class CFactorAnalysis : public CEmbeddingConverter } /* namespace shogun */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* FACTOR_ANALYSIS_H_ */ diff --git a/include/shogun/converter/HessianLocallyLinearEmbedding.h b/include/shogun/converter/HessianLocallyLinearEmbedding.h index 453595d802c..48e47376b48 100644 --- a/include/shogun/converter/HessianLocallyLinearEmbedding.h +++ b/include/shogun/converter/HessianLocallyLinearEmbedding.h @@ -11,7 +11,7 @@ #ifndef HESSIANLOCALLYLINEAREMBEDDING_H_ #define HESSIANLOCALLYLINEAREMBEDDING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -57,5 +57,5 @@ class CHessianLocallyLinearEmbedding: public CLocallyLinearEmbedding }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* HESSIANLOCALLYLINEAREMBEDDING_H_ */ diff --git a/include/shogun/converter/Isomap.h b/include/shogun/converter/Isomap.h index e72910cf3fa..fb76d72e303 100644 --- a/include/shogun/converter/Isomap.h +++ b/include/shogun/converter/Isomap.h @@ -11,7 +11,7 @@ #ifndef ISOMAP_H_ #define ISOMAP_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -81,5 +81,5 @@ class CIsomap: public CMultidimensionalScaling }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* ISOMAP_H_ */ diff --git a/include/shogun/converter/KernelLocallyLinearEmbedding.h b/include/shogun/converter/KernelLocallyLinearEmbedding.h index ccbcebbe4b4..dc4f2330c86 100644 --- a/include/shogun/converter/KernelLocallyLinearEmbedding.h +++ b/include/shogun/converter/KernelLocallyLinearEmbedding.h @@ -11,7 +11,7 @@ #ifndef KERNELLOCALLYLINEAREMBEDDING_H_ #define KERNELLOCALLYLINEAREMBEDDING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -70,5 +70,5 @@ class CKernelLocallyLinearEmbedding: public CLocallyLinearEmbedding }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* KERNELLOCALLYLINEAREMBEDDING_H_ */ diff --git a/include/shogun/converter/LaplacianEigenmaps.h b/include/shogun/converter/LaplacianEigenmaps.h index d7436d6ba7a..cc27dc20268 100644 --- a/include/shogun/converter/LaplacianEigenmaps.h +++ b/include/shogun/converter/LaplacianEigenmaps.h @@ -11,7 +11,7 @@ #ifndef LAPLACIANEIGENMAPS_H_ #define LAPLACIANEIGENMAPS_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -96,5 +96,5 @@ class CLaplacianEigenmaps: public CEmbeddingConverter }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* LAPLACIANEIGENMAPS_H_ */ diff --git a/include/shogun/converter/LinearLocalTangentSpaceAlignment.h b/include/shogun/converter/LinearLocalTangentSpaceAlignment.h index 19b0f29f2dd..c5bfceff89a 100644 --- a/include/shogun/converter/LinearLocalTangentSpaceAlignment.h +++ b/include/shogun/converter/LinearLocalTangentSpaceAlignment.h @@ -11,7 +11,7 @@ #ifndef LINEARLOCALTANGENTSPACEALIGNMENT_H_ #define LINEARLOCALTANGENTSPACEALIGNMENT_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -59,5 +59,5 @@ class CLinearLocalTangentSpaceAlignment: public CLocalTangentSpaceAlignment }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* LINEARLOCALTANGENTSPACEALIGNMENT_H_ */ diff --git a/include/shogun/converter/LocalTangentSpaceAlignment.h b/include/shogun/converter/LocalTangentSpaceAlignment.h index d3dcdaf6bea..54187cc0287 100644 --- a/include/shogun/converter/LocalTangentSpaceAlignment.h +++ b/include/shogun/converter/LocalTangentSpaceAlignment.h @@ -11,7 +11,7 @@ #ifndef LOCALTANGENTSPACEALIGNMENT_H_ #define LOCALTANGENTSPACEALIGNMENT_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -57,5 +57,5 @@ class CLocalTangentSpaceAlignment: public CLocallyLinearEmbedding }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* LOCALTANGENTSPACEALINGMENT_H_ */ diff --git a/include/shogun/converter/LocalityPreservingProjections.h b/include/shogun/converter/LocalityPreservingProjections.h index d7e0d6e1da1..46c77aaca99 100644 --- a/include/shogun/converter/LocalityPreservingProjections.h +++ b/include/shogun/converter/LocalityPreservingProjections.h @@ -11,7 +11,7 @@ #ifndef LOCALITYPRESERVINGPROJECTIONS_H_ #define LOCALITYPRESERVINGPROJECTIONS_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -54,5 +54,5 @@ class CLocalityPreservingProjections: public CLaplacianEigenmaps }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* LOCALITYPRESERVINGPROJECTIONS_H_ */ diff --git a/include/shogun/converter/LocallyLinearEmbedding.h b/include/shogun/converter/LocallyLinearEmbedding.h index c3cbefc838a..af059f7c65e 100644 --- a/include/shogun/converter/LocallyLinearEmbedding.h +++ b/include/shogun/converter/LocallyLinearEmbedding.h @@ -11,7 +11,7 @@ #ifndef LOCALLYLINEAREMBEDDING_H_ #define LOCALLYLINEAREMBEDDING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -113,5 +113,5 @@ class CLocallyLinearEmbedding: public CEmbeddingConverter }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* LOCALLYLINEAREMBEDDING_H_ */ diff --git a/include/shogun/converter/ManifoldSculpting.h b/include/shogun/converter/ManifoldSculpting.h index 7312936defb..324d010565f 100644 --- a/include/shogun/converter/ManifoldSculpting.h +++ b/include/shogun/converter/ManifoldSculpting.h @@ -11,7 +11,7 @@ #ifndef MANIFOLDSCULPTING_H_ #define MANIFOLDSCULPTING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -101,5 +101,5 @@ class CManifoldSculpting : public CEmbeddingConverter } /* namespace shogun */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* MANIFOLDSCULPTING_H_ */ diff --git a/include/shogun/converter/MultidimensionalScaling.h b/include/shogun/converter/MultidimensionalScaling.h index 02629d7889b..b43e1e93c4b 100644 --- a/include/shogun/converter/MultidimensionalScaling.h +++ b/include/shogun/converter/MultidimensionalScaling.h @@ -11,7 +11,7 @@ #ifndef MULTIDIMENSIONALSCALING_H_ #define MULTIDIMENSIONALSCALING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -132,5 +132,5 @@ class CMultidimensionalScaling: public CEmbeddingConverter }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* MULTIDIMENSIONALSCALING_H_ */ diff --git a/include/shogun/converter/NeighborhoodPreservingEmbedding.h b/include/shogun/converter/NeighborhoodPreservingEmbedding.h index 86c3909d0d4..b5e16f4d5e0 100644 --- a/include/shogun/converter/NeighborhoodPreservingEmbedding.h +++ b/include/shogun/converter/NeighborhoodPreservingEmbedding.h @@ -11,7 +11,7 @@ #ifndef NEIGHBORHOODPRESERVINGEMBEDDING_H_ #define NEIGHBORHOODPRESERVINGEMBEDDING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -59,5 +59,5 @@ class CNeighborhoodPreservingEmbedding: public CLocallyLinearEmbedding }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* NEIGHBORHOODPRESERVINGEMBEDDING_H_ */ diff --git a/include/shogun/converter/StochasticProximityEmbedding.h b/include/shogun/converter/StochasticProximityEmbedding.h index 4fed0ec4c04..a316ad0b2fc 100644 --- a/include/shogun/converter/StochasticProximityEmbedding.h +++ b/include/shogun/converter/StochasticProximityEmbedding.h @@ -11,7 +11,7 @@ #ifndef STOCHASTICPROXIMITYEMBEDDING_H_ #define STOCHASTICPROXIMITYEMBEDDING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -174,5 +174,5 @@ class CStochasticProximityEmbedding : public CEmbeddingConverter } /* namespace shogun */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* STOCHASTICPROXIMITYEMBEDDING_H_ */ diff --git a/include/shogun/converter/TDistributedStochasticNeighborEmbedding.h b/include/shogun/converter/TDistributedStochasticNeighborEmbedding.h index 18dfc4e5b36..e84afccaf47 100644 --- a/include/shogun/converter/TDistributedStochasticNeighborEmbedding.h +++ b/include/shogun/converter/TDistributedStochasticNeighborEmbedding.h @@ -11,7 +11,7 @@ #ifndef TDISTRIBUTEDSTOCHASTICNEIGHBOREMBEDDING_H_ #define TDISTRIBUTEDSTOCHASTICNEIGHBOREMBEDDING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -85,5 +85,5 @@ class CTDistributedStochasticNeighborEmbedding : public CEmbeddingConverter } /* namespace shogun */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* TDISTRIBUTEDSTOCHASTICNEIGHBOREMBEDDING_H_ */ diff --git a/include/shogun/converter/ica/FFSep.h b/include/shogun/converter/ica/FFSep.h index ee2401b69c4..91e577d00b9 100644 --- a/include/shogun/converter/ica/FFSep.h +++ b/include/shogun/converter/ica/FFSep.h @@ -11,7 +11,7 @@ #define FFSEP_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -80,5 +80,5 @@ class CFFSep: public CICAConverter SGNDArray m_covs; }; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // FFSEP diff --git a/include/shogun/converter/ica/FastICA.h b/include/shogun/converter/ica/FastICA.h index feeb0634c02..cb99e5a72a7 100644 --- a/include/shogun/converter/ica/FastICA.h +++ b/include/shogun/converter/ica/FastICA.h @@ -12,7 +12,7 @@ #define FASTICA_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -71,5 +71,5 @@ class CFastICA: public CICAConverter }; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // FASTICA diff --git a/include/shogun/converter/ica/ICAConverter.h b/include/shogun/converter/ica/ICAConverter.h index e72c1594edc..6444e43b801 100644 --- a/include/shogun/converter/ica/ICAConverter.h +++ b/include/shogun/converter/ica/ICAConverter.h @@ -11,7 +11,7 @@ #define ICACONVERTER_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -88,5 +88,5 @@ class CICAConverter: public CConverter float64_t tol; }; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // ICACONVERTER diff --git a/include/shogun/converter/ica/Jade.h b/include/shogun/converter/ica/Jade.h index 7ac499c2606..6d3450a030f 100644 --- a/include/shogun/converter/ica/Jade.h +++ b/include/shogun/converter/ica/Jade.h @@ -11,7 +11,7 @@ #define JADE_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -68,5 +68,5 @@ class CJade: public CICAConverter SGMatrix m_cumulant_matrix; }; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // JADE diff --git a/include/shogun/converter/ica/JediSep.h b/include/shogun/converter/ica/JediSep.h index d9b5c294a35..df294d36722 100644 --- a/include/shogun/converter/ica/JediSep.h +++ b/include/shogun/converter/ica/JediSep.h @@ -11,7 +11,7 @@ #define JEDISEP_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -79,5 +79,5 @@ class CJediSep: public CICAConverter SGNDArray m_covs; }; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // JEDISEP diff --git a/include/shogun/converter/ica/SOBI.h b/include/shogun/converter/ica/SOBI.h index a4ef00fe924..26986df1a54 100644 --- a/include/shogun/converter/ica/SOBI.h +++ b/include/shogun/converter/ica/SOBI.h @@ -11,7 +11,7 @@ #define SOBI_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -81,5 +81,5 @@ class CSOBI: public CICAConverter SGNDArray m_covs; }; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // SOBI diff --git a/include/shogun/converter/ica/UWedgeSep.h b/include/shogun/converter/ica/UWedgeSep.h index 04cf0c83aa1..72e81f167bd 100644 --- a/include/shogun/converter/ica/UWedgeSep.h +++ b/include/shogun/converter/ica/UWedgeSep.h @@ -11,7 +11,7 @@ #define UWEDGESEP_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -79,5 +79,5 @@ class CUWedgeSep: public CICAConverter SGNDArray m_covs; }; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // UWEDGESEP diff --git a/include/shogun/distance/CustomMahalanobisDistance.h b/include/shogun/distance/CustomMahalanobisDistance.h index 979ffde9280..157c844a54c 100644 --- a/include/shogun/distance/CustomMahalanobisDistance.h +++ b/include/shogun/distance/CustomMahalanobisDistance.h @@ -11,7 +11,7 @@ #ifndef CUSTOM_MAHALANOBIS_DISTANCE_ #define CUSTOM_MAHALANOBIS_DISTANCE_ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -80,6 +80,6 @@ class CCustomMahalanobisDistance : public CRealDistance } /* namespace shogun */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* CUSTOM_MAHALANOBIS_DISTANCE_ */ diff --git a/include/shogun/distance/DirectorDistance.h b/include/shogun/distance/DirectorDistance.h index 437af8fc627..b8d805eb373 100644 --- a/include/shogun/distance/DirectorDistance.h +++ b/include/shogun/distance/DirectorDistance.h @@ -10,7 +10,7 @@ #ifndef _DIRECTORDISTANCE_H___ #define _DIRECTORDISTANCE_H___ -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS #include #include #include @@ -218,5 +218,5 @@ IGNORE_IN_CLASSLIST class CDirectorDistance : public CDistance } -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ #endif /* _DIRECTORDISTANCE_H___ */ diff --git a/include/shogun/distance/MahalanobisDistance.h b/include/shogun/distance/MahalanobisDistance.h index e2e72ee6ca8..ddd3511457a 100644 --- a/include/shogun/distance/MahalanobisDistance.h +++ b/include/shogun/distance/MahalanobisDistance.h @@ -11,7 +11,7 @@ #ifndef _MAHALANOBISDISTANCE_H__ #define _MAHALANOBISDISTANCE_H__ -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -147,5 +147,5 @@ class CMahalanobisDistance: public CRealDistance }; } // namespace shogun -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ #endif /* _MAHALANOBISDISTANCE_H__ */ diff --git a/include/shogun/distributions/Gaussian.h b/include/shogun/distributions/Gaussian.h index 4706350b9b1..77472cdd6e6 100644 --- a/include/shogun/distributions/Gaussian.h +++ b/include/shogun/distributions/Gaussian.h @@ -13,7 +13,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -233,5 +233,5 @@ class CGaussian : public CDistribution ECovType m_cov_type; }; } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK #endif //_GAUSSIAN_H__ diff --git a/include/shogun/distributions/HMM.h b/include/shogun/distributions/HMM.h index 19d7320af1c..759bf7d6e8f 100644 --- a/include/shogun/distributions/HMM.h +++ b/include/shogun/distributions/HMM.h @@ -22,8 +22,8 @@ #include -#ifdef USE_HMMPARALLEL -#define USE_HMMPARALLEL_STRUCTURES 1 +#ifdef SHOGUN_USE_HMMPARALLEL +#define SHOGUN_USE_HMMPARALLEL_STRUCTURES 1 #endif namespace shogun @@ -58,7 +58,7 @@ struct T_ALPHA_BETA * Probably uint8_t is enough if you have at most 256 states, * however uint16_t/long/... is also possible although you might quickly run into memory problems */ -#ifdef USE_BIGSTATES +#ifdef SHOGUN_USE_BIGSTATES typedef uint16_t T_STATES ; #else typedef uint8_t T_STATES ; @@ -380,7 +380,7 @@ class CHMM : public CDistribution T_STATES *trans_list_backward_cnt ; bool mem_initialized ; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES /// Datatype that is used in parrallel computation of viterbi struct S_DIM_THREAD_PARAM @@ -409,7 +409,7 @@ class CHMM : public CDistribution return alpha_cache[dim%parallel->get_num_threads()] ; } ; inline T_ALPHA_BETA & BETA_CACHE(int32_t dim) { return beta_cache[dim%parallel->get_num_threads()] ; } ; -#ifdef USE_LOGSUMARRAY +#ifdef SHOGUN_USE_LOGSUMARRAY inline float64_t* ARRAYS(int32_t dim) { return arrayS[dim%parallel->get_num_threads()] ; } ; #endif @@ -432,7 +432,7 @@ class CHMM : public CDistribution return alpha_cache ; } ; inline T_ALPHA_BETA & BETA_CACHE(int32_t /*dim*/) { return beta_cache ; } ; -#ifdef USE_LOGSUMARRAY +#ifdef SHOGUN_USE_LOGSUMARRAY inline float64_t* ARRAYS(int32_t dim) { return arrayS ; } ; #endif @@ -643,7 +643,7 @@ class CHMM : public CDistribution void estimate_model_baum_welch(CHMM* train); void estimate_model_baum_welch_trans(CHMM* train); -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES void ab_buf_comp( float64_t* p_buf, float64_t* q_buf, float64_t* a_buf, float64_t* b_buf, int32_t dim) ; @@ -762,7 +762,7 @@ class CHMM : public CDistribution PSEUDO=pseudo ; } -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES static void* bw_dim_prefetch(void * params); static void* bw_single_dim_prefetch(void * params); static void* vit_dim_prefetch(void * params); @@ -957,10 +957,10 @@ class CHMM : public CDistribution */ bool save_path_derivatives_bin(FILE* file); -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG /// numerically check whether derivates were calculated right bool check_path_derivatives() ; -#endif //USE_HMMDEBUG +#endif // SHOGUN_USE_HMMDEBUG /** save model probability in binary format * @param file filehandle @@ -1267,29 +1267,29 @@ class CHMM : public CDistribution bool reused_caches; //@} -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES /** array of size N*parallel.get_num_threads() for temporary calculations */ float64_t** arrayN1 /*[parallel.get_num_threads()]*/ ; /** array of size N*parallel.get_num_threads() for temporary calculations */ float64_t** arrayN2 /*[parallel.get_num_threads()]*/ ; -#else //USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES /** array of size N for temporary calculations */ float64_t* arrayN1; /** array of size N for temporary calculations */ float64_t* arrayN2; -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES -#ifdef USE_LOGSUMARRAY -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_LOGSUMARRAY +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES /** array for for temporary calculations of log_sum */ float64_t** arrayS /*[parallel.get_num_threads()]*/; #else /** array for for temporary calculations of log_sum */ float64_t* arrayS; -#endif // USE_HMMPARALLEL_STRUCTURES -#endif // USE_LOGSUMARRAY +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_LOGSUMARRAY -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES /// cache for forward variables can be terrible HUGE O(T*N) T_ALPHA_BETA* alpha_cache /*[parallel.get_num_threads()]*/ ; @@ -1308,7 +1308,7 @@ class CHMM : public CDistribution /// dimension for which path_prob was calculated int32_t* path_prob_dimension /*[parallel.get_num_threads()]*/ ; -#else //USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES /// cache for forward variables can be terrible HUGE O(T*N) T_ALPHA_BETA alpha_cache; /// cache for backward variables can be terrible HUGE O(T*N) @@ -1326,7 +1326,7 @@ class CHMM : public CDistribution /// dimension for which path_prob was calculated int32_t path_prob_dimension; -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES //@} /** GOTN */ diff --git a/include/shogun/distributions/classical/GaussianDistribution.h b/include/shogun/distributions/classical/GaussianDistribution.h index 73ef6f2fc0f..8dbe0125fbb 100644 --- a/include/shogun/distributions/classical/GaussianDistribution.h +++ b/include/shogun/distributions/classical/GaussianDistribution.h @@ -6,7 +6,7 @@ * * Written (W) 2013 Heiko Strathmann */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #ifndef GAUSSIANDISTRIBUTION_H #define GAUSSIANDISTRIBUTION_H @@ -104,4 +104,4 @@ class CGaussianDistribution: public CProbabilityDistribution } #endif // GAUSSIANDISTRIBUTION_H -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/include/shogun/evaluation/DirectorContingencyTableEvaluation.h b/include/shogun/evaluation/DirectorContingencyTableEvaluation.h index c1d8b420522..e513cf6748b 100644 --- a/include/shogun/evaluation/DirectorContingencyTableEvaluation.h +++ b/include/shogun/evaluation/DirectorContingencyTableEvaluation.h @@ -12,7 +12,7 @@ #include #include -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS namespace shogun { @@ -71,5 +71,5 @@ IGNORE_IN_CLASSLIST class CDirectorContingencyTableEvaluation: public CContingen }; } -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ #endif /* DIRECTORCONTINGENCYTABLEEVALUATION_H_ */ diff --git a/include/shogun/evaluation/ica/AmariIndex.h b/include/shogun/evaluation/ica/AmariIndex.h index 2e3126334a3..cf68a699fe8 100644 --- a/include/shogun/evaluation/ica/AmariIndex.h +++ b/include/shogun/evaluation/ica/AmariIndex.h @@ -1,6 +1,6 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 /** * @brief function amari_index @@ -15,4 +15,4 @@ */ float64_t amari_index(shogun::SGMatrix W, shogun::SGMatrix A, bool standardize); -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/include/shogun/evaluation/ica/PermutationMatrix.h b/include/shogun/evaluation/ica/PermutationMatrix.h index eb637d5ef4b..abdce8e1bb9 100644 --- a/include/shogun/evaluation/ica/PermutationMatrix.h +++ b/include/shogun/evaluation/ica/PermutationMatrix.h @@ -1,10 +1,10 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 /* Function that tests if a SGMatrix is a permutation matrix */ bool is_permutation_matrix(shogun::SGMatrix m); -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/include/shogun/features/DataGenerator.h b/include/shogun/features/DataGenerator.h index 61ffdf2dd43..7efc77af76f 100644 --- a/include/shogun/features/DataGenerator.h +++ b/include/shogun/features/DataGenerator.h @@ -84,7 +84,7 @@ class CDataGenerator: public CSGObject float64_t d, float64_t angle, SGMatrix target=SGMatrix()); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** Produces samples of gaussians * The functions produces m number of samples of each gaussians (n number) with * the given dimension. @@ -96,7 +96,7 @@ class CDataGenerator: public CSGObject * of the first gaussian, m number of second etc. */ static SGMatrix generate_gaussians(index_t m, index_t n, index_t dim); -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ virtual const char* get_name() const { return "DataGenerator"; } diff --git a/include/shogun/features/DirectorDotFeatures.h b/include/shogun/features/DirectorDotFeatures.h index 33e3395b224..c4b9a39a23d 100644 --- a/include/shogun/features/DirectorDotFeatures.h +++ b/include/shogun/features/DirectorDotFeatures.h @@ -12,7 +12,7 @@ #include -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS #include #include #include @@ -363,5 +363,5 @@ IGNORE_IN_CLASSLIST class CDirectorDotFeatures : public CDotFeatures virtual const char* get_name() const { return "DirectorDotFeatures"; } }; } -#endif // USE_SWIG_DIRECTORS +#endif // SHOGUN_USE_SWIG_DIRECTORS #endif // _DIRECTORDOTFEATURES_H___ diff --git a/include/shogun/io/HDF5File.h b/include/shogun/io/HDF5File.h index fb9f56b7a81..77a66d49d9a 100644 --- a/include/shogun/io/HDF5File.h +++ b/include/shogun/io/HDF5File.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 #include #include #include @@ -408,6 +408,6 @@ IGNORE_IN_CLASSLIST class CHDF5File : public CFile hid_t boolean_type; }; } -#endif // HAVE_HDF5 +#endif // SHOGUN_HAVE_HDF5 #endif //__HDF5_FILE_H__ diff --git a/include/shogun/io/MLDataHDF5File.h b/include/shogun/io/MLDataHDF5File.h index 06b367f15ef..e864b078a33 100644 --- a/include/shogun/io/MLDataHDF5File.h +++ b/include/shogun/io/MLDataHDF5File.h @@ -11,7 +11,7 @@ #include -#if defined(HAVE_HDF5) && defined( HAVE_CURL) +#if defined(SHOGUN_HAVE_HDF5) && defined( SHOGUN_HAVE_CURL) #include #include #include @@ -481,6 +481,6 @@ IGNORE_IN_CLASSLIST class CMLDataHDF5File : public CFile char *mldata_url; }; } -#endif // HAVE_CURL && HAVE_HDF5 +#endif // SHOGUN_HAVE_CURL && SHOGUN_HAVE_HDF5 #endif //__HDF5_FILE_H__ diff --git a/include/shogun/io/ProtobufFile.h b/include/shogun/io/ProtobufFile.h index 20123062002..7ac74e22f5d 100644 --- a/include/shogun/io/ProtobufFile.h +++ b/include/shogun/io/ProtobufFile.h @@ -7,7 +7,7 @@ * Written (W) 2013 Evgeniy Andreev (gsomix) */ -#ifdef HAVE_PROTOBUF +#ifdef SHOGUN_HAVE_PROTOBUF #ifndef __PROTOBUFFILE_H__ #define __PROTOBUFFILE_H__ @@ -621,4 +621,4 @@ class CProtobufFile : public CFile #endif /** __PROTOBUFFILE_H__ */ -#endif /** HAVE_PROTOBUF */ +#endif /** SHOGUN_HAVE_PROTOBUF */ diff --git a/include/shogun/io/SerializableHdf5File.h b/include/shogun/io/SerializableHdf5File.h index 9fc9a91dec9..79fab57dd49 100644 --- a/include/shogun/io/SerializableHdf5File.h +++ b/include/shogun/io/SerializableHdf5File.h @@ -11,7 +11,7 @@ #define __SERIALIZABLE_HDF5_FILE_H__ #include -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 #include @@ -165,5 +165,5 @@ IGNORE_IN_CLASSLIST class CSerializableHdf5File virtual bool is_opened(); }; } -#endif /* HAVE_HDF5 */ +#endif /* SHOGUN_HAVE_HDF5 */ #endif /* __SERIALIZABLE_HDF5_FILE_H__ */ diff --git a/include/shogun/io/SerializableHdf5Reader00.h b/include/shogun/io/SerializableHdf5Reader00.h index 530bc73db8f..2f920f254cd 100644 --- a/include/shogun/io/SerializableHdf5Reader00.h +++ b/include/shogun/io/SerializableHdf5Reader00.h @@ -11,7 +11,7 @@ #define __SERIALIZABLE_HDF5_READER_00_H__ #include -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 #include @@ -84,5 +84,5 @@ IGNORE_IN_CLASSLIST class SerializableHdf5Reader00 }; } -#endif /* HAVE_HDF5 */ +#endif /* SHOGUN_HAVE_HDF5 */ #endif /* __SERIALIZABLE_HDF5_READER_00_H__ */ diff --git a/include/shogun/io/SerializableJsonFile.h b/include/shogun/io/SerializableJsonFile.h index 966cbe9763b..f57cb8fe798 100644 --- a/include/shogun/io/SerializableJsonFile.h +++ b/include/shogun/io/SerializableJsonFile.h @@ -11,7 +11,7 @@ #define __SERIALIZABLE_JSON_FILE_H__ #include -#ifdef HAVE_JSON +#ifdef SHOGUN_HAVE_JSON #include @@ -124,5 +124,5 @@ IGNORE_IN_CLASSLIST class CSerializableJsonFile virtual bool is_opened(); }; } -#endif /* HAVE_JSON */ +#endif /* SHOGUN_HAVE_JSON */ #endif /* __SERIALIZABLE_JSON_FILE_H__ */ diff --git a/include/shogun/io/SerializableJsonReader00.h b/include/shogun/io/SerializableJsonReader00.h index 3b8914e9053..73a0dbb16f1 100644 --- a/include/shogun/io/SerializableJsonReader00.h +++ b/include/shogun/io/SerializableJsonReader00.h @@ -11,7 +11,7 @@ #define __SERIALIZABLE_JSON_READER_00_H__ #include -#ifdef HAVE_JSON +#ifdef SHOGUN_HAVE_JSON #include @@ -84,5 +84,5 @@ IGNORE_IN_CLASSLIST class SerializableJsonReader00 }; } -#endif /* HAVE_JSON */ +#endif /* SHOGUN_HAVE_JSON */ #endif /* __SERIALIZABLE_JSON_READER_00_H__ */ diff --git a/include/shogun/io/SerializableXmlFile.h b/include/shogun/io/SerializableXmlFile.h index c3baccd8f7e..66828be8339 100644 --- a/include/shogun/io/SerializableXmlFile.h +++ b/include/shogun/io/SerializableXmlFile.h @@ -11,7 +11,7 @@ #define __SERIALIZABLE_XML_FILE_H__ #include -#ifdef HAVE_XML +#ifdef SHOGUN_HAVE_XML #include #include @@ -129,5 +129,5 @@ class CSerializableXmlFile virtual bool is_opened(); }; } -#endif /* HAVE_XML */ +#endif /* SHOGUN_HAVE_XML */ #endif /* __SERIALIZABLE_XML_FILE_H__ */ diff --git a/include/shogun/io/SerializableXmlReader00.h b/include/shogun/io/SerializableXmlReader00.h index 8a39dcd6cfc..bfff5fe4e7b 100644 --- a/include/shogun/io/SerializableXmlReader00.h +++ b/include/shogun/io/SerializableXmlReader00.h @@ -11,7 +11,7 @@ #define __SERIALIZABLE_XML_READER_00_H__ #include -#ifdef HAVE_XML +#ifdef SHOGUN_HAVE_XML #include @@ -84,5 +84,5 @@ IGNORE_IN_CLASSLIST class SerializableXmlReader00 }; } -#endif /* HAVE_XML */ +#endif /* SHOGUN_HAVE_XML */ #endif /* __SERIALIZABLE_XML_READER_00_H__ */ diff --git a/include/shogun/io/streaming/InputParser.h b/include/shogun/io/streaming/InputParser.h index ed92714c5f1..5f822fcdf3b 100644 --- a/include/shogun/io/streaming/InputParser.h +++ b/include/shogun/io/streaming/InputParser.h @@ -12,7 +12,7 @@ #define __INPUTPARSER_H__ #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #include @@ -515,7 +515,7 @@ template void* CInputParser::main_parse_loop(void* params) { // Read the examples into current_* objects // Instead of allocating mem for new objects each time -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD CInputParser* this_obj = (CInputParser *) params; this->input_source = this_obj->input_source; @@ -561,7 +561,7 @@ template void* CInputParser::main_parse_loop(void* params) pthread_cond_signal(&examples_state_changed); pthread_mutex_unlock(&examples_state_lock); } -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ return NULL; } @@ -673,6 +673,6 @@ template void CInputParser::exit_parser() } } -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ #endif // __INPUTPARSER_H__ diff --git a/include/shogun/io/streaming/ParseBuffer.h b/include/shogun/io/streaming/ParseBuffer.h index 9654b22e70a..823035ae689 100644 --- a/include/shogun/io/streaming/ParseBuffer.h +++ b/include/shogun/io/streaming/ParseBuffer.h @@ -11,7 +11,7 @@ #define __PARSEBUFFER_H__ #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #include @@ -362,5 +362,5 @@ void CParseBuffer::finalize_example(bool free_after_release) } } -#endif // HAVE_PTHREAD +#endif // SHOGUN_HAVE_PTHREAD #endif // __PARSEBUFFER_H__ diff --git a/include/shogun/kernel/CombinedKernel.h b/include/shogun/kernel/CombinedKernel.h index 892d5cc45c8..972d2fa725d 100644 --- a/include/shogun/kernel/CombinedKernel.h +++ b/include/shogun/kernel/CombinedKernel.h @@ -423,9 +423,9 @@ class CCombinedKernel : public CKernel if (!get_num_subkernels()) { initialized=true; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT cache_reset(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT } } else @@ -440,9 +440,9 @@ class CCombinedKernel : public CKernel if (!get_num_subkernels()) { initialized=true; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT cache_reset(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT } } else diff --git a/include/shogun/kernel/DirectorKernel.h b/include/shogun/kernel/DirectorKernel.h index 1c53f43c30e..333119d3139 100644 --- a/include/shogun/kernel/DirectorKernel.h +++ b/include/shogun/kernel/DirectorKernel.h @@ -13,7 +13,7 @@ #include -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS #include #include #include @@ -468,5 +468,5 @@ IGNORE_IN_CLASSLIST class CDirectorKernel: public CKernel bool external_features; }; } -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ #endif /* _DIRECTORKERNEL_H__ */ diff --git a/include/shogun/kernel/Kernel.h b/include/shogun/kernel/Kernel.h index 193ff9b2a7d..d9a75ccf020 100644 --- a/include/shogun/kernel/Kernel.h +++ b/include/shogun/kernel/Kernel.h @@ -31,7 +31,7 @@ namespace shogun class CFeatures; class CKernelNormalizer; -#ifdef USE_SHORTREAL_KERNELCACHE +#ifdef SHOGUN_USE_SHORTREAL_KERNELCACHE /** kernel cache element */ typedef float32_t KERNELCACHE_ELEM; #else @@ -428,9 +428,9 @@ class CKernel : public CSGObject inline void set_cache_size(int32_t size) { cache_size = size; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT cache_reset(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT } /** return the size of the kernel cache @@ -439,7 +439,7 @@ class CKernel : public CSGObject */ inline int32_t get_cache_size() { return cache_size; } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT /** cache reset */ inline void cache_reset() { resize_kernel_cache(cache_size); } @@ -552,7 +552,7 @@ class CKernel : public CSGObject /** cleanup kernel cache */ void kernel_cache_cleanup(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT /** list kernel */ void list_kernel(); @@ -805,7 +805,7 @@ class CKernel : public CSGObject void init(); -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #ifndef DOXYGEN_SHOULD_SKIP_THIS /**@ cache kernel evalutations to improve speed */ struct KERNEL_CACHE { @@ -868,17 +868,17 @@ class CKernel : public CSGObject int32_t kernel_cache_malloc(); int32_t kernel_cache_free_lru(); KERNELCACHE_ELEM *kernel_cache_clean_and_malloc(int32_t cacheidx); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT //@} protected: /// cache_size in MB int32_t cache_size; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT /// kernel cache KERNEL_CACHE kernel_cache; -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT /// this *COULD* store the whole kernel matrix /// usually not applicable / necessary to compute the whole matrix diff --git a/include/shogun/kernel/ProductKernel.h b/include/shogun/kernel/ProductKernel.h index 53bb4b28d68..8445c8a9ccb 100644 --- a/include/shogun/kernel/ProductKernel.h +++ b/include/shogun/kernel/ProductKernel.h @@ -226,9 +226,9 @@ class CProductKernel : public CKernel if (!get_num_subkernels()) { initialized=true; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT cache_reset(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT } } else @@ -243,9 +243,9 @@ class CProductKernel : public CKernel if (!get_num_subkernels()) { initialized=true; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT cache_reset(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT } } else diff --git a/include/shogun/latent/DirectorLatentModel.h b/include/shogun/latent/DirectorLatentModel.h index 5c05a6731d8..2950c03dd98 100644 --- a/include/shogun/latent/DirectorLatentModel.h +++ b/include/shogun/latent/DirectorLatentModel.h @@ -12,7 +12,7 @@ #include #include -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS namespace shogun { @@ -69,6 +69,6 @@ IGNORE_IN_CLASSLIST class CDirectorLatentModel : public CLatentModel }; /* class CDirectorLatentModel */ } /* namespace shogun */ -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ #endif /* _DIRECTOR_LATENT_MODEL_H_ */ diff --git a/include/shogun/lib/CMakeLists.txt b/include/shogun/lib/CMakeLists.txt index 5970a08f243..51a3297dc0a 100644 --- a/include/shogun/lib/CMakeLists.txt +++ b/include/shogun/lib/CMakeLists.txt @@ -14,6 +14,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +SET( SHOGUN_MACHINE_TYPE "a-fast-one" ) +SET( SHOGUN_CONFIGURE_OPTIONS "a-lot" ) +SET( SHOGUN_COMPFLAGS_CPP "really-much" ) +SET( SHOGUN_LINKFLAGS "some" ) ##### Autogenerate headers ##### FILE( GLOB _AUTOGEN_FILES "*.in" ) diff --git a/include/shogun/lib/RefCount.h b/include/shogun/lib/RefCount.h index 1794c3c9003..e3d1b3629bc 100644 --- a/include/shogun/lib/RefCount.h +++ b/include/shogun/lib/RefCount.h @@ -1,4 +1,4 @@ -#ifdef HAVE_CXX11_ATOMIC +#ifdef SHOGUN_HAVE_CXX11_ATOMIC #include #endif @@ -41,7 +41,7 @@ class RefCount int32_t ref_count(); /** reference count */ -#ifdef HAVE_CXX11_ATOMIC +#ifdef SHOGUN_HAVE_CXX11_ATOMIC volatile std::atomic rc; #else int32_t rc; diff --git a/include/shogun/lib/SGMatrix.h b/include/shogun/lib/SGMatrix.h index 5df9000f502..e126f233c41 100644 --- a/include/shogun/lib/SGMatrix.h +++ b/include/shogun/lib/SGMatrix.h @@ -167,7 +167,7 @@ template class SGMatrix : public SGReferencedData */ static SGMatrix create_centering_matrix(index_t size); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** compute eigenvalues and eigenvectors of symmetric matrix using * LAPACK * @@ -213,7 +213,7 @@ template class SGMatrix : public SGReferencedData SGMatrix A, SGMatrix B, bool transpose_A=false, bool transpose_B=false, float64_t scale=1.0); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** inverses square matrix in-place */ static void inverse(SGMatrix matrix); diff --git a/include/shogun/lib/config.h.in b/include/shogun/lib/config.h.in index 55ad5792665..6c608c28af9 100644 --- a/include/shogun/lib/config.h.in +++ b/include/shogun/lib/config.h.in @@ -1,116 +1,104 @@ -#cmakedefine MACHINE "@MACHINE@" -#cmakedefine CONFIGURE_OPTIONS "@CONFIGURE_OPTIONS@" -#cmakedefine COMPFLAGS_CPP "@COMPFLAGS_CPP@" -#cmakedefine LINKFLAGS "@LINKFLAGS@" - -#cmakedefine SFMT_MEXP @SFMT_MEXP@ -#cmakedefine DSFMT_MEXP @DSFMT_MEXP@ - -#cmakedefine HAVE_HDF5 1 -#cmakedefine HAVE_CURL 1 -#cmakedefine HAVE_JSON 1 -#cmakedefine HAVE_XML 1 -#cmakedefine HAVE_LARGEFILE 1 -#cmakedefine HAVE_DOXYGEN 1 -#cmakedefine HAVE_LAPACK 1 -#cmakedefine HAVE_MVEC 1 -#cmakedefine HAVE_PROTOBUF 1 - -#cmakedefine HAVE_ARPACK 1 -#cmakedefine HAVE_EIGEN3 1 -#cmakedefine HAVE_CATLAS 1 -#cmakedefine HAVE_ATLAS 1 -#cmakedefine HAVE_NLOPT 1 -#cmakedefine USE_LPSOLVE 1 -#cmakedefine HAVE_PTHREAD 1 -#cmakedefine USE_CPLEX 1 -#cmakedefine HAVE_COLPACK 1 -#cmakedefine HAVE_ARPREC 1 - -#cmakedefine HAVE_POWL 1 -#cmakedefine HAVE_LGAMMAL 1 -#cmakedefine HAVE_SQRTL 1 -#cmakedefine HAVE_LOG2 1 -#cmakedefine USE_LOGCACHE 1 -#cmakedefine USE_LOGSUMARRAY 1 - -/* Define to 1 if you have the declaration of `isfinite', and to 0 if you - don't. */ -#cmakedefine HAVE_DECL_ISFINITE 1 - -/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. */ -#cmakedefine HAVE_DECL_ISINF 1 - -/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. */ -#cmakedefine HAVE_DECL_ISNAN 1 - -/* Define to 1 if you have the `finite' function. */ -#cmakedefine HAVE_FINITE 1 - -/* Define to 1 if you have the `fpclass' function. */ -#cmakedefine HAVE_FPCLASS 1 - -/* Define to 1 if you have the `isfinite' function. */ -#cmakedefine HAVE_ISFINITE 1 - -/* Define to 1 if you have the `isinf' function. */ -#cmakedefine HAVE_ISINF 1 - -/* Define to 1 if you have the `isnan' function. */ -#cmakedefine HAVE_ISNAN 1 - -/* Define to 1 if you have the `std::isfinite' function. */ -#cmakedefine HAVE_STD_ISFINITE 1 - -/* Define to 1 if you have the `std::isinf' function. */ -#cmakedefine HAVE_STD_ISINF 1 - -/* Define to 1 if you have the `std::isnan' function. */ -#cmakedefine HAVE_STD_ISNAN 1 - -#cmakedefine USE_SPINLOCKS 1 -#cmakedefine USE_SHORTREAL_KERNELCACHE 1 -#cmakedefine USE_BIGSTATES 1 - -#cmakedefine USE_HMMDEBUG 1 -#cmakedefine USE_HMMCACHE 1 -#cmakedefine USE_HMMPARALLEL 1 -#cmakedefine USE_HMMPARALLEL_STRUCTURES 1 - -#cmakedefine USE_PATHDEBUG 1 - -#cmakedefine USE_SVMLIGHT 1 -#cmakedefine USE_MOSEK 1 - -#cmakedefine USE_GLPK 1 -#cmakedefine USE_LZO 1 -#cmakedefine USE_GZIP 1 -#cmakedefine USE_BZIP2 1 -#cmakedefine USE_LZMA 1 -#cmakedefine USE_REFERENCE_COUNTING 1 -#cmakedefine USE_SNAPPY 1 - -#cmakedefine HAVE_SSE2 1 -#cmakedefine HAVE_BUILTIN_VECTOR 1 -#cmakedefine OCTAVE_APIVERSION @OCTAVE_APIVERSION@ - -#cmakedefine DARWIN 1 -#cmakedefine FREEBSD 1 -#cmakedefine LINUX 1 - -#cmakedefine USE_SWIG_DIRECTORS 1 -#cmakedefine TRACE_MEMORY_ALLOCS 1 -#cmakedefine USE_JEMALLOC 1 +#cmakedefine SHOGUN_MACHINE_TYPE "@MACHINE@" +#cmakedefine SHOGUN_CONFIGURE_OPTIONS "@SHOGUN_CONFIGURE_OPTIONS@" +#cmakedefine SHOGUN_COMPFLAGS_CPP "@SHOGUN_COMPFLAGS_CPP@" +#cmakedefine SHOGUN_LINKFLAGS "@SHOGUN_LINKFLAGS@" -#cmakedefine NARRAY_LIB "@NARRAY_LIB@" - -#cmakedefine HAVE_CXX0X 1 -#cmakedefine HAVE_CXX11 1 -#cmakedefine HAVE_CXX11_ATOMIC 1 -#cmakedefine HAVE_STD_UNORDERED_MAP 1 +#cmakedefine SHOGUN_SFMT_MEXP @SHOGUN_SFMT_MEXP@ +#cmakedefine SHOGUN_DSFMT_MEXP @SHOGUN_DSFMT_MEXP@ -#cmakedefine HAVE_JBLAS 1 +#cmakedefine SHOGUN_HAVE_HDF5 1 +#cmakedefine SHOGUN_HAVE_CURL 1 +#cmakedefine SHOGUN_HAVE_JSON 1 +#cmakedefine SHOGUN_HAVE_XML 1 +#cmakedefine SHOGUN_HAVE_LARGEFILE 1 +#cmakedefine SHOGUN_HAVE_DOXYGEN 1 +#cmakedefine SHOGUN_HAVE_LAPACK 1 +#cmakedefine SHOGUN_HAVE_MVEC 1 +#cmakedefine SHOGUN_HAVE_PROTOBUF 1 + +#cmakedefine SHOGUN_HAVE_ARPACK 1 +#cmakedefine SHOGUN_HAVE_EIGEN3 1 +#cmakedefine SHOGUN_HAVE_CATLAS 1 +#cmakedefine SHOGUN_HAVE_ATLAS 1 +#cmakedefine SHOGUN_HAVE_NLOPT 1 +#cmakedefine SHOGUN_USE_LPSOLVE 1 +#cmakedefine SHOGUN_HAVE_PTHREAD 1 +#cmakedefine SHOGUN_USE_CPLEX 1 +#cmakedefine SHOGUN_HAVE_COLPACK 1 +#cmakedefine SHOGUN_HAVE_ARPREC 1 + +#cmakedefine SHOGUN_HAVE_POWL 1 +#cmakedefine SHOGUN_HAVE_LGAMMAL 1 +#cmakedefine SHOGUN_HAVE_SQRTL 1 +#cmakedefine SHOGUN_HAVE_LOG2 1 +#cmakedefine SHOGUN_USE_LOGCACHE 1 +#cmakedefine SHOGUN_USE_LOGSUMARRAY 1 + +#cmakedefine SHOGUN_HAVE_CXX_ISFINITE 1 + +#cmakedefine SHOGUN_HAVE_CXX_ISINF 1 + +#cmakedefine SHOGUN_HAVE_CXX_ISNAN 1 + +#cmakedefine SHOGUN_HAVE_FINITE 1 + +#cmakedefine SHOGUN_HAVE_FPCLASS 1 + +#cmakedefine SHOGUN_HAVE_ISFINITE 1 + +#cmakedefine SHOGUN_HAVE_ISINF 1 + +#cmakedefine SHOGUN_HAVE_ISNAN 1 + +#cmakedefine SHOGUN_HAVE_STD_ISFINITE 1 + +#cmakedefine SHOGUN_HAVE_STD_ISINF 1 + +#cmakedefine SHOGUN_HAVE_STD_ISNAN 1 + +#cmakedefine SHOGUN_USE_SPINLOCKS 1 +#cmakedefine SHOGUN_USE_SHORTREAL_KERNELCACHE 1 +#cmakedefine SHOGUN_USE_BIGSTATES 1 + +#cmakedefine SHOGUN_USE_HMMDEBUG 1 +#cmakedefine SHOGUN_USE_HMMCACHE 1 +#cmakedefine SHOGUN_USE_HMMPARALLEL 1 +#cmakedefine SHOGUN_USE_HMMPARALLEL_STRUCTURES 1 + +#cmakedefine SHOGUN_USE_PATHDEBUG 1 + +#cmakedefine SHOGUN_USE_SVMLIGHT 1 +#cmakedefine SHOGUN_USE_MOSEK 1 + +#cmakedefine SHOGUN_USE_GLPK 1 +#cmakedefine SHOGUN_USE_LZO 1 +#cmakedefine SHOGUN_USE_GZIP 1 +#cmakedefine SHOGUN_USE_BZIP2 1 +#cmakedefine SHOGUN_USE_LZMA 1 +#cmakedefine SHOGUN_USE_REFERENCE_COUNTING 1 +#cmakedefine SHOGUN_USE_SNAPPY 1 + +#cmakedefine SHOGUN_HAVE_SSE2 1 +#cmakedefine SHOGUN_HAVE_BUILTIN_VECTOR 1 +#cmakedefine SHOGUN_OCTAVE_APIVERSION @SHOGUN_OCTAVE_APIVERSION@ + +#cmakedefine SHOGUN_OS_DARWIN 1 +#cmakedefine SHOGUN_OS_FREEBSD 1 +#cmakedefine SHOGUN_OS_LINUX 1 + +#cmakedefine SHOGUN_USE_SWIG_DIRECTORS 1 +#cmakedefine SHOGUN_TRACE_MEMORY_ALLOCS 1 +#cmakedefine SHOGUN_USE_JEMALLOC 1 + +#cmakedefine SHOGUN_NARRAY_LIB "@SHOGUN_NARRAY_LIB@" + +#cmakedefine SHOGUN_HAVE_CXX0X 1 +#cmakedefine SHOGUN_HAVE_CXX11 1 +#cmakedefine SHOGUN_HAVE_CXX11_ATOMIC 1 +#cmakedefine SHOGUN_HAVE_STD_UNORDERED_MAP 1 + +#cmakedefine SHOGUN_HAVE_JBLAS 1 /* random related defines */ -#cmakedefine HAVE_ARC4RANDOM 1 -#cmakedefine DEV_RANDOM "@DEV_RANDOM@" +#cmakedefine SHOGUN_HAVE_ARC4RANDOM 1 +#cmakedefine SHOGUN_DEV_RANDOM "@SHOGUN_DEV_RANDOM@" diff --git a/include/shogun/lib/malsar/malsar_clustered.h b/include/shogun/lib/malsar/malsar_clustered.h index 1af15db69af..92f74b2aa80 100644 --- a/include/shogun/lib/malsar/malsar_clustered.h +++ b/include/shogun/lib/malsar/malsar_clustered.h @@ -11,7 +11,7 @@ #ifndef MALSAR_CLUSTERED_H_ #define MALSAR_CLUSTERED_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include diff --git a/include/shogun/lib/malsar/malsar_joint_feature_learning.h b/include/shogun/lib/malsar/malsar_joint_feature_learning.h index 69eedbd91b6..e628f8c4a50 100644 --- a/include/shogun/lib/malsar/malsar_joint_feature_learning.h +++ b/include/shogun/lib/malsar/malsar_joint_feature_learning.h @@ -11,7 +11,7 @@ #ifndef MALSAR_JOINT_FEATURE_LEARNING_H_ #define MALSAR_JOINT_FEATURE_LEARNING_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include diff --git a/include/shogun/lib/malsar/malsar_low_rank.h b/include/shogun/lib/malsar/malsar_low_rank.h index 28af6149918..fba0db00ae3 100644 --- a/include/shogun/lib/malsar/malsar_low_rank.h +++ b/include/shogun/lib/malsar/malsar_low_rank.h @@ -11,7 +11,7 @@ #ifndef MALSAR_LOW_RANK_H_ #define MALSAR_LOW_RANK_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include diff --git a/include/shogun/lib/slep/slep_mc_plain_lr.h b/include/shogun/lib/slep/slep_mc_plain_lr.h index 37533fe8018..c22fcd35d13 100644 --- a/include/shogun/lib/slep/slep_mc_plain_lr.h +++ b/include/shogun/lib/slep/slep_mc_plain_lr.h @@ -10,7 +10,7 @@ #ifndef SLEP_MC_PLAIN_LR_H_ #define SLEP_MC_PLAIN_LR_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -33,5 +33,5 @@ slep_result_t slep_mc_plain_lr( const slep_options& options); }; -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* SLEP_MC_PLAIN_LR_H_ */ diff --git a/include/shogun/lib/slep/slep_mc_tree_lr.h b/include/shogun/lib/slep/slep_mc_tree_lr.h index 1704ebbee6c..1bab7f6c498 100644 --- a/include/shogun/lib/slep/slep_mc_tree_lr.h +++ b/include/shogun/lib/slep/slep_mc_tree_lr.h @@ -10,7 +10,7 @@ #ifndef SLEP_MC_TREE_LR_H_ #define SLEP_MC_TREE_LR_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -33,5 +33,5 @@ slep_result_t slep_mc_tree_lr( const slep_options& options); }; -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* SLEP_MC_TREE_LR_H_ */ diff --git a/include/shogun/lib/tapkee/tapkee_shogun.hpp b/include/shogun/lib/tapkee/tapkee_shogun.hpp index e5235bdcd19..082c0f666b7 100644 --- a/include/shogun/lib/tapkee/tapkee_shogun.hpp +++ b/include/shogun/lib/tapkee/tapkee_shogun.hpp @@ -10,7 +10,7 @@ #ifndef TAPKEE_SHOGUN_ADAPTER #define TAPKEE_SHOGUN_ADAPTER -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include diff --git a/include/shogun/machine/DirectorKernelMachine.h b/include/shogun/machine/DirectorKernelMachine.h index 4ed40d99084..0d9bd124866 100644 --- a/include/shogun/machine/DirectorKernelMachine.h +++ b/include/shogun/machine/DirectorKernelMachine.h @@ -10,7 +10,7 @@ #ifndef _DIRECTORKERNELMACHINE_H___ #define _DIRECTORKERNELMACHINE_H___ -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS #include #include #include @@ -239,5 +239,5 @@ IGNORE_IN_CLASSLIST class CDirectorKernelMachine : public CKernelMachine } -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ #endif /* _DIRECTORKERNELMACHINE_H___ */ diff --git a/include/shogun/machine/DirectorLinearMachine.h b/include/shogun/machine/DirectorLinearMachine.h index b30fe0ffa16..c6aeb935a34 100644 --- a/include/shogun/machine/DirectorLinearMachine.h +++ b/include/shogun/machine/DirectorLinearMachine.h @@ -10,7 +10,7 @@ #ifndef _DIRECTORLINEARMACHINE_H___ #define _DIRECTORLINEARMACHINE_H___ -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS #include #include #include @@ -227,5 +227,5 @@ IGNORE_IN_CLASSLIST class CDirectorLinearMachine : public CLinearMachine } -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ #endif /* _DIRECTORLINEARMACHINE_H___ */ diff --git a/include/shogun/machine/GaussianProcessMachine.h b/include/shogun/machine/GaussianProcessMachine.h index d40e1e4079b..8a66979b2f1 100644 --- a/include/shogun/machine/GaussianProcessMachine.h +++ b/include/shogun/machine/GaussianProcessMachine.h @@ -14,7 +14,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 namespace shogun { @@ -116,5 +116,5 @@ class CGaussianProcessMachine : public CMachine CInferenceMethod* m_method; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _GAUSSIANPROCESSMACHINE_H_ */ diff --git a/include/shogun/machine/gp/EPInferenceMethod.h b/include/shogun/machine/gp/EPInferenceMethod.h index 3c3b7bbd829..1f460e4c676 100644 --- a/include/shogun/machine/gp/EPInferenceMethod.h +++ b/include/shogun/machine/gp/EPInferenceMethod.h @@ -17,7 +17,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -319,5 +319,5 @@ class CEPInferenceMethod : public CInferenceMethod SGMatrix m_F; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _EPINFERENCEMETHOD_H_ */ diff --git a/include/shogun/machine/gp/ExactInferenceMethod.h b/include/shogun/machine/gp/ExactInferenceMethod.h index 77d68625d8b..d93abee8bcc 100644 --- a/include/shogun/machine/gp/ExactInferenceMethod.h +++ b/include/shogun/machine/gp/ExactInferenceMethod.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -232,5 +232,5 @@ class CExactInferenceMethod: public CInferenceMethod SGMatrix m_Q; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* CEXACTINFERENCEMETHOD_H_ */ diff --git a/include/shogun/machine/gp/FITCInferenceMethod.h b/include/shogun/machine/gp/FITCInferenceMethod.h index b7ce154f96c..51d213676ed 100644 --- a/include/shogun/machine/gp/FITCInferenceMethod.h +++ b/include/shogun/machine/gp/FITCInferenceMethod.h @@ -17,7 +17,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -296,5 +296,5 @@ class CFITCInferenceMethod: public CInferenceMethod SGMatrix m_W; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* CFITCINFERENCEMETHOD_H_ */ diff --git a/include/shogun/machine/gp/GaussianLikelihood.h b/include/shogun/machine/gp/GaussianLikelihood.h index e2d648a3f8d..fa990499d9f 100644 --- a/include/shogun/machine/gp/GaussianLikelihood.h +++ b/include/shogun/machine/gp/GaussianLikelihood.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -247,5 +247,5 @@ class CGaussianLikelihood: public CLikelihoodModel float64_t m_sigma; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* CGAUSSIANLIKELIHOOD_H_ */ diff --git a/include/shogun/machine/gp/InferenceMethod.h b/include/shogun/machine/gp/InferenceMethod.h index a633226a08e..f64c8698e39 100644 --- a/include/shogun/machine/gp/InferenceMethod.h +++ b/include/shogun/machine/gp/InferenceMethod.h @@ -15,7 +15,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -450,5 +450,5 @@ class CInferenceMethod : public CDifferentiableFunction SGMatrix m_ktrtr; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* CINFERENCEMETHOD_H_ */ diff --git a/include/shogun/machine/gp/LaplacianInferenceMethod.h b/include/shogun/machine/gp/LaplacianInferenceMethod.h index 37b27c749d9..2b6a6e20467 100644 --- a/include/shogun/machine/gp/LaplacianInferenceMethod.h +++ b/include/shogun/machine/gp/LaplacianInferenceMethod.h @@ -17,7 +17,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -325,5 +325,5 @@ class CLaplacianInferenceMethod: public CInferenceMethod SGVector m_g; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* CLAPLACIANINFERENCEMETHOD_H_ */ diff --git a/include/shogun/machine/gp/LogitLikelihood.h b/include/shogun/machine/gp/LogitLikelihood.h index 7201c522ab7..c3ab9908dce 100644 --- a/include/shogun/machine/gp/LogitLikelihood.h +++ b/include/shogun/machine/gp/LogitLikelihood.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -166,5 +166,5 @@ class CLogitLikelihood : public CLikelihoodModel virtual bool supports_binary() const { return true; } }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _LOGITLIKELIHOOD_H_ */ diff --git a/include/shogun/machine/gp/ProbitLikelihood.h b/include/shogun/machine/gp/ProbitLikelihood.h index e4777508ee3..0185717bd31 100644 --- a/include/shogun/machine/gp/ProbitLikelihood.h +++ b/include/shogun/machine/gp/ProbitLikelihood.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -170,5 +170,5 @@ class CProbitLikelihood : public CLikelihoodModel }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _PROBITLIKELIHOOD_H_ */ diff --git a/include/shogun/machine/gp/StudentsTLikelihood.h b/include/shogun/machine/gp/StudentsTLikelihood.h index d6602a13e9c..9b2c5e67620 100644 --- a/include/shogun/machine/gp/StudentsTLikelihood.h +++ b/include/shogun/machine/gp/StudentsTLikelihood.h @@ -17,7 +17,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -270,5 +270,5 @@ class CStudentsTLikelihood: public CLikelihoodModel float64_t m_df; }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* CSTUDENTSTLIKELIHOOD_H_ */ diff --git a/include/shogun/mathematics/Cplex.h b/include/shogun/mathematics/Cplex.h index ffd3e0b3b37..d859f1236f4 100644 --- a/include/shogun/mathematics/Cplex.h +++ b/include/shogun/mathematics/Cplex.h @@ -13,7 +13,7 @@ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX extern "C" { #include } diff --git a/include/shogun/mathematics/Integration.h b/include/shogun/mathematics/Integration.h index 6e519b50e66..f66ba1e0bc6 100644 --- a/include/shogun/mathematics/Integration.h +++ b/include/shogun/mathematics/Integration.h @@ -20,7 +20,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -183,5 +183,5 @@ class CIntegration : public CSGObject static float64_t evaluate_quadgh64(CFunction* f); }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _INTEGRATION_H_ */ diff --git a/include/shogun/mathematics/JacobiEllipticFunctions.h b/include/shogun/mathematics/JacobiEllipticFunctions.h index cbd3f4a0b70..1f53245341b 100644 --- a/include/shogun/mathematics/JacobiEllipticFunctions.h +++ b/include/shogun/mathematics/JacobiEllipticFunctions.h @@ -23,10 +23,10 @@ #include #include -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC #include #include -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC namespace shogun { @@ -54,23 +54,23 @@ namespace shogun */ class CJacobiEllipticFunctions: public CSGObject { -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC typedef mp_real Real; typedef mp_complex Complex; #else typedef float64_t Real; typedef complex128_t Complex; -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC private: static inline Real compute_quarter_period(Real b) { -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC const Real eps=mp_real::_eps; const Real pi=mp_real::_pi; #else const Real eps=std::numeric_limits::epsilon(); const Real pi=M_PI; -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC Real a=1.0; Real mm=1.0; @@ -114,7 +114,7 @@ class CJacobiEllipticFunctions: public CSGObject static void ellipJC(Complex u, Real m, Complex &sn, Complex &cn, Complex &dn); -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC /** Wrapper method for ellipKKp if ARPREC is present (for high precision) * @param L * @param K the quarter period (to be computed) on the Real axis @@ -149,7 +149,7 @@ class CJacobiEllipticFunctions: public CSGObject dn=complex128_t(dble(_dn.real),dble(_dn.imag)); mp::mp_finalize(); } -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC /** @return object name */ virtual const char* get_name() const diff --git a/include/shogun/mathematics/Math.h b/include/shogun/mathematics/Math.h index f5dd6ad5139..e04d73911ba 100644 --- a/include/shogun/mathematics/Math.h +++ b/include/shogun/mathematics/Math.h @@ -38,7 +38,7 @@ #include #endif -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -263,7 +263,7 @@ class CMath : public CSGObject { //fall back to double precision sqrt if sqrtl is not //available -#ifdef HAVE_SQRTL +#ifdef SHOGUN_HAVE_SQRTL return ::sqrtl(x); #else return ::sqrt(x); @@ -299,7 +299,7 @@ class CMath : public CSGObject { //fall back to double precision pow if powl is not //available -#ifdef HAVE_POWL +#ifdef SHOGUN_HAVE_POWL return ::powl((long double) x, (long double) n); #else return ::pow((double) x, (double) n); @@ -415,11 +415,11 @@ class CMath : public CSGObject static inline float64_t log2(float64_t v) { -#ifdef HAVE_LOG2 +#ifdef SHOGUN_HAVE_LOG2 return ::log2(v); #else return ::log(v)/::log(2.0); -#endif //HAVE_LOG2 +#endif //SHOGUN_HAVE_LOG2 } static inline float64_t log(float64_t v) @@ -1221,7 +1221,7 @@ class CMath : public CSGObject return CMath::LOGRANGE; } -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE /// returns range of logtable inline static uint32_t get_log_accuracy() { @@ -1248,7 +1248,7 @@ class CMath : public CSGObject * log( exp(a) + exp(b)) = a + log (1 + exp (b-a)) where a = max(p,q) * and b min(p,q). */ -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE static inline float64_t logarithmic_sum(float64_t p, float64_t q) { float64_t diff; @@ -1291,7 +1291,7 @@ class CMath : public CSGObject return -diff > LOGRANGE? q : q + log(1 + exp(diff)); } #endif -#ifdef USE_LOGSUMARRAY +#ifdef SHOGUN_USE_LOGSUMARRAY /** sum up a whole array of values in logspace. * This function addresses the numeric instabiliy caused by simply summing up N elements by adding * each of the elements to some variable. Instead array neighbours are summed up until one element remains. @@ -1317,7 +1317,7 @@ class CMath : public CSGObject } return logarithmic_sum_array(p,len%2 + (len>>1)) ; } -#endif //USE_LOGSUMARRAY +#endif // SHOGUN_USE_LOGSUMARRAY //@} /** @return object name */ @@ -1349,7 +1349,7 @@ class CMath : public CSGObject /// random generator seed static uint32_t seed; -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE /// number of steps per integer static int32_t LOGACCURACY; diff --git a/include/shogun/mathematics/Mosek.h b/include/shogun/mathematics/Mosek.h index 93e425848fd..64ad1670eef 100644 --- a/include/shogun/mathematics/Mosek.h +++ b/include/shogun/mathematics/Mosek.h @@ -11,7 +11,7 @@ #ifndef _CMOSEK__H__ #define _CMOSEK__H__ -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK #include #include @@ -181,5 +181,5 @@ class CMosek : public CSGObject } /* namespace shogun */ -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ #endif /* _CMOSEK__H__ */ diff --git a/include/shogun/mathematics/Statistics.h b/include/shogun/mathematics/Statistics.h index 5c4fe187ba5..212d72910cd 100644 --- a/include/shogun/mathematics/Statistics.h +++ b/include/shogun/mathematics/Statistics.h @@ -153,7 +153,7 @@ class CStatistics: public CSGObject static SGVector matrix_std_deviation( SGMatrix values, bool col_wise=true); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** Computes the empirical estimate of the covariance matrix of the given * data which is organized as num_cols variables with num_rows observations. * @@ -173,7 +173,7 @@ class CStatistics: public CSGObject */ static SGMatrix covariance_matrix( SGMatrix observations, bool in_place=false); -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK /** Calculates the sample mean of a given set of samples and also computes * the confidence interval for the actual mean for a given p-value, @@ -271,11 +271,11 @@ class CStatistics: public CSGObject * numbers */ static inline floatmax_t lgammal(floatmax_t x) { -#ifdef HAVE_LGAMMAL +#ifdef SHOGUN_HAVE_LGAMMAL return ::lgammal((long double) x); #else return ::lgamma((double) x); -#endif // HAVE_LGAMMAL +#endif // SHOGUN_HAVE_LGAMMAL } /** @return gamma function of input */ @@ -493,7 +493,7 @@ class CStatistics: public CSGObject */ static SigmoidParamters fit_sigmoid(SGVector scores); -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 /** The log determinant of a dense matrix * * The log determinant of a positive definite symmetric real valued @@ -562,7 +562,7 @@ class CStatistics: public CSGObject */ static SGMatrix sample_from_gaussian(SGVector mean, SGSparseMatrix cov, int32_t N=1, bool precision_matrix=false); -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 protected: diff --git a/include/shogun/mathematics/ajd/ApproxJointDiagonalizer.h b/include/shogun/mathematics/ajd/ApproxJointDiagonalizer.h index 120ac6fe248..d2bde785977 100644 --- a/include/shogun/mathematics/ajd/ApproxJointDiagonalizer.h +++ b/include/shogun/mathematics/ajd/ApproxJointDiagonalizer.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -72,5 +72,5 @@ class CApproxJointDiagonalizer : public CSGObject }; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif //APPROXJOINTDIAGONALIZER_H_ diff --git a/include/shogun/mathematics/ajd/FFDiag.h b/include/shogun/mathematics/ajd/FFDiag.h index 4be25d189cb..86ff49c1bb5 100644 --- a/include/shogun/mathematics/ajd/FFDiag.h +++ b/include/shogun/mathematics/ajd/FFDiag.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -78,5 +78,5 @@ class CFFDiag : public CApproxJointDiagonalizer virtual const char* get_name() const { return "FFDiag"; } }; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif //FFDIAG_H_ diff --git a/include/shogun/mathematics/ajd/JADiag.h b/include/shogun/mathematics/ajd/JADiag.h index 60b678c4016..dc45b38d3eb 100644 --- a/include/shogun/mathematics/ajd/JADiag.h +++ b/include/shogun/mathematics/ajd/JADiag.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -78,5 +78,5 @@ class CJADiag : public CApproxJointDiagonalizer virtual const char* get_name() const { return "JADiag"; } }; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif //JADIAG_H_ diff --git a/include/shogun/mathematics/ajd/JADiagOrth.h b/include/shogun/mathematics/ajd/JADiagOrth.h index f3fd06468f8..4bc497966a5 100644 --- a/include/shogun/mathematics/ajd/JADiagOrth.h +++ b/include/shogun/mathematics/ajd/JADiagOrth.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -78,5 +78,5 @@ class CJADiagOrth : public CApproxJointDiagonalizer virtual const char* get_name() const { return "JADiagOrth"; } }; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif //JADIAGORTH_H_ diff --git a/include/shogun/mathematics/ajd/JediDiag.h b/include/shogun/mathematics/ajd/JediDiag.h index c44d266d520..4c7095c5cb0 100644 --- a/include/shogun/mathematics/ajd/JediDiag.h +++ b/include/shogun/mathematics/ajd/JediDiag.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -77,5 +77,5 @@ class CJediDiag : public CApproxJointDiagonalizer virtual const char* get_name() const { return "JediDiag"; } }; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif //JEDIDIAG_H_ diff --git a/include/shogun/mathematics/ajd/QDiag.h b/include/shogun/mathematics/ajd/QDiag.h index d0fec1368a4..484286e0294 100644 --- a/include/shogun/mathematics/ajd/QDiag.h +++ b/include/shogun/mathematics/ajd/QDiag.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -77,5 +77,5 @@ class CQDiag : public CApproxJointDiagonalizer virtual const char* get_name() const { return "QDiag"; } }; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif //QDIAG_H_ diff --git a/include/shogun/mathematics/ajd/UWedge.h b/include/shogun/mathematics/ajd/UWedge.h index 9800effd2e3..8c75c7734ba 100644 --- a/include/shogun/mathematics/ajd/UWedge.h +++ b/include/shogun/mathematics/ajd/UWedge.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -77,5 +77,5 @@ class CUWedge : public CApproxJointDiagonalizer virtual const char* get_name() const { return "UWedge"; } }; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif //UWEDGE_H_ diff --git a/include/shogun/mathematics/eigen3.h b/include/shogun/mathematics/eigen3.h index 85286bb196f..529766bc047 100644 --- a/include/shogun/mathematics/eigen3.h +++ b/include/shogun/mathematics/eigen3.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 //#define EIGEN_RUNTIME_NO_MALLOC #include #include @@ -84,6 +84,6 @@ template class EigenSparseUtil } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 #endif diff --git a/include/shogun/mathematics/lapack.h b/include/shogun/mathematics/lapack.h index 9685dc06429..23a28fe4e92 100644 --- a/include/shogun/mathematics/lapack.h +++ b/include/shogun/mathematics/lapack.h @@ -17,19 +17,19 @@ #include #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK extern "C" { -#ifdef HAVE_MKL +#ifdef SHOGUN_HAVE_MKL #include #include -#elif defined(HAVE_MVEC) +#elif defined(SHOGUN_HAVE_MVEC) //FIXME: Accelerate framework's vForce.h forward declares // std::complex<> classes that causes major errors // in c++11 mode and Eigen3 // this define basically disables the include of vForce.h -#ifdef HAVE_CXX11 +#ifdef SHOGUN_HAVE_CXX11 #define __VFORCE_H 1 #endif #include @@ -37,11 +37,11 @@ extern "C" { #include #endif -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML #include #endif -#ifdef HAVE_ATLAS +#ifdef SHOGUN_HAVE_ATLAS #include #else // ACML and MKL do not provide clapack_* routines @@ -87,7 +87,7 @@ void wrap_dstemr(char jobz, char range, int n, double* d__, double *e, double vl } // only MKL, ACML and Mac OS vector library provide a header file for the lapack routines -#if !defined(HAVE_ACML) && !defined(HAVE_MKL) && !defined(HAVE_MVEC) +#if !defined(SHOGUN_HAVE_ACML) && !defined(SHOGUN_HAVE_MKL) && !defined(SHOGUN_HAVE_MVEC) // double precision int dsyev_(char*, char*, int*, double*, int*, double*, double*, int*, int*); int dgesvd_(char* jobu, char* jobvt, int* m, int* n, double* a, int* lda, @@ -114,5 +114,5 @@ int dstemr_(char*, char*, int*, double*, double*, double*, double*, int*, #endif } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK #endif //_LAPACK_H__ diff --git a/include/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.h b/include/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.h index 32129dd7a72..306906db3ed 100644 --- a/include/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.h +++ b/include/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -54,5 +54,5 @@ class CDirectEigenSolver : public CEigenSolver } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // DIRECT_EIGEN_SOLVER_H_ diff --git a/include/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.h b/include/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.h index 796a8f2e62b..5b8127ccbbd 100644 --- a/include/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.h +++ b/include/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.h @@ -12,8 +12,8 @@ #include -#ifdef HAVE_LAPACK -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -104,6 +104,6 @@ class CLanczosEigenSolver : public CEigenSolver } -#endif // HAVE_EIGEN3 -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK #endif // LANCZOS_EIGEN_SOLVER_H_ diff --git a/include/shogun/mathematics/linalg/linop/DenseMatrixOperator.h b/include/shogun/mathematics/linalg/linop/DenseMatrixOperator.h index eb29c6fb185..8563cf29f31 100644 --- a/include/shogun/mathematics/linalg/linop/DenseMatrixOperator.h +++ b/include/shogun/mathematics/linalg/linop/DenseMatrixOperator.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -113,5 +113,5 @@ typedef bool supports_complex128_t; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // DENSE_MATRIX_OPERATOR_H_ diff --git a/include/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.h b/include/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.h index c6c7003bf44..bbb7e3024a9 100644 --- a/include/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.h +++ b/include/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -78,5 +78,5 @@ class CCGMShiftedFamilySolver } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // CG_M_SHIFTED_FAMILY_SOLVER_H_ diff --git a/include/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.h b/include/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.h index d54611ee5d5..51a18204928 100644 --- a/include/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.h +++ b/include/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -58,5 +58,5 @@ class CConjugateGradientSolver : public CIterativeLinearSolver -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -64,5 +64,5 @@ class CConjugateOrthogonalCGSolver } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // CONJUGATE_ORTHOGONAL_CG_SOLVER_H_ diff --git a/include/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.h b/include/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.h index 604b54c6ed8..7de0448899f 100644 --- a/include/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.h +++ b/include/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -71,5 +71,5 @@ class CDirectLinearSolverComplex : public CLinearSolver } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // DIRECT_LINEAR_SOLVER_COMPLEX_H_ diff --git a/include/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.h b/include/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.h index 0e804e90c31..0b3dbabfa18 100644 --- a/include/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.h +++ b/include/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -50,5 +50,5 @@ class CDirectSparseLinearSolver : public CLinearSolver } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // DIRECT_SPARSE_LINEAR_SOLVER_H_ diff --git a/include/shogun/mathematics/linalg/linsolver/IterativeSolverIterator.h b/include/shogun/mathematics/linalg/linsolver/IterativeSolverIterator.h index 8fa610498b7..3920971df65 100644 --- a/include/shogun/mathematics/linalg/linsolver/IterativeSolverIterator.h +++ b/include/shogun/mathematics/linalg/linsolver/IterativeSolverIterator.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include using namespace Eigen; @@ -122,5 +122,5 @@ typedef Matrix VectorXt; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // ITERATIVE_SOLVER_ITERATOR_H_ diff --git a/include/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.h b/include/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.h index caac714e96c..51734fe7dc6 100644 --- a/include/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.h +++ b/include/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.h @@ -13,7 +13,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 namespace shogun { @@ -78,5 +78,5 @@ class CIndividualJobResultAggregator : public CStoreVectorAggregator -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -71,5 +71,5 @@ class CDenseExactLogJob : public CIndependentJob } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // DENSE_EXACT_LOG_JOB_H_ diff --git a/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.h b/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.h index 035c5dfe78b..7695683b98a 100644 --- a/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.h +++ b/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -87,5 +87,5 @@ class CRationalApproximationCGMJob : public CIndependentJob } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // RATIONAL_APPROXIMATION_CGM_JOB_H_ diff --git a/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.h b/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.h index 7b8a9d8c1b7..4f66105b660 100644 --- a/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.h +++ b/include/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include namespace shogun @@ -80,5 +80,5 @@ class CRationalApproximationIndividualJob : public CIndependentJob } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // RATIONAL_APPROXIMATION_INDIVIDUAL_JOB_H_ diff --git a/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.h b/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.h index 10ff4153e6f..1902cf4e051 100644 --- a/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.h +++ b/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.h @@ -13,7 +13,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 namespace shogun { @@ -70,5 +70,5 @@ class CDenseMatrixExactLog : public COperatorFunction } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // DENSE_MATRIX_EXACT_LOG_H_ diff --git a/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.h b/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.h index 89f72ef3207..ce5d6312e5e 100644 --- a/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.h +++ b/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.h @@ -13,7 +13,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 namespace shogun { @@ -87,5 +87,5 @@ class CLogRationalApproximationCGM : public CRationalApproximation } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // LOG_RATIONAL_APPROXIMATION_CGM_H_ diff --git a/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.h b/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.h index 06f56052b44..82a4b42b9e8 100644 --- a/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.h +++ b/include/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.h @@ -13,7 +13,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 namespace shogun { @@ -86,5 +86,5 @@ class CLogRationalApproximationIndividual : public CRationalApproximation } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 #endif // LOG_RATIONAL_APPROXIMATION_INDIVIDUAL_H_ diff --git a/include/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.h b/include/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.h index 1e837827aa6..249e970cd86 100644 --- a/include/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.h +++ b/include/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.h @@ -12,8 +12,8 @@ #include -#ifdef HAVE_COLPACK -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_COLPACK +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -127,6 +127,6 @@ class CProbingSampler : public CTraceSampler } -#endif // HAVE_EIGEN3 -#endif // HAVE_COLPACK +#endif // SHOGUN_HAVE_EIGEN3 +#endif // SHOGUN_HAVE_COLPACK #endif // PROBING_SAMPLER_H_ diff --git a/include/shogun/metric/LMNN.h b/include/shogun/metric/LMNN.h index 9cac16291d8..5c21c7484db 100644 --- a/include/shogun/metric/LMNN.h +++ b/include/shogun/metric/LMNN.h @@ -13,8 +13,8 @@ #include -#ifdef HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -297,7 +297,7 @@ class CLMNNStatistics : public CSGObject } /* namespace shogun */ -#endif /* HAVE_LAPACK */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* LMNN_H_ */ diff --git a/include/shogun/metric/LMNNImpl.h b/include/shogun/metric/LMNNImpl.h index b43df6b3b6e..81cccd482a2 100644 --- a/include/shogun/metric/LMNNImpl.h +++ b/include/shogun/metric/LMNNImpl.h @@ -13,8 +13,8 @@ #include -#ifdef HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -158,7 +158,7 @@ class CLMNNImpl #endif /* DOXYGEN_SHOULD_SKIP_THIS */ -#endif /* HAVE_LAPACK */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _LMNNIMPL_H_ */ diff --git a/include/shogun/modelselection/GradientModelSelection.h b/include/shogun/modelselection/GradientModelSelection.h index 7db1e56f1de..4c4bfb6564c 100644 --- a/include/shogun/modelselection/GradientModelSelection.h +++ b/include/shogun/modelselection/GradientModelSelection.h @@ -13,7 +13,7 @@ #include -#ifdef HAVE_NLOPT +#ifdef SHOGUN_HAVE_NLOPT #include #include @@ -101,5 +101,5 @@ class CGradientModelSelection : public CModelSelection float64_t m_grad_tolerance; }; } -#endif /* HAVE_NLOPT */ +#endif /* SHOGUN_HAVE_NLOPT */ #endif /* CGRADIENTMODELSELECTION_H_ */ diff --git a/include/shogun/multiclass/MCLDA.h b/include/shogun/multiclass/MCLDA.h index 02c9adf9b9e..b16db5b7986 100644 --- a/include/shogun/multiclass/MCLDA.h +++ b/include/shogun/multiclass/MCLDA.h @@ -16,7 +16,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -187,5 +187,5 @@ class CMCLDA : public CNativeMulticlassMachine }; /* class MCLDA */ } /* namespace shogun */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _MCLDA_H__ */ diff --git a/include/shogun/multiclass/MulticlassLogisticRegression.h b/include/shogun/multiclass/MulticlassLogisticRegression.h index 41377d05295..0af7ae144a1 100644 --- a/include/shogun/multiclass/MulticlassLogisticRegression.h +++ b/include/shogun/multiclass/MulticlassLogisticRegression.h @@ -11,7 +11,7 @@ #ifndef MULTICLASSLOGISTICREGRESSION_H_ #define MULTICLASSLOGISTICREGRESSION_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -111,5 +111,5 @@ class CMulticlassLogisticRegression : public CLinearMulticlassMachine }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif diff --git a/include/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.h b/include/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.h index f6a3aae5165..a50aca3a17b 100644 --- a/include/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.h +++ b/include/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.h @@ -11,7 +11,7 @@ #ifndef MULTICLASSTREEGUIDEDLOGISTICREGRESSION_H_ #define MULTICLASSTREEGUIDEDLOGISTICREGRESSION_H_ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -133,5 +133,5 @@ class CMulticlassTreeGuidedLogisticRegression : public CLinearMulticlassMachine }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif diff --git a/include/shogun/multiclass/QDA.h b/include/shogun/multiclass/QDA.h index fe5b00dc4a2..dbe7fb7ac1f 100644 --- a/include/shogun/multiclass/QDA.h +++ b/include/shogun/multiclass/QDA.h @@ -13,7 +13,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -189,5 +189,5 @@ class CQDA : public CNativeMulticlassMachine }; /* class QDA */ } /* namespace shogun */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _QDA_H__ */ diff --git a/include/shogun/multiclass/ScatterSVM.h b/include/shogun/multiclass/ScatterSVM.h index 2aeca7da7f0..1d463cefedd 100644 --- a/include/shogun/multiclass/ScatterSVM.h +++ b/include/shogun/multiclass/ScatterSVM.h @@ -26,10 +26,10 @@ namespace shogun { /// no bias w/ libsvm NO_BIAS_LIBSVM, -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT /// no bias w/ svmlight NO_BIAS_SVMLIGHT, -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT /// training with bias using test rule 1 TEST_RULE1, /// training with bias using test rule 2 @@ -106,9 +106,9 @@ class CScatterSVM : public CMulticlassSVM private: void compute_norm_wc(); virtual bool train_no_bias_libsvm(); -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT virtual bool train_no_bias_svmlight(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT virtual bool train_testrule12(); protected: diff --git a/include/shogun/multiclass/ecoc/ECOCIHDDecoder.h b/include/shogun/multiclass/ecoc/ECOCIHDDecoder.h index a3ca871d7cd..8b483e38cf8 100644 --- a/include/shogun/multiclass/ecoc/ECOCIHDDecoder.h +++ b/include/shogun/multiclass/ecoc/ECOCIHDDecoder.h @@ -10,7 +10,7 @@ #ifndef ECOCIHDDECODER_H__ #define ECOCIHDDECODER_H__ -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include @@ -59,6 +59,6 @@ class CECOCIHDDecoder: public CECOCDecoder } // namespace shogun -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif /* end of include guard: ECOCIHDDECODER_H__ */ diff --git a/include/shogun/preprocessor/KernelPCA.h b/include/shogun/preprocessor/KernelPCA.h index 12dd7963472..87293592330 100644 --- a/include/shogun/preprocessor/KernelPCA.h +++ b/include/shogun/preprocessor/KernelPCA.h @@ -11,7 +11,7 @@ #ifndef KERNELPCA_H__ #define KERNELPCA_H__ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include diff --git a/include/shogun/preprocessor/PCA.h b/include/shogun/preprocessor/PCA.h index 4f79fd60ebe..7252fd998af 100644 --- a/include/shogun/preprocessor/PCA.h +++ b/include/shogun/preprocessor/PCA.h @@ -13,7 +13,7 @@ #ifndef PCA_H_ #define PCA_H_ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include diff --git a/include/shogun/regression/GaussianProcessRegression.h b/include/shogun/regression/GaussianProcessRegression.h index 425d0ee17c1..f0671ac6e6f 100644 --- a/include/shogun/regression/GaussianProcessRegression.h +++ b/include/shogun/regression/GaussianProcessRegression.h @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -103,5 +103,5 @@ class CGaussianProcessRegression : public CGaussianProcessMachine } }; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ #endif /* _GAUSSIANPROCESSREGRESSION_H_ */ diff --git a/include/shogun/regression/KernelRidgeRegression.h b/include/shogun/regression/KernelRidgeRegression.h index 766750a328b..8deb1931b0d 100644 --- a/include/shogun/regression/KernelRidgeRegression.h +++ b/include/shogun/regression/KernelRidgeRegression.h @@ -15,7 +15,7 @@ #include #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include @@ -158,5 +158,5 @@ class CKernelRidgeRegression : public CKernelMachine }; } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif // _KERNELRIDGEREGRESSION_H__ diff --git a/include/shogun/regression/LeastAngleRegression.h b/include/shogun/regression/LeastAngleRegression.h index c21a340433a..bb70edf18a4 100644 --- a/include/shogun/regression/LeastAngleRegression.h +++ b/include/shogun/regression/LeastAngleRegression.h @@ -13,7 +13,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -207,5 +207,5 @@ class CLeastAngleRegression: public CLinearMachine } // namespace shogun -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif // LEASTANGLEREGRESSION_H__ diff --git a/include/shogun/regression/LeastSquaresRegression.h b/include/shogun/regression/LeastSquaresRegression.h index 2adb6b240a4..4d8689fe5d7 100644 --- a/include/shogun/regression/LeastSquaresRegression.h +++ b/include/shogun/regression/LeastSquaresRegression.h @@ -14,7 +14,7 @@ #include #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include @@ -70,5 +70,5 @@ class CLeastSquaresRegression : public CLinearRidgeRegression void init(); }; } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif // _LEASTSQUARESREGRESSION_H__ diff --git a/include/shogun/regression/LinearRidgeRegression.h b/include/shogun/regression/LinearRidgeRegression.h index ff2df27730b..3fa8837adc8 100644 --- a/include/shogun/regression/LinearRidgeRegression.h +++ b/include/shogun/regression/LinearRidgeRegression.h @@ -12,7 +12,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -108,5 +108,5 @@ class CLinearRidgeRegression : public CLinearMachine float64_t m_tau; }; } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif // _LINEARRIDGEREGRESSION_H__ diff --git a/include/shogun/regression/svr/LibLinearRegression.h b/include/shogun/regression/svr/LibLinearRegression.h index f8df79cc145..1b8f8a93b6d 100644 --- a/include/shogun/regression/svr/LibLinearRegression.h +++ b/include/shogun/regression/svr/LibLinearRegression.h @@ -10,7 +10,7 @@ #ifndef _REGRESSIONLIBLINEAR_H___ #define _REGRESSIONLIBLINEAR_H___ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include @@ -172,5 +172,5 @@ class CLibLinearRegression : public CLinearMachine LIBLINEAR_REGRESSION_TYPE m_liblinear_regression_type; }; } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ #endif diff --git a/include/shogun/regression/svr/SVRLight.h b/include/shogun/regression/svr/SVRLight.h index fb958b568c5..d47751cd3e2 100644 --- a/include/shogun/regression/svr/SVRLight.h +++ b/include/shogun/regression/svr/SVRLight.h @@ -14,11 +14,11 @@ #include #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT namespace shogun { /** @brief Class SVRLight, performs support vector regression using SVMLight. @@ -237,5 +237,5 @@ class CSVRLight: public CSVMLight int32_t num_vectors; }; } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #endif diff --git a/include/shogun/statistics/MMDKernelSelectionComb.h b/include/shogun/statistics/MMDKernelSelectionComb.h index d5ebca64f4c..77e2f3d963c 100644 --- a/include/shogun/statistics/MMDKernelSelectionComb.h +++ b/include/shogun/statistics/MMDKernelSelectionComb.h @@ -42,7 +42,7 @@ class CMMDKernelSelectionComb: public CMMDKernelSelection /** Destructor */ virtual ~CMMDKernelSelectionComb(); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** Abstract method that computes weights of the selected combined kernel. * * @return weights of the selected kernel @@ -82,7 +82,7 @@ class CMMDKernelSelectionComb: public CMMDKernelSelection */ virtual SGVector solve_optimization(SGVector mmds); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** return pointer to i-th column of m_Q. Helper for libqp */ static const float64_t* get_Q_col(uint32_t i); diff --git a/include/shogun/statistics/MMDKernelSelectionCombMaxL2.h b/include/shogun/statistics/MMDKernelSelectionCombMaxL2.h index 00ba8cd03c5..482b7cbbe40 100644 --- a/include/shogun/statistics/MMDKernelSelectionCombMaxL2.h +++ b/include/shogun/statistics/MMDKernelSelectionCombMaxL2.h @@ -54,7 +54,7 @@ class CMMDKernelSelectionCombMaxL2: public CMMDKernelSelectionComb /** Destructor */ virtual ~CMMDKernelSelectionCombMaxL2(); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** Computes kernel weights which maximise the MMD of the underlying * combined kernel using L2-regularization. * diff --git a/include/shogun/statistics/MMDKernelSelectionCombOpt.h b/include/shogun/statistics/MMDKernelSelectionCombOpt.h index 278de90e184..1c3d9deda92 100644 --- a/include/shogun/statistics/MMDKernelSelectionCombOpt.h +++ b/include/shogun/statistics/MMDKernelSelectionCombOpt.h @@ -56,7 +56,7 @@ class CMMDKernelSelectionCombOpt: public CMMDKernelSelectionComb /** Destructor */ virtual ~CMMDKernelSelectionCombOpt(); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** Computes optimal kernel weights using the ratio of the squared MMD by its * standard deviation as a criterion, where both expressions are estimated * in linear time. diff --git a/include/shogun/statistics/QuadraticTimeMMD.h b/include/shogun/statistics/QuadraticTimeMMD.h index 03a838a40f4..1c285686b51 100644 --- a/include/shogun/statistics/QuadraticTimeMMD.h +++ b/include/shogun/statistics/QuadraticTimeMMD.h @@ -179,7 +179,7 @@ class CQuadraticTimeMMD : public CKernelTwoSampleTestStatistic return S_QUADRATIC_TIME_MMD; } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_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) @@ -204,7 +204,7 @@ class CQuadraticTimeMMD : public CKernelTwoSampleTestStatistic */ SGVector sample_null_spectrum(index_t num_samples, index_t num_eigenvalues); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK /** setter for number of samples to use in spectrum based p-value * computation. diff --git a/include/shogun/structure/BeliefPropagation.h b/include/shogun/structure/BeliefPropagation.h index 97cfa6cd03a..0de7fed38f2 100644 --- a/include/shogun/structure/BeliefPropagation.h +++ b/include/shogun/structure/BeliefPropagation.h @@ -18,7 +18,7 @@ #include #include -#ifdef HAVE_STD_UNORDERED_MAP +#ifdef SHOGUN_HAVE_STD_UNORDERED_MAP #include #else #include @@ -103,7 +103,7 @@ IGNORE_IN_CLASSLIST class CBeliefPropagation : public CMAPInferImpl */ IGNORE_IN_CLASSLIST class CTreeMaxProduct : public CBeliefPropagation { -#ifdef HAVE_STD_UNORDERED_MAP +#ifdef SHOGUN_HAVE_STD_UNORDERED_MAP typedef std::unordered_map msg_map_type; typedef std::unordered_map > msgset_map_type; typedef std::unordered_multimap var_factor_map_type; diff --git a/include/shogun/structure/CCSOSVM.h b/include/shogun/structure/CCSOSVM.h index 4753f8244bc..72f3f3daad4 100644 --- a/include/shogun/structure/CCSOSVM.h +++ b/include/shogun/structure/CCSOSVM.h @@ -15,7 +15,7 @@ #include #include -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK #include #endif @@ -214,7 +214,7 @@ namespace shogun /** QP solver type */ EQPType m_qp_type; -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK /** Mosek environment */ MSKenv_t m_msk_env; #endif diff --git a/include/shogun/structure/DirectorStructuredModel.h b/include/shogun/structure/DirectorStructuredModel.h index 10e8a268b02..cde33a0bb93 100644 --- a/include/shogun/structure/DirectorStructuredModel.h +++ b/include/shogun/structure/DirectorStructuredModel.h @@ -10,7 +10,7 @@ #ifndef DIRECTOR_STRUCTURED_MODEL_H_ #define DIRECTOR_STRUCTURED_MODEL_H_ -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS #include #include namespace shogun @@ -113,5 +113,5 @@ IGNORE_IN_CLASSLIST class CDirectorStructuredModel : public CStructuredModel }; /* class CDirectorStructuredModel */ } /* namespace shogun */ -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ #endif /* DIRECTOR_STRUCTURED_MODEL_H_ */ diff --git a/include/shogun/structure/DynProg.h b/include/shogun/structure/DynProg.h index 75ebac15cd4..d8e6faa47b4 100644 --- a/include/shogun/structure/DynProg.h +++ b/include/shogun/structure/DynProg.h @@ -44,7 +44,7 @@ namespace shogun //#define DYNPROG_TIMING -#ifdef USE_BIGSTATES +#ifdef SHOGUN_USE_BIGSTATES typedef uint16_t T_STATES ; #else typedef uint8_t T_STATES ; diff --git a/include/shogun/structure/PrimalMosekSOSVM.h b/include/shogun/structure/PrimalMosekSOSVM.h index d44bd90a7bf..05293759d9c 100644 --- a/include/shogun/structure/PrimalMosekSOSVM.h +++ b/include/shogun/structure/PrimalMosekSOSVM.h @@ -11,7 +11,7 @@ #ifndef _PRIMAL_MOSEK_SOSVM__H__ #define _PRIMAL_MOSEK_SOSVM__H__ -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK #include #include @@ -145,5 +145,5 @@ class CPrimalMosekSOSVM : public CLinearStructuredOutputMachine } /* namespace shogun */ -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ #endif /* _PRIMAL_MOSEK_SOSVM__H__ */ diff --git a/include/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.h b/include/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.h index 7552726667a..078ade0eebb 100644 --- a/include/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.h +++ b/include/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.h @@ -11,7 +11,7 @@ #ifndef _DOMAINADAPTATIONMULTICLASSLIBLINEAR_H___ #define _DOMAINADAPTATIONMULTICLASSLIBLINEAR_H___ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include namespace shogun @@ -100,5 +100,5 @@ class CDomainAdaptationMulticlassLibLinear : public CMulticlassLibLinear CLinearMulticlassMachine* m_source_machine; }; } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ #endif diff --git a/include/shogun/transfer/domain_adaptation/DomainAdaptationSVM.h b/include/shogun/transfer/domain_adaptation/DomainAdaptationSVM.h index 05c65161a51..48d2c3ec4d2 100644 --- a/include/shogun/transfer/domain_adaptation/DomainAdaptationSVM.h +++ b/include/shogun/transfer/domain_adaptation/DomainAdaptationSVM.h @@ -8,7 +8,7 @@ * Copyright (C) 2007-2011 Max-Planck-Society */ -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #ifndef _DomainAdaptation_SVM_H___ #define _DomainAdaptation_SVM_H___ @@ -122,4 +122,4 @@ class CDomainAdaptationSVM : public CSVMLight }; } #endif //_DomainAdaptation_SVM_H___ -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT diff --git a/include/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.h b/include/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.h index b3b79934624..0c86896021a 100644 --- a/include/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.h +++ b/include/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.h @@ -19,7 +19,7 @@ namespace shogun { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** @brief class DomainAdaptationSVMLinear */ class CDomainAdaptationSVMLinear : public CLibLinear @@ -146,7 +146,7 @@ class CDomainAdaptationSVMLinear : public CLibLinear }; -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK } /* namespace shogun */ diff --git a/include/shogun/transfer/multitask/LibLinearMTL.h b/include/shogun/transfer/multitask/LibLinearMTL.h index 05d492a491f..c0011e2a9eb 100644 --- a/include/shogun/transfer/multitask/LibLinearMTL.h +++ b/include/shogun/transfer/multitask/LibLinearMTL.h @@ -26,7 +26,7 @@ namespace shogun { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /** @brief mapped sparse matrix for @@ -350,7 +350,7 @@ class CLibLinearMTL : public CLinearMachine }; -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK } /* namespace shogun */ diff --git a/include/shogun/ui/GUICommands.h b/include/shogun/ui/GUICommands.h index 400de1e4d7d..36e0764f9d2 100644 --- a/include/shogun/ui/GUICommands.h +++ b/include/shogun/ui/GUICommands.h @@ -150,9 +150,9 @@ #define N_DEL_LAST_KERNEL "del_last_kernel" #define N_CLEAN_KERNEL "clean_kernel" -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #define N_RESIZE_KERNEL_CACHE "resize_kernel_cache" -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #define N_SET_KERNEL_OPTIMIZATION_TYPE "set_kernel_optimization_type" #define N_SET_PRIOR_PROBS "set_prior_probs" diff --git a/include/shogun/ui/GUIKernel.h b/include/shogun/ui/GUIKernel.h index 773ef57b9fb..c837f7a5696 100644 --- a/include/shogun/ui/GUIKernel.h +++ b/include/shogun/ui/GUIKernel.h @@ -55,10 +55,10 @@ class CGUIKernel : public CSGObject bool save_kernel(char* filename); /** clean/r kernel */ bool clean_kernel(); -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT /** resize kernel cache */ bool resize_kernel_cache(int32_t size); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT /** set optimization type */ bool set_optimization_type(char* opt_type); /** precompute subkernels */ diff --git a/include/shogun/ui/SGInterface.h b/include/shogun/ui/SGInterface.h index 642118a0520..44366c342ef 100644 --- a/include/shogun/ui/SGInterface.h +++ b/include/shogun/ui/SGInterface.h @@ -211,10 +211,10 @@ class CSGInterface : public CSGObject bool cmd_set_prior_probs(); /** set Salzberg prior probs from labels */ bool cmd_set_prior_probs_from_labels(); -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT /** resize kernel cache */ bool cmd_resize_kernel_cache(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT /** set distance */ diff --git a/src/interfaces/cmdline_static/CmdLineInterface.cpp b/src/interfaces/cmdline_static/CmdLineInterface.cpp index 7cc96f16bb5..2ee24514508 100644 --- a/src/interfaces/cmdline_static/CmdLineInterface.cpp +++ b/src/interfaces/cmdline_static/CmdLineInterface.cpp @@ -7,7 +7,7 @@ #include #include -#ifdef HAVE_READLINE +#ifdef SHOGUN_HAVE_READLINE #include #include #endif @@ -548,7 +548,7 @@ char* CCmdLineInterface::get_line(FILE* infile, bool interactive_mode) if (feof(infile)) return NULL; -#ifdef HAVE_READLINE +#ifdef SHOGUN_HAVE_READLINE if (interactive_mode) { in=readline("\033[1;34mshogun\033[0m >> "); @@ -593,7 +593,7 @@ bool CCmdLineInterface::parse_line(char* line) } } -#ifdef HAVE_READLINE +#ifdef SHOGUN_HAVE_READLINE char* command_generator(const char *text, int state) { static int list_index, len; @@ -643,14 +643,14 @@ char** shogun_completion (const char *text, int start, int end) return (matches); } -#endif //HAVE_READLINE +#endif //SHOGUN_HAVE_READLINE int main(int argc, char* argv[]) { -#ifdef HAVE_READLINE +#ifdef SHOGUN_HAVE_READLINE rl_readline_name = "shogun"; rl_attempted_completion_function = shogun_completion; -#endif //HAVE_READLINE +#endif //SHOGUN_HAVE_READLINE init_shogun(&cmdline_print_message, &cmdline_print_warning, &cmdline_print_error, &cmdline_cancel_computations); diff --git a/src/interfaces/elwms_static/elwms.cpp b/src/interfaces/elwms_static/elwms.cpp index fbcd9cf4ff0..e5229c23365 100644 --- a/src/interfaces/elwms_static/elwms.cpp +++ b/src/interfaces/elwms_static/elwms.cpp @@ -1,15 +1,15 @@ -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON #include "../python_static/PythonInterface.cpp" #endif -#ifdef HAVE_MATLAB +#ifdef SHOGUN_HAVE_MATLAB #include "../matlab_static/MatlabInterface.cpp" #endif -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE #include "../octave_static/OctaveInterface.cpp" #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R #include "../r_static/RInterface.cpp" #endif diff --git a/src/interfaces/java_modular/swig_typemaps.i b/src/interfaces/java_modular/swig_typemaps.i index 46927535b32..3a727900168 100644 --- a/src/interfaces/java_modular/swig_typemaps.i +++ b/src/interfaces/java_modular/swig_typemaps.i @@ -10,7 +10,7 @@ %include -#ifdef HAVE_JBLAS +#ifdef SHOGUN_HAVE_JBLAS %pragma(java) jniclassimports=%{ import org.jblas.*; %} @@ -19,7 +19,7 @@ import java.io.Serializable; import org.jblas.*; %} #else -#ifdef HAVE_UJMP +#ifdef SHOGUN_HAVE_UJMP %pragma(java) jniclassimports=%{ import org.ujmp.core.*; import org.ujmp.core.doublematrix.impl.DefaultDenseDoubleMatrix2D; @@ -43,7 +43,7 @@ import org.ujmp.core.booleanmatrix.impl.DefaultDenseBooleanMatrix2D; #endif #endif /* One dimensional input/output arrays */ -#ifdef HAVE_JBLAS +#ifdef SHOGUN_HAVE_JBLAS /* Two dimensional input/output arrays */ %define TYPEMAP_SGVECTOR(SGTYPE, JTYPE, JAVATYPE, JNITYPE, TOARRAY, CLASSDESC, CONSTRUCTOR) @@ -164,7 +164,7 @@ TYPEMAP_SGVECTOR(float64_t, double, Double, jdouble, "()[D", "org/jblas/DoubleMa #undef TYPEMAP_SGVECTOR #else -#ifdef HAVE_UJMP +#ifdef SHOGUN_HAVE_UJMP /* Two dimensional input/output arrays */ %define TYPEMAP_SGVECTOR(SGTYPE, JTYPE, JAVATYPE, JNITYPE, TOARRAYMETHOD, TOARRAYDESC, CLASSDESC, CONSTRUCTOR) @@ -395,7 +395,7 @@ TYPEMAP_SGVECTOR_REF(float64_t, double, Double, jdouble, "toDoubleArray", "()[[D #endif #endif -#ifdef HAVE_JBLAS +#ifdef SHOGUN_HAVE_JBLAS /* Two dimensional input/output arrays */ %define TYPEMAP_SGMATRIX(SGTYPE, JTYPE, JAVATYPE, JNITYPE, TOARRAY, CLASSDESC, CONSTRUCTOR) @@ -507,7 +507,7 @@ TYPEMAP_SGMATRIX(float64_t, double, Double, jdouble, "()[D", "org/jblas/DoubleMa #undef TYPEMAP_SGMATRIX #else -#ifdef HAVE_UJMP +#ifdef SHOGUN_HAVE_UJMP /* Two dimensional input/output arrays */ %define TYPEMAP_SGMATRIX(SGTYPE, JTYPE, JAVATYPE, JNITYPE, TOARRAYMETHOD, TOARRAYDESC, CLASSDESC, CONSTRUCTOR) diff --git a/src/interfaces/matlab_static/MatlabInterface.cpp b/src/interfaces/matlab_static/MatlabInterface.cpp index 83a1bf99b72..22b1a3ac2c4 100644 --- a/src/interfaces/matlab_static/MatlabInterface.cpp +++ b/src/interfaces/matlab_static/MatlabInterface.cpp @@ -12,15 +12,15 @@ #include #include -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON #include "../python/PythonInterface.h" #endif -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE #include "../octave/OctaveInterface.h" #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R #include "../r/RInterface.h" #endif @@ -628,7 +628,7 @@ void CMatlabInterface::set_arg_increment(mxArray* mx_arg) // bool CMatlabInterface::cmd_run_python() { -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON return CPythonInterface::run_python_helper(this); #else return false; @@ -637,7 +637,7 @@ bool CMatlabInterface::cmd_run_python() bool CMatlabInterface::cmd_run_octave() { -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE return COctaveInterface::run_octave_helper(this); #else return false; @@ -646,7 +646,7 @@ bool CMatlabInterface::cmd_run_octave() bool CMatlabInterface::cmd_run_r() { -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R return CRInterface::run_r_helper(this); #else return false; @@ -666,13 +666,13 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) &matlab_print_error, &matlab_cancel_computations); interface=new CMatlabInterface(nlhs, plhs, nrhs, prhs); -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON CPythonInterface::run_python_init(); #endif -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE COctaveInterface::run_octave_init(); #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R CRInterface::run_r_init(); #endif } diff --git a/src/interfaces/modular/Classifier.i b/src/interfaces/modular/Classifier.i index 941a1a826d8..41a7050ebf0 100644 --- a/src/interfaces/modular/Classifier.i +++ b/src/interfaces/modular/Classifier.i @@ -9,13 +9,13 @@ * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON %feature("autodoc", "get_w(self) -> [] of float") get_w; %feature("autodoc", "get_support_vectors(self) -> [] of int") get_support_vectors; %feature("autodoc", "get_alphas(self) -> [] of float") get_alphas; #endif -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %feature("director") shogun::CDirectorLinearMachine; %feature("director") shogun::CDirectorKernelMachine; %feature("director:except") { @@ -44,7 +44,7 @@ %rename(Perceptron) CPerceptron; %rename(AveragedPerceptron) CAveragedPerceptron; %rename(NewtonSVM) CNewtonSVM; -#ifndef HAVE_PYTHON +#ifndef SHOGUN_HAVE_PYTHON %rename(SVM) CSVM; #endif %rename(SVMLin) CSVMLin; @@ -57,10 +57,10 @@ %rename(MKLClassification) CMKLClassification; %rename(MKLOneClass) CMKLOneClass; %rename(VowpalWabbit) CVowpalWabbit; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT %rename(SVMLight) CSVMLight; %rename(SVMLightOneClass) CSVMLightOneClass; -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT %rename(FeatureBlockLogisticRegression) CFeatureBlockLogisticRegression; %rename(DirectorLinearMachine) CDirectorLinearMachine; %rename(DirectorKernelMachine) CDirectorKernelMachine; @@ -109,7 +109,7 @@ %include %include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT %ignore VERSION; %ignore VERSION_DATE; @@ -122,4 +122,4 @@ %include %include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT diff --git a/src/interfaces/modular/Classifier_includes.i b/src/interfaces/modular/Classifier_includes.i index 3eaab941ff2..35f071c3d85 100644 --- a/src/interfaces/modular/Classifier_includes.i +++ b/src/interfaces/modular/Classifier_includes.i @@ -30,10 +30,10 @@ #include #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #include #include #include diff --git a/src/interfaces/modular/Clustering.i b/src/interfaces/modular/Clustering.i index e37ea04578d..20074f996f2 100644 --- a/src/interfaces/modular/Clustering.i +++ b/src/interfaces/modular/Clustering.i @@ -8,7 +8,7 @@ * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON %feature("autodoc", "get_radi(self) -> numpy 1dim array of float") get_radi; %feature("autodoc", "get_centers(self) -> numpy 2dim array of float") get_centers; %feature("autodoc", "get_merge_distance(self) -> [] of float") get_merge_distance; diff --git a/src/interfaces/modular/Distance.i b/src/interfaces/modular/Distance.i index cb378442222..65cd9fe1d53 100644 --- a/src/interfaces/modular/Distance.i +++ b/src/interfaces/modular/Distance.i @@ -8,11 +8,11 @@ * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON %feature("autodoc", "get_distance_matrix(self) -> numpy 2dim array of float") get_distance_matrix; #endif -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %feature("director") shogun::CDirectorDistance; %feature("director:except") { if ($error != NULL) { @@ -54,16 +54,16 @@ %include namespace shogun { -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(DenseCharDistance) CDenseDistance; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(DenseWordDistance) CDenseDistance; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(DenseIntDistance) CDenseDistance; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(DenseRealDistance) CDenseDistance; #endif @@ -73,16 +73,16 @@ namespace shogun %include namespace shogun { -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(SparseCharDistance) CSparseDistance; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(SparseWordDistance) CSparseDistance; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(SparseIntDistance) CSparseDistance; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(SparseRealDistance) CSparseDistance; #endif } @@ -91,19 +91,19 @@ namespace shogun %include namespace shogun { -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StringCharDistance) CStringDistance; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StringWordDistance) CStringDistance; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StringIntDistance) CStringDistance; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StringUlongDistance) CStringDistance; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StringRealDistance) CStringDistance; #endif } diff --git a/src/interfaces/modular/Distribution.i b/src/interfaces/modular/Distribution.i index f292c56992f..7a38cd05cf0 100644 --- a/src/interfaces/modular/Distribution.i +++ b/src/interfaces/modular/Distribution.i @@ -8,7 +8,7 @@ * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON %feature("autodoc", "get_log_likelihood(self) -> numpy 1dim array of float") get_log_likelihood; %feature("autodoc", "get_histogram(self) -> numpy 1dim array of float") get_histogram; %feature("autodoc", "get_log_transition_probs(self) -> numpy 1dim array of %float") get_log_transition_probs; @@ -24,9 +24,9 @@ %rename(PositionalPWM) CPositionalPWM; %rename(Gaussian) CGaussian; %rename(GMM) CGMM; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 %rename(GaussianDistribution) CGaussianDistribution; -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 /* Include Class Headers to make them visible from within the target language */ %include @@ -37,7 +37,7 @@ %include %include %include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 %include %include -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/interfaces/modular/Distribution_includes.i b/src/interfaces/modular/Distribution_includes.i index a80ee35ac01..77f624749a3 100644 --- a/src/interfaces/modular/Distribution_includes.i +++ b/src/interfaces/modular/Distribution_includes.i @@ -7,8 +7,8 @@ #include #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 %} diff --git a/src/interfaces/modular/Evaluation.i b/src/interfaces/modular/Evaluation.i index 14f0a54e512..3225d9434fb 100644 --- a/src/interfaces/modular/Evaluation.i +++ b/src/interfaces/modular/Evaluation.i @@ -12,7 +12,7 @@ %newobject CGradientEvaluation::evaluate(); %newobject CCrossValidation::evaluate(); -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %feature("director") shogun::CDirectorContingencyTableEvaluation; #endif diff --git a/src/interfaces/modular/Features.i b/src/interfaces/modular/Features.i index fb406018d91..015ce2448da 100644 --- a/src/interfaces/modular/Features.i +++ b/src/interfaces/modular/Features.i @@ -8,7 +8,7 @@ * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON %feature("autodoc", "get_str(self) -> numpy 1dim array of str\n\nUse this instead of get_string() which is not nicely wrapped") get_str; %feature("autodoc", "get_hist(self) -> numpy 1dim array of int") get_hist; %feature("autodoc", "get_fm(self) -> numpy 1dim array of int") get_fm; @@ -22,7 +22,7 @@ %newobject create_merged_copy(CFeatures* other); %newobject copy_subset(SGVector indices); -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %feature("director") shogun::CDirectorDotFeatures; %feature("director:except") { if ($error != NULL) { @@ -104,40 +104,40 @@ PROTOCOLS_DENSELABELS(CRegressionLabels, RegressionLabels, float64_t, "d\0", NPY %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(StringBoolFeatures) CStringFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StringCharFeatures) CStringFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StringByteFeatures) CStringFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(StringShortFeatures) CStringFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StringWordFeatures) CStringFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StringIntFeatures) CStringFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StringUIntFeatures) CStringFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(StringLongFeatures) CStringFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StringUlongFeatures) CStringFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(StringShortRealFeatures) CStringFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StringRealFeatures) CStringFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(StringLongRealFeatures) CStringFeatures; #endif } @@ -146,40 +146,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(StreamingStringBoolFeatures) CStreamingStringFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StreamingStringCharFeatures) CStreamingStringFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StreamingStringByteFeatures) CStreamingStringFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(StreamingStringShortFeatures) CStreamingStringFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StreamingStringWordFeatures) CStreamingStringFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StreamingStringIntFeatures) CStreamingStringFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StreamingStringUIntFeatures) CStreamingStringFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(StreamingStringLongFeatures) CStreamingStringFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StreamingStringUlongFeatures) CStreamingStringFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(StreamingStringShortRealFeatures) CStreamingStringFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StreamingStringRealFeatures) CStreamingStringFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(StreamingStringLongRealFeatures) CStreamingStringFeatures; #endif } @@ -188,40 +188,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(StringFileBoolFeatures) CStringFileFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StringFileCharFeatures) CStringFileFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StringFileByteFeatures) CStringFileFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(StringFileShortFeatures) CStringFileFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StringFileWordFeatures) CStringFileFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StringFileIntFeatures) CStringFileFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StringFileUIntFeatures) CStringFileFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(StringFileLongFeatures) CStringFileFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StringFileUlongFeatures) CStringFileFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(StringFileShortRealFeatures) CStringFileFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StringFileRealFeatures) CStringFileFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(StringFileLongRealFeatures) CStringFileFeatures; #endif } @@ -230,40 +230,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(SparseBoolFeatures) CSparseFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(SparseCharFeatures) CSparseFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(SparseByteFeatures) CSparseFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(SparseShortFeatures) CSparseFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(SparseWordFeatures) CSparseFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(SparseIntFeatures) CSparseFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(SparseUIntFeatures) CSparseFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(SparseLongFeatures) CSparseFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(SparseUlongFeatures) CSparseFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(SparseShortRealFeatures) CSparseFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(SparseRealFeatures) CSparseFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(SparseLongRealFeatures) CSparseFeatures; #endif } @@ -272,40 +272,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(StreamingSparseBoolFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StreamingSparseCharFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StreamingSparseByteFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(StreamingSparseShortFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StreamingSparseWordFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StreamingSparseIntFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StreamingSparseUIntFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(StreamingSparseLongFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StreamingSparseUlongFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(StreamingSparseShortRealFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StreamingSparseRealFeatures) CStreamingSparseFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(StreamingSparseLongRealFeatures) CStreamingSparseFeatures; #endif } @@ -314,72 +314,72 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL // something wrong with git PROTOCOLS_DENSEFEATURES(BoolFeatures, bool, "?\0", NPY_BOOL) %template(BoolFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(BoolFeatures, bool, NPY_BOOL) #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR PROTOCOLS_DENSEFEATURES(CharFeatures, char, "c\0", NPY_STRING) %template(CharFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(CharFeatures, char, NPY_STRING) #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 PROTOCOLS_DENSEFEATURES(ByteFeatures, uint8_t, "B\0", NPY_UINT8) %template(ByteFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(ByteFeatures, uint8_t, NPY_UINT8) #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 PROTOCOLS_DENSEFEATURES(WordFeatures, uint16_t, "H\0", NPY_UINT16) %template(WordFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(WordFeatures, uint16_t, NPY_UINT16) #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 PROTOCOLS_DENSEFEATURES(ShortFeatures, int16_t, "h\0", NPY_INT16) %template(ShortFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(ShortFeatures, int16_t, NPY_INT16) #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 PROTOCOLS_DENSEFEATURES(IntFeatures, int32_t, "i\0", NPY_INT32) %template(IntFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(IntFeatures, int32_t, NPY_INT32) #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 PROTOCOLS_DENSEFEATURES(UIntFeatures, uint32_t, "I\0", NPY_UINT32) %template(UIntFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(UIntFeatures, uint32_t, NPY_UINT32) #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 PROTOCOLS_DENSEFEATURES(LongIntFeatures, int64_t, "l\0", NPY_INT64) %template(LongIntFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(LongIntFeatures, int64_t, NPY_INT64) #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 PROTOCOLS_DENSEFEATURES(ULongIntFeatures, uint64_t, "L\0", NPY_UINT64) %template(ULongIntFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(ULongIntFeatures, uint64_t, NPY_UINT64) #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealFeatures) CDenseFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 PROTOCOLS_DENSEFEATURES(ShortRealFeatures, float32_t, "f\0", NPY_FLOAT32) %template(ShortRealFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(ShortRealFeatures, float32_t, NPY_FLOAT32) #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 PROTOCOLS_DENSEFEATURES(RealFeatures, float64_t, "d\0", NPY_FLOAT64) %template(RealFeatures) CDenseFeatures; EXTEND_DENSEFEATURES(RealFeatures, float64_t, NPY_FLOAT64) @@ -390,40 +390,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(StreamingBoolFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StreamingCharFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StreamingByteFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StreamingWordFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(StreamingShortFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StreamingIntFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StreamingUIntFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(StreamingLongIntFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StreamingULongIntFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(StreamingLongRealFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(StreamingShortRealFeatures) CStreamingDenseFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StreamingRealFeatures) CStreamingDenseFeatures; #endif } @@ -439,40 +439,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealSubsetFeatures) CDenseSubsetFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealSubsetFeatures) CDenseSubsetFeatures; #endif } @@ -515,40 +515,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealMatrixFeatures) CMatrixFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealMatrixFeatures) CMatrixFeatures; #endif } diff --git a/src/interfaces/modular/GaussianProcess.i b/src/interfaces/modular/GaussianProcess.i index 2ce16c79b98..87d38a43c23 100644 --- a/src/interfaces/modular/GaussianProcess.i +++ b/src/interfaces/modular/GaussianProcess.i @@ -8,7 +8,7 @@ */ /* Remove C Prefix */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 %rename(MeanFunction) CMeanFunction; %rename(ZeroMean) CZeroMean; @@ -28,12 +28,12 @@ %rename(GaussianProcessBinaryClassification) CGaussianProcessBinaryClassification; %rename(GaussianProcessRegression) CGaussianProcessRegression; -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 /* These functions return new Objects */ /* Include Class Headers to make them visible from within the target language */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 %include %include %include @@ -57,4 +57,4 @@ %include %include -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/interfaces/modular/GaussianProcess_includes.i b/src/interfaces/modular/GaussianProcess_includes.i index 4ea92456119..8b33b405c6e 100644 --- a/src/interfaces/modular/GaussianProcess_includes.i +++ b/src/interfaces/modular/GaussianProcess_includes.i @@ -1,5 +1,5 @@ %{ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -24,5 +24,5 @@ #include #include #include -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 %} diff --git a/src/interfaces/modular/IO.i b/src/interfaces/modular/IO.i index 3bef2eaade7..8ab8adfcb14 100644 --- a/src/interfaces/modular/IO.i +++ b/src/interfaces/modular/IO.i @@ -38,40 +38,40 @@ %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(StreamingFileFromSparseBoolFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StreamingFileFromSparseCharFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StreamingFileFromSparseByteFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(StreamingFileFromSparseShortFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StreamingFileFromSparseWordFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StreamingFileFromSparseIntFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StreamingFileFromSparseUIntFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(StreamingFileFromSparseLongFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StreamingFileFromSparseUlongFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(StreamingFileFromSparseShortRealFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StreamingFileFromSparseRealFeatures) CStreamingFileFromSparseFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(StreamingFileFromSparseLongRealFeatures) CStreamingFileFromSparseFeatures; #endif } @@ -80,40 +80,40 @@ namespace shogun %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(StreamingFileFromBoolFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StreamingFileFromCharFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StreamingFileFromByteFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(StreamingFileFromShortFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StreamingFileFromWordFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(StreamingFileFromIntFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StreamingFileFromUIntFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(StreamingFileFromLongFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StreamingFileFromUlongFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(StreamingFileFromShortRealFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StreamingFileFromRealFeatures) CStreamingFileFromDenseFeatures; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(StreamingFileFromLongRealFeatures) CStreamingFileFromDenseFeatures; #endif } diff --git a/src/interfaces/modular/Kernel.i b/src/interfaces/modular/Kernel.i index df5db06d8a8..c1398dffd4a 100644 --- a/src/interfaces/modular/Kernel.i +++ b/src/interfaces/modular/Kernel.i @@ -7,14 +7,14 @@ * Written (W) 2009 Soeren Sonnenburg * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON %feature("autodoc", "get_kernel_matrix(self) -> numpy 2dim array of float") get_kernel_matrix; %feature("autodoc", "get_POIM2(self) -> [] of float") get_POIM2; #endif %ignore CWeightedDegreePositionStringKernel::set_position_weights(float64_t*); -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %feature("director") shogun::CDirectorKernel; %feature("director:except") { if ($error != NULL) { @@ -112,10 +112,10 @@ PROTOCOLS_CUSTOMKERNEL(CustomKernel, float32_t, "f\0", NPY_FLOAT32) %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(SparseRealKernel) CSparseKernel; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(SparseWordKernel) CSparseKernel; #endif } @@ -124,25 +124,25 @@ namespace shogun %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(StringRealKernel) CStringKernel; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StringWordKernel) CStringKernel; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StringCharKernel) CStringKernel; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(StringIntKernel) CStringKernel; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StringUlongKernel) CStringKernel; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StringShortKernel) CStringKernel; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StringByteKernel) CStringKernel; #endif } diff --git a/src/interfaces/modular/Latent.i b/src/interfaces/modular/Latent.i index ba65ff09af2..31631c69281 100644 --- a/src/interfaces/modular/Latent.i +++ b/src/interfaces/modular/Latent.i @@ -8,7 +8,7 @@ * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %feature("director") shogun::CDirectorLatentModel; #endif diff --git a/src/interfaces/modular/Library.i b/src/interfaces/modular/Library.i index 36f74b45b18..ac0f2b93163 100644 --- a/src/interfaces/modular/Library.i +++ b/src/interfaces/modular/Library.i @@ -53,156 +53,156 @@ %include namespace shogun { -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolSparseVector) SGSparseVector; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharSparseVector) SGSparseVector; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteSparseVector) SGSparseVector; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordSparseVector) SGSparseVector; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortSparseVector) SGSparseVector; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntSparseVector) SGSparseVector; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntSparseVector) SGSparseVector; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntSparseVector) SGSparseVector; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntSparseVector) SGSparseVector; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealSparseVector) SGSparseVector; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealSparseVector) SGSparseVector; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealSparseVector) SGSparseVector; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %template(ComplexSparseVector) SGSparseVector; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %template(ComplexSparseMatrix) SGSparseMatrix; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolStringList) SGStringList; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharStringList) SGStringList; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteStringList) SGStringList; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordStringList) SGStringList; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortStringList) SGStringList; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntStringList) SGStringList; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntStringList) SGStringList; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntStringList) SGStringList; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntStringList) SGStringList; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealStringList) SGStringList; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealStringList) SGStringList; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealStringList) SGStringList; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolString) SGString; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharString) SGString; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteString) SGString; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordString) SGString; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortString) SGString; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntString) SGString; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntString) SGString; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntString) SGString; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntString) SGString; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealString) SGString; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealString) SGString; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealString) SGString; #endif @@ -211,128 +211,128 @@ namespace shogun %ignore SGVector::operator+; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL PROTOCOLS_SGVECTOR(BoolVector, bool, "?\0", NPY_BOOL) %template(BoolVector) SGVector; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR PROTOCOLS_SGVECTOR(CharVector, char, "c\0", NPY_STRING) %template(CharVector) SGVector; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 PROTOCOLS_SGVECTOR(ByteVector, uint8_t, "B\0", NPY_UINT8) %template(ByteVector) SGVector; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 PROTOCOLS_SGVECTOR(WordVector, uint16_t, "H\0", NPY_UINT16) %template(WordVector) SGVector; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 PROTOCOLS_SGVECTOR(ShortVector, int16_t, "h\0", NPY_INT16) %template(ShortVector) SGVector; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 PROTOCOLS_SGVECTOR(IntVector, int32_t, "i\0", NPY_INT32) %template(IntVector) SGVector; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 PROTOCOLS_SGVECTOR(LongIntVector, int64_t, "l\0", NPY_INT64) %template(LongIntVector) SGVector; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 PROTOCOLS_SGVECTOR(ULongIntVector, int64_t, "L\0", NPY_UINT64) %template(ULongIntVector) SGVector; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 PROTOCOLS_SGVECTOR(ShortRealVector, float32_t, "f\0", NPY_FLOAT32) %template(ShortRealVector) SGVector; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 PROTOCOLS_SGVECTOR(RealVector, float64_t, "d\0", NPY_FLOAT64) %template(RealVector) SGVector; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealVector) SGVector; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 PROTOCOLS_SGVECTOR(ComplexVector, complex128_t, "d\0", NPY_CDOUBLE) %template(ComplexVector) SGVector; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolMatrix) SGMatrix; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharMatrix) SGMatrix; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteMatrix) SGMatrix; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordMatrix) SGMatrix; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortMatrix) SGMatrix; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntMatrix) SGMatrix; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntMatrix) SGMatrix; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntMatrix) SGMatrix; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntMatrix) SGMatrix; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealMatrix) SGMatrix; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealMatrix) SGMatrix; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealMatrix) SGMatrix; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %template(ComplexMatrix) SGMatrix; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(BoolNDArray) SGNDArray; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharNDArray) SGNDArray; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordNDArray) SGNDArray; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ByteNDArray) SGNDArray; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortNDArray) SGNDArray; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(IntNDArray) SGNDArray; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(UIntNDArray) SGNDArray; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(LongIntNDArray) SGNDArray; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ULongIntNDArray) SGNDArray; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ShortRealNDArray) SGNDArray; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealNDArray) SGNDArray; #endif -#ifdef USE_FLOATMAX +#ifdef SHOGUN_USE_FLOATMAX %template(LongRealNDArray) SGNDArray; #endif } @@ -344,34 +344,34 @@ namespace shogun %include namespace shogun { -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(DynamicCharArray) CDynamicArray; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(DynamicByteArray) CDynamicArray; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(DynamicShortArray) CDynamicArray; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(DynamicWordArray) CDynamicArray; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(DynamicIntArray) CDynamicArray; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(DynamicUIntArray) CDynamicArray; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(DynamicLongArray) CDynamicArray; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(DynamicULongArray) CDynamicArray; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(DynamicShortRealArray) CDynamicArray; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(DynamicRealArray) CDynamicArray; #endif %template(DynamicPlifArray) DynArray; @@ -423,37 +423,37 @@ namespace shogun %include namespace shogun { -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(ScalarCharResult) CScalarResult; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(ScalarBoolResult) CScalarResult; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(ScalarByteResult) CScalarResult; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ScalarShortResult) CScalarResult; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(ScalarWordResult) CScalarResult; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(ScalarIntResult) CScalarResult; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(ScalarUIntResult) CScalarResult; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(ScalarLongResult) CScalarResult; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(ScalarULongResult) CScalarResult; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(ScalarShortRealResult) CScalarResult; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(ScalarRealResult) CScalarResult; #endif } @@ -461,37 +461,37 @@ namespace shogun %include namespace shogun { -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(VectorCharResult) CVectorResult; #endif -#ifdef USE_BOOL +#ifdef SHOGUN_USE_BOOL %template(VectorBoolResult) CVectorResult; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(VectorByteResult) CVectorResult; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(VectorShortResult) CVectorResult; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(VectorWordResult) CVectorResult; #endif -#ifdef USE_INT32 +#ifdef SHOGUN_USE_INT32 %template(VectorIntResult) CVectorResult; #endif -#ifdef USE_UINT32 +#ifdef SHOGUN_USE_UINT32 %template(VectorUIntResult) CVectorResult; #endif -#ifdef USE_INT64 +#ifdef SHOGUN_USE_INT64 %template(VectorLongResult) CVectorResult; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(VectorULongResult) CVectorResult; #endif -#ifdef USE_FLOAT32 +#ifdef SHOGUN_USE_FLOAT32 %template(VectorShortRealResult) CVectorResult; #endif -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(VectorRealResult) CVectorResult; #endif } diff --git a/src/interfaces/modular/Machine.i b/src/interfaces/modular/Machine.i index e682a5026c6..af739f75b68 100644 --- a/src/interfaces/modular/Machine.i +++ b/src/interfaces/modular/Machine.i @@ -86,27 +86,27 @@ APPLY_BINARY(CLinearMachine); APPLY_BINARY(CKernelMachine); APPLY_BINARY(CWDSVMOcas); APPLY_BINARY(CPluginEstimate); -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 APPLY_BINARY(CGaussianProcessBinaryClassification); -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 APPLY_REGRESSION(CLibSVR); APPLY_REGRESSION(CSVRLight); APPLY_REGRESSION(CMKLRegression); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK APPLY_REGRESSION(CKernelRidgeRegression); APPLY_REGRESSION(CLinearRidgeRegression); APPLY_REGRESSION(CLeastSquaresRegression); APPLY_REGRESSION(CLeastAngleRegression); #endif -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 APPLY_REGRESSION(CGaussianProcessRegression); -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 APPLY_STRUCTURED(CStructuredOutputMachine); APPLY_STRUCTURED(CLinearStructuredOutputMachine); APPLY_STRUCTURED(CKernelStructuredOutputMachine); -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK APPLY_STRUCTURED(CPrimalMosekSOSVM); #endif APPLY_STRUCTURED(CDualLibQPBMSOSVM); @@ -127,7 +127,7 @@ APPLY_LATENT(CLatentSVM); %rename(apply_generic) CSVRLight::apply(CFeatures* data=NULL); %rename(apply_generic) CLibSVR::apply(CFeatures* data=NULL); %rename(apply_generic) CMKLRegression::apply(CFeatures* data=NULL); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK %rename(apply_generic) CKernelRidgeRegression::apply(CFeatures* data=NULL); %rename(apply_generic) CLinearRidgeRegression::apply(CFeatures* data=NULL); %rename(apply_generic) CLeastSquaresRegression::apply(CFeatures* data=NULL); @@ -138,7 +138,7 @@ APPLY_LATENT(CLatentSVM); %rename(apply_generic) CStructuredOutputMachine::apply(CFeatures* data=NULL); %rename(apply_generic) CLinearStructuredOutputMachine::apply(CFeatures* data=NULL); %rename(apply_generic) CKernelStructuredOutputMachine::apply(CFeatures* data=NULL); -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK %rename(apply_generic) CPrimalMosekSOSVM::apply(CFeatures* data=NULL); #endif diff --git a/src/interfaces/modular/Mathematics.i b/src/interfaces/modular/Mathematics.i index dad3b787592..b2fe172b593 100644 --- a/src/interfaces/modular/Mathematics.i +++ b/src/interfaces/modular/Mathematics.i @@ -16,7 +16,7 @@ /* Log-det framework */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 /* Trace samplers */ %rename(TraceSampler) CTraceSampler; %rename(NormalSampler) CNormalSampler; @@ -26,10 +26,10 @@ %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealLinearOperator) CLinearOperator; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %template(ComplexLinearOperator) CLinearOperator; #endif } @@ -37,10 +37,10 @@ namespace shogun %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealMatrixOperator) CMatrixOperator; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %template(ComplexMatrixOperator) CMatrixOperator; #endif } @@ -48,10 +48,10 @@ namespace shogun %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealSparseMatrixOperator) CSparseMatrixOperator; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %template(ComplexSparseMatrixOperator) CSparseMatrixOperator; #endif } @@ -59,10 +59,10 @@ namespace shogun %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealDenseMatrixOperator) CDenseMatrixOperator; #endif -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %template(ComplexDenseMatrixOperator) CDenseMatrixOperator; #endif } @@ -71,7 +71,7 @@ namespace shogun %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealOperatorFunction) COperatorFunction; #endif } @@ -84,26 +84,26 @@ namespace shogun %include namespace shogun { -#if defined(USE_FLOAT64) +#if defined(SHOGUN_USE_FLOAT64) %template(RealLinearSolver) CLinearSolver; #endif -#if defined(USE_FLOAT64) && defined(USE_COMPLEX128) +#if defined(SHOGUN_USE_FLOAT64) && defined(SHOGUN_USE_COMPLEX128) %template(ComplexRealLinearSolver) CLinearSolver; #endif } %rename(DirectSparseLinearSolver) CDirectSparseLinearSolver; -#ifdef USE_COMPLEX128 +#ifdef SHOGUN_USE_COMPLEX128 %rename(DirectLinearSolverComplex) CDirectLinearSolverComplex; #endif %include namespace shogun { -#if defined(USE_FLOAT64) +#if defined(SHOGUN_USE_FLOAT64) %template(RealIterativeLinearSolver) CIterativeLinearSolver; #endif -#if defined(USE_FLOAT64) && defined(USE_COMPLEX128) +#if defined(SHOGUN_USE_FLOAT64) && defined(SHOGUN_USE_COMPLEX128) %template(ComplexRealIterativeLinearSolver) CIterativeLinearSolver; #endif } @@ -114,7 +114,7 @@ namespace shogun %include namespace shogun { -#if defined(USE_FLOAT64) && defined(USE_COMPLEX128) +#if defined(SHOGUN_USE_FLOAT64) && defined(SHOGUN_USE_COMPLEX128) %template(RealComplexIterativeShiftedLinearSolver) CIterativeShiftedLinearFamilySolver; #endif } @@ -125,7 +125,7 @@ namespace shogun %rename(LanczosEigenSolver) CLanczosEigenSolver; %rename(LogDetEstimator) CLogDetEstimator; -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 /* Include Class Headers to make them visible from within the target language */ %include diff --git a/src/interfaces/modular/Preprocessor.i b/src/interfaces/modular/Preprocessor.i index 2728578e899..497b9d3009d 100644 --- a/src/interfaces/modular/Preprocessor.i +++ b/src/interfaces/modular/Preprocessor.i @@ -37,22 +37,22 @@ %include namespace shogun { -#ifdef USE_FLOAT64 +#ifdef SHOGUN_USE_FLOAT64 %template(RealPreprocessor) CDensePreprocessor; #endif -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(UlongPreprocessor) CDensePreprocessor; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(WordPreprocessor) CDensePreprocessor; #endif -#ifdef USE_INT16 +#ifdef SHOGUN_USE_INT16 %template(ShortPreprocessor) CDensePreprocessor; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(BytePreprocessor) CDensePreprocessor; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(CharPreprocessor) CDensePreprocessor; #endif } @@ -64,16 +64,16 @@ namespace shogun %include namespace shogun { -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(StringUlongPreprocessor) CStringPreprocessor; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(StringWordPreprocessor) CStringPreprocessor; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(StringBytePreprocessor) CStringPreprocessor; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(StringCharPreprocessor) CStringPreprocessor; #endif } @@ -82,16 +82,16 @@ namespace shogun %include namespace shogun { -#ifdef USE_UINT64 +#ifdef SHOGUN_USE_UINT64 %template(DecompressUlongString) CDecompressString; #endif -#ifdef USE_UINT16 +#ifdef SHOGUN_USE_UINT16 %template(DecompressWordString) CDecompressString; #endif -#ifdef USE_UINT8 +#ifdef SHOGUN_USE_UINT8 %template(DecompressByteString) CDecompressString; #endif -#ifdef USE_CHAR +#ifdef SHOGUN_USE_CHAR %template(DecompressCharString) CDecompressString; #endif } diff --git a/src/interfaces/modular/Regression.i b/src/interfaces/modular/Regression.i index ab4726eda7c..a5510f706e2 100644 --- a/src/interfaces/modular/Regression.i +++ b/src/interfaces/modular/Regression.i @@ -20,9 +20,9 @@ %rename(MKL) CMKL; %rename(MKLRegression) CMKLRegression; -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT %rename(SVRLight) CSVRLight; -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT /* Include Class Headers to make them visible from within the target language */ @@ -35,6 +35,6 @@ %include %include %include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT %include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT diff --git a/src/interfaces/modular/Regression_includes.i b/src/interfaces/modular/Regression_includes.i index 1aaaa8c0b12..17447bffe00 100644 --- a/src/interfaces/modular/Regression_includes.i +++ b/src/interfaces/modular/Regression_includes.i @@ -13,8 +13,8 @@ #include #include #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT %} diff --git a/src/interfaces/modular/SGBase.i b/src/interfaces/modular/SGBase.i index db6c19c2d2a..fb9c2bf656a 100644 --- a/src/interfaces/modular/SGBase.i +++ b/src/interfaces/modular/SGBase.i @@ -84,7 +84,7 @@ public void readExternal(java.io.ObjectInput in) throws java.io.IOException, jav VALUE cNArray; #include #endif -#if defined(SWIGPERL) && defined(HAVE_PDL) +#if defined(SWIGPERL) && defined(SHOGUN_HAVE_PDL) #ifdef __cplusplus extern "C" { #endif @@ -134,7 +134,7 @@ public void readExternal(java.io.ObjectInput in) throws java.io.IOException, jav using namespace shogun; %} -#if defined (SWIGPERL) && defined(HAVE_PDL) +#if defined (SWIGPERL) && defined(SHOGUN_HAVE_PDL) %header %{ SV* CoreSV; Core* PDL; @@ -143,7 +143,7 @@ public void readExternal(java.io.ObjectInput in) throws java.io.IOException, jav %init %{ -#if defined (SWIGPERL) && defined(HAVE_PDL) +#if defined (SWIGPERL) && defined(SHOGUN_HAVE_PDL) //check Core.xs //Core* PDL_p = pdl__Core_get_Core(); //PDL_COMMENT("Get pointer to structure of core shared C routines") //PDL_COMMENT("make sure PDL::Core is loaded") @@ -275,7 +275,7 @@ public void readExternal(java.io.ObjectInput in) throws java.io.IOException, jav { $action } -#if defined(SWIGPYTHON) && defined(USE_SWIG_DIRECTORS) +#if defined(SWIGPYTHON) && defined(SHOGUN_USE_SWIG_DIRECTORS) catch (Swig::DirectorException &e) { SWIG_fail; @@ -357,7 +357,7 @@ namespace shogun char* fname=tmpnam(NULL); FILE* tmpf=fopen(fname, "w"); CSerializableFile* fstream=NULL; -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 if (pickle_ascii) fstream = new CSerializableAsciiFile(fname, 'w'); else @@ -408,7 +408,7 @@ namespace shogun ASSERT(total==len); CSerializableFile* fstream=NULL; -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 if (pickle_ascii) fstream = new CSerializableAsciiFile(fname, 'r'); else diff --git a/src/interfaces/modular/Structure.i b/src/interfaces/modular/Structure.i index 9fb82f4ed6c..fc9aef4affa 100644 --- a/src/interfaces/modular/Structure.i +++ b/src/interfaces/modular/Structure.i @@ -8,7 +8,7 @@ * Copyright (C) 2009 Fraunhofer Institute FIRST and Max-Planck-Society */ -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %feature("director") shogun::CDirectorStructuredModel; #endif @@ -51,9 +51,9 @@ %rename(KernelStructuredOutputMachine) CKernelStructuredOutputMachine; %rename(DualLibQPBMSOSVM) CDualLibQPBMSOSVM; -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK %rename(PrimalMosekSOSVM) CPrimalMosekSOSVM; -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ %rename(StochasticSOSVM) CStochasticSOSVM; @@ -93,8 +93,8 @@ %include -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK %include -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ %include diff --git a/src/interfaces/modular/Structure_includes.i b/src/interfaces/modular/Structure_includes.i index b5f0cb1c48a..9809a5cba4a 100644 --- a/src/interfaces/modular/Structure_includes.i +++ b/src/interfaces/modular/Structure_includes.i @@ -34,9 +34,9 @@ #include -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK #include -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ #include %} diff --git a/src/interfaces/modular/Transfer.i b/src/interfaces/modular/Transfer.i index a5d098decdf..71160d063e5 100644 --- a/src/interfaces/modular/Transfer.i +++ b/src/interfaces/modular/Transfer.i @@ -32,9 +32,9 @@ %rename(LibLinearMTL) CLibLinearMTL; /* Domain adaptation renames */ -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT %rename(DomainAdaptationSVM) CDomainAdaptationSVM; -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT %rename(DomainAdaptationSVMLinear) CDomainAdaptationSVMLinear; %rename(DomainAdaptationMulticlassLibLinear) CDomainAdaptationMulticlassLibLinear; @@ -62,12 +62,12 @@ %include /* Domain adaptation includes */ -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT %include -#endif // USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT %include %include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SERIALIZABLE_DUMMY(shogun::MappedSparseMatrix); #endif diff --git a/src/interfaces/modular/Transfer_includes.i b/src/interfaces/modular/Transfer_includes.i index e73a52aa322..12bd83bc71d 100644 --- a/src/interfaces/modular/Transfer_includes.i +++ b/src/interfaces/modular/Transfer_includes.i @@ -20,9 +20,9 @@ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include -#endif /* USE_SVMLIGHT */ +#endif /* SHOGUN_USE_SVMLIGHT */ #include #include %} diff --git a/src/interfaces/modular/modshogun.i b/src/interfaces/modular/modshogun.i index 83f8fbd2989..4fbf1b199e0 100644 --- a/src/interfaces/modular/modshogun.i +++ b/src/interfaces/modular/modshogun.i @@ -11,7 +11,7 @@ "The `modshogun` module gathers all modules available in the SHOGUN toolkit." %enddef -#if defined(USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) +#if defined(SHOGUN_USE_SWIG_DIRECTORS) && defined(SWIGPYTHON) %module(directors="1", docstring=DOCSTR) modshogun #else %module(docstring=DOCSTR) modshogun @@ -36,7 +36,7 @@ %feature("python:slot", "bf_getbuffer", functype="getbufferproc") shogun::SGObject::getbuffer;*/ #endif -#ifdef HAVE_DOXYGEN +#ifdef SHOGUN_HAVE_DOXYGEN #ifndef SWIGRUBY %include "modshogun_doxygen.i" #endif diff --git a/src/interfaces/octave_static/OctaveInterface.cpp b/src/interfaces/octave_static/OctaveInterface.cpp index 8971ee24482..d640dbb9359 100644 --- a/src/interfaces/octave_static/OctaveInterface.cpp +++ b/src/interfaces/octave_static/OctaveInterface.cpp @@ -27,11 +27,11 @@ #include #include -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON #include "../python_static/PythonInterface.h" #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R #include "../r_static/RInterface.h" #undef length #endif @@ -583,7 +583,7 @@ void COctaveInterface::set_attribute_struct(const CDynamicArray* at bool COctaveInterface::cmd_run_python() { -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON return CPythonInterface::run_python_helper(this); #else return false; @@ -592,7 +592,7 @@ bool COctaveInterface::cmd_run_python() bool COctaveInterface::cmd_run_r() { -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R return CRInterface::run_r_helper(this); #else return false; @@ -783,7 +783,7 @@ bool COctaveInterface::run_octave_helper(CSGInterface* from_if) return true; } -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS DEFUN_DLD (elwms, prhs, nlhs, "shogun.") #else DEFUN_DLD (sg, prhs, nlhs, "shogun.") @@ -799,10 +799,10 @@ DEFUN_DLD (sg, prhs, nlhs, "shogun.") init_shogun(&octave_print_message, &octave_print_warning, &octave_print_error, &octave_cancel_computations); interface=new COctaveInterface(prhs, nlhs); -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON CPythonInterface::run_python_init(); #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R CRInterface::run_r_init(); #endif } diff --git a/src/interfaces/octave_static/OctaveInterface.h b/src/interfaces/octave_static/OctaveInterface.h index 4812f0b85b2..b8f10eea7e5 100644 --- a/src/interfaces/octave_static/OctaveInterface.h +++ b/src/interfaces/octave_static/OctaveInterface.h @@ -6,10 +6,10 @@ #include -#undef HAVE_STAT +#undef SHOGUN_HAVE_STAT #include -#ifdef HAVE_MATLAB +#ifdef SHOGUN_HAVE_MATLAB #define MXARRAY_H typedef struct mxArray_tag mxArray; #endif diff --git a/src/interfaces/perl_modular/swig_typemaps.i b/src/interfaces/perl_modular/swig_typemaps.i index d7e055f9076..b886ece6f91 100644 --- a/src/interfaces/perl_modular/swig_typemaps.i +++ b/src/interfaces/perl_modular/swig_typemaps.i @@ -9,7 +9,7 @@ * Written (W) 2012 Christian Montanari */ -#ifdef HAVE_PDL +#ifdef SHOGUN_HAVE_PDL %include pdl.i @@ -883,4 +883,4 @@ TYPEMAP_SPARSEFEATURES_OUT(floatmax_t, PDL_LONGDOUBLE) TYPEMAP_SPARSEFEATURES_OUT(SV*, PDL_OBJECT) #undef TYPEMAP_SPARSEFEATURES_OUT -#endif /* HAVE_PDL */ +#endif /* SHOGUN_HAVE_PDL */ diff --git a/src/interfaces/python_modular/swig_typemaps.i b/src/interfaces/python_modular/swig_typemaps.i index 20a55a4b20d..2840105c693 100644 --- a/src/interfaces/python_modular/swig_typemaps.i +++ b/src/interfaces/python_modular/swig_typemaps.i @@ -22,7 +22,7 @@ %include "DenseLabels_protocols.i" %include "SGVector_protocols.i" -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON %{ #include #include @@ -1269,4 +1269,4 @@ TYPEMAP_SPARSEFEATURES_OUT(complex128_t, NPY_CDOUBLE) TYPEMAP_SPARSEFEATURES_OUT(floatmax_t, NPY_LONGDOUBLE) TYPEMAP_SPARSEFEATURES_OUT(PyObject, NPY_OBJECT) #undef TYPEMAP_SPARSEFEATURES_OUT -#endif /* HAVE_PYTHON */ +#endif /* SHOGUN_HAVE_PYTHON */ diff --git a/src/interfaces/python_static/PythonInterface.cpp b/src/interfaces/python_static/PythonInterface.cpp index 917c1c99c90..7fdaa5f6bdb 100644 --- a/src/interfaces/python_static/PythonInterface.cpp +++ b/src/interfaces/python_static/PythonInterface.cpp @@ -8,11 +8,11 @@ #include #include -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE #include "../octave_static/OctaveInterface.h" #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R #include "../r_static/RInterface.h" #endif @@ -879,7 +879,7 @@ bool CPythonInterface::run_python_helper(CSGInterface* from_if) bool CPythonInterface::cmd_run_octave() { -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE return COctaveInterface::run_octave_helper(this); #else return false; @@ -888,7 +888,7 @@ bool CPythonInterface::cmd_run_octave() bool CPythonInterface::cmd_run_r() { -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R return CRInterface::run_r_helper(this); #else return false; @@ -896,7 +896,7 @@ bool CPythonInterface::cmd_run_r() } -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS PyObject* elwms(PyObject* self, PyObject* args) #else PyObject* sg(PyObject* self, PyObject* args) @@ -933,10 +933,10 @@ PyObject* sg(PyObject* self, PyObject* args) void exitsg(void) { SG_SINFO("Quitting...\n"); -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE COctaveInterface::run_octave_exit(); #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R CRInterface::run_r_exit(); #endif exit_shogun(); @@ -944,7 +944,7 @@ void exitsg(void) static PyMethodDef sg_pythonmethods[] = { {(char*) -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS "elwms", elwms, METH_VARARGS, (char*) "Shogun."}, #else "sg", sg, METH_VARARGS, (char*) "Shogun."}, @@ -952,7 +952,7 @@ static PyMethodDef sg_pythonmethods[] = { {NULL, NULL, 0, NULL} /* Sentinel */ }; -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS MOD_INIT(elwms) #else MOD_INIT(sg) @@ -970,7 +970,7 @@ MOD_INIT(sg) Py_AtExit(exitsg); // initialize callbacks -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS MOD_DEF(module, (char*) "elwms", sg_pythonmethods); #else MOD_DEF(module, (char*) "sg", sg_pythonmethods); @@ -979,10 +979,10 @@ MOD_INIT(sg) if (module == NULL) return MOD_ERROR_VAL; -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE COctaveInterface::run_octave_init(); #endif -#ifdef HAVE_R +#ifdef SHOGUN_HAVE_R CRInterface::run_r_init(); #endif init_numpy(); diff --git a/src/interfaces/python_static/PythonInterface.h b/src/interfaces/python_static/PythonInterface.h index b885fe7b485..a48419a16d4 100644 --- a/src/interfaces/python_static/PythonInterface.h +++ b/src/interfaces/python_static/PythonInterface.h @@ -2,7 +2,7 @@ #define __PYTHONINTERFACE__H_ #undef _POSIX_C_SOURCE -#undef HAVE_STAT +#undef SHOGUN_HAVE_STAT extern "C" { #include diff --git a/src/interfaces/r_static/RInterface.cpp b/src/interfaces/r_static/RInterface.cpp index 108245fa557..26f0d83a90e 100644 --- a/src/interfaces/r_static/RInterface.cpp +++ b/src/interfaces/r_static/RInterface.cpp @@ -19,11 +19,11 @@ extern "C" { #include #include -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON #include "../python_static/PythonInterface.h" #endif -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE #include "../octave_static/OctaveInterface.h" #endif @@ -531,7 +531,7 @@ void CRInterface::set_attribute_struct(const CDynamicArray* attrs) bool CRInterface::cmd_run_python() { -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON return CPythonInterface::run_python_helper(this); #else return false; @@ -540,7 +540,7 @@ bool CRInterface::cmd_run_python() bool CRInterface::cmd_run_octave() { -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE return COctaveInterface::run_octave_helper(this); #else return false; @@ -682,7 +682,7 @@ extern "C" { SEXP Rsg(SEXP args); -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS void R_init_elwms(DllInfo *info) #else void R_init_sg(DllInfo *info) @@ -699,7 +699,7 @@ void R_init_sg(DllInfo *info) R_CMethodDef cMethods[] = { {NULL, NULL, 0} }; R_FortranMethodDef fortranMethods[] = { {NULL, NULL, 0} }; -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS R_ExternalMethodDef externalMethods[] = { {"elwms", (void*(*)()) &Rsg, -1}, {NULL, NULL, 0} }; #else R_ExternalMethodDef externalMethods[] = { {"sg", (void*(*)()) &Rsg, -1}, {NULL, NULL, 0} }; @@ -727,10 +727,10 @@ SEXP Rsg(SEXP args) init_shogun(&r_print_message, &r_print_warning, &r_print_error, &r_cancel_computations); interface=new CRInterface(args); -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON CPythonInterface::run_python_init(); #endif -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE COctaveInterface::run_octave_init(); #endif } @@ -762,16 +762,16 @@ SEXP Rsg(SEXP args) /* This method is called form within R when the current module is unregistered. * Note that R does not allow unregistering of single symbols. */ -#ifdef HAVE_ELWMS +#ifdef SHOGUN_HAVE_ELWMS void R_unload_elwms(DllInfo *info) #else void R_unload_sg(DllInfo *info) #endif { -#ifdef HAVE_PYTHON +#ifdef SHOGUN_HAVE_PYTHON CPythonInterface::run_python_exit(); #endif -#ifdef HAVE_OCTAVE +#ifdef SHOGUN_HAVE_OCTAVE COctaveInterface::run_octave_exit(); #endif diff --git a/src/shogun/base/Parallel.cpp b/src/shogun/base/Parallel.cpp index b21893e77ea..9281cca66b0 100644 --- a/src/shogun/base/Parallel.cpp +++ b/src/shogun/base/Parallel.cpp @@ -53,7 +53,7 @@ int32_t Parallel::get_num_cpus() const void Parallel::set_num_threads(int32_t n) { -#ifndef HAVE_PTHREAD +#ifndef SHOGUN_HAVE_PTHREAD ASSERT(n==1) #endif num_threads=n; diff --git a/src/shogun/base/SGRefObject.cpp b/src/shogun/base/SGRefObject.cpp index ef99ae02af4..1c2f1160f77 100644 --- a/src/shogun/base/SGRefObject.cpp +++ b/src/shogun/base/SGRefObject.cpp @@ -40,7 +40,7 @@ SGRefObject::~SGRefObject() delete m_refcount; } -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING int32_t SGRefObject::ref() { int32_t count = m_refcount->ref(); @@ -70,7 +70,7 @@ int32_t SGRefObject::unref() return m_refcount->ref_count(); } } -#endif //USE_REFERENCE_COUNTING +#endif // SHOGUN_USE_REFERENCE_COUNTING #ifdef TRACE_MEMORY_ALLOCS #include diff --git a/src/shogun/base/Version.cpp b/src/shogun/base/Version.cpp index 54c60152183..daaee554367 100644 --- a/src/shogun/base/Version.cpp +++ b/src/shogun/base/Version.cpp @@ -41,23 +41,23 @@ Version::~Version() void Version::print_version() { - SG_SPRINT("libshogun (%s/%s%d)\n\n", MACHINE, VERSION_RELEASE, version_revision) + SG_SPRINT("libshogun (%s/%s%d)\n\n", SHOGUN_MACHINE_TYPE, VERSION_RELEASE, version_revision) SG_SPRINT("Copyright (C) 1999-2009 Fraunhofer Institute FIRST\n") SG_SPRINT("Copyright (C) 1999-2011 Max Planck Society\n") SG_SPRINT("Copyright (C) 2009-2011 Berlin Institute of Technology\n") SG_SPRINT("Copyright (C) 2012 Soeren Sonnenburg, Sergey Lisitsyn, Heiko Strathmann\n") SG_SPRINT("Written (W) 1999-2012 Soeren Sonnenburg, Gunnar Raetsch et al.\n\n") -#ifndef USE_SVMLIGHT +#ifndef SHOGUN_USE_SVMLIGHT SG_SPRINT("This is free software; see the source for copying conditions. There is NO\n") SG_SPRINT("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n") #endif #ifdef LINKFLAGS SG_SPRINT("( configure options: \"%s\" compile flags: \"%s\" link flags: \"%s\" )\n", - CONFIGURE_OPTIONS, COMPFLAGS_CPP, LINKFLAGS) + SHOGUN_CONFIGURE_OPTIONS, SHOGUN_COMPFLAGS_CPP, SHOGUN_LINKFLAGS) #else SG_SPRINT("( configure options: \"%s\" compile flags: \"%s\" link flags: None )\n", - CONFIGURE_OPTIONS, COMPFLAGS_CPP) + SHOGUN_CONFIGURE_OPTIONS, SHOGUN_COMPFLAGS_CPP) #endif } diff --git a/src/shogun/classifier/GaussianProcessBinaryClassification.cpp b/src/shogun/classifier/GaussianProcessBinaryClassification.cpp index 43ead5df103..68d79ab319c 100644 --- a/src/shogun/classifier/GaussianProcessBinaryClassification.cpp +++ b/src/shogun/classifier/GaussianProcessBinaryClassification.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -143,4 +143,4 @@ SGVector CGaussianProcessBinaryClassification::get_probabilities( return p; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/classifier/LDA.cpp b/src/shogun/classifier/LDA.cpp index 4c53f6a7d9e..0af56fe4eac 100644 --- a/src/shogun/classifier/LDA.cpp +++ b/src/shogun/classifier/LDA.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include diff --git a/src/shogun/classifier/LPBoost.cpp b/src/shogun/classifier/LPBoost.cpp index f14751286c2..00db55c7809 100644 --- a/src/shogun/classifier/LPBoost.cpp +++ b/src/shogun/classifier/LPBoost.cpp @@ -10,7 +10,7 @@ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX #include #include diff --git a/src/shogun/classifier/LPM.cpp b/src/shogun/classifier/LPM.cpp index 885f4cbaa5f..850348b773e 100644 --- a/src/shogun/classifier/LPM.cpp +++ b/src/shogun/classifier/LPM.cpp @@ -10,7 +10,7 @@ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX #include #include diff --git a/src/shogun/classifier/mkl/MKL.cpp b/src/shogun/classifier/mkl/MKL.cpp index 0123e8422a8..a32b7fe95a2 100644 --- a/src/shogun/classifier/mkl/MKL.cpp +++ b/src/shogun/classifier/mkl/MKL.cpp @@ -23,12 +23,12 @@ CMKL::CMKL(CSVM* s) : CSVM(), svm(NULL), C_mkl(0), mkl_norm(1), ent_lambda(0), interleaved_optimization(true), w_gap(1.0), rho(0) { set_constraint_generator(s); -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX lp_cplex = NULL ; env = NULL ; #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK lp_glpk = NULL; lp_glpk_parm = NULL; #endif @@ -50,14 +50,14 @@ CMKL::~CMKL() void CMKL::init_solver() { -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX cleanup_cplex(); if (get_solver_type()==ST_CPLEX) init_cplex(); #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK cleanup_glpk(); if (get_solver_type() == ST_GLPK) @@ -65,7 +65,7 @@ void CMKL::init_solver() #endif } -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX bool CMKL::init_cplex() { while (env==NULL) @@ -150,7 +150,7 @@ bool CMKL::cleanup_cplex() } #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK bool CMKL::init_glpk() { lp_glpk = glp_create_prob(); @@ -191,7 +191,7 @@ bool CMKL::check_glp_status(glp_prob *lp) } return true; } -#endif // USE_GLPK +#endif // SHOGUN_USE_GLPK bool CMKL::train_machine(CFeatures* data) { @@ -275,14 +275,14 @@ bool CMKL::train_machine(CFeatures* data) svm->set_labels(m_labels); svm->set_kernel(kernel); -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX cleanup_cplex(); if (get_solver_type()==ST_CPLEX) init_cplex(); #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK if (get_solver_type()==ST_GLPK) init_glpk(); #endif @@ -310,14 +310,14 @@ bool CMKL::train_machine(CFeatures* data) //but if we don't actually unref() the object we might leak memory... //So as a workaround we only unref when the reference count was >1 //before. -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING int32_t refs=this->ref(); #endif svm->set_callback_function(this, perform_mkl_step_helper); svm->train(); SG_DONE() svm->set_callback_function(NULL, NULL); -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING if (refs>1) this->unref(); #endif @@ -349,10 +349,10 @@ bool CMKL::train_machine(CFeatures* data) SG_FREE(sumw); } -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX cleanup_cplex(); #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK cleanup_glpk(); #endif @@ -414,7 +414,7 @@ bool CMKL::perform_mkl_step( ASSERT(nweights==num_kernels) float64_t* beta = SG_MALLOC(float64_t, num_kernels); -#if defined(USE_CPLEX) || defined(USE_GLPK) +#if defined(SHOGUN_USE_CPLEX) || defined(SHOGUN_USE_GLPK) int32_t inner_iters=0; #endif float64_t mkl_objective=0; @@ -448,11 +448,11 @@ bool CMKL::perform_mkl_step( } else if (get_solver_type()==ST_NEWTON) rho=compute_optimal_betas_newton(beta, old_beta, num_kernels, sumw, suma, mkl_objective); -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX else if (get_solver_type()==ST_CPLEX) rho=compute_optimal_betas_via_cplex(beta, old_beta, num_kernels, sumw, suma, inner_iters); #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK else if (get_solver_type()==ST_GLPK) rho=compute_optimal_betas_via_glpk(beta, old_beta, num_kernels, sumw, suma, inner_iters); #endif @@ -984,7 +984,7 @@ float64_t CMKL::compute_optimal_betas_via_cplex(float64_t* new_beta, const float { SG_DEBUG("MKL via CPLEX\n") -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX ASSERT(new_beta) ASSERT(old_beta) @@ -1331,7 +1331,7 @@ float64_t CMKL::compute_optimal_betas_via_glpk(float64_t* beta, const float64_t* SG_ERROR("MKL via GLPK works only for norm=1\n") float64_t obj=1.0; -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK int32_t NUMCOLS = 2*num_kernels + 1 ; if (!lp_initialized) { @@ -1570,7 +1570,7 @@ float64_t CMKL::compute_mkl_dual_objective() return -mkl_obj; } -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX void CMKL::set_qnorm_constraints(float64_t* beta, int32_t num_kernels) { ASSERT(num_kernels>0) @@ -1619,4 +1619,4 @@ void CMKL::set_qnorm_constraints(float64_t* beta, int32_t num_kernels) SG_FREE(lin_term); SG_FREE(ind); } -#endif // USE_CPLEX +#endif // SHOGUN_USE_CPLEX diff --git a/src/shogun/classifier/mkl/MKLClassification.cpp b/src/shogun/classifier/mkl/MKLClassification.cpp index 2b27d7e2fbb..7e3e701533a 100644 --- a/src/shogun/classifier/mkl/MKLClassification.cpp +++ b/src/shogun/classifier/mkl/MKLClassification.cpp @@ -1,7 +1,7 @@ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #include using namespace shogun; @@ -10,9 +10,9 @@ CMKLClassification::CMKLClassification(CSVM* s) : CMKL(s) { if (!s) { -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT s=new CSVMLight(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT if (!s) s=new CLibSVM(); set_svm(s); diff --git a/src/shogun/classifier/mkl/MKLMulticlassGLPK.cpp b/src/shogun/classifier/mkl/MKLMulticlassGLPK.cpp index 2070c6b5aa0..161030306d7 100644 --- a/src/shogun/classifier/mkl/MKLMulticlassGLPK.cpp +++ b/src/shogun/classifier/mkl/MKLMulticlassGLPK.cpp @@ -12,7 +12,7 @@ */ #include -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK #include #endif @@ -22,7 +22,7 @@ using namespace shogun; MKLMulticlassGLPK::MKLMulticlassGLPK() { numkernels = 0; -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK //makes glpk quiet glp_term_out(GLP_OFF); linearproblem=NULL; @@ -30,7 +30,7 @@ MKLMulticlassGLPK::MKLMulticlassGLPK() } MKLMulticlassGLPK::~MKLMulticlassGLPK() { -#if defined(USE_GLPK) +#if defined(SHOGUN_USE_GLPK) if (linearproblem) { glp_delete_prob((glp_prob*) linearproblem); @@ -58,7 +58,7 @@ MKLMulticlassGLPK::MKLMulticlassGLPK(MKLMulticlassGLPK & gl) void MKLMulticlassGLPK::setup(const int32_t numkernels2) { -#if defined(USE_GLPK) +#if defined(SHOGUN_USE_GLPK) numkernels=numkernels2; if (numkernels<=1) { @@ -125,7 +125,7 @@ void MKLMulticlassGLPK::setup(const int32_t numkernels2) void MKLMulticlassGLPK::addconstraint(const ::std::vector & normw2, const float64_t sumofpositivealphas) { -#if defined(USE_GLPK) +#if defined(SHOGUN_USE_GLPK) ASSERT ((int)normw2.size()==numkernels) ASSERT (sumofpositivealphas>=0) @@ -173,7 +173,7 @@ void MKLMulticlassGLPK::addconstraint(const ::std::vector & normw2, void MKLMulticlassGLPK::computeweights(std::vector & weights2) { -#if defined(USE_GLPK) +#if defined(SHOGUN_USE_GLPK) weights2.resize(numkernels); glp_simplex((glp_prob*) linearproblem,NULL); diff --git a/src/shogun/classifier/svm/CPLEXSVM.cpp b/src/shogun/classifier/svm/CPLEXSVM.cpp index a90cb9913a6..81774cee623 100644 --- a/src/shogun/classifier/svm/CPLEXSVM.cpp +++ b/src/shogun/classifier/svm/CPLEXSVM.cpp @@ -11,7 +11,7 @@ #include #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX #include #include #include diff --git a/src/shogun/classifier/svm/NewtonSVM.cpp b/src/shogun/classifier/svm/NewtonSVM.cpp index 678a061d6c6..cfe1ad19a83 100644 --- a/src/shogun/classifier/svm/NewtonSVM.cpp +++ b/src/shogun/classifier/svm/NewtonSVM.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include @@ -395,4 +395,4 @@ void CNewtonSVM::obj_fun_linear(float64_t* weights, float64_t* out, SG_FREE(temp1); SG_FREE(p2); } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK diff --git a/src/shogun/classifier/svm/QPBSVMLib.cpp b/src/shogun/classifier/svm/QPBSVMLib.cpp index 12efa832363..c2bf7fd0aa8 100644 --- a/src/shogun/classifier/svm/QPBSVMLib.cpp +++ b/src/shogun/classifier/svm/QPBSVMLib.cpp @@ -142,7 +142,7 @@ int32_t CQPBSVMLib::solve_qp(float64_t* result, int32_t len) case QPB_SOLVER_PRLOQO: status = qpbsvm_prloqo(result, Nabla, &t, &History, verb ); break; -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX case QPB_SOLVER_CPLEX: status = qpbsvm_cplex(result, Nabla, &t, &History, verb ); #else @@ -647,7 +647,7 @@ int32_t CQPBSVMLib::qpbsvm_gradient_descent(float64_t *x, return 0; } -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX /* -------------------------------------------------------------- Usage: exitflag = qpbsvm_prloqo(m_UB, m_dim, m_tmax, diff --git a/src/shogun/classifier/svm/SVM.cpp b/src/shogun/classifier/svm/SVM.cpp index 71c612a056f..694c6fd6491 100644 --- a/src/shogun/classifier/svm/SVM.cpp +++ b/src/shogun/classifier/svm/SVM.cpp @@ -19,7 +19,7 @@ #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif diff --git a/src/shogun/classifier/svm/SVMLight.cpp b/src/shogun/classifier/svm/SVMLight.cpp index 10f1f9eaac0..19c281b9e74 100644 --- a/src/shogun/classifier/svm/SVMLight.cpp +++ b/src/shogun/classifier/svm/SVMLight.cpp @@ -22,7 +22,7 @@ /***********************************************************************/ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include @@ -42,7 +42,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -1047,7 +1047,7 @@ void CSVMLight::compute_matrices_for_optimization_parallel( chosen, active2dnum, key, a, lin, c, varnum, totdoc, aicache, qp) ; } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { register int32_t ki,kj,i,j; @@ -1456,7 +1456,7 @@ void CSVMLight::update_linear_component( lin[j]+=kernel->compute_optimized(docs[j]); } } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { int32_t num_elem = 0 ; @@ -1630,7 +1630,7 @@ void CSVMLight::update_linear_component_mkl_linadd( for (int32_t i=0; icompute_by_subkernel(i,&W[i*num_kernels]); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { pthread_t* threads = SG_MALLOC(pthread_t, parallel->get_num_threads()-1); @@ -1683,7 +1683,7 @@ void CSVMLight::call_mkl_callback(float64_t* a, int32_t* label, float64_t* lin) float64_t suma=0; float64_t* sumw=SG_MALLOC(float64_t, num_kernels); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK int nk = (int) num_kernels; /* calling external lib */ double* alphay = SG_MALLOC(double, num); @@ -1719,7 +1719,7 @@ void CSVMLight::call_mkl_callback(float64_t* a, int32_t* label, float64_t* lin) const float64_t* new_beta = kernel->get_subkernel_weights(num_kernels); // update lin -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK cblas_dgemv(CblasColMajor, CblasTrans, nk, (int) num, 1.0, (double*) W, nk, (double*) new_beta, 1, 0.0, (double*) lin, 1); #else @@ -2134,7 +2134,7 @@ void CSVMLight::reactivate_inactive_examples( params.end=totdoc; reactivate_inactive_examples_linadd_helper((void*) ¶ms); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { pthread_t* threads = SG_MALLOC(pthread_t, num_threads-1); @@ -2267,7 +2267,7 @@ void CSVMLight::reactivate_inactive_examples( lin[j]+=(a[i]-a_old[i])*aicache[j]*(float64_t)label[i]; } } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { //find number of the changed ones @@ -2535,4 +2535,4 @@ float64_t* CSVMLight::optimize_qp( } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT diff --git a/src/shogun/classifier/svm/SVMLightOneClass.cpp b/src/shogun/classifier/svm/SVMLightOneClass.cpp index 597583176a7..c054801f5c2 100644 --- a/src/shogun/classifier/svm/SVMLightOneClass.cpp +++ b/src/shogun/classifier/svm/SVMLightOneClass.cpp @@ -10,7 +10,7 @@ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include @@ -23,7 +23,7 @@ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX extern "C" { #include } @@ -31,7 +31,7 @@ extern "C" { #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -154,4 +154,4 @@ bool CSVMLightOneClass::train_machine(CFeatures* data) return true ; } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT diff --git a/src/shogun/classifier/svm/WDSVMOcas.cpp b/src/shogun/classifier/svm/WDSVMOcas.cpp index bea65350fdf..98421e1f903 100644 --- a/src/shogun/classifier/svm/WDSVMOcas.cpp +++ b/src/shogun/classifier/svm/WDSVMOcas.cpp @@ -360,7 +360,7 @@ int CWDSVMOcas::add_new_cut( float32_t** cuts=o->cuts; float32_t* new_a=SG_MALLOC(float32_t, nDim); memset(new_a, 0, sizeof(float32_t)*nDim); -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD wdocas_thread_params_add* params_add=SG_MALLOC(wdocas_thread_params_add, o->parallel->get_num_threads()); pthread_t* threads=SG_MALLOC(pthread_t, o->parallel->get_num_threads()); @@ -416,7 +416,7 @@ int CWDSVMOcas::add_new_cut( } SG_FREE(threads); SG_FREE(params_add); -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ for(i=0; i < cut_length; i++) { if (o->use_bias) @@ -541,7 +541,7 @@ void* CWDSVMOcas::compute_output_helper(void* ptr) int CWDSVMOcas::compute_output( float64_t *output, void* ptr ) { -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD CWDSVMOcas* o = (CWDSVMOcas*) ptr; int32_t nData=o->num_vec; wdocas_thread_params_output* params_output=SG_MALLOC(wdocas_thread_params_output, o->parallel->get_num_threads()); @@ -597,7 +597,7 @@ int CWDSVMOcas::compute_output( float64_t *output, void* ptr ) SG_FREE(params_output); SG_FREE(val); SG_FREE(out); -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ return 0; } /*---------------------------------------------------------------------- diff --git a/src/shogun/clustering/GMM.cpp b/src/shogun/clustering/GMM.cpp index 0597395ff40..9970f59ce39 100644 --- a/src/shogun/clustering/GMM.cpp +++ b/src/shogun/clustering/GMM.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include diff --git a/src/shogun/clustering/Hierarchical.cpp b/src/shogun/clustering/Hierarchical.cpp index f1c6f6c76a2..92437a7cd41 100644 --- a/src/shogun/clustering/Hierarchical.cpp +++ b/src/shogun/clustering/Hierarchical.cpp @@ -15,7 +15,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif diff --git a/src/shogun/clustering/KMeans.cpp b/src/shogun/clustering/KMeans.cpp index 7a59a2312a2..7b8e55ff6ff 100644 --- a/src/shogun/clustering/KMeans.cpp +++ b/src/shogun/clustering/KMeans.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif diff --git a/src/shogun/converter/DiffusionMaps.cpp b/src/shogun/converter/DiffusionMaps.cpp index 380874c9da1..cda83a06a08 100644 --- a/src/shogun/converter/DiffusionMaps.cpp +++ b/src/shogun/converter/DiffusionMaps.cpp @@ -11,7 +11,7 @@ #include #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -86,4 +86,4 @@ CDenseFeatures* CDiffusionMaps::embed_distance(CDistance* distance) parameters.distance = distance; return tapkee_embed(parameters); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/FactorAnalysis.cpp b/src/shogun/converter/FactorAnalysis.cpp index c2a410dbc25..15d2bbd8104 100644 --- a/src/shogun/converter/FactorAnalysis.cpp +++ b/src/shogun/converter/FactorAnalysis.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -71,4 +71,4 @@ CFeatures* CFactorAnalysis::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN */ +#endif /* SHOGUN_HAVE_EIGEN */ diff --git a/src/shogun/converter/HessianLocallyLinearEmbedding.cpp b/src/shogun/converter/HessianLocallyLinearEmbedding.cpp index fcb9ef5a979..c99052fd40c 100644 --- a/src/shogun/converter/HessianLocallyLinearEmbedding.cpp +++ b/src/shogun/converter/HessianLocallyLinearEmbedding.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -44,4 +44,4 @@ CFeatures* CHessianLocallyLinearEmbedding::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/Isomap.cpp b/src/shogun/converter/Isomap.cpp index 510680df81f..00594e88f6a 100644 --- a/src/shogun/converter/Isomap.cpp +++ b/src/shogun/converter/Isomap.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -67,4 +67,4 @@ CDenseFeatures* CIsomap::embed_distance(CDistance* distance) return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/KernelLocallyLinearEmbedding.cpp b/src/shogun/converter/KernelLocallyLinearEmbedding.cpp index 14582d38b4c..7aea49a9b06 100644 --- a/src/shogun/converter/KernelLocallyLinearEmbedding.cpp +++ b/src/shogun/converter/KernelLocallyLinearEmbedding.cpp @@ -9,11 +9,11 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -71,4 +71,4 @@ CDenseFeatures* CKernelLocallyLinearEmbedding::embed_kernel(CKernel* return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/LaplacianEigenmaps.cpp b/src/shogun/converter/LaplacianEigenmaps.cpp index d3cf9d708f9..ab9ef4a8fcc 100644 --- a/src/shogun/converter/LaplacianEigenmaps.cpp +++ b/src/shogun/converter/LaplacianEigenmaps.cpp @@ -10,7 +10,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -90,4 +90,4 @@ CDenseFeatures* CLaplacianEigenmaps::embed_distance(CDistance* distan parameters.distance = distance; return tapkee_embed(parameters); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/LinearLocalTangentSpaceAlignment.cpp b/src/shogun/converter/LinearLocalTangentSpaceAlignment.cpp index 226922c377b..1cbbb47e962 100644 --- a/src/shogun/converter/LinearLocalTangentSpaceAlignment.cpp +++ b/src/shogun/converter/LinearLocalTangentSpaceAlignment.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -45,4 +45,4 @@ CFeatures* CLinearLocalTangentSpaceAlignment::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/LocalTangentSpaceAlignment.cpp b/src/shogun/converter/LocalTangentSpaceAlignment.cpp index e14adfe4eeb..e96ebff00f4 100644 --- a/src/shogun/converter/LocalTangentSpaceAlignment.cpp +++ b/src/shogun/converter/LocalTangentSpaceAlignment.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -44,4 +44,4 @@ CFeatures* CLocalTangentSpaceAlignment::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/LocalityPreservingProjections.cpp b/src/shogun/converter/LocalityPreservingProjections.cpp index 99f67e6ad0b..e3a0afe82af 100644 --- a/src/shogun/converter/LocalityPreservingProjections.cpp +++ b/src/shogun/converter/LocalityPreservingProjections.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -44,4 +44,4 @@ CFeatures* CLocalityPreservingProjections::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/LocallyLinearEmbedding.cpp b/src/shogun/converter/LocallyLinearEmbedding.cpp index e278aa0564c..7f861d8e6ec 100644 --- a/src/shogun/converter/LocallyLinearEmbedding.cpp +++ b/src/shogun/converter/LocallyLinearEmbedding.cpp @@ -10,7 +10,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -93,4 +93,4 @@ CFeatures* CLocallyLinearEmbedding::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/ManifoldSculpting.cpp b/src/shogun/converter/ManifoldSculpting.cpp index 013f64140ab..2a71663c1c2 100644 --- a/src/shogun/converter/ManifoldSculpting.cpp +++ b/src/shogun/converter/ManifoldSculpting.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -100,4 +100,4 @@ CFeatures* CManifoldSculpting::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN */ +#endif /* SHOGUN_HAVE_EIGEN */ diff --git a/src/shogun/converter/MultidimensionalScaling.cpp b/src/shogun/converter/MultidimensionalScaling.cpp index fbb7f748a7a..9879e47f994 100644 --- a/src/shogun/converter/MultidimensionalScaling.cpp +++ b/src/shogun/converter/MultidimensionalScaling.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -113,4 +113,4 @@ CFeatures* CMultidimensionalScaling::apply(CFeatures* features) return (CFeatures*)embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/NeighborhoodPreservingEmbedding.cpp b/src/shogun/converter/NeighborhoodPreservingEmbedding.cpp index 4face699bcc..97a608cac56 100644 --- a/src/shogun/converter/NeighborhoodPreservingEmbedding.cpp +++ b/src/shogun/converter/NeighborhoodPreservingEmbedding.cpp @@ -10,7 +10,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -46,4 +46,4 @@ CFeatures* CNeighborhoodPreservingEmbedding::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/StochasticProximityEmbedding.cpp b/src/shogun/converter/StochasticProximityEmbedding.cpp index f87575cd635..9b6637af762 100644 --- a/src/shogun/converter/StochasticProximityEmbedding.cpp +++ b/src/shogun/converter/StochasticProximityEmbedding.cpp @@ -10,7 +10,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -152,4 +152,4 @@ CDenseFeatures< float64_t >* CStochasticProximityEmbedding::embed_distance(CDist return embedding; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/converter/TDistributedStochasticNeighborEmbedding.cpp b/src/shogun/converter/TDistributedStochasticNeighborEmbedding.cpp index d488fc66f94..e7cc8898927 100644 --- a/src/shogun/converter/TDistributedStochasticNeighborEmbedding.cpp +++ b/src/shogun/converter/TDistributedStochasticNeighborEmbedding.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -73,4 +73,4 @@ CFeatures* CTDistributedStochasticNeighborEmbedding::apply(CFeatures* features) return embedding; } -#endif /* HAVE_EIGEN */ +#endif /* SHOGUN_HAVE_EIGEN */ diff --git a/src/shogun/converter/ica/FFSep.cpp b/src/shogun/converter/ica/FFSep.cpp index aedbd8b379a..aa144e4c7e6 100644 --- a/src/shogun/converter/ica/FFSep.cpp +++ b/src/shogun/converter/ica/FFSep.cpp @@ -11,7 +11,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -132,4 +132,4 @@ namespace } }; -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/converter/ica/FastICA.cpp b/src/shogun/converter/ica/FastICA.cpp index c4d7ba11a8e..90668578f3a 100644 --- a/src/shogun/converter/ica/FastICA.cpp +++ b/src/shogun/converter/ica/FastICA.cpp @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -164,4 +164,4 @@ CFeatures* CFastICA::apply(CFeatures* features) return features; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/converter/ica/ICAConverter.cpp b/src/shogun/converter/ica/ICAConverter.cpp index 13a4d40b316..641854b986a 100644 --- a/src/shogun/converter/ica/ICAConverter.cpp +++ b/src/shogun/converter/ica/ICAConverter.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 using namespace shogun; @@ -63,4 +63,4 @@ float64_t CICAConverter::get_tol() const return tol; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/converter/ica/Jade.cpp b/src/shogun/converter/ica/Jade.cpp index e9452009e40..f9c747e5f44 100644 --- a/src/shogun/converter/ica/Jade.cpp +++ b/src/shogun/converter/ica/Jade.cpp @@ -11,7 +11,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -201,4 +201,4 @@ CFeatures* CJade::apply(CFeatures* features) return features; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/converter/ica/JediSep.cpp b/src/shogun/converter/ica/JediSep.cpp index 20f4cdad0ae..ccf4cf6565b 100644 --- a/src/shogun/converter/ica/JediSep.cpp +++ b/src/shogun/converter/ica/JediSep.cpp @@ -11,7 +11,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -132,4 +132,4 @@ namespace } }; -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/converter/ica/SOBI.cpp b/src/shogun/converter/ica/SOBI.cpp index 0880cfa2d1f..f9f46188714 100644 --- a/src/shogun/converter/ica/SOBI.cpp +++ b/src/shogun/converter/ica/SOBI.cpp @@ -11,7 +11,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -140,4 +140,4 @@ namespace return K; } }; -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/converter/ica/UWedgeSep.cpp b/src/shogun/converter/ica/UWedgeSep.cpp index a675edaff9f..f2eec546056 100644 --- a/src/shogun/converter/ica/UWedgeSep.cpp +++ b/src/shogun/converter/ica/UWedgeSep.cpp @@ -11,7 +11,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -132,4 +132,4 @@ namespace } }; -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/distance/CustomMahalanobisDistance.cpp b/src/shogun/distance/CustomMahalanobisDistance.cpp index 830cc9beb85..87554ed821f 100644 --- a/src/shogun/distance/CustomMahalanobisDistance.cpp +++ b/src/shogun/distance/CustomMahalanobisDistance.cpp @@ -8,7 +8,7 @@ * Copyright (C) 2013 Fernando J. Iglesias Garcia */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -74,4 +74,4 @@ float64_t CCustomMahalanobisDistance::compute(int32_t idx_a, int32_t idx_b) return dvec.transpose()*M*dvec; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/distance/Distance.cpp b/src/shogun/distance/Distance.cpp index 60c256e7e06..25dd60d18f2 100644 --- a/src/shogun/distance/Distance.cpp +++ b/src/shogun/distance/Distance.cpp @@ -24,7 +24,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif diff --git a/src/shogun/distance/MahalanobisDistance.cpp b/src/shogun/distance/MahalanobisDistance.cpp index 1a34710fcd9..dd03fb59123 100644 --- a/src/shogun/distance/MahalanobisDistance.cpp +++ b/src/shogun/distance/MahalanobisDistance.cpp @@ -8,7 +8,7 @@ * Copyright (C) 2012 Fernando José Iglesias García */ -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -110,4 +110,4 @@ void CMahalanobisDistance::init() m_parameters->add(&use_mean, "use_mean", "If distance shall be computed between mean vector and vector from rhs or between lhs and rhs."); } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ diff --git a/src/shogun/distributions/Gaussian.cpp b/src/shogun/distributions/Gaussian.cpp index 01061034f8c..eb2061a9afe 100644 --- a/src/shogun/distributions/Gaussian.cpp +++ b/src/shogun/distributions/Gaussian.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -319,4 +319,4 @@ CGaussian* CGaussian::obtain_from_generic(CDistribution* distribution) return casted; } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK diff --git a/src/shogun/distributions/HMM.cpp b/src/shogun/distributions/HMM.cpp index d6fe7343820..ce45cd58c4a 100644 --- a/src/shogun/distributions/HMM.cpp +++ b/src/shogun/distributions/HMM.cpp @@ -163,10 +163,10 @@ CHMM::CHMM() observation_matrix_b=NULL; initial_state_distribution_p=NULL; end_state_distribution_q=NULL; -#ifdef USE_LOGSUMARRAY +#ifdef SHOGUN_USE_LOGSUMARRAY arrayS = NULL; #endif -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES this->alpha_cache=NULL; this->beta_cache=NULL; path_prob_updated = NULL; @@ -184,7 +184,7 @@ CHMM::CHMM() CHMM::CHMM(CHMM* h) : CDistribution(), iterations(150), epsilon(1e-4), conv_it(5) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_INFO("hmm is using %i separate tables\n", parallel->get_num_threads()) #endif @@ -202,7 +202,7 @@ CHMM::CHMM(int32_t p_N, int32_t p_M, Model* p_model, float64_t p_PSEUDO) this->M=p_M; model=NULL ; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_INFO("hmm is using %i separate tables\n", parallel->get_num_threads()) #endif @@ -218,7 +218,7 @@ CHMM::CHMM( this->M=p_M; model=NULL ; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_INFO("hmm is using %i separate tables\n", parallel->get_num_threads()) #endif @@ -248,7 +248,7 @@ CHMM::CHMM(int32_t p_N, float64_t* p, float64_t* q, float64_t* a) this->p_observations=NULL; this->reused_caches=false; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES this->alpha_cache=NULL; this->beta_cache=NULL; #else @@ -301,7 +301,7 @@ CHMM::CHMM( this->p_observations=NULL; this->reused_caches=false; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES this->alpha_cache=NULL; this->beta_cache=NULL; #else @@ -389,7 +389,7 @@ CHMM::CHMM( CHMM::CHMM(FILE* model_file, float64_t p_PSEUDO) : CDistribution(), iterations(150), epsilon(1e-4), conv_it(5) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_INFO("hmm is using %i separate tables\n", parallel->get_num_threads()) #endif @@ -430,7 +430,7 @@ CHMM::~CHMM() if (!reused_caches) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES if (mem_initialized) { for (int32_t i=0; iget_num_threads(); i++) @@ -445,19 +445,19 @@ CHMM::~CHMM() SG_FREE(beta_cache); alpha_cache=NULL; beta_cache=NULL; -#else // USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_FREE(alpha_cache.table); SG_FREE(beta_cache.table); alpha_cache.table=NULL; beta_cache.table=NULL; -#endif // USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_FREE(states_per_observation_psi); states_per_observation_psi=NULL; } -#ifdef USE_LOGSUMARRAY -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_LOGSUMARRAY +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES { if (mem_initialized) { @@ -466,14 +466,14 @@ CHMM::~CHMM() } SG_FREE(arrayS); } ; -#else //USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_FREE(arrayS); -#endif //USE_HMMPARALLEL_STRUCTURES -#endif //USE_LOGSUMARRAY +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_LOGSUMARRAY if (!reused_caches) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES if (mem_initialized) { SG_FREE(path_prob_updated); @@ -481,7 +481,7 @@ CHMM::~CHMM() for (int32_t i=0; iget_num_threads(); i++) SG_FREE(path[i]); } -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_FREE(path); } } @@ -514,35 +514,35 @@ bool CHMM::alloc_state_dependend_arrays() convert_to_log(); } -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES for (int32_t i=0; iget_num_threads(); i++) { arrayN1[i]=SG_MALLOC(float64_t, N); arrayN2[i]=SG_MALLOC(float64_t, N); } -#else //USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES arrayN1=SG_MALLOC(float64_t, N); arrayN2=SG_MALLOC(float64_t, N); -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES #ifdef LOG_SUMARRAY -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES for (int32_t i=0; iget_num_threads(); i++) arrayS[i]=SG_MALLOC(float64_t, (int32_t)(this->N/2+1)); -#else //USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES arrayS=SG_MALLOC(float64_t, (int32_t)(this->N/2+1)); -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES #endif //LOG_SUMARRAY transition_matrix_A=SG_MALLOC(float64_t, this->N*this->N); observation_matrix_B=SG_MALLOC(float64_t, this->N*this->M); if (p_observations) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES if (alpha_cache[0].table!=NULL) -#else //USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES if (alpha_cache.table!=NULL) -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES set_observations(p_observations); else set_observation_nocache(p_observations); @@ -559,7 +559,7 @@ bool CHMM::alloc_state_dependend_arrays() void CHMM::free_state_dependend_arrays() { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES if (arrayN1 && arrayN2) { for (int32_t i=0; iget_num_threads(); i++) @@ -617,7 +617,7 @@ bool CHMM::initialize(Model* m, float64_t pseudo, FILE* modelfile) this->p_observations=NULL; this->reused_caches=false; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES alpha_cache=SG_MALLOC(T_ALPHA_BETA, parallel->get_num_threads()); beta_cache=SG_MALLOC(T_ALPHA_BETA, parallel->get_num_threads()); states_per_observation_psi=SG_MALLOC(P_STATES, parallel->get_num_threads()); @@ -631,18 +631,18 @@ bool CHMM::initialize(Model* m, float64_t pseudo, FILE* modelfile) this->states_per_observation_psi[i]=NULL ; } -#else // USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES this->alpha_cache.table=NULL; this->beta_cache.table=NULL; this->alpha_cache.dimension=0; this->beta_cache.dimension=0; this->states_per_observation_psi=NULL ; -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES if (modelfile) files_ok= files_ok && load_model(modelfile); -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES path_prob_updated=SG_MALLOC(bool, parallel->get_num_threads()); path_prob_dimension=SG_MALLOC(int, parallel->get_num_threads()); @@ -651,20 +651,20 @@ bool CHMM::initialize(Model* m, float64_t pseudo, FILE* modelfile) for (int32_t i=0; iget_num_threads(); i++) this->path[i]=NULL; -#else // USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES this->path=NULL; -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES arrayN1=SG_MALLOC(float64_t*, parallel->get_num_threads()); arrayN2=SG_MALLOC(float64_t*, parallel->get_num_threads()); -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES #ifdef LOG_SUMARRAY -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES arrayS=SG_MALLOC(float64_t*, parallel->get_num_threads()); -#endif // USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES #endif //LOG_SUMARRAY alloc_state_dependend_arrays(); @@ -825,7 +825,7 @@ float64_t CHMM::forward_comp_old(int32_t time, int32_t state, int32_t dimension) for (int32_t j=0; j>1); i++) ARRAYS(dimension)[i]=CMath::logarithmic_sum(alpha[i<<1] + get_a(i<<1,j), alpha[(i<<1)+1] + get_a((i<<1)+1,j)); @@ -835,13 +835,13 @@ float64_t CHMM::forward_comp_old(int32_t time, int32_t state, int32_t dimension) CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1)) ; else alpha_new[j]=get_b(j, p_observations->get_feature(dimension,t))+CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1) ; -#else //USE_LOGSUMARRAY +#else // SHOGUN_USE_LOGSUMARRAY float64_t sum=-CMath::INFTY; for (i=0; iget_feature(dimension,t)); -#endif //USE_LOGSUMARRAY +#endif // SHOGUN_USE_LOGSUMARRAY } if (!ALPHA_CACHE(dimension).table) @@ -861,7 +861,7 @@ float64_t CHMM::forward_comp_old(int32_t time, int32_t state, int32_t dimension) if (timeget_vector_length(dimension)) { register int32_t i; -#ifdef USE_LOGSUMARRAY +#ifdef SHOGUN_USE_LOGSUMARRAY for (i=0; i<(N>>1); i++) ARRAYS(dimension)[i]=CMath::logarithmic_sum(alpha[i<<1] + get_a(i<<1,state), alpha[(i<<1)+1] + get_a((i<<1)+1,state)); @@ -871,20 +871,20 @@ float64_t CHMM::forward_comp_old(int32_t time, int32_t state, int32_t dimension) CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1)) ; else return get_b(state, p_observations->get_feature(dimension,time))+CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1) ; -#else //USE_LOGSUMARRAY +#else // SHOGUN_USE_LOGSUMARRAY register float64_t sum=-CMath::INFTY; for (i=0; iget_feature(dimension,time)); -#endif //USE_LOGSUMARRAY +#endif // SHOGUN_USE_LOGSUMARRAY } else { // termination register int32_t i ; float64_t sum ; -#ifdef USE_LOGSUMARRAY +#ifdef SHOGUN_USE_LOGSUMARRAY for (i=0; i<(N>>1); i++) ARRAYS(dimension)[i]=CMath::logarithmic_sum(alpha[i<<1] + get_q(i<<1), alpha[(i<<1)+1] + get_q((i<<1)+1)); @@ -893,11 +893,11 @@ float64_t CHMM::forward_comp_old(int32_t time, int32_t state, int32_t dimension) CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1)) ; else sum=CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1) ; -#else //USE_LOGSUMARRAY +#else // SHOGUN_USE_LOGSUMARRAY sum=-CMath::INFTY; for (i=0; i>1); j++) ARRAYS(dimension)[j]=CMath::logarithmic_sum( get_a(i, j<<1) + get_b(j<<1, p_observations->get_feature(dimension,t)) + beta[j<<1], @@ -1068,13 +1068,13 @@ float64_t CHMM::backward_comp_old( CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1)) ; else beta_new[i]=CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1) ; -#else //USE_LOGSUMARRAY +#else // SHOGUN_USE_LOGSUMARRAY float64_t sum=-CMath::INFTY; for (j=0; jget_feature(dimension,t)) + beta[j]); beta_new[i]=sum; -#endif //USE_LOGSUMARRAY +#endif // SHOGUN_USE_LOGSUMARRAY } if (!BETA_CACHE(dimension).table) @@ -1093,7 +1093,7 @@ float64_t CHMM::backward_comp_old( if (time>=0) { register int32_t j ; -#ifdef USE_LOGSUMARRAY +#ifdef SHOGUN_USE_LOGSUMARRAY for (j=0; j<(N>>1); j++) ARRAYS(dimension)[j]=CMath::logarithmic_sum( get_a(state, j<<1) + get_b(j<<1, p_observations->get_feature(dimension,time+1)) + beta[j<<1], @@ -1103,19 +1103,19 @@ float64_t CHMM::backward_comp_old( CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1)) ; else return CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1) ; -#else //USE_LOGSUMARRAY +#else // SHOGUN_USE_LOGSUMARRAY float64_t sum=-CMath::INFTY; for (j=0; jget_feature(dimension,time+1))+beta[j]); return sum; -#endif //USE_LOGSUMARRAY +#endif // SHOGUN_USE_LOGSUMARRAY } else // time<0 { if (BETA_CACHE(dimension).table) { -#ifdef USE_LOGSUMARRAY//AAA +#ifdef SHOGUN_USE_LOGSUMARRAY//AAA for (int32_t j=0; j<(N>>1); j++) ARRAYS(dimension)[j]=CMath::logarithmic_sum(get_p(j<<1) + get_b(j<<1, p_observations->get_feature(dimension,0))+beta[j<<1], get_p((j<<1)+1) + get_b((j<<1)+1, p_observations->get_feature(dimension,0))+beta[(j<<1)+1]) ; @@ -1124,12 +1124,12 @@ float64_t CHMM::backward_comp_old( CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1)) ; else BETA_CACHE(dimension).sum=CMath::logarithmic_sum_array(ARRAYS(dimension), N>>1) ; -#else //USE_LOGSUMARRAY +#else // SHOGUN_USE_LOGSUMARRAY float64_t sum=-CMath::INFTY; for (register int32_t j=0; jget_feature(dimension,0))+beta[j]); BETA_CACHE(dimension).sum=sum; -#endif //USE_LOGSUMARRAY +#endif // SHOGUN_USE_LOGSUMARRAY BETA_CACHE(dimension).dimension=dimension; BETA_CACHE(dimension).updated=true; @@ -1193,7 +1193,7 @@ float64_t CHMM::best_path(int32_t dimension) } } -#ifdef USE_PATHDEBUG +#ifdef SHOGUN_USE_PATHDEBUG float64_t worst=-CMath::INFTY/4 ; #endif //recursion @@ -1228,7 +1228,7 @@ float64_t CHMM::best_path(int32_t dimension) set_psi(t, j, argmax, dimension); } -#ifdef USE_PATHDEBUG +#ifdef SHOGUN_USE_PATHDEBUG float64_t best=log(0) ; for (int32_t jj=0; jjbest) @@ -1278,7 +1278,7 @@ float64_t CHMM::best_path(int32_t dimension) } } -#ifndef USE_HMMPARALLEL +#ifndef SHOGUN_USE_HMMPARALLEL float64_t CHMM::model_probability_comp() { //for faster calculation cache model probability @@ -1371,10 +1371,10 @@ void* CHMM::vit_dim_prefetch(void * params) return NULL ; } -#endif //USE_HMMPARALLEL +#endif // SHOGUN_USE_HMMPARALLEL -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL void CHMM::ab_buf_comp( float64_t* p_buf, float64_t* q_buf, float64_t *a_buf, float64_t* b_buf, @@ -1524,7 +1524,7 @@ void CHMM::estimate_model_baum_welch(CHMM* hmm) invalidate_model(); } -#else // USE_HMMPARALLEL +#else // SHOGUN_USE_HMMPARALLEL //estimates new model lambda out of lambda_estimate using baum welch algorithm void CHMM::estimate_model_baum_welch(CHMM* estimate) @@ -1694,7 +1694,7 @@ void CHMM::estimate_model_baum_welch_old(CHMM* estimate) normalize(); invalidate_model(); } -#endif // USE_HMMPARALLEL +#endif // SHOGUN_USE_HMMPARALLEL //estimates new model lambda out of lambda_estimate using baum welch algorithm // optimize only p, q, a but not b @@ -1804,7 +1804,7 @@ void CHMM::estimate_model_baum_welch_defined(CHMM* estimate) B[i]=log(PSEUDO); } -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL int32_t num_threads = parallel->get_num_threads(); pthread_t *threads=SG_MALLOC(pthread_t, num_threads); S_DIM_THREAD_PARAM *params=SG_MALLOC(S_DIM_THREAD_PARAM, num_threads); @@ -1816,7 +1816,7 @@ void CHMM::estimate_model_baum_welch_defined(CHMM* estimate) //change summation order to make use of alpha/beta caches for (dim=0; dimget_num_vectors(); dim++) { -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL if (dim%num_threads==0) { for (i=0; imodel_probability(dim); -#endif // USE_HMMPARALLEL +#endif // SHOGUN_USE_HMMPARALLEL //and denominator fullmodprob+= dimmodprob; @@ -1909,7 +1909,7 @@ void CHMM::estimate_model_baum_welch_defined(CHMM* estimate) set_b(i,j, CMath::logarithmic_sum(get_b(i,j), b_sum_num-dimmodprob)); } } -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL SG_FREE(threads); SG_FREE(params); #endif @@ -1968,7 +1968,7 @@ void CHMM::estimate_model_viterbi(CHMM* estimate) float64_t allpatprob=0 ; -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL int32_t num_threads = parallel->get_num_threads(); pthread_t *threads=SG_MALLOC(pthread_t, num_threads); S_DIM_THREAD_PARAM *params=SG_MALLOC(S_DIM_THREAD_PARAM, num_threads); @@ -1980,7 +1980,7 @@ void CHMM::estimate_model_viterbi(CHMM* estimate) for (int32_t dim=0; dimget_num_vectors(); dim++) { -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL if (dim%num_threads==0) { for (i=0; ibest_path(dim); -#endif // USE_HMMPARALLEL +#endif // SHOGUN_USE_HMMPARALLEL //counting occurences for A and B for (t=0; tget_vector_length(dim)-1; t++) @@ -2019,7 +2019,7 @@ void CHMM::estimate_model_viterbi(CHMM* estimate) Q[estimate->PATH(dim)[p_observations->get_vector_length(dim)-1]]++; } -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL SG_FREE(threads); SG_FREE(params); #endif @@ -2093,7 +2093,7 @@ void CHMM::estimate_model_viterbi_defined(CHMM* estimate) Q[i]=PSEUDO; } -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL int32_t num_threads = parallel->get_num_threads(); pthread_t *threads=SG_MALLOC(pthread_t, num_threads); S_DIM_THREAD_PARAM *params=SG_MALLOC(S_DIM_THREAD_PARAM, num_threads); @@ -2103,7 +2103,7 @@ void CHMM::estimate_model_viterbi_defined(CHMM* estimate) for (int32_t dim=0; dimget_num_vectors(); dim++) { -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL if (dim%num_threads==0) { for (i=0; ibest_path(dim); -#endif // USE_HMMPARALLEL +#endif // SHOGUN_USE_HMMPARALLEL //counting occurences for A and B @@ -2143,7 +2143,7 @@ void CHMM::estimate_model_viterbi_defined(CHMM* estimate) Q[estimate->PATH(dim)[p_observations->get_vector_length(dim)-1]]++; } -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL SG_FREE(threads); SG_FREE(params); #endif @@ -2782,7 +2782,7 @@ void CHMM::invalidate_model() this->path_deriv_dimension=-1 ; this->all_path_prob_updated=false; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES { for (int32_t i=0; iget_num_threads(); i++) { @@ -2792,13 +2792,13 @@ void CHMM::invalidate_model() path_prob_dimension[i]=-1 ; } ; } -#else // USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES this->alpha_cache.updated=false; this->beta_cache.updated=false; this->path_prob_dimension=-1; this->path_prob_updated=false; -#endif // USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES } void CHMM::open_bracket(FILE* file) @@ -3590,7 +3590,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) int32_t i=0; if (verbose) -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG SG_DEBUG("\nconst for transition matrix: \n") #else SG_DEBUG("\nconst for transition matrix: ") @@ -3654,7 +3654,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) else model->set_const_a_val((int32_t)i/2 - 1, 1.0); -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG if (verbose) SG_ERROR("const_a(%i,%i)=%e\n", model->get_const_a((int32_t)i/2-1,0),model->get_const_a((int32_t)i/2-1,1),model->get_const_a_val((int32_t)i/2-1)) #endif @@ -3682,7 +3682,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) int32_t i=0; if (verbose) -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG SG_DEBUG("\nconst for emission matrix: \n") #else SG_DEBUG("\nconst for emission matrix: ") @@ -3745,7 +3745,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) model->set_const_b(i++, combine); if (combine>=M) SG_ERROR("invalid value for const_b(%i,1): %i\n",i/2-1, combine) -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG if (verbose && !finished) SG_ERROR("const_b(%i,%i)=%e\n", model->get_const_b((int32_t)i/2-1,0),model->get_const_b((int32_t)i/2-1,1),model->get_const_b_val((int32_t)i/2-1)) #endif @@ -3771,7 +3771,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) int32_t i=0; if (verbose) -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG SG_DEBUG("\nconst for start states: \n") #else SG_DEBUG("\nconst for start states: ") @@ -3818,7 +3818,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) close_bracket(file); -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG if (verbose) SG_DEBUG("const_p(%i)=%e\n", model->get_const_p(i-1),model->get_const_p_val(i-1)) #endif @@ -3843,7 +3843,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) open_bracket(file); bool finished=false; if (verbose) -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG SG_DEBUG("\nconst for terminal states: \n") #else SG_DEBUG("\nconst for terminal states: ") @@ -3888,7 +3888,7 @@ bool CHMM::load_definitions(FILE* file, bool verbose, bool _initialize) model->set_const_q_val(i++, 1.0); close_bracket(file); -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_HMMDEBUG if (verbose) SG_DEBUG("const_q(%i)=%e\n", model->get_const_q(i-1),model->get_const_q_val(i-1)) #endif @@ -4388,7 +4388,7 @@ bool CHMM::save_model_derivatives_bin(FILE* file) else SG_INFO("writing derivatives of changed weights only\n") -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL int32_t num_threads = parallel->get_num_threads(); pthread_t *threads=SG_MALLOC(pthread_t, num_threads); S_DIM_THREAD_PARAM *params=SG_MALLOC(S_DIM_THREAD_PARAM, num_threads); @@ -4405,7 +4405,7 @@ bool CHMM::save_model_derivatives_bin(FILE* file) } ; -#ifdef USE_HMMPARALLEL +#ifdef SHOGUN_USE_HMMPARALLEL if (dim%num_threads==0) { for (i=0; i* obs) if (!reused_caches) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES for (int32_t i=0; iget_num_threads(); i++) { SG_FREE(alpha_cache[i].table); @@ -5300,7 +5300,7 @@ void CHMM::set_observation_nocache(CStringFeatures* obs) states_per_observation_psi=NULL; path=NULL; -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES } invalidate_model(); @@ -5332,7 +5332,7 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) if (!reused_caches) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES for (int32_t i=0; iget_num_threads(); i++) { SG_FREE(alpha_cache[i].table); @@ -5356,7 +5356,7 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) states_per_observation_psi=NULL; path=NULL; -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES } if (obs!=NULL) @@ -5365,7 +5365,7 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) if (lambda) { -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES for (int32_t i=0; iget_num_threads(); i++) { this->alpha_cache[i].table= lambda->alpha_cache[i].table; @@ -5378,14 +5378,14 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) this->beta_cache.table= lambda->beta_cache.table; this->states_per_observation_psi= lambda->states_per_observation_psi; this->path=lambda->path; -#endif //USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES this->reused_caches=true; } else { this->reused_caches=false; -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_INFO("allocating mem for path-table of size %.2f Megabytes (%d*%d) each:\n", ((float32_t)max_T)*N*sizeof(T_STATES)/(1024*1024), max_T, N) for (int32_t i=0; iget_num_threads(); i++) { @@ -5395,7 +5395,7 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) SG_ERROR("failed allocating memory for path_table[%i].\n",i) path[i]=SG_MALLOC(T_STATES, max_T); } -#else // no USE_HMMPARALLEL_STRUCTURES +#else // no SHOGUN_USE_HMMPARALLEL_STRUCTURES SG_INFO("allocating mem of size %.2f Megabytes (%d*%d) for path-table ....", ((float32_t)max_T)*N*sizeof(T_STATES)/(1024*1024), max_T, N) if ((states_per_observation_psi=SG_MALLOC(T_STATES,max_T*N)) != NULL) SG_DONE() @@ -5403,11 +5403,11 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) SG_ERROR("failed.\n") path=SG_MALLOC(T_STATES, max_T); -#endif // USE_HMMPARALLEL_STRUCTURES -#ifdef USE_HMMCACHE +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMCACHE SG_INFO("allocating mem for caches each of size %.2f Megabytes (%d*%d) ....\n", ((float32_t)max_T)*N*sizeof(T_ALPHA_BETA_TABLE)/(1024*1024), max_T, N) -#ifdef USE_HMMPARALLEL_STRUCTURES +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES for (int32_t i=0; iget_num_threads(); i++) { if ((alpha_cache[i].table=SG_MALLOC(T_ALPHA_BETA_TABLE, max_T*N))!=NULL) @@ -5420,7 +5420,7 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) else SG_ERROR("allocation of beta_cache[%i].table failed\n",i) } ; -#else // USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES if ((alpha_cache.table=SG_MALLOC(T_ALPHA_BETA_TABLE, max_T*N)) != NULL) SG_DEBUG("alpha_cache.table successfully allocated\n") else @@ -5431,19 +5431,19 @@ void CHMM::set_observations(CStringFeatures* obs, CHMM* lambda) else SG_ERROR("allocation of beta_cache.table failed\n") -#endif // USE_HMMPARALLEL_STRUCTURES -#else // USE_HMMCACHE -#ifdef USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMCACHE +#ifdef SHOGUN_USE_HMMPARALLEL_STRUCTURES for (int32_t i=0; iget_num_threads(); i++) { alpha_cache[i].table=NULL ; beta_cache[i].table=NULL ; } ; -#else //USE_HMMPARALLEL_STRUCTURES +#else // SHOGUN_USE_HMMPARALLEL_STRUCTURES alpha_cache.table=NULL ; beta_cache.table=NULL ; -#endif //USE_HMMPARALLEL_STRUCTURES -#endif //USE_HMMCACHE +#endif // SHOGUN_USE_HMMPARALLEL_STRUCTURES +#endif // SHOGUN_USE_HMMCACHE } } diff --git a/src/shogun/distributions/classical/GaussianDistribution.cpp b/src/shogun/distributions/classical/GaussianDistribution.cpp index 65e2c7a2368..cd05941df0c 100644 --- a/src/shogun/distributions/classical/GaussianDistribution.cpp +++ b/src/shogun/distributions/classical/GaussianDistribution.cpp @@ -7,7 +7,7 @@ * Written (W) 2013 Heiko Strathmann */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -172,4 +172,4 @@ void CGaussianDistribution::init() "depending on the factorization type.", MS_NOT_AVAILABLE); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/evaluation/ica/AmariIndex.cpp b/src/shogun/evaluation/ica/AmariIndex.cpp index e853ab4fdfe..1791d6e62bb 100644 --- a/src/shogun/evaluation/ica/AmariIndex.cpp +++ b/src/shogun/evaluation/ica/AmariIndex.cpp @@ -1,6 +1,6 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -73,4 +73,4 @@ float64_t amari_index(SGMatrix SGW, SGMatrix SGA, bool sta return 1.0 / (float)(2*k*(k-1)) * (row_error + col_error); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/evaluation/ica/PermutationMatrix.cpp b/src/shogun/evaluation/ica/PermutationMatrix.cpp index bf786c73729..f0f745e523b 100644 --- a/src/shogun/evaluation/ica/PermutationMatrix.cpp +++ b/src/shogun/evaluation/ica/PermutationMatrix.cpp @@ -1,6 +1,6 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -58,4 +58,4 @@ bool is_permutation_matrix(SGMatrix m) return true; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/features/DataGenerator.cpp b/src/shogun/features/DataGenerator.cpp index c58af25899d..e079bab08e9 100644 --- a/src/shogun/features/DataGenerator.cpp +++ b/src/shogun/features/DataGenerator.cpp @@ -129,7 +129,7 @@ SGMatrix CDataGenerator::generate_sym_mix_gauss(index_t m, return result; } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGMatrix CDataGenerator::generate_gaussians(index_t m, index_t n, index_t dim) { /* evtl. allocate space */ @@ -162,4 +162,4 @@ SGMatrix CDataGenerator::generate_gaussians(index_t m, index_t n, ind return result; } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ diff --git a/src/shogun/features/DotFeatures.cpp b/src/shogun/features/DotFeatures.cpp index 4af59755088..252497ee931 100644 --- a/src/shogun/features/DotFeatures.cpp +++ b/src/shogun/features/DotFeatures.cpp @@ -16,7 +16,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -82,7 +82,7 @@ void CDotFeatures::dense_dot_range(float64_t* output, int32_t start, int32_t sto CSignal::clear_cancel(); -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD if (num_threads < 2) { #endif @@ -98,7 +98,7 @@ void CDotFeatures::dense_dot_range(float64_t* output, int32_t start, int32_t sto params.bias=b; params.progress=false; //true; dense_dot_range_helper((void*) ¶ms); -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD } else { @@ -160,7 +160,7 @@ void CDotFeatures::dense_dot_range_subset(int32_t* sub_index, int32_t num, float CSignal::clear_cancel(); -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD if (num_threads < 2) { #endif @@ -176,7 +176,7 @@ void CDotFeatures::dense_dot_range_subset(int32_t* sub_index, int32_t num, float params.bias=b; params.progress=false; //true; dense_dot_range_helper((void*) ¶ms); -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD } else { diff --git a/src/shogun/features/HashedWDFeaturesTransposed.cpp b/src/shogun/features/HashedWDFeaturesTransposed.cpp index 0b044984ff9..b4534fa6063 100644 --- a/src/shogun/features/HashedWDFeaturesTransposed.cpp +++ b/src/shogun/features/HashedWDFeaturesTransposed.cpp @@ -13,7 +13,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -219,7 +219,7 @@ void CHashedWDFeaturesTransposed::dense_dot_range(float64_t* output, int32_t sta if (dim != w_dim) SG_ERROR("Dimensions don't match, vec_len=%d, w_dim=%d\n", dim, w_dim) -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD if (num_threads < 2) { #endif @@ -235,7 +235,7 @@ void CHashedWDFeaturesTransposed::dense_dot_range(float64_t* output, int32_t sta params.progress=false; //true; params.index=index; dense_dot_range_helper((void*) ¶ms); -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD } else { @@ -303,7 +303,7 @@ void CHashedWDFeaturesTransposed::dense_dot_range_subset(int32_t* sub_index, int if (dim != w_dim) SG_ERROR("Dimensions don't match, vec_len=%d, w_dim=%d\n", dim, w_dim) -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD if (num_threads < 2) { #endif @@ -319,7 +319,7 @@ void CHashedWDFeaturesTransposed::dense_dot_range_subset(int32_t* sub_index, int params.progress=false; //true; params.index=index; dense_dot_range_helper((void*) ¶ms); -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD } else { diff --git a/src/shogun/io/HDF5File.cpp b/src/shogun/io/HDF5File.cpp index 9ed07362fb0..ccf6f4f78bc 100644 --- a/src/shogun/io/HDF5File.cpp +++ b/src/shogun/io/HDF5File.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 #include #include #include diff --git a/src/shogun/io/MLDataHDF5File.cpp b/src/shogun/io/MLDataHDF5File.cpp index e00a09ffa69..3b1405f1022 100644 --- a/src/shogun/io/MLDataHDF5File.cpp +++ b/src/shogun/io/MLDataHDF5File.cpp @@ -9,7 +9,7 @@ #include -#if defined(HAVE_HDF5) && defined( HAVE_CURL) +#if defined(SHOGUN_HAVE_HDF5) && defined( SHOGUN_HAVE_CURL) #include #include @@ -380,4 +380,4 @@ void CMLDataHDF5File::create_group_hierarchy() } SG_FREE(vname); } -#endif // HAVE_CURL && HAVE_HDF5 +#endif // SHOGUN_HAVE_CURL && SHOGUN_HAVE_HDF5 diff --git a/src/shogun/io/Parser.cpp b/src/shogun/io/Parser.cpp index 1d064a10710..f477c4b0189 100644 --- a/src/shogun/io/Parser.cpp +++ b/src/shogun/io/Parser.cpp @@ -127,7 +127,7 @@ READ_REAL_METHOD(read_uint, strtod, uint32_t) READ_REAL_METHOD(read_short_real, strtod, float32_t) READ_REAL_METHOD(read_real, strtod, float64_t) -#ifdef HAVE_STRTOLD +#ifdef SHOGUN_HAVE_STRTOLD READ_REAL_METHOD(read_long_real, strtold, floatmax_t) #else READ_REAL_METHOD(read_long_real, strtod, floatmax_t) diff --git a/src/shogun/io/ProtobufFile.cpp b/src/shogun/io/ProtobufFile.cpp index 793bc5f88d7..65e1ae57bd0 100644 --- a/src/shogun/io/ProtobufFile.cpp +++ b/src/shogun/io/ProtobufFile.cpp @@ -6,7 +6,7 @@ * * Written (W) 2013 Evgeniy Andreev (gsomix) */ -#ifdef HAVE_PROTOBUF +#ifdef SHOGUN_HAVE_PROTOBUF #include @@ -693,4 +693,4 @@ WRITE_STRING_LIST(Int32Chunk, int16_t) WRITE_STRING_LIST(UInt32Chunk, uint16_t) #undef WRITE_STRING_LIST -#endif /* HAVE_PROTOBUF */ +#endif /* SHOGUN_HAVE_PROTOBUF */ diff --git a/src/shogun/io/SerializableAsciiReader00.cpp b/src/shogun/io/SerializableAsciiReader00.cpp index 0a0c823debb..06e1ee33d80 100644 --- a/src/shogun/io/SerializableAsciiReader00.cpp +++ b/src/shogun/io/SerializableAsciiReader00.cpp @@ -88,7 +88,7 @@ SerializableAsciiReader00::read_scalar_wrapped( float64_t c_real, c_imag; if (fscanf(m_file->m_fstream, "(%lg,%lg)", &c_real, &c_imag) != 2) return false; -#if defined(HAVE_CXX11) || defined(_LIBCPP_VERSION) || defined(HAVE_CXX0X) +#if defined(SHOGUN_HAVE_CXX11) || defined(_LIBCPP_VERSION) || defined(SHOGUN_HAVE_CXX0X) ((complex128_t*) param)->real(c_real); ((complex128_t*) param)->imag(c_imag); #else diff --git a/src/shogun/io/SerializableHdf5File.cpp b/src/shogun/io/SerializableHdf5File.cpp index e9581afb754..1c433888f9a 100644 --- a/src/shogun/io/SerializableHdf5File.cpp +++ b/src/shogun/io/SerializableHdf5File.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 #include #include @@ -795,4 +795,4 @@ CSerializableHdf5File::write_type_end_wrapped( return true; } -#endif /* HAVE_HDF5 */ +#endif /* SHOGUN_HAVE_HDF5 */ diff --git a/src/shogun/io/SerializableHdf5Reader00.cpp b/src/shogun/io/SerializableHdf5Reader00.cpp index 0b31dbb1c00..e6c836b96d1 100644 --- a/src/shogun/io/SerializableHdf5Reader00.cpp +++ b/src/shogun/io/SerializableHdf5Reader00.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 #include @@ -410,4 +410,4 @@ SerializableHdf5Reader00::read_type_end_wrapped( return true; } -#endif /* HAVE_HDF5 */ +#endif /* SHOGUN_HAVE_HDF5 */ diff --git a/src/shogun/io/SerializableJsonFile.cpp b/src/shogun/io/SerializableJsonFile.cpp index fabce882356..20015d1ccb1 100644 --- a/src/shogun/io/SerializableJsonFile.cpp +++ b/src/shogun/io/SerializableJsonFile.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_JSON +#ifdef SHOGUN_HAVE_JSON #include #include @@ -438,4 +438,4 @@ CSerializableJsonFile::write_type_end_wrapped( return true; } -#endif /* HAVE_JSON */ +#endif /* SHOGUN_HAVE_JSON */ diff --git a/src/shogun/io/SerializableJsonReader00.cpp b/src/shogun/io/SerializableJsonReader00.cpp index be9be1481f1..611cb3118e2 100644 --- a/src/shogun/io/SerializableJsonReader00.cpp +++ b/src/shogun/io/SerializableJsonReader00.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_JSON +#ifdef SHOGUN_HAVE_JSON #include @@ -326,4 +326,4 @@ SerializableJsonReader00::read_type_end_wrapped( return true; } -#endif /* HAVE_JSON */ +#endif /* SHOGUN_HAVE_JSON */ diff --git a/src/shogun/io/SerializableXmlFile.cpp b/src/shogun/io/SerializableXmlFile.cpp index 5351e98662d..af1c4023f3a 100644 --- a/src/shogun/io/SerializableXmlFile.cpp +++ b/src/shogun/io/SerializableXmlFile.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_XML +#ifdef SHOGUN_HAVE_XML #include #include @@ -414,4 +414,4 @@ CSerializableXmlFile::write_type_end_wrapped( return true; } -#endif /* HAVE_XML */ +#endif /* SHOGUN_HAVE_XML */ diff --git a/src/shogun/io/SerializableXmlReader00.cpp b/src/shogun/io/SerializableXmlReader00.cpp index 12fdbee46fa..a3f9298bab6 100644 --- a/src/shogun/io/SerializableXmlReader00.cpp +++ b/src/shogun/io/SerializableXmlReader00.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_XML +#ifdef SHOGUN_HAVE_XML #include #include @@ -96,7 +96,7 @@ SerializableXmlReader00::read_scalar_wrapped( float64_t c_real, c_imag; if (sscanf(buf, "(%lg,%lg)", &c_real, &c_imag) != 2) result = false; -#if defined(HAVE_CXX11) || defined(_LIBCPP_VERSION) +#if defined(SHOGUN_HAVE_CXX11) || defined(_LIBCPP_VERSION) ((complex128_t*) param)->real(c_real); ((complex128_t*) param)->imag(c_imag); #else @@ -360,4 +360,4 @@ SerializableXmlReader00::read_type_end_wrapped( return true; } -#endif /* HAVE_XML */ +#endif /* SHOGUN_HAVE_XML */ diff --git a/src/shogun/kernel/CombinedKernel.cpp b/src/shogun/kernel/CombinedKernel.cpp index 1d4831952e7..b568ba1ce01 100644 --- a/src/shogun/kernel/CombinedKernel.cpp +++ b/src/shogun/kernel/CombinedKernel.cpp @@ -432,7 +432,7 @@ void CCombinedKernel::emulate_compute_batch( params.vec_idx = vec_idx; compute_optimized_kernel_helper((void*) ¶ms); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { pthread_t* threads = SG_MALLOC(pthread_t, num_threads-1); @@ -464,7 +464,7 @@ void CCombinedKernel::emulate_compute_batch( SG_FREE(params); SG_FREE(threads); } -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ k->delete_optimization(); } @@ -492,7 +492,7 @@ void CCombinedKernel::emulate_compute_batch( params.num_suppvec = num_suppvec; compute_kernel_helper((void*) ¶ms); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { pthread_t* threads = SG_MALLOC(pthread_t, num_threads-1); @@ -530,7 +530,7 @@ void CCombinedKernel::emulate_compute_batch( SG_FREE(params); SG_FREE(threads); } -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ } } } diff --git a/src/shogun/kernel/Kernel.cpp b/src/shogun/kernel/Kernel.cpp index cb7a6f1912f..e80e9771ae2 100644 --- a/src/shogun/kernel/Kernel.cpp +++ b/src/shogun/kernel/Kernel.cpp @@ -32,7 +32,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -81,7 +81,7 @@ CKernel::~CKernel() SG_INFO("Kernel deleted (%p).\n", this) } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT void CKernel::resize_kernel_cache(KERNELCACHE_IDX size, bool regression_hack) { if (size<10) @@ -93,7 +93,7 @@ void CKernel::resize_kernel_cache(KERNELCACHE_IDX size, bool regression_hack) if (has_features() && get_num_vec_lhs()) kernel_cache_init(cache_size, regression_hack); } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT bool CKernel::init(CFeatures* l, CFeatures* r) { @@ -164,7 +164,7 @@ void CKernel::cleanup() remove_lhs_and_rhs(); } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT /****************************** Cache handling *******************************/ void CKernel::kernel_cache_init(int32_t buffsize, bool regression_hack) @@ -364,7 +364,7 @@ void* CKernel::cache_multiple_kernel_row_helper(void* p) // Fills cache for the rows in key void CKernel::cache_multiple_kernel_rows(int32_t* rows, int32_t num_rows) { -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD int32_t nthreads=parallel->get_num_threads(); if (nthreads<2) @@ -372,7 +372,7 @@ void CKernel::cache_multiple_kernel_rows(int32_t* rows, int32_t num_rows) #endif for(int32_t i=0;i -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif diff --git a/src/shogun/kernel/string/WeightedDegreePositionStringKernel.cpp b/src/shogun/kernel/string/WeightedDegreePositionStringKernel.cpp index 4f72da07a89..e8ffdb1b51d 100644 --- a/src/shogun/kernel/string/WeightedDegreePositionStringKernel.cpp +++ b/src/shogun/kernel/string/WeightedDegreePositionStringKernel.cpp @@ -22,7 +22,7 @@ #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -1277,7 +1277,7 @@ void CWeightedDegreePositionStringKernel::compute_batch( SG_PROGRESS(j,0,num_feat) } } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { diff --git a/src/shogun/kernel/string/WeightedDegreeStringKernel.cpp b/src/shogun/kernel/string/WeightedDegreeStringKernel.cpp index cfd088cd95a..bca1a25266d 100644 --- a/src/shogun/kernel/string/WeightedDegreeStringKernel.cpp +++ b/src/shogun/kernel/string/WeightedDegreeStringKernel.cpp @@ -906,7 +906,7 @@ void CWeightedDegreeStringKernel::compute_batch( SG_PROGRESS(j,0,num_feat) } } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { CSignal::clear_cancel(); diff --git a/src/shogun/latent/DirectorLatentModel.cpp b/src/shogun/latent/DirectorLatentModel.cpp index 7380100cef1..761c4ddd53d 100644 --- a/src/shogun/latent/DirectorLatentModel.cpp +++ b/src/shogun/latent/DirectorLatentModel.cpp @@ -1,6 +1,6 @@ #include -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS using namespace shogun; @@ -37,4 +37,4 @@ void CDirectorLatentModel::argmax_h(const SGVector& w) SG_ERROR("Please implemement argmax_h(w) in your target language before use\n") } -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ diff --git a/src/shogun/lib/Compressor.cpp b/src/shogun/lib/Compressor.cpp index c788b66ffac..5d0c5d0ca44 100644 --- a/src/shogun/lib/Compressor.cpp +++ b/src/shogun/lib/Compressor.cpp @@ -12,25 +12,25 @@ #include #include -#ifdef USE_LZO +#ifdef SHOGUN_USE_LZO #include #include #include #endif -#ifdef USE_GZIP +#ifdef SHOGUN_USE_GZIP #include #endif -#ifdef USE_BZIP2 +#ifdef SHOGUN_USE_BZIP2 #include #endif -#ifdef USE_LZMA +#ifdef SHOGUN_USE_LZMA #include #endif -#ifdef USE_SNAPPY +#ifdef SHOGUN_USE_SNAPPY #include #endif @@ -64,7 +64,7 @@ void CCompressor::compress(uint8_t* uncompressed, uint64_t uncompressed_size, memcpy(compressed, uncompressed, uncompressed_size); break; } -#ifdef USE_LZO +#ifdef SHOGUN_USE_LZO case LZO: { if (lzo_init() != LZO_E_OK) @@ -103,7 +103,7 @@ void CCompressor::compress(uint8_t* uncompressed, uint64_t uncompressed_size, break; } #endif -#ifdef USE_GZIP +#ifdef SHOGUN_USE_GZIP case GZIP: { initial_buffer_size=1.001*uncompressed_size + 12; @@ -120,7 +120,7 @@ void CCompressor::compress(uint8_t* uncompressed, uint64_t uncompressed_size, break; } #endif -#ifdef USE_BZIP2 +#ifdef SHOGUN_USE_BZIP2 case BZIP2: { bz_stream strm; @@ -156,7 +156,7 @@ void CCompressor::compress(uint8_t* uncompressed, uint64_t uncompressed_size, break; } #endif -#ifdef USE_LZMA +#ifdef SHOGUN_USE_LZMA case LZMA: { lzma_stream strm = LZMA_STREAM_INIT; @@ -189,7 +189,7 @@ void CCompressor::compress(uint8_t* uncompressed, uint64_t uncompressed_size, break; } #endif -#ifdef USE_SNAPPY +#ifdef SHOGUN_USE_SNAPPY case SNAPPY: { compressed=SG_MALLOC(uint8_t, snappy::MaxCompressedLength((size_t) uncompressed_size)); @@ -225,7 +225,7 @@ void CCompressor::decompress(uint8_t* compressed, uint64_t compressed_size, memcpy(uncompressed, compressed, uncompressed_size); break; } -#ifdef USE_LZO +#ifdef SHOGUN_USE_LZO case LZO: { if (lzo_init() != LZO_E_OK) @@ -247,7 +247,7 @@ void CCompressor::decompress(uint8_t* compressed, uint64_t compressed_size, break; } #endif -#ifdef USE_GZIP +#ifdef SHOGUN_USE_GZIP case GZIP: { uLongf gz_size=uncompressed_size; @@ -260,7 +260,7 @@ void CCompressor::decompress(uint8_t* compressed, uint64_t compressed_size, break; } #endif -#ifdef USE_BZIP2 +#ifdef SHOGUN_USE_BZIP2 case BZIP2: { bz_stream strm; @@ -279,7 +279,7 @@ void CCompressor::decompress(uint8_t* compressed, uint64_t compressed_size, break; } #endif -#ifdef USE_LZMA +#ifdef SHOGUN_USE_LZMA case LZMA: { lzma_stream strm = LZMA_STREAM_INIT; @@ -298,7 +298,7 @@ void CCompressor::decompress(uint8_t* compressed, uint64_t compressed_size, break; } #endif -#ifdef USE_SNAPPY +#ifdef SHOGUN_USE_SNAPPY case SNAPPY: { size_t uncompressed_length; diff --git a/src/shogun/lib/Lock.cpp b/src/shogun/lib/Lock.cpp index 49461a284f2..7abc0b6bbfa 100644 --- a/src/shogun/lib/Lock.cpp +++ b/src/shogun/lib/Lock.cpp @@ -10,9 +10,9 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include -#ifdef USE_SPINLOCKS +#ifdef SHOGUN_USE_SPINLOCKS #ifdef DARWIN #include #define PTHREAD_LOCK_T OSSpinLock @@ -40,7 +40,7 @@ using namespace shogun; CLock::CLock() { -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD lock_object=(void*) SG_MALLOC(PTHREAD_LOCK_T, 1); PTHREAD_LOCK_INIT((PTHREAD_LOCK_T*) lock_object); #endif @@ -48,7 +48,7 @@ CLock::CLock() CLock::~CLock() { -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD PTHREAD_LOCK_DESTROY((PTHREAD_LOCK_T*) lock_object); SG_FREE(lock_object); #endif @@ -56,14 +56,14 @@ CLock::~CLock() void CLock::lock() { -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD PTHREAD_LOCK((PTHREAD_LOCK_T*) lock_object); #endif } void CLock::unlock() { -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD PTHREAD_UNLOCK((PTHREAD_LOCK_T*) lock_object); #endif } diff --git a/src/shogun/lib/RefCount.cpp b/src/shogun/lib/RefCount.cpp index fb5f9e99ca4..04833b2724f 100644 --- a/src/shogun/lib/RefCount.cpp +++ b/src/shogun/lib/RefCount.cpp @@ -4,7 +4,7 @@ using namespace shogun; int32_t RefCount::ref() { -#ifdef HAVE_CXX11_ATOMIC +#ifdef SHOGUN_HAVE_CXX11_ATOMIC int32_t count = rc.fetch_add(1)+1; #else lock.lock(); @@ -17,7 +17,7 @@ int32_t RefCount::ref() int32_t RefCount::unref() { -#ifdef HAVE_CXX11_ATOMIC +#ifdef SHOGUN_HAVE_CXX11_ATOMIC int32_t count = rc.fetch_sub(1)-1; #else lock.lock(); @@ -30,7 +30,7 @@ int32_t RefCount::unref() int32_t RefCount::ref_count() { -#ifdef HAVE_CXX11_ATOMIC +#ifdef SHOGUN_HAVE_CXX11_ATOMIC int32_t count = rc.load(); #else lock.lock(); diff --git a/src/shogun/lib/SGMatrix.cpp b/src/shogun/lib/SGMatrix.cpp index ff41d09c1b1..bbe7fd4d27f 100644 --- a/src/shogun/lib/SGMatrix.cpp +++ b/src/shogun/lib/SGMatrix.cpp @@ -727,7 +727,7 @@ SGMatrix SGMatrix::create_centering_matrix(index_t size) //The pseudo inverse A+ can be constructed from the singular value //decomposition A = UDV^T , by A^+ = V(D+)U^T. -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK template float64_t* SGMatrix::pinv( float64_t* matrix, int32_t rows, int32_t cols, float64_t* target) @@ -827,7 +827,7 @@ void SGMatrix::compute_few_eigenvectors(double* matrix_, double*& eigenvalues ASSERT(status==0) } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK template SGMatrix SGMatrix::matrix_multiply( @@ -850,7 +850,7 @@ SGMatrix SGMatrix::matrix_multiply( /* allocate result matrix */ SGMatrix C(rows_A, cols_B); C.zero(); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /* multiply */ cblas_dgemm(CblasColMajor, transpose_A ? CblasTrans : CblasNoTrans, @@ -867,7 +867,7 @@ SGMatrix SGMatrix::matrix_multiply( C(i,j) += A(i,k)*B(k,j); } } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK return C; } diff --git a/src/shogun/lib/SGVector.cpp b/src/shogun/lib/SGVector.cpp index 4570411626c..21d2f1cf424 100644 --- a/src/shogun/lib/SGVector.cpp +++ b/src/shogun/lib/SGVector.cpp @@ -127,7 +127,7 @@ void SGVector::set_const(T const_elem) vector[i]=const_elem ; } -#if HAVE_CATLAS +#if SHOGUN_HAVE_CATLAS template<> void SGVector::set_const(float64_t const_elem) { @@ -139,7 +139,7 @@ void SGVector::set_const(float32_t const_elem) { catlas_sset(vlen, const_elem, vector, 1); } -#endif // HAVE_CATLAS +#endif // SHOGUN_HAVE_CATLAS template void SGVector::range_fill(T start) @@ -588,7 +588,7 @@ template <> void SGVector::vec1_plus_scalar_times_vec2(float64_t* vec1, float64_t scalar, const float64_t* vec2, int32_t n) { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK int32_t skip=1; cblas_daxpy(n, scalar, vec2, skip, vec1, skip); #else @@ -601,7 +601,7 @@ template <> void SGVector::vec1_plus_scalar_times_vec2(float32_t* vec1, float32_t scalar, const float32_t* vec2, int32_t n) { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK int32_t skip=1; cblas_saxpy(n, scalar, vec2, skip, vec1, skip); #else @@ -614,11 +614,11 @@ template float64_t SGVector::dot(const float64_t* v1, const float64_t* v2, int32_t n) { float64_t r=0; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 Eigen::Map ev1(v1,n); Eigen::Map ev2(v2,n); r = ev1.dot(ev2); -#elif HAVE_LAPACK +#elif SHOGUN_HAVE_LAPACK int32_t skip=1; r = cblas_ddot(n, v1, skip, v2, skip); #else @@ -632,11 +632,11 @@ template float32_t SGVector::dot(const float32_t* v1, const float32_t* v2, int32_t n) { float32_t r=0; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 Eigen::Map ev1(v1,n); Eigen::Map ev2(v2,n); r = ev1.dot(ev2); -#elif HAVE_LAPACK +#elif SHOGUN_HAVE_LAPACK int32_t skip=1; r = cblas_sdot(n, v1, skip, v2, skip); #else @@ -850,7 +850,7 @@ template <> float64_t SGVector::twonorm(const float64_t* v, int32_t n) { float64_t norm = 0.0; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK norm = cblas_dnrm2(n, v, 1); #else norm = CMath::sqrt(SGVector::dot(v, v, n)); @@ -934,7 +934,7 @@ template return minv; } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK template <> float64_t SGVector::max_abs(float64_t* vec, int32_t len) { @@ -989,7 +989,7 @@ T SGVector::max(T* vec, int32_t len) return maxv; } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK template <> int32_t SGVector::arg_max_abs(float64_t* vec, int32_t inc, int32_t len, float64_t* maxv_ptr) { @@ -1115,7 +1115,7 @@ T SGVector::sum_abs(T* vec, int32_t len) return result; } -#if HAVE_LAPACK +#if SHOGUN_HAVE_LAPACK template <> float64_t SGVector::sum_abs(float64_t* vec, int32_t len) { @@ -1182,7 +1182,7 @@ void SGVector::scale_vector(T alpha, T* vec, int32_t len) vec[i]*=alpha; } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK template<> void SGVector::scale_vector(float64_t alpha, float64_t* vec, int32_t len) { diff --git a/src/shogun/lib/external/SFMT/SFMT.c b/src/shogun/lib/external/SFMT/SFMT.c index 9b7e465e8ea..0a9fae0732f 100644 --- a/src/shogun/lib/external/SFMT/SFMT.c +++ b/src/shogun/lib/external/SFMT/SFMT.c @@ -52,7 +52,7 @@ static void period_certification(sfmt_t * sfmt); inline static void swap(w128_t *array, int size); #endif -#if defined(HAVE_SSE2) +#if defined(SHOGUN_HAVE_SSE2) #include #endif @@ -70,7 +70,7 @@ inline static int idxof(int i) { } #endif -#if !defined(HAVE_SSE2) +#if !defined(SHOGUN_HAVE_SSE2) /** * This function fills the user-specified array with pseudorandom * integers. @@ -221,7 +221,7 @@ int sfmt_get_min_array_size64(sfmt_t * sfmt) { return SFMT_N64; } -#if !defined(HAVE_SSE2) +#if !defined(SHOGUN_HAVE_SSE2) /** * This function fills the internal state array with pseudorandom * integers. diff --git a/src/shogun/lib/external/SFMT/SFMT.h b/src/shogun/lib/external/SFMT/SFMT.h index 8d087528a88..ac19a9675cc 100644 --- a/src/shogun/lib/external/SFMT/SFMT.h +++ b/src/shogun/lib/external/SFMT/SFMT.h @@ -70,7 +70,7 @@ extern "C" { /*------------------------------------------ 128-bit SIMD like data type for standard C ------------------------------------------*/ -#if defined(HAVE_SSE2) +#if defined(SHOGUN_HAVE_SSE2) #include /** 128-bit data structure */ diff --git a/src/shogun/lib/external/dSFMT/dSFMT-common.h b/src/shogun/lib/external/dSFMT/dSFMT-common.h index b7f683e145a..bd1a8851235 100644 --- a/src/shogun/lib/external/dSFMT/dSFMT-common.h +++ b/src/shogun/lib/external/dSFMT/dSFMT-common.h @@ -23,7 +23,7 @@ #include -#if defined(HAVE_SSE2) +#if defined(SHOGUN_HAVE_SSE2) # include union X128I_T { uint64_t u[2]; @@ -37,7 +37,7 @@ union X128D_T { static const union X128I_T sse2_param_mask = {{DSFMT_MSK1, DSFMT_MSK2}}; #endif -#if defined(HAVE_ALTIVEC) +#if defined(SHOGUN_HAVE_ALTIVEC) inline static void do_recursion(dw128_t *r, dw128_t *a, dw128_t * b, dw128_t *lung) { const vector unsigned char sl1 = ALTI_SL1; @@ -66,7 +66,7 @@ inline static void do_recursion(dw128_t *r, dw128_t *a, dw128_t * b, r->s = vec_xor(z, x); lung->s = w; } -#elif defined(HAVE_SSE2) +#elif defined(SHOGUN_HAVE_SSE2) /** * This function represents the recursion formula. * @param r output 128-bit diff --git a/src/shogun/lib/external/dSFMT/dSFMT-params.h b/src/shogun/lib/external/dSFMT/dSFMT-params.h index 52d853e146a..2e50feae866 100644 --- a/src/shogun/lib/external/dSFMT/dSFMT-params.h +++ b/src/shogun/lib/external/dSFMT/dSFMT-params.h @@ -35,9 +35,9 @@ define DSFMT_PCV2 UINT64_C(0x00000000) #define DSFMT_SR 12 /* for sse2 */ -#if defined(HAVE_SSE2) +#if defined(SHOGUN_HAVE_SSE2) #define SSE2_SHUFF 0x1b -#elif defined(HAVE_ALTIVEC) +#elif defined(SHOGUN_HAVE_ALTIVEC) #if defined(__APPLE__) /* For OSX */ #define ALTI_SR (vector unsigned char)(4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4) #define ALTI_SR_PERM \ diff --git a/src/shogun/lib/external/dSFMT/dSFMT.c b/src/shogun/lib/external/dSFMT/dSFMT.c index 1730b04b76d..65d64f2ce29 100644 --- a/src/shogun/lib/external/dSFMT/dSFMT.c +++ b/src/shogun/lib/external/dSFMT/dSFMT.c @@ -43,7 +43,7 @@ inline static int idxof(int i); static void initial_mask(dsfmt_t *dsfmt); static void period_certification(dsfmt_t *dsfmt); -#if defined(HAVE_SSE2) +#if defined(SHOGUN_HAVE_SSE2) /** 1 in 64bit for sse2 */ static const union X128I_T sse2_int_one = {{1, 1}}; /** 2.0 double for sse2 */ @@ -66,7 +66,7 @@ inline static int idxof(int i) { } #endif -#if defined(HAVE_SSE2) +#if defined(SHOGUN_HAVE_SSE2) /** * This function converts the double precision floating point numbers which * distribute uniformly in the range [1, 2) to those which distribute uniformly diff --git a/src/shogun/lib/external/dSFMT/dSFMT.h b/src/shogun/lib/external/dSFMT/dSFMT.h index e96f1d3e537..a5bff4e76d0 100644 --- a/src/shogun/lib/external/dSFMT/dSFMT.h +++ b/src/shogun/lib/external/dSFMT/dSFMT.h @@ -131,7 +131,7 @@ typedef unsigned __int64 uint64_t; /*------------------------------------------ 128-bit SIMD like data type for standard C ------------------------------------------*/ -#if defined(HAVE_ALTIVEC) +#if defined(SHOGUN_HAVE_ALTIVEC) # if !defined(__APPLE__) # include # endif @@ -143,7 +143,7 @@ union dW128_T { double d[2]; }; -#elif defined(HAVE_SSE2) +#elif defined(SHOGUN_HAVE_SSE2) # include /** 128-bit data structure */ diff --git a/src/shogun/lib/external/pr_loqo.cpp b/src/shogun/lib/external/pr_loqo.cpp index 61df7d2948c..0d688efa8a1 100644 --- a/src/shogun/lib/external/pr_loqo.cpp +++ b/src/shogun/lib/external/pr_loqo.cpp @@ -50,7 +50,7 @@ void nrerror(char error_text[]) leaves upper right triangle intact (rows first order) ***************************************************************/ -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK bool choldc(float64_t* a, int32_t n, float64_t* p) { if (n<=0) diff --git a/src/shogun/lib/external/shogun_libsvm.cpp b/src/shogun/lib/external/shogun_libsvm.cpp index 993cdc85dc1..8015eea0c18 100644 --- a/src/shogun/lib/external/shogun_libsvm.cpp +++ b/src/shogun/lib/external/shogun_libsvm.cpp @@ -50,7 +50,7 @@ #include #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -283,7 +283,7 @@ class LibSVMKernel: public QMatrix { } else { -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD int32_t total_num=(len-start); pthread_t* threads = SG_MALLOC(pthread_t, num_threads-1); Q_THREAD_PARAM* params = SG_MALLOC(Q_THREAD_PARAM, num_threads); @@ -329,7 +329,7 @@ class LibSVMKernel: public QMatrix { SG_FREE(params); SG_FREE(threads); -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ } } diff --git a/src/shogun/lib/malsar/malsar_clustered.cpp b/src/shogun/lib/malsar/malsar_clustered.cpp index a9d42b16a9b..1d5ca804d16 100644 --- a/src/shogun/lib/malsar/malsar_clustered.cpp +++ b/src/shogun/lib/malsar/malsar_clustered.cpp @@ -9,8 +9,8 @@ */ #include -#ifdef HAVE_EIGEN3 -#ifndef HAVE_CXX11 +#ifdef SHOGUN_HAVE_EIGEN3 +#ifndef SHOGUN_HAVE_CXX11 #include #include #include diff --git a/src/shogun/lib/malsar/malsar_joint_feature_learning.cpp b/src/shogun/lib/malsar/malsar_joint_feature_learning.cpp index 46a1d1cb853..feaf15b6e2d 100644 --- a/src/shogun/lib/malsar/malsar_joint_feature_learning.cpp +++ b/src/shogun/lib/malsar/malsar_joint_feature_learning.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/src/shogun/lib/malsar/malsar_low_rank.cpp b/src/shogun/lib/malsar/malsar_low_rank.cpp index 9f1ce3f8f59..169b021597c 100644 --- a/src/shogun/lib/malsar/malsar_low_rank.cpp +++ b/src/shogun/lib/malsar/malsar_low_rank.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/src/shogun/lib/memory.cpp b/src/shogun/lib/memory.cpp index cbb29016146..89fa1f6d70e 100644 --- a/src/shogun/lib/memory.cpp +++ b/src/shogun/lib/memory.cpp @@ -19,9 +19,9 @@ #include -#ifdef USE_JEMALLOC +#ifdef SHOGUN_USE_JEMALLOC #include -#elif USE_TCMALLOC +#elif SHOGUN_USE_TCMALLOC #include #endif @@ -89,15 +89,15 @@ void MemoryBlock::set_sgobject() } #endif -#ifdef HAVE_CXX11 +#ifdef SHOGUN_HAVE_CXX11 void* operator new(size_t size) #else void* operator new(size_t size) throw (std::bad_alloc) #endif { -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) void *p=je_malloc(size); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) void *p=tc_malloc(size); #else void *p=malloc(size); @@ -129,24 +129,24 @@ void operator delete(void *p) throw() sg_mallocs->remove(p); #endif -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) je_free(p); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) tc_free(p); #else free(p); #endif } -#ifdef HAVE_CXX11 +#ifdef SHOGUN_HAVE_CXX11 void* operator new[](size_t size) #else void* operator new[](size_t size) throw(std::bad_alloc) #endif { -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) void *p=je_malloc(size); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) void *p=tc_malloc(size); #else void *p=malloc(size); @@ -179,9 +179,9 @@ void operator delete[](void *p) throw() sg_mallocs->remove(p); #endif -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) je_free(p); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) tc_free(p); #else free(p); @@ -196,9 +196,9 @@ void* sg_malloc(size_t size #endif ) { -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) void* p=je_malloc(size); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) void *p=tc_malloc(size); #else void* p=malloc(size); @@ -229,9 +229,9 @@ void* sg_calloc(size_t num, size_t size #endif ) { -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) void* p=je_calloc(num, size); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) void* p=tc_calloc(num, size); #else void* p=calloc(num, size); @@ -266,9 +266,9 @@ void sg_free(void* ptr) sg_mallocs->remove(ptr); #endif -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) je_free(ptr); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) tc_free(ptr); #else free(ptr); @@ -281,9 +281,9 @@ void* sg_realloc(void* ptr, size_t size #endif ) { -#if defined(USE_JEMALLOC) +#if defined(SHOGUN_USE_JEMALLOC) void* p=je_realloc(ptr, size); -#elif defined(USE_TCMALLOC) +#elif defined(SHOGUN_USE_TCMALLOC) void* p=tc_realloc(ptr, size); #else void* p=realloc(ptr, size); diff --git a/src/shogun/lib/slep/slep_mc_plain_lr.cpp b/src/shogun/lib/slep/slep_mc_plain_lr.cpp index 2c221767763..20d2283dcf8 100644 --- a/src/shogun/lib/slep/slep_mc_plain_lr.cpp +++ b/src/shogun/lib/slep/slep_mc_plain_lr.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/src/shogun/lib/slep/slep_mc_tree_lr.cpp b/src/shogun/lib/slep/slep_mc_tree_lr.cpp index 95edda3b581..d5b35eab37c 100644 --- a/src/shogun/lib/slep/slep_mc_tree_lr.cpp +++ b/src/shogun/lib/slep/slep_mc_tree_lr.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include diff --git a/src/shogun/lib/tapkee/tapkee_shogun.cpp b/src/shogun/lib/tapkee/tapkee_shogun.cpp index c7673ab5787..2a6591f9e20 100644 --- a/src/shogun/lib/tapkee/tapkee_shogun.cpp +++ b/src/shogun/lib/tapkee/tapkee_shogun.cpp @@ -9,14 +9,14 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #define CUSTOM_UNIFORM_RANDOM_INDEX_FUNCTION shogun::CMath::random() #define CUSTOM_UNIFORM_RANDOM_FUNCTION shogun::CMath::random(static_cast(0),static_cast(1)) #define CUSTOM_GAUSSIAN_RANDOM_FUNCTION shogun::CMath::normal_random(static_cast(0),static_cast(1)) #define TAPKEE_EIGEN_INCLUDE_FILE -#ifdef HAVE_ARPACK +#ifdef SHOGUN_HAVE_ARPACK #define TAPKEE_WITH_ARPACK #endif #define TAPKEE_USE_LGPL_COVERTREE @@ -80,7 +80,7 @@ CDenseFeatures* shogun::tapkee_embed(const shogun::TAPKEE_PARAMETERS_ ShogunFeatureVectorCallback features_callback(parameters.features); tapkee::DimensionReductionMethod method; -#ifdef HAVE_ARPACK +#ifdef SHOGUN_HAVE_ARPACK tapkee::EigenMethod eigen_method = tapkee::Arpack; #else tapkee::EigenMethod eigen_method = tapkee::Dense; diff --git a/src/shogun/machine/DistanceMachine.cpp b/src/shogun/machine/DistanceMachine.cpp index 5c8ec3fa159..b0f1063c80a 100644 --- a/src/shogun/machine/DistanceMachine.cpp +++ b/src/shogun/machine/DistanceMachine.cpp @@ -67,7 +67,7 @@ void CDistanceMachine::distances_lhs(float64_t* result,int32_t idx_a1,int32_t id run_distance_thread_lhs((void*) ¶m); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { pthread_t* threads = SG_MALLOC(pthread_t, num_threads-1); diff --git a/src/shogun/machine/GaussianProcessMachine.cpp b/src/shogun/machine/GaussianProcessMachine.cpp index 0c338a774f8..c8aa56e0c3a 100644 --- a/src/shogun/machine/GaussianProcessMachine.cpp +++ b/src/shogun/machine/GaussianProcessMachine.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -174,4 +174,4 @@ SGVector CGaussianProcessMachine::get_posterior_variances( return s2; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/KernelMachine.cpp b/src/shogun/machine/KernelMachine.cpp index 9dfc121815f..d2759d46117 100644 --- a/src/shogun/machine/KernelMachine.cpp +++ b/src/shogun/machine/KernelMachine.cpp @@ -345,7 +345,7 @@ SGVector CKernelMachine::apply_get_outputs(CFeatures* data) params.indices_len = 0; apply_helper((void*) ¶ms); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { pthread_t* threads = SG_MALLOC(pthread_t, num_threads-1); @@ -563,7 +563,7 @@ SGVector CKernelMachine::apply_locked_get_output( params.verbose=true; apply_helper((void*) ¶ms); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { pthread_t* threads = SG_MALLOC(pthread_t, num_threads-1); diff --git a/src/shogun/machine/gp/EPInferenceMethod.cpp b/src/shogun/machine/gp/EPInferenceMethod.cpp index 83dc3e892a7..afb375aa2ab 100644 --- a/src/shogun/machine/gp/EPInferenceMethod.cpp +++ b/src/shogun/machine/gp/EPInferenceMethod.cpp @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -479,4 +479,4 @@ SGVector CEPInferenceMethod::get_derivative_wrt_mean( return SGVector(); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/ExactInferenceMethod.cpp b/src/shogun/machine/gp/ExactInferenceMethod.cpp index ff64d16d40b..5860c498edf 100644 --- a/src/shogun/machine/gp/ExactInferenceMethod.cpp +++ b/src/shogun/machine/gp/ExactInferenceMethod.cpp @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -362,4 +362,4 @@ SGVector CExactInferenceMethod::get_derivative_wrt_mean( return result; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/FITCInferenceMethod.cpp b/src/shogun/machine/gp/FITCInferenceMethod.cpp index df8ac91607d..f15a9fd18de 100644 --- a/src/shogun/machine/gp/FITCInferenceMethod.cpp +++ b/src/shogun/machine/gp/FITCInferenceMethod.cpp @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -528,4 +528,4 @@ SGVector CFITCInferenceMethod::get_derivative_wrt_mean( return result; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/GaussianLikelihood.cpp b/src/shogun/machine/gp/GaussianLikelihood.cpp index dc655a1c5a7..f8290059f6e 100644 --- a/src/shogun/machine/gp/GaussianLikelihood.cpp +++ b/src/shogun/machine/gp/GaussianLikelihood.cpp @@ -11,7 +11,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -292,4 +292,4 @@ float64_t CGaussianLikelihood::get_second_moment(SGVector mu, return Var; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/InferenceMethod.cpp b/src/shogun/machine/gp/InferenceMethod.cpp index 8d57023ee3e..79437fb55ef 100644 --- a/src/shogun/machine/gp/InferenceMethod.cpp +++ b/src/shogun/machine/gp/InferenceMethod.cpp @@ -12,7 +12,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -155,10 +155,10 @@ get_negative_log_marginal_likelihood_derivatives(CMap* // create lock object CLock lock; -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD if (num_deriv<2) { -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ for (index_t i=0; i* node=params->get_node_ptr(i); @@ -173,7 +173,7 @@ get_negative_log_marginal_likelihood_derivatives(CMap* get_derivative_helper((void*) &thread_params); } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD } else { @@ -201,7 +201,7 @@ get_negative_log_marginal_likelihood_derivatives(CMap* SG_FREE(thread_params); SG_FREE(threads); } -#endif /* HAVE_PTHREAD */ +#endif /* SHOGUN_HAVE_PTHREAD */ return result; } @@ -283,4 +283,4 @@ void CInferenceMethod::update_train_kernel() m_ktrtr=m_kernel->get_kernel_matrix(); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/LaplacianInferenceMethod.cpp b/src/shogun/machine/gp/LaplacianInferenceMethod.cpp index be8f77fa280..a1467706fee 100644 --- a/src/shogun/machine/gp/LaplacianInferenceMethod.cpp +++ b/src/shogun/machine/gp/LaplacianInferenceMethod.cpp @@ -15,7 +15,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -605,4 +605,4 @@ SGVector CLaplacianInferenceMethod::get_derivative_wrt_mean( } } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/LogitLikelihood.cpp b/src/shogun/machine/gp/LogitLikelihood.cpp index 4ffd4ac69c7..89244254925 100644 --- a/src/shogun/machine/gp/LogitLikelihood.cpp +++ b/src/shogun/machine/gp/LogitLikelihood.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -475,4 +475,4 @@ float64_t CLogitLikelihood::get_second_moment(SGVector mu, } } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/ProbitLikelihood.cpp b/src/shogun/machine/gp/ProbitLikelihood.cpp index 54f127d0f83..0f9c3adc316 100644 --- a/src/shogun/machine/gp/ProbitLikelihood.cpp +++ b/src/shogun/machine/gp/ProbitLikelihood.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -245,4 +245,4 @@ float64_t CProbitLikelihood::get_second_moment(SGVector mu, return Var; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/machine/gp/StudentsTLikelihood.cpp b/src/shogun/machine/gp/StudentsTLikelihood.cpp index e411121c05d..dfe2533a319 100644 --- a/src/shogun/machine/gp/StudentsTLikelihood.cpp +++ b/src/shogun/machine/gp/StudentsTLikelihood.cpp @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -704,4 +704,4 @@ float64_t CStudentsTLikelihood::get_second_moment(SGVector mu, } } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/mathematics/Cplex.cpp b/src/shogun/mathematics/Cplex.cpp index 99706407013..a1d602afcac 100644 --- a/src/shogun/mathematics/Cplex.cpp +++ b/src/shogun/mathematics/Cplex.cpp @@ -10,7 +10,7 @@ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX #include #include diff --git a/src/shogun/mathematics/Integration.cpp b/src/shogun/mathematics/Integration.cpp index 68d3f8a73ff..aaaa4daa0ac 100644 --- a/src/shogun/mathematics/Integration.cpp +++ b/src/shogun/mathematics/Integration.cpp @@ -17,7 +17,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -783,4 +783,4 @@ float64_t CIntegration::evaluate_quadgh64(CFunction* f) } } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/mathematics/JacobiEllipticFunctions.cpp b/src/shogun/mathematics/JacobiEllipticFunctions.cpp index eeb4af024f5..7fe7ef6968c 100644 --- a/src/shogun/mathematics/JacobiEllipticFunctions.cpp +++ b/src/shogun/mathematics/JacobiEllipticFunctions.cpp @@ -20,13 +20,13 @@ void CJacobiEllipticFunctions::ellipKKp(Real L, Real &K, Real &Kp) REQUIRE(L>=0.0, "CJacobiEllipticFunctions::ellipKKp(): \ Parameter L should be non-negative\n"); -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC const Real eps=Real(std::numeric_limits::epsilon()); const Real pi=mp_real::_pi; #else const Real eps=std::numeric_limits::epsilon(); const Real pi=M_PI; -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC if (L>10.0) { K=pi*0.5; @@ -61,14 +61,14 @@ void CJacobiEllipticFunctions "CJacobiEllipticFunctions::ellipJC(): \ Parameter m should be >=0 and <=1\n"); -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC const Real eps=sqrt(mp_real::_eps); #else const Real eps=sqrt(std::numeric_limits::epsilon()); -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC if (m>=(1.0-eps)) { -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC complex128_t _u(dble(u.real),dble(u.imag)); complex128_t t=CMath::tanh(_u); complex128_t b=CMath::cosh(_u); @@ -91,7 +91,7 @@ void CJacobiEllipticFunctions ai*=t*phi; cn=phi-ai*(twon-u); dn=phi+ai*(twon+u); -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC } else { diff --git a/src/shogun/mathematics/Math.cpp b/src/shogun/mathematics/Math.cpp index be212f1bde1..6d34745c091 100644 --- a/src/shogun/mathematics/Math.cpp +++ b/src/shogun/mathematics/Math.cpp @@ -21,16 +21,16 @@ using namespace shogun; -#ifdef USE_LOGCACHE -#ifdef USE_HMMDEBUG +#ifdef SHOGUN_USE_LOGCACHE +#ifdef SHOGUN_USE_HMMDEBUG #define MAX_LOG_TABLE_SIZE 10*1024*1024 #define LOG_TABLE_PRECISION 1e-6 -#else //USE_HMMDEBUG +#else // SHOGUN_USE_HMMDEBUG #define MAX_LOG_TABLE_SIZE 123*1024*1024 #define LOG_TABLE_PRECISION 1e-15 -#endif //USE_HMMDEBUG +#endif // SHOGUN_USE_HMMDEBUG int32_t CMath::LOGACCURACY = 0; // 100000 steps per integer -#endif // USE_LOGCACHE +#endif // SHOGUN_USE_LOGCACHE int32_t CMath::LOGRANGE = 0; // range for logtable: log(1+exp(x)) -25 <= x <= 0 @@ -42,7 +42,7 @@ const float64_t CMath::MACHINE_EPSILON=5E-16; const float64_t CMath::MAX_REAL_NUMBER=1E300; const float64_t CMath::MIN_REAL_NUMBER=1E-300; -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE float64_t* CMath::logtable = NULL; #endif uint32_t CMath::seed = 0; @@ -50,7 +50,7 @@ uint32_t CMath::seed = 0; CMath::CMath() : CSGObject() { -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE LOGRANGE=CMath::determine_logrange(); LOGACCURACY=CMath::determine_logaccuracy(LOGRANGE); CMath::logtable=SG_MALLOC(float64_t, LOGRANGE*LOGACCURACY); @@ -66,13 +66,13 @@ CMath::CMath() CMath::~CMath() { -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE SG_FREE(CMath::logtable); CMath::logtable=NULL; #endif } -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE int32_t CMath::determine_logrange() { int32_t i; @@ -201,21 +201,21 @@ void CMath::linspace(float64_t* output, float64_t start, float64_t end, int32_t int CMath::is_nan(double f) { -#ifndef HAVE_STD_ISNAN -#if (HAVE_DECL_ISNAN == 1) || defined(HAVE_ISNAN) +#ifndef SHOGUN_HAVE_STD_ISNAN +#if (SHOGUN_HAVE_DECL_ISNAN == 1) || defined(SHOGUN_HAVE_ISNAN) return ::isnan(f); #else return ((f != f) ? 1 : 0); -#endif // #if (HAVE_DECL_ISNAN == 1) || defined(HAVE_ISNAN) -#endif // #ifndef HAVE_STD_ISNAN +#endif // #if (SHOGUN_HAVE_DECL_ISNAN == 1) || defined(SHOGUN_HAVE_ISNAN) +#endif // #ifndef SHOGUN_HAVE_STD_ISNAN return std::isnan(f); } int CMath::is_infinity(double f) { -#ifndef HAVE_STD_ISINF -#if (HAVE_DECL_ISINF == 1) || defined(HAVE_ISINF) +#ifndef SHOGUN_HAVE_STD_ISINF +#if (SHOGUN_HAVE_DECL_ISINF == 1) || defined(SHOGUN_HAVE_ISINF) return ::isinf(f); #elif defined(FPCLASS) if (::fpclass(f) == FP_NINF) return -1; @@ -225,23 +225,23 @@ int CMath::is_infinity(double f) if ((f == f) && ((f - f) != 0.0)) return (f < 0.0 ? -1 : 1); else return 0; } -#endif // #if (HAVE_DECL_ISINF == 1) || defined(HAVE_ISINF) -#endif // #ifndef HAVE_STD_ISINF +#endif // #if (SHOGUN_HAVE_DECL_ISINF == 1) || defined(SHOGUN_HAVE_ISINF) +#endif // #ifndef SHOGUN_HAVE_STD_ISINF return std::isinf(f); } int CMath::is_finite(double f) { -#ifndef HAVE_STD_ISFINITE -#if (HAVE_DECL_ISFINITE == 1) || defined(HAVE_ISFINITE) +#ifndef SHOGUN_HAVE_STD_ISFINITE +#if (SHOGUN_HAVE_DECL_ISFINITE == 1) || defined(SHOGUN_HAVE_ISFINITE) return ::isfinite(f); -#elif defined(HAVE_FINITE) +#elif defined(SHOGUN_HAVE_FINITE) return ::finite(f); #else return ((!std::isnan(f) && !std::isinf(f)) ? 1 : 0); -#endif // #if (HAVE_DECL_ISFINITE == 1) || defined(HAVE_ISFINITE) -#endif // #ifndef HAVE_STD_ISFINITE +#endif // #if (SHOGUN_HAVE_DECL_ISFINITE == 1) || defined(SHOGUN_HAVE_ISFINITE) +#endif // #ifndef SHOGUN_HAVE_STD_ISFINITE return std::isfinite(f); } \ No newline at end of file diff --git a/src/shogun/mathematics/Mosek.cpp b/src/shogun/mathematics/Mosek.cpp index d8d4bc594a9..53e097634a9 100644 --- a/src/shogun/mathematics/Mosek.cpp +++ b/src/shogun/mathematics/Mosek.cpp @@ -8,7 +8,7 @@ * Copyright (C) 2012 Fernando José Iglesias García */ -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK //#define DEBUG_MOSEK //#define DEBUG_SOLUTION @@ -503,4 +503,4 @@ float64_t CMosek::get_primal_objective_value() const return po; } -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ diff --git a/src/shogun/mathematics/Random.cpp b/src/shogun/mathematics/Random.cpp index 57a0bdeea70..a7ac4175a21 100644 --- a/src/shogun/mathematics/Random.cpp +++ b/src/shogun/mathematics/Random.cpp @@ -139,7 +139,7 @@ uint64_t CRandom::random_64() const void CRandom::fill_array(uint32_t* array, int32_t size) const { -#if defined(USE_ALIGNED_MEMORY) || defined(DARWIN) +#if defined(SHOGUN_USE_ALIGNED_MEMORY) || defined(DARWIN) if ((size >= sfmt_get_min_array_size32(m_sfmt_32)) && (size % 4) == 0) { sfmt_fill_array32(m_sfmt_32, array, size); @@ -152,7 +152,7 @@ void CRandom::fill_array(uint32_t* array, int32_t size) const void CRandom::fill_array(uint64_t* array, int32_t size) const { -#if defined(USE_ALIGNED_MEMORY) || defined(DARWIN) +#if defined(SHOGUN_USE_ALIGNED_MEMORY) || defined(DARWIN) if ((size >= sfmt_get_min_array_size64(m_sfmt_64)) && (size % 2) == 0) { sfmt_fill_array64(m_sfmt_64, array, size); @@ -165,7 +165,7 @@ void CRandom::fill_array(uint64_t* array, int32_t size) const void CRandom::fill_array_oc(float64_t* array, int32_t size) const { -#if defined(USE_ALIGNED_MEMORY) || defined(DARWIN) +#if defined(SHOGUN_USE_ALIGNED_MEMORY) || defined(DARWIN) if ((size >= dsfmt_get_min_array_size()) && (size % 2) == 0) { dsfmt_fill_array_open_close(m_dsfmt, array, size); @@ -178,7 +178,7 @@ void CRandom::fill_array_oc(float64_t* array, int32_t size) const void CRandom::fill_array_co(float64_t* array, int32_t size) const { -#if defined(USE_ALIGNED_MEMORY) || defined(DARWIN) +#if defined(SHOGUN_USE_ALIGNED_MEMORY) || defined(DARWIN) if ((size >= dsfmt_get_min_array_size()) && (size % 2) == 0) { dsfmt_fill_array_close_open(m_dsfmt, array, size); @@ -191,7 +191,7 @@ void CRandom::fill_array_co(float64_t* array, int32_t size) const void CRandom::fill_array_oo(float64_t* array, int32_t size) const { -#if defined(USE_ALIGNED_MEMORY) || defined(DARWIN) +#if defined(SHOGUN_USE_ALIGNED_MEMORY) || defined(DARWIN) if ((size >= dsfmt_get_min_array_size()) && (size % 2) == 0) { dsfmt_fill_array_open_open(m_dsfmt, array, size); @@ -204,7 +204,7 @@ void CRandom::fill_array_oo(float64_t* array, int32_t size) const void CRandom::fill_array_c1o2(float64_t* array, int32_t size) const { -#if defined(USE_ALIGNED_MEMORY) || defined(DARWIN) +#if defined(SHOGUN_USE_ALIGNED_MEMORY) || defined(DARWIN) if ((size >= dsfmt_get_min_array_size()) && (size % 2) == 0) { dsfmt_fill_array_close1_open2(m_dsfmt, array, size); @@ -317,7 +317,7 @@ uint32_t CRandom::generate_seed() uint32_t seed; #if defined(_WIN32) rand_s(&seed); -#elif defined(HAVE_ARC4RANDOM) +#elif defined(SHOGUN_HAVE_ARC4RANDOM) seed = arc4random(); #elif defined(DEV_RANDOM) int fd = open(DEV_RANDOM, O_RDONLY); diff --git a/src/shogun/mathematics/Statistics.cpp b/src/shogun/mathematics/Statistics.cpp index b69139c0916..ea74cbbde3d 100644 --- a/src/shogun/mathematics/Statistics.cpp +++ b/src/shogun/mathematics/Statistics.cpp @@ -20,14 +20,14 @@ #include #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include using namespace Eigen; -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 using namespace shogun; @@ -313,7 +313,7 @@ SGVector CStatistics::matrix_std_deviation( return var; } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGMatrix CStatistics::covariance_matrix( SGMatrix observations, bool in_place) { @@ -336,7 +336,7 @@ SGMatrix CStatistics::covariance_matrix( return cov; } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK float64_t CStatistics::confidence_intervals_mean(SGVector values, float64_t alpha, float64_t& conf_int_low, float64_t& conf_int_up) @@ -2015,7 +2015,7 @@ float64_t CStatistics::dlgamma(float64_t x) return result; } -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 float64_t CStatistics::log_det(SGMatrix m) { /* map the matrix to eigen3 to perform cholesky */ @@ -2186,7 +2186,7 @@ SGMatrix CStatistics::sample_from_gaussian(SGVector mean, return S; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 CStatistics::SigmoidParamters CStatistics::fit_sigmoid(SGVector scores) { diff --git a/src/shogun/mathematics/ajd/FFDiag.cpp b/src/shogun/mathematics/ajd/FFDiag.cpp index 0e6f05170f3..1e385048400 100644 --- a/src/shogun/mathematics/ajd/FFDiag.cpp +++ b/src/shogun/mathematics/ajd/FFDiag.cpp @@ -1,4 +1,4 @@ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -131,4 +131,4 @@ void getW(float64_t *C, int *ptN, int *ptK, float64_t *W) return; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/ajd/JADiag.cpp b/src/shogun/mathematics/ajd/JADiag.cpp index 6a56ad06e84..37714b4e98a 100644 --- a/src/shogun/mathematics/ajd/JADiag.cpp +++ b/src/shogun/mathematics/ajd/JADiag.cpp @@ -1,4 +1,4 @@ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -223,4 +223,4 @@ void jadiagw(float64_t c[], float64_t w[], int *ptn, int *ptm, float64_t a[], return; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/ajd/JADiagOrth.cpp b/src/shogun/mathematics/ajd/JADiagOrth.cpp index bdbff5e1be9..df4c466976f 100644 --- a/src/shogun/mathematics/ajd/JADiagOrth.cpp +++ b/src/shogun/mathematics/ajd/JADiagOrth.cpp @@ -1,4 +1,4 @@ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -152,4 +152,4 @@ void left_rot_simple(float64_t *A, int m, int n, int p, int q, float64_t c, floa A[iy] = s*nx + c*ny; } } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/ajd/JediDiag.cpp b/src/shogun/mathematics/ajd/JediDiag.cpp index a7f94ced4b8..489d99a3d92 100644 --- a/src/shogun/mathematics/ajd/JediDiag.cpp +++ b/src/shogun/mathematics/ajd/JediDiag.cpp @@ -1,4 +1,4 @@ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -269,4 +269,4 @@ void iterJDI(float64_t *C, int *pMatSize, int *pMatNumber, int *ptn,int *ptm, A[n*MS+i] = -rm21*col1 + rm11*col2; } } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/ajd/QDiag.cpp b/src/shogun/mathematics/ajd/QDiag.cpp index f1dc43392ec..68cecea0454 100644 --- a/src/shogun/mathematics/ajd/QDiag.cpp +++ b/src/shogun/mathematics/ajd/QDiag.cpp @@ -1,4 +1,4 @@ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -174,4 +174,4 @@ SGMatrix CQDiag::diagonalize(SGNDArray C, SGMatrix @@ -120,4 +120,4 @@ SGMatrix CUWedge::diagonalize(SGNDArray C, SGMatrix -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -70,4 +70,4 @@ template class EigenSparseUtil; template class EigenSparseUtil; template class EigenSparseUtil; } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/lapack.cpp b/src/shogun/mathematics/lapack.cpp index eeba4b2d82c..e98ceb9337d 100644 --- a/src/shogun/mathematics/lapack.cpp +++ b/src/shogun/mathematics/lapack.cpp @@ -14,7 +14,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include @@ -24,7 +24,7 @@ using namespace shogun; -#if defined(HAVE_MKL) || defined(HAVE_ACML) +#if defined(SHOGUN_HAVE_MKL) || defined(SHOGUN_HAVE_ACML) #define DSYEV dsyev #define DGESVD dgesvd #define DPOSV dposv @@ -56,7 +56,7 @@ using namespace shogun; #define DSTEMR dstemr_ #endif -#ifndef HAVE_ATLAS +#ifndef SHOGUN_HAVE_ATLAS int clapack_dpotrf(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, const int N, double *A, const int LDA) { @@ -71,7 +71,7 @@ int clapack_dpotrf(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, { uplo='L'; } -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DPOTRF(uplo, N, A, LDA, &info); #else int n=N; @@ -96,7 +96,7 @@ int clapack_dpotri(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, { uplo='L'; } -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DPOTRI(uplo, N, A, LDA, &info); #else int n=N; @@ -127,7 +127,7 @@ int clapack_dposv(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, { uplo='L'; } -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DPOSV(uplo,N,NRHS,A,lda,B,ldb,&info); #else int n=N; @@ -145,7 +145,7 @@ int clapack_dgetrf(const CBLAS_ORDER Order, const int M, const int N, { // no rowmajor? int info=0; -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DGETRF(M,N,A,lda,ipiv,&info); #else int m=M; @@ -162,7 +162,7 @@ int clapack_dgetri(const CBLAS_ORDER Order, const int N, double *A, const int lda, int* ipiv) { int info=0; -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DGETRI(N,A,lda,ipiv,&info); #else double* work; @@ -191,7 +191,7 @@ int clapack_dgetrs(const CBLAS_ORDER Order, const CBLAS_TRANSPOSE Transpose, { trans = 'T'; } -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DGETRS(trans,N,NRHS,A,lda,ipiv,B,ldb,info); #else int n=N; @@ -215,7 +215,7 @@ int clapack_dpotrs(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, { uplo = 'L'; } -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DPOTRS(uplo,N,NRHS,A,lda,B,ldb,info); #else int n=N; @@ -227,14 +227,14 @@ int clapack_dpotrs(const CBLAS_ORDER Order, const CBLAS_UPLO Uplo, return info; } #undef DPOTRS -#endif //HAVE_ATLAS +#endif //SHOGUN_HAVE_ATLAS namespace shogun { void wrap_dsyev(char jobz, char uplo, int n, double *a, int lda, double *w, int *info) { -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DSYEV(jobz, uplo, n, a, lda, w, info); #else int lwork=-1; @@ -253,7 +253,7 @@ void wrap_dsyev(char jobz, char uplo, int n, double *a, int lda, double *w, int void wrap_dgesvd(char jobu, char jobvt, int m, int n, double *a, int lda, double *sing, double *u, int ldu, double *vt, int ldvt, int *info) { -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DGESVD(jobu, jobvt, m, n, a, lda, sing, u, ldu, vt, ldvt, info); #else double work1 = 0; @@ -270,7 +270,7 @@ void wrap_dgesvd(char jobu, char jobvt, int m, int n, double *a, int lda, double void wrap_dgeqrf(int m, int n, double *a, int lda, double *tau, int *info) { -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DGEQRF(m, n, a, lda, tau, info); #else int lwork = -1; @@ -288,7 +288,7 @@ void wrap_dgeqrf(int m, int n, double *a, int lda, double *tau, int *info) void wrap_dorgqr(int m, int n, int k, double *a, int lda, double *tau, int *info) { -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DORGQR(m, n, k, a, lda, tau, info); #else int lwork = -1; @@ -312,7 +312,7 @@ void wrap_dsyevr(char jobz, char uplo, int n, double *a, int lda, int il, int iu double abstol = 0.0; char I = 'I'; int* isuppz = SG_MALLOC(int, n); -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DSYEVR(jobz,I,uplo,n,a,lda,vl,vu,il,iu,abstol,m, eigenvalues,eigenvectors,n,isuppz,info); #else @@ -347,7 +347,7 @@ void wrap_dsygvx(int itype, char jobz, char uplo, int n, double *a, int lda, dou double vl,vu; int* ifail = SG_MALLOC(int, n); char I = 'I'; -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML DSYGVX(itype,jobz,I,uplo,n,a,lda,b,ldb,vl,vu, il,iu,abstol,m,eigenvalues, eigenvectors,n,ifail,info); @@ -374,7 +374,7 @@ void wrap_dstemr(char jobz, char range, int n, double* diag, double *subdiag, double vl, double vu, int il, int iu, int* m, double* w, double* z__, int ldz, int nzc, int *isuppz, int tryrac, int *info) { -#ifdef HAVE_ACML +#ifdef SHOGUN_HAVE_ACML SG_SNOTIMPLEMENTED #else int lwork=-1; @@ -399,4 +399,4 @@ void wrap_dstemr(char jobz, char range, int n, double* diag, double *subdiag, #undef DSTEMR } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK diff --git a/src/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.cpp b/src/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.cpp index 25f32086aa6..17ae3680cf3 100644 --- a/src/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.cpp +++ b/src/shogun/mathematics/linalg/eigsolver/DirectEigenSolver.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -63,4 +63,4 @@ void CDirectEigenSolver::compute() } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.cpp b/src/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.cpp index 7e64f2f218a..fb2b96554dc 100644 --- a/src/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.cpp +++ b/src/shogun/mathematics/linalg/eigsolver/LanczosEigenSolver.cpp @@ -9,8 +9,8 @@ #include -#ifdef HAVE_LAPACK -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -168,5 +168,5 @@ void CLanczosEigenSolver::compute() } } -#endif // HAVE_EIGEN3 -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK diff --git a/src/shogun/mathematics/linalg/linop/DenseMatrixOperator.cpp b/src/shogun/mathematics/linalg/linop/DenseMatrixOperator.cpp index 6791f2f37b7..7754f82a87b 100644 --- a/src/shogun/mathematics/linalg/linop/DenseMatrixOperator.cpp +++ b/src/shogun/mathematics/linalg/linop/DenseMatrixOperator.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -166,4 +166,4 @@ template class CDenseMatrixOperator; template class CDenseMatrixOperator; template class CDenseMatrixOperator; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/linop/SparseMatrixOperator.cpp b/src/shogun/mathematics/linalg/linop/SparseMatrixOperator.cpp index 09296368926..6dff57e6bac 100644 --- a/src/shogun/mathematics/linalg/linop/SparseMatrixOperator.cpp +++ b/src/shogun/mathematics/linalg/linop/SparseMatrixOperator.cpp @@ -85,7 +85,7 @@ SGSparseMatrix CSparseMatrixOperator::get_matrix_operator() const return m_operator; } -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 template SparsityStructure* CSparseMatrixOperator::get_sparsity_structure( int64_t power) const @@ -146,7 +146,7 @@ SparsityStructure* CSparseMatrixOperator::get_sparsity_structure( SG_SWARNING("Eigen3 required\n"); return new SparsityStructure(); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 template<> \ SparsityStructure* CSparseMatrixOperator diff --git a/src/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.cpp b/src/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.cpp index e2a6548d9b1..45ad43f7275 100644 --- a/src/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.cpp +++ b/src/shogun/mathematics/linalg/linsolver/CGMShiftedFamilySolver.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -202,4 +202,4 @@ SGVector CCGMShiftedFamilySolver::solve_shifted_weighted( } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.cpp b/src/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.cpp index ba17ef0320c..7e84188a8a2 100644 --- a/src/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.cpp +++ b/src/shogun/mathematics/linalg/linsolver/ConjugateGradientSolver.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -139,4 +139,4 @@ SGVector CConjugateGradientSolver::solve( } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/linsolver/ConjugateOrthogonalCGSolver.cpp b/src/shogun/mathematics/linalg/linsolver/ConjugateOrthogonalCGSolver.cpp index c01c1e29ffd..519205d7f41 100644 --- a/src/shogun/mathematics/linalg/linsolver/ConjugateOrthogonalCGSolver.cpp +++ b/src/shogun/mathematics/linalg/linsolver/ConjugateOrthogonalCGSolver.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -140,4 +140,4 @@ SGVector CConjugateOrthogonalCGSolver::solve( } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.cpp b/src/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.cpp index eeef03b5ad2..7faae631bfe 100644 --- a/src/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.cpp +++ b/src/shogun/mathematics/linalg/linsolver/DirectLinearSolverComplex.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -87,4 +87,4 @@ SGVector CDirectLinearSolverComplex::solve( } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.cpp b/src/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.cpp index 1648dc3e5be..0b325209c76 100644 --- a/src/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.cpp +++ b/src/shogun/mathematics/linalg/linsolver/DirectSparseLinearSolver.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -63,4 +63,4 @@ SGVector CDirectSparseLinearSolver::solve( } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.cpp b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.cpp index f1ef1438d19..9b45ac6a0f0 100644 --- a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/aggregator/IndividualJobResultAggregator.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -85,4 +85,4 @@ void CIndividualJobResultAggregator::finalize() } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/DenseExactLogJob.cpp b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/DenseExactLogJob.cpp index 16b9b5f7d95..99b01a50fa0 100644 --- a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/DenseExactLogJob.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/DenseExactLogJob.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -97,4 +97,4 @@ CDenseMatrixOperator* CDenseExactLogJob::get_operator() const } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.cpp b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.cpp index 39f6478dfb3..e05e76bfdcf 100644 --- a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationCGMJob.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -130,4 +130,4 @@ void CRationalApproximationCGMJob::compute() } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.cpp b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.cpp index 09f7b73faf6..c8bb4b3b883 100644 --- a/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/logdet/computation/job/RationalApproximationIndividualJob.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -107,4 +107,4 @@ void CRationalApproximationIndividualJob::compute() } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.cpp b/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.cpp index 5d153000ba1..a19746be710 100644 --- a/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/DenseMatrixExactLog.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #if EIGEN_VERSION_AT_LEAST(3,1,0) @@ -103,4 +103,4 @@ CJobResultAggregator* CDenseMatrixExactLog::submit_jobs(SGVector } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.cpp b/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.cpp index 2a455c0b84e..9e0e218724e 100644 --- a/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationCGM.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -102,4 +102,4 @@ CJobResultAggregator* CLogRationalApproximationCGM::submit_jobs( } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.cpp b/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.cpp index be348fe0441..1fdcb222f14 100644 --- a/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/logdet/opfunc/LogRationalApproximationIndividual.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -163,4 +163,4 @@ CJobResultAggregator* CLogRationalApproximationIndividual::submit_jobs( } } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/src/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.cpp b/src/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.cpp index 6130b84029d..241666a16a5 100644 --- a/src/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.cpp +++ b/src/shogun/mathematics/linalg/ratapprox/tracesampler/ProbingSampler.cpp @@ -9,8 +9,8 @@ #include -#ifdef HAVE_COLPACK -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_COLPACK +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -212,5 +212,5 @@ SGVector CProbingSampler::sample(index_t idx) const } -#endif // HAVE_EIGEN3 -#endif // HAVE_COLPACK +#endif // SHOGUN_HAVE_EIGEN3 +#endif // SHOGUN_HAVE_COLPACK diff --git a/src/shogun/metric/LMNN.cpp b/src/shogun/metric/LMNN.cpp index f38d75f11de..223b300c45a 100644 --- a/src/shogun/metric/LMNN.cpp +++ b/src/shogun/metric/LMNN.cpp @@ -8,8 +8,8 @@ * Copyright (C) 2013 Fernando J. Iglesias Garcia */ -#ifdef HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -351,5 +351,5 @@ void CLMNNStatistics::init() MS_NOT_AVAILABLE); } -#endif /* HAVE_LAPACK */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/metric/LMNNImpl.cpp b/src/shogun/metric/LMNNImpl.cpp index f7d1ccbf7db..ed80ce6cc38 100644 --- a/src/shogun/metric/LMNNImpl.cpp +++ b/src/shogun/metric/LMNNImpl.cpp @@ -8,8 +8,8 @@ * Copyright (C) 2013 Fernando J. Iglesias Garcia */ -#ifdef HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -545,5 +545,5 @@ CEuclideanDistance* CLMNNImpl::setup_distance(CDenseFeatures* x, return euclidean; } -#endif /* HAVE_LAPACK */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/modelselection/GradientModelSelection.cpp b/src/shogun/modelselection/GradientModelSelection.cpp index e6c2e0c9988..435b5ae2f06 100644 --- a/src/shogun/modelselection/GradientModelSelection.cpp +++ b/src/shogun/modelselection/GradientModelSelection.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_NLOPT +#ifdef SHOGUN_HAVE_NLOPT #include #include @@ -294,4 +294,4 @@ CParameterCombination* CGradientModelSelection::select_model(bool print_state) } } -#endif /* HAVE_NLOPT */ +#endif /* SHOGUN_HAVE_NLOPT */ diff --git a/src/shogun/multiclass/MCLDA.cpp b/src/shogun/multiclass/MCLDA.cpp index 81f96df79f5..b4358c4018e 100644 --- a/src/shogun/multiclass/MCLDA.cpp +++ b/src/shogun/multiclass/MCLDA.cpp @@ -13,7 +13,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -423,4 +423,4 @@ bool CMCLDA::train_machine(CFeatures* data) return true; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/multiclass/MulticlassLogisticRegression.cpp b/src/shogun/multiclass/MulticlassLogisticRegression.cpp index 5cef8141e86..152e2fa07bf 100644 --- a/src/shogun/multiclass/MulticlassLogisticRegression.cpp +++ b/src/shogun/multiclass/MulticlassLogisticRegression.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -100,4 +100,4 @@ bool CMulticlassLogisticRegression::train_machine(CFeatures* data) } return true; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.cpp b/src/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.cpp index 7678b98f79f..0a44837cabd 100644 --- a/src/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.cpp +++ b/src/shogun/multiclass/MulticlassTreeGuidedLogisticRegression.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -108,4 +108,4 @@ bool CMulticlassTreeGuidedLogisticRegression::train_machine(CFeatures* data) } return true; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/multiclass/QDA.cpp b/src/shogun/multiclass/QDA.cpp index 3b3a4b35441..4c42a451973 100644 --- a/src/shogun/multiclass/QDA.cpp +++ b/src/shogun/multiclass/QDA.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -333,4 +333,4 @@ bool CQDA::train_machine(CFeatures* data) return true; } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/src/shogun/multiclass/ScatterSVM.cpp b/src/shogun/multiclass/ScatterSVM.cpp index 05d76a75604..aef079ef07f 100644 --- a/src/shogun/multiclass/ScatterSVM.cpp +++ b/src/shogun/multiclass/ScatterSVM.cpp @@ -10,9 +10,9 @@ */ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #include #include @@ -87,12 +87,12 @@ bool CScatterSVM::train_machine(CFeatures* data) { result=train_no_bias_libsvm(); } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT else if (scatter_type==NO_BIAS_SVMLIGHT) { result=train_no_bias_svmlight(); } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT else if (scatter_type==TEST_RULE1 || scatter_type==TEST_RULE2) { float64_t nu_min=((float64_t) Nc)/num_vectors; @@ -216,7 +216,7 @@ bool CScatterSVM::train_no_bias_libsvm() return false; } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT bool CScatterSVM::train_no_bias_svmlight() { CKernelNormalizer* prev_normalizer=m_kernel->get_normalizer(); @@ -244,7 +244,7 @@ bool CScatterSVM::train_no_bias_svmlight() m_kernel->set_normalizer(prev_normalizer); return true; } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT bool CScatterSVM::train_testrule12() { @@ -398,7 +398,7 @@ CLabels* CScatterSVM::classify_one_vs_rest() for (int32_t i=0; iset_label(i, apply_one(i)); } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT else if (scatter_type == NO_BIAS_SVMLIGHT) { float64_t* outputs=SG_MALLOC(float64_t, num_vectors*m_num_classes); @@ -439,7 +439,7 @@ CLabels* CScatterSVM::classify_one_vs_rest() SG_FREE(outputs); } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT else { ASSERT(m_machines->get_num_elements()>0) @@ -525,12 +525,12 @@ float64_t CScatterSVM::apply_one(int32_t num) } } } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT else if (scatter_type == NO_BIAS_SVMLIGHT) { SG_ERROR("Use classify...\n") } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT else { float64_t max_out=get_svm(0)->apply_one(num)/norm_wc[0]; diff --git a/src/shogun/multiclass/ecoc/ECOCIHDDecoder.cpp b/src/shogun/multiclass/ecoc/ECOCIHDDecoder.cpp index 3897ec5cf93..0673ea8332a 100644 --- a/src/shogun/multiclass/ecoc/ECOCIHDDecoder.cpp +++ b/src/shogun/multiclass/ecoc/ECOCIHDDecoder.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -71,4 +71,4 @@ void CECOCIHDDecoder::update_delta_cache(const SGMatrix codebook) clapack_dgetri(CblasColMajor, m_delta.num_cols, m_delta.matrix, m_delta.num_cols, IPIV.vector); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK diff --git a/src/shogun/optimization/liblinear/tron.cpp b/src/shogun/optimization/liblinear/tron.cpp index 66fb7d3127f..287ffa716e3 100644 --- a/src/shogun/optimization/liblinear/tron.cpp +++ b/src/shogun/optimization/liblinear/tron.cpp @@ -15,7 +15,7 @@ using namespace shogun; double tron_ddot(const int N, const double *X, const int incX, const double *Y, const int incY) { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK return cblas_ddot(N,X,incX,Y,incY); #else double dot = 0.0; @@ -27,7 +27,7 @@ double tron_ddot(const int N, const double *X, const int incX, const double *Y, double tron_dnrm2(const int N, const double *X, const int incX) { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK return cblas_dnrm2(N,X,incX); #else double dot = 0.0; @@ -39,7 +39,7 @@ double tron_dnrm2(const int N, const double *X, const int incX) void tron_dscal(const int N, const double alpha, double *X, const int incX) { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK return cblas_dscal(N,alpha,X,incX); #else for (int32_t i=0; i -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include diff --git a/src/shogun/preprocessor/PCA.cpp b/src/shogun/preprocessor/PCA.cpp index b5e54b65983..f153c6cefc4 100644 --- a/src/shogun/preprocessor/PCA.cpp +++ b/src/shogun/preprocessor/PCA.cpp @@ -10,7 +10,7 @@ * Copyright (C) 2011 Berlin Institute of Technology */ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include @@ -251,4 +251,4 @@ SGVector CPCA::get_mean() return m_mean_vector; } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ diff --git a/src/shogun/preprocessor/PNorm.cpp b/src/shogun/preprocessor/PNorm.cpp index 3dd8b7f3d6c..3e99f6a5d83 100644 --- a/src/shogun/preprocessor/PNorm.cpp +++ b/src/shogun/preprocessor/PNorm.cpp @@ -13,7 +13,7 @@ #include #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #endif diff --git a/src/shogun/regression/GaussianProcessRegression.cpp b/src/shogun/regression/GaussianProcessRegression.cpp index 695d3105931..7c228b5fc6f 100644 --- a/src/shogun/regression/GaussianProcessRegression.cpp +++ b/src/shogun/regression/GaussianProcessRegression.cpp @@ -14,7 +14,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include diff --git a/src/shogun/regression/KernelRidgeRegression.cpp b/src/shogun/regression/KernelRidgeRegression.cpp index b344d19ae38..9ffdc10f9c2 100644 --- a/src/shogun/regression/KernelRidgeRegression.cpp +++ b/src/shogun/regression/KernelRidgeRegression.cpp @@ -11,7 +11,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include diff --git a/src/shogun/regression/LeastAngleRegression.cpp b/src/shogun/regression/LeastAngleRegression.cpp index bf1e69900b9..d105571ad93 100644 --- a/src/shogun/regression/LeastAngleRegression.cpp +++ b/src/shogun/regression/LeastAngleRegression.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -407,4 +407,4 @@ SGMatrix CLeastAngleRegression::cholesky_delete(SGMatrix R return nR; } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK diff --git a/src/shogun/regression/LeastSquaresRegression.cpp b/src/shogun/regression/LeastSquaresRegression.cpp index 8882c5eb847..37b3f28bbc1 100644 --- a/src/shogun/regression/LeastSquaresRegression.cpp +++ b/src/shogun/regression/LeastSquaresRegression.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include diff --git a/src/shogun/regression/LinearRidgeRegression.cpp b/src/shogun/regression/LinearRidgeRegression.cpp index 07a50a19d07..0ba119ab40f 100644 --- a/src/shogun/regression/LinearRidgeRegression.cpp +++ b/src/shogun/regression/LinearRidgeRegression.cpp @@ -9,7 +9,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include diff --git a/src/shogun/regression/svr/LibLinearRegression.cpp b/src/shogun/regression/svr/LibLinearRegression.cpp index a5fdf704cad..f5a11ac38b9 100644 --- a/src/shogun/regression/svr/LibLinearRegression.cpp +++ b/src/shogun/regression/svr/LibLinearRegression.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include @@ -345,4 +345,4 @@ void CLibLinearRegression::solve_l2r_l1l2_svr(const liblinear_problem *prob) delete [] index; } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ diff --git a/src/shogun/regression/svr/MKLRegression.cpp b/src/shogun/regression/svr/MKLRegression.cpp index b6248cf400e..46d77b60611 100644 --- a/src/shogun/regression/svr/MKLRegression.cpp +++ b/src/shogun/regression/svr/MKLRegression.cpp @@ -1,8 +1,8 @@ #include #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT using namespace shogun; @@ -10,9 +10,9 @@ CMKLRegression::CMKLRegression(CSVM* s) : CMKL(s) { if (!s) { -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT s=new CSVRLight(); -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT if (!s) s=new CLibSVR(); set_svm(s); diff --git a/src/shogun/regression/svr/SVRLight.cpp b/src/shogun/regression/svr/SVRLight.cpp index 26fb178714a..92881d1297f 100644 --- a/src/shogun/regression/svr/SVRLight.cpp +++ b/src/shogun/regression/svr/SVRLight.cpp @@ -10,7 +10,7 @@ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include @@ -23,7 +23,7 @@ #include -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX extern "C" { #include } @@ -31,7 +31,7 @@ extern "C" { #include -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD #include #endif @@ -432,7 +432,7 @@ void CSVRLight::update_linear_component( lin[j]+=kernel->compute_optimized(regression_fix_index(docs[j])); } } -#ifdef HAVE_PTHREAD +#ifdef SHOGUN_HAVE_PTHREAD else { int32_t num_elem = 0 ; @@ -618,7 +618,7 @@ void CSVRLight::call_mkl_callback(float64_t* a, int32_t* label, float64_t* lin, for (int32_t i=0; ieps[i]-label[i]*c[i]); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK int nk = (int) num_kernels; // calling external lib double* alphay = SG_MALLOC(double, num); for (int32_t i=0; iget_subkernel_weights(num_kernels); // update lin -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK cblas_dgemv(CblasColMajor, CblasTrans, nk, (int) num, 1.0, (double*) W, nk, (double*) new_beta, 1, 0.0, (double*) lin, 1); #else @@ -771,4 +771,4 @@ void CSVRLight::reactivate_inactive_examples( } } } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT diff --git a/src/shogun/statistics/MMDKernelSelectionComb.cpp b/src/shogun/statistics/MMDKernelSelectionComb.cpp index 320e9cd96a0..ce3fd6a4c69 100644 --- a/src/shogun/statistics/MMDKernelSelectionComb.cpp +++ b/src/shogun/statistics/MMDKernelSelectionComb.cpp @@ -31,7 +31,7 @@ CMMDKernelSelectionComb::~CMMDKernelSelectionComb() void CMMDKernelSelectionComb::init() { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SG_ADD(&m_opt_max_iterations, "opt_max_iterations", "Maximum number of " "iterations for qp solver", MS_NOT_AVAILABLE); SG_ADD(&m_opt_epsilon, "opt_epsilon", "Stopping criterion for qp solver", @@ -46,7 +46,7 @@ void CMMDKernelSelectionComb::init() #endif } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /* no reference counting, use the static context constructor of SGMatrix */ SGMatrix CMMDKernelSelectionComb::m_Q=SGMatrix(false); diff --git a/src/shogun/statistics/MMDKernelSelectionCombMaxL2.cpp b/src/shogun/statistics/MMDKernelSelectionCombMaxL2.cpp index 1eacb69a6b1..c585ff12b6a 100644 --- a/src/shogun/statistics/MMDKernelSelectionCombMaxL2.cpp +++ b/src/shogun/statistics/MMDKernelSelectionCombMaxL2.cpp @@ -34,7 +34,7 @@ CMMDKernelSelectionCombMaxL2::~CMMDKernelSelectionCombMaxL2() { } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGVector CMMDKernelSelectionCombMaxL2::compute_measures() { /* cast is safe due to assertion in constructor */ diff --git a/src/shogun/statistics/MMDKernelSelectionCombOpt.cpp b/src/shogun/statistics/MMDKernelSelectionCombOpt.cpp index 0d1132e46d1..c838a39f4fa 100644 --- a/src/shogun/statistics/MMDKernelSelectionCombOpt.cpp +++ b/src/shogun/statistics/MMDKernelSelectionCombOpt.cpp @@ -48,7 +48,7 @@ void CMMDKernelSelectionCombOpt::init() MS_NOT_AVAILABLE); } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGVector CMMDKernelSelectionCombOpt::compute_measures() { /* cast is safe due to assertion in constructor */ diff --git a/src/shogun/statistics/QuadraticTimeMMD.cpp b/src/shogun/statistics/QuadraticTimeMMD.cpp index 12cebc76245..764b17f6b11 100644 --- a/src/shogun/statistics/QuadraticTimeMMD.cpp +++ b/src/shogun/statistics/QuadraticTimeMMD.cpp @@ -182,17 +182,17 @@ float64_t CQuadraticTimeMMD::compute_p_value(float64_t statistic) { case MMD2_SPECTRUM: { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /* get samples from null-distribution and compute p-value of statistic */ SGVector null_samples=sample_null_spectrum( m_num_samples_spectrum, m_num_eigenvalues_spectrum); null_samples.qsort(); index_t pos=null_samples.find_position_to_insert(statistic); result=1.0-((float64_t)pos)/null_samples.vlen; -#else // HAVE_LAPACK +#else // SHOGUN_HAVE_LAPACK SG_ERROR("CQuadraticTimeMMD::compute_p_value(): Only possible if " "shogun is compiled with LAPACK enabled\n"); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK break; } @@ -261,16 +261,16 @@ float64_t CQuadraticTimeMMD::compute_threshold(float64_t alpha) { case MMD2_SPECTRUM: { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /* get samples from null-distribution and compute threshold */ SGVector null_samples=sample_null_spectrum( m_num_samples_spectrum, m_num_eigenvalues_spectrum); null_samples.qsort(); result=null_samples[index_t(CMath::floor(null_samples.vlen*(1-alpha)))]; -#else // HAVE_LAPACK +#else // SHOGUN_HAVE_LAPACK SG_ERROR("CQuadraticTimeMMD::compute_threshold(): Only possible if " "shogun is compiled with LAPACK enabled\n"); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK break; } @@ -292,7 +292,7 @@ float64_t CQuadraticTimeMMD::compute_threshold(float64_t alpha) } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGVector CQuadraticTimeMMD::sample_null_spectrum(index_t num_samples, index_t num_eigenvalues) { @@ -374,7 +374,7 @@ SGVector CQuadraticTimeMMD::sample_null_spectrum(index_t num_samples, return null_samples; } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK SGVector CQuadraticTimeMMD::fit_null_gamma() { diff --git a/src/shogun/structure/CCSOSVM.cpp b/src/shogun/structure/CCSOSVM.cpp index 5c4770132a1..818409b87fc 100644 --- a/src/shogun/structure/CCSOSVM.cpp +++ b/src/shogun/structure/CCSOSVM.cpp @@ -37,14 +37,14 @@ CCCSOSVM::CCCSOSVM(CStructuredModel* model, SGVector w) CCCSOSVM::~CCCSOSVM() { -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK MSK_deleteenv(&m_msk_env); #endif } int32_t CCCSOSVM::mosek_qp_optimize(float64_t** G, float64_t* delta, float64_t* alpha, int32_t k, float64_t* dual_obj, float64_t rho) { -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK int32_t t; index_t Q_size = k*(k+1)/2; SGVector c(k); @@ -668,7 +668,7 @@ void CCCSOSVM::init() m_primal_obj = CMath::INFTY; m_qp_type = MOSEK; -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK MSKrescodee r = MSK_RES_OK; /* create mosek environment */ diff --git a/src/shogun/structure/DirectorStructuredModel.cpp b/src/shogun/structure/DirectorStructuredModel.cpp index 8371e941839..374a6ba182b 100644 --- a/src/shogun/structure/DirectorStructuredModel.cpp +++ b/src/shogun/structure/DirectorStructuredModel.cpp @@ -9,7 +9,7 @@ #include -#ifdef USE_SWIG_DIRECTORS +#ifdef SHOGUN_USE_SWIG_DIRECTORS using namespace shogun; @@ -71,4 +71,4 @@ void CDirectorStructuredModel::init_training() SG_ERROR("Please implemement init_training() in your target language before use\n") } -#endif /* USE_SWIG_DIRECTORS */ +#endif /* SHOGUN_USE_SWIG_DIRECTORS */ diff --git a/src/shogun/structure/DynProg.cpp b/src/shogun/structure/DynProg.cpp index c144483dfaf..72c435af8fc 100644 --- a/src/shogun/structure/DynProg.cpp +++ b/src/shogun/structure/DynProg.cpp @@ -26,7 +26,7 @@ using namespace shogun; -//#define USE_TMP_ARRAYCLASS +//#define SHOGUN_USE_TMP_ARRAYCLASS //#define DYNPROG_DEBUG int32_t CDynProg::word_degree_default[4]={3,4,5,6} ; @@ -1365,7 +1365,7 @@ void CDynProg::compute_nbest_paths(int32_t max_num_signals, bool use_orf, path_ends.set_array_name("path_ends") ; ktable_end.set_array_name("ktable_end") ; -#ifdef USE_TMP_ARRAYCLASS +#ifdef SHOGUN_USE_TMP_ARRAYCLASS fixedtempvv.set_array_name("fixedtempvv") ; fixedtempii.set_array_name("fixedtempvv") ; #endif @@ -1405,7 +1405,7 @@ void CDynProg::compute_nbest_paths(int32_t max_num_signals, bool use_orf, path_ends.display_size() ; ktable_end.display_size() ; -#ifdef USE_TMP_ARRAYCLASS +#ifdef SHOGUN_USE_TMP_ARRAYCLASS fixedtempvv.display_size() ; fixedtempii.display_size() ; #endif diff --git a/src/shogun/structure/FactorGraph.cpp b/src/shogun/structure/FactorGraph.cpp index 378228dd4a0..382928f293c 100644 --- a/src/shogun/structure/FactorGraph.cpp +++ b/src/shogun/structure/FactorGraph.cpp @@ -49,7 +49,7 @@ CFactorGraph::~CFactorGraph() SG_UNREF(m_datasources); SG_UNREF(m_dset); -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING if (m_factors != NULL) SG_DEBUG("CFactorGraph::~CFactorGraph(): m_factors->ref_count() = %d.\n", m_factors->ref_count()); @@ -79,7 +79,7 @@ void CFactorGraph::init() m_factors = new CDynamicObjectArray(); m_datasources = new CDynamicObjectArray(); -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING if (m_factors != NULL) SG_DEBUG("CFactorGraph::init(): m_factors->ref_count() = %d.\n", m_factors->ref_count()); #endif diff --git a/src/shogun/structure/FactorGraphModel.cpp b/src/shogun/structure/FactorGraphModel.cpp index e55f3a0a291..87331d5af2b 100644 --- a/src/shogun/structure/FactorGraphModel.cpp +++ b/src/shogun/structure/FactorGraphModel.cpp @@ -12,7 +12,7 @@ #include #include -#ifdef HAVE_STD_UNORDERED_MAP +#ifdef SHOGUN_HAVE_STD_UNORDERED_MAP #include typedef std::unordered_map factor_counts_type; #else diff --git a/src/shogun/structure/PrimalMosekSOSVM.cpp b/src/shogun/structure/PrimalMosekSOSVM.cpp index ba45a5c0524..ec158a67ff8 100644 --- a/src/shogun/structure/PrimalMosekSOSVM.cpp +++ b/src/shogun/structure/PrimalMosekSOSVM.cpp @@ -8,7 +8,7 @@ * Copyright (C) 2012 Fernando José Iglesias García */ -#ifdef USE_MOSEK +#ifdef SHOGUN_USE_MOSEK #include #include @@ -285,4 +285,4 @@ void CPrimalMosekSOSVM::set_epsilon(float64_t epsilon) m_epsilon = epsilon; } -#endif /* USE_MOSEK */ +#endif /* SHOGUN_USE_MOSEK */ diff --git a/src/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.cpp b/src/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.cpp index 662172ba227..e775e5c2ca3 100644 --- a/src/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.cpp +++ b/src/shogun/transfer/domain_adaptation/DomainAdaptationMulticlassLibLinear.cpp @@ -9,7 +9,7 @@ */ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -120,4 +120,4 @@ CBinaryLabels* CDomainAdaptationMulticlassLibLinear::get_submachine_outputs(int3 return new CBinaryLabels(result); } -#endif /* HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_LAPACK */ diff --git a/src/shogun/transfer/domain_adaptation/DomainAdaptationSVM.cpp b/src/shogun/transfer/domain_adaptation/DomainAdaptationSVM.cpp index 30db5f526ff..0b04852bc67 100644 --- a/src/shogun/transfer/domain_adaptation/DomainAdaptationSVM.cpp +++ b/src/shogun/transfer/domain_adaptation/DomainAdaptationSVM.cpp @@ -10,7 +10,7 @@ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include @@ -190,4 +190,4 @@ void CDomainAdaptationSVM::init() "flag to switch off regularization in training.", MS_AVAILABLE); } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT diff --git a/src/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.cpp b/src/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.cpp index 8ec8ab60baf..4ff9a470026 100644 --- a/src/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.cpp +++ b/src/shogun/transfer/domain_adaptation/DomainAdaptationSVMLinear.cpp @@ -10,7 +10,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -237,5 +237,5 @@ CBinaryLabels* CDomainAdaptationSVMLinear::apply_binary(CFeatures* data) return new CBinaryLabels(out_combined); } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK diff --git a/src/shogun/transfer/multitask/LibLinearMTL.cpp b/src/shogun/transfer/multitask/LibLinearMTL.cpp index c6b07a90eac..24242acef84 100644 --- a/src/shogun/transfer/multitask/LibLinearMTL.cpp +++ b/src/shogun/transfer/multitask/LibLinearMTL.cpp @@ -14,7 +14,7 @@ #include -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK #include #include #include @@ -565,4 +565,4 @@ float64_t CLibLinearMTL::compute_duality_gap() } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK diff --git a/src/shogun/transfer/multitask/MultitaskClusteredLogisticRegression.cpp b/src/shogun/transfer/multitask/MultitaskClusteredLogisticRegression.cpp index 19edae5cd78..bda326f284d 100644 --- a/src/shogun/transfer/multitask/MultitaskClusteredLogisticRegression.cpp +++ b/src/shogun/transfer/multitask/MultitaskClusteredLogisticRegression.cpp @@ -78,8 +78,8 @@ bool CMultitaskClusteredLogisticRegression::train_locked_implementation(SGVector options.tasks_indices = tasks; options.n_clusters = m_num_clusters; -#ifdef HAVE_EIGEN3 -#ifndef HAVE_CXX11 +#ifdef SHOGUN_HAVE_EIGEN3 +#ifndef SHOGUN_HAVE_CXX11 malsar_result_t model = malsar_clustered( features, y.vector, m_rho1, m_rho2, options); @@ -119,8 +119,8 @@ bool CMultitaskClusteredLogisticRegression::train_machine(CFeatures* data) options.tasks_indices = ((CTaskGroup*)m_task_relation)->get_tasks_indices(); options.n_clusters = m_num_clusters; -#ifdef HAVE_EIGEN3 -#ifndef HAVE_CXX11 +#ifdef SHOGUN_HAVE_EIGEN3 +#ifndef SHOGUN_HAVE_CXX11 malsar_result_t model = malsar_clustered( features, y.vector, m_rho1, m_rho2, options); diff --git a/src/shogun/transfer/multitask/MultitaskL12LogisticRegression.cpp b/src/shogun/transfer/multitask/MultitaskL12LogisticRegression.cpp index d41c98159f1..b968ab872a9 100644 --- a/src/shogun/transfer/multitask/MultitaskL12LogisticRegression.cpp +++ b/src/shogun/transfer/multitask/MultitaskL12LogisticRegression.cpp @@ -73,7 +73,7 @@ bool CMultitaskL12LogisticRegression::train_locked_implementation(SGVectorget_num_tasks(); options.tasks_indices = tasks; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 malsar_result_t model = malsar_joint_feature_learning( features, y.vector, m_rho1, m_rho2, options); @@ -108,7 +108,7 @@ bool CMultitaskL12LogisticRegression::train_machine(CFeatures* data) options.n_tasks = ((CTaskGroup*)m_task_relation)->get_num_tasks(); options.tasks_indices = ((CTaskGroup*)m_task_relation)->get_tasks_indices(); -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 malsar_result_t model = malsar_joint_feature_learning( features, y.vector, m_rho1, m_rho2, options); diff --git a/src/shogun/transfer/multitask/MultitaskTraceLogisticRegression.cpp b/src/shogun/transfer/multitask/MultitaskTraceLogisticRegression.cpp index f6f654230fd..2bec7f38592 100644 --- a/src/shogun/transfer/multitask/MultitaskTraceLogisticRegression.cpp +++ b/src/shogun/transfer/multitask/MultitaskTraceLogisticRegression.cpp @@ -63,7 +63,7 @@ bool CMultitaskTraceLogisticRegression::train_locked_implementation(SGVectorget_num_tasks(); options.tasks_indices = tasks; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 malsar_result_t model = malsar_low_rank( features, y.vector, m_rho, options); @@ -97,7 +97,7 @@ bool CMultitaskTraceLogisticRegression::train_machine(CFeatures* data) options.n_tasks = ((CTaskGroup*)m_task_relation)->get_num_tasks(); options.tasks_indices = ((CTaskGroup*)m_task_relation)->get_tasks_indices(); -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 malsar_result_t model = malsar_low_rank( features, y.vector, m_rho, options); diff --git a/src/shogun/ui/GUIClassifier.cpp b/src/shogun/ui/GUIClassifier.cpp index 937de7955f0..ef75ea5591a 100644 --- a/src/shogun/ui/GUIClassifier.cpp +++ b/src/shogun/ui/GUIClassifier.cpp @@ -32,11 +32,11 @@ #include -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT #include #include #include -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT #include #include @@ -131,14 +131,14 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d) classifier= new CMulticlassLibSVM(LIBSVM_NU_SVC); SG_INFO("created SVMlibsvm object for multiclass\n") } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT else if (strcmp(name,"SCATTERSVM_NO_BIAS_SVMLIGHT")==0) { SG_UNREF(classifier); classifier= new CScatterSVM(NO_BIAS_SVMLIGHT); SG_INFO("created ScatterSVM NO BIAS SVMLIGHT object\n") } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT else if (strcmp(name,"SCATTERSVM_NO_BIAS_LIBSVM")==0) { SG_UNREF(classifier); @@ -175,7 +175,7 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d) classifier= new CLaRank(); SG_INFO("created LaRank object\n") } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT else if ((strcmp(name,"LIGHT")==0) || (strcmp(name,"SVMLIGHT")==0)) { SG_UNREF(classifier); @@ -194,7 +194,7 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d) classifier= new CSVRLight(); SG_INFO("created SVRLight object\n") } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT else if (strcmp(name,"GPBTSVM")==0) { SG_UNREF(classifier); @@ -225,7 +225,7 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d) classifier= new CLibSVR(); SG_INFO("created SVRlibsvm object\n") } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK else if (strcmp(name, "KERNELRIDGEREGRESSION")==0) { SG_UNREF(classifier); @@ -233,14 +233,14 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d) ui->ui_labels->get_train_labels()); SG_INFO("created KernelRidgeRegression object %p\n", classifier) } -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK else if (strcmp(name,"PERCEPTRON")==0) { SG_UNREF(classifier); classifier= new CPerceptron(); SG_INFO("created Perceptron object\n") } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK else if (strncmp(name,"LIBLINEAR",9)==0) { LIBLINEAR_SOLVER_TYPE st=L2R_LR; @@ -285,8 +285,8 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d) classifier= new CLDA(); SG_INFO("created LDA object\n") } -#endif //HAVE_LAPACK -#ifdef USE_CPLEX +#endif //SHOGUN_HAVE_LAPACK +#ifdef SHOGUN_USE_CPLEX else if (strcmp(name,"LPM")==0) { SG_UNREF(classifier); @@ -307,7 +307,7 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d) ((CLPBoost*) classifier)->set_max_train_time(max_train_time); SG_INFO("created LPBoost object\n") } -#endif //USE_CPLEX +#endif // SHOGUN_USE_CPLEX else if (strncmp(name,"KNN", strlen("KNN"))==0) { SG_UNREF(classifier); @@ -682,7 +682,7 @@ bool CGUIClassifier::train_knn(int32_t k) bool CGUIClassifier::train_krr() { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK CKernelRidgeRegression* krr= (CKernelRidgeRegression*) classifier; if (!krr) SG_ERROR("No SVM available.\n") @@ -740,7 +740,7 @@ bool CGUIClassifier::train_linear(float64_t gamma) ((CPerceptron*) classifier)->set_max_iter(perceptron_maxiter); } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK if (ctype==CT_LDA) { if (trainfeatures->get_feature_type()!=F_DREAL || @@ -752,7 +752,7 @@ bool CGUIClassifier::train_linear(float64_t gamma) if (ctype==CT_SVMOCAS) ((CSVMOcas*) classifier)->set_C(svm_C1, svm_C2); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK else if (ctype==CT_LIBLINEAR) ((CLibLinear*) classifier)->set_C(svm_C1, svm_C2); #endif @@ -1492,7 +1492,7 @@ bool CGUIClassifier::classify_example(int32_t idx, float64_t &result) bool CGUIClassifier::set_krr_tau(float64_t tau) { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK krr_tau=tau; ((CKernelRidgeRegression*) classifier)->set_tau(krr_tau); SG_INFO("Set to krr_tau=%f.\n", krr_tau) @@ -1532,14 +1532,14 @@ bool CGUIClassifier::set_solver(char* solver) SG_INFO("Automagically determining solver.\n") s=ST_AUTO; } -#ifdef USE_CPLEX +#ifdef SHOGUN_USE_CPLEX else if (strncmp(solver, "CPLEX", 5)==0) { SG_INFO("USING CPLEX METHOD selected\n") s=ST_CPLEX; } #endif -#ifdef USE_GLPK +#ifdef SHOGUN_USE_GLPK else if (strncmp(solver,"GLPK", 4)==0) { SG_INFO("Using GLPK solver\n") @@ -1574,7 +1574,7 @@ bool CGUIClassifier::set_constraint_generator(char* name) constraint_generator= new CLibSVM(); SG_INFO("created SVMlibsvm object\n") } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT else if ((strcmp(name,"LIGHT")==0) || (strcmp(name,"SVMLIGHT")==0)) { SG_UNREF(constraint_generator); @@ -1593,7 +1593,7 @@ bool CGUIClassifier::set_constraint_generator(char* name) constraint_generator= new CSVRLight(); SG_INFO("created SVRLight object\n") } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT else if (strcmp(name,"GPBTSVM")==0) { SG_UNREF(constraint_generator); diff --git a/src/shogun/ui/GUIConverter.cpp b/src/shogun/ui/GUIConverter.cpp index 8f8ddae6d5d..0a150521341 100644 --- a/src/shogun/ui/GUIConverter.cpp +++ b/src/shogun/ui/GUIConverter.cpp @@ -44,7 +44,7 @@ CGUIConverter::~CGUIConverter() bool CGUIConverter::create_locallylinearembedding(int32_t k) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CLocallyLinearEmbedding(); ((CLocallyLinearEmbedding*)m_converter)->set_k(k); #else @@ -55,7 +55,7 @@ bool CGUIConverter::create_locallylinearembedding(int32_t k) bool CGUIConverter::create_neighborhoodpreservingembedding(int32_t k) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CNeighborhoodPreservingEmbedding(); ((CNeighborhoodPreservingEmbedding*)m_converter)->set_k(k); #else @@ -66,7 +66,7 @@ bool CGUIConverter::create_neighborhoodpreservingembedding(int32_t k) bool CGUIConverter::create_localtangentspacealignment(int32_t k) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CLocalTangentSpaceAlignment(); ((CLocalTangentSpaceAlignment*)m_converter)->set_k(k); #else @@ -77,7 +77,7 @@ bool CGUIConverter::create_localtangentspacealignment(int32_t k) bool CGUIConverter::create_linearlocaltangentspacealignment(int32_t k) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CLinearLocalTangentSpaceAlignment(); ((CLinearLocalTangentSpaceAlignment*)m_converter)->set_k(k); #else @@ -88,7 +88,7 @@ bool CGUIConverter::create_linearlocaltangentspacealignment(int32_t k) bool CGUIConverter::create_hessianlocallylinearembedding(int32_t k) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CLocallyLinearEmbedding(); ((CHessianLocallyLinearEmbedding*)m_converter)->set_k(k); #else @@ -99,7 +99,7 @@ bool CGUIConverter::create_hessianlocallylinearembedding(int32_t k) bool CGUIConverter::create_laplacianeigenmaps(int32_t k, float64_t width) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CLaplacianEigenmaps(); ((CLaplacianEigenmaps*)m_converter)->set_k(k); ((CLaplacianEigenmaps*)m_converter)->set_tau(width); @@ -111,7 +111,7 @@ bool CGUIConverter::create_laplacianeigenmaps(int32_t k, float64_t width) bool CGUIConverter::create_localitypreservingprojections(int32_t k, float64_t width) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CLocalityPreservingProjections(); ((CLocalityPreservingProjections*)m_converter)->set_k(k); ((CLocalityPreservingProjections*)m_converter)->set_tau(width); @@ -123,7 +123,7 @@ bool CGUIConverter::create_localitypreservingprojections(int32_t k, float64_t wi bool CGUIConverter::create_diffusionmaps(int32_t t, float64_t width) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CDiffusionMaps(); ((CDiffusionMaps*)m_converter)->set_t(t); ((CDiffusionMaps*)m_converter)->set_kernel(new CGaussianKernel(100,width)); @@ -135,7 +135,7 @@ bool CGUIConverter::create_diffusionmaps(int32_t t, float64_t width) bool CGUIConverter::create_isomap(int32_t k) { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CIsomap(); ((CIsomap*)m_converter)->set_k(k); #else @@ -146,7 +146,7 @@ bool CGUIConverter::create_isomap(int32_t k) bool CGUIConverter::create_multidimensionalscaling() { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CMultidimensionalScaling(); #else SG_ERROR("Requires EIGEN3 to be enabled at compile time\n") @@ -156,7 +156,7 @@ bool CGUIConverter::create_multidimensionalscaling() bool CGUIConverter::create_jade() { -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 m_converter = new CJade(); #else SG_ERROR("Requires EIGEN3 to be enabled at compile time\n") diff --git a/src/shogun/ui/GUIKernel.cpp b/src/shogun/ui/GUIKernel.cpp index 2c24142c6a8..e93469cb486 100644 --- a/src/shogun/ui/GUIKernel.cpp +++ b/src/shogun/ui/GUIKernel.cpp @@ -918,7 +918,7 @@ bool CGUIKernel::clean_kernel() return true; } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT bool CGUIKernel::resize_kernel_cache(int32_t size) { if (!kernel) @@ -927,7 +927,7 @@ bool CGUIKernel::resize_kernel_cache(int32_t size) kernel->resize_kernel_cache(size); return true; } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT bool CGUIKernel::set_optimization_type(char* opt_type) { diff --git a/src/shogun/ui/GUIPreprocessor.cpp b/src/shogun/ui/GUIPreprocessor.cpp index de5925bbefd..d5e1dac06de 100644 --- a/src/shogun/ui/GUIPreprocessor.cpp +++ b/src/shogun/ui/GUIPreprocessor.cpp @@ -61,7 +61,7 @@ CPreprocessor* CGUIPreprocessor::create_prunevarsubmean(bool divide_by_std) CPreprocessor* CGUIPreprocessor::create_pca(bool do_whitening, float64_t threshold) { -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK CPreprocessor* preproc=new CPCA(do_whitening, THRESHOLD, threshold); if (preproc) @@ -70,10 +70,10 @@ CPreprocessor* CGUIPreprocessor::create_pca(bool do_whitening, float64_t thresho SG_ERROR("Could not create preproc PCA, do_whitening %i threshold %e", do_whitening, threshold) return preproc; -#else //HAVE_LAPACK +#else //SHOGUN_HAVE_LAPACK SG_ERROR("Could not create preproc PCA - lapack not available at compile time\n") return NULL; -#endif //HAVE_LAPACK +#endif //SHOGUN_HAVE_LAPACK } CPreprocessor* CGUIPreprocessor::create_generic(EPreprocessorType type) diff --git a/src/shogun/ui/SGInterface.cpp b/src/shogun/ui/SGInterface.cpp index ebc95302d71..e9dda7b84dc 100644 --- a/src/shogun/ui/SGInterface.cpp +++ b/src/shogun/ui/SGInterface.cpp @@ -45,14 +45,14 @@ using namespace shogun; CSGInterface* interface=NULL; CSyntaxHighLight hilight; -#if defined(HAVE_CMDLINE) +#if defined(SHOGUN_HAVE_CMDLINE) #define USAGE(method) "", "" #define USAGE_I(method, in) "", " " in "" #define USAGE_O(method, out) "" out " = ", "" #define USAGE_IO(method, in, out) "" out " = ", " " in "" #define USAGE_COMMA " " #define USAGE_STR "" -#elif defined(HAVE_R) +#elif defined(SHOGUN_HAVE_R) #define USAGE(method) "sg('", "')" #define USAGE_I(method, in) "sg('", "', " in ")" #define USAGE_O(method, out) "[" out "] <- sg('", "')" @@ -316,13 +316,13 @@ CSGInterfaceMethod sg_methods[]= (&CSGInterface::cmd_set_prior_probs_from_labels), USAGE_I(N_SET_PRIOR_PROBS_FROM_LABELS, USAGE_STR "labels" USAGE_STR) }, -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT { N_RESIZE_KERNEL_CACHE, (&CSGInterface::cmd_resize_kernel_cache), USAGE_I(N_RESIZE_KERNEL_CACHE, "size") }, -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT { "Distance", NULL, NULL }, @@ -1212,7 +1212,7 @@ CSGInterface::CSGInterface(bool print_copyright) version->print_version(); SG_PRINT("( seeding random number generator with %u (seed size %d))\n", CMath::get_seed(), RNG_SEED_SIZE); -#ifdef USE_LOGCACHE +#ifdef SHOGUN_USE_LOGCACHE SG_PRINT("initializing log-table (size=%i*%i*%i=%2.1fMB) ... ) ", CMath::get_log_range(),CMath::get_log_accuracy(),sizeof(float64_t), CMath::get_log_range()*CMath::get_log_accuracy()*sizeof(float64_t)/(1024.0*1024.0)); @@ -4212,7 +4212,7 @@ bool CSGInterface::cmd_set_prior_probs_from_labels() return true; } -#ifdef USE_SVMLIGHT +#ifdef SHOGUN_USE_SVMLIGHT bool CSGInterface::cmd_resize_kernel_cache() { if (m_nrhs<2 || !create_return_values(0)) @@ -4221,7 +4221,7 @@ bool CSGInterface::cmd_resize_kernel_cache() int32_t size=get_int_from_int_or_str(); return ui_kernel->resize_kernel_cache(size); } -#endif //USE_SVMLIGHT +#endif // SHOGUN_USE_SVMLIGHT /** Distance */ @@ -5246,7 +5246,7 @@ bool CSGInterface::cmd_add_preproc() preproc=ui_preproc->create_prunevarsubmean(divide_by_std); } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK else if (strmatch(type, "PCA") && m_nrhs==4) { bool do_whitening=get_bool_from_bool_or_str(); diff --git a/tests/unit/base/SGObject_unittest.cc b/tests/unit/base/SGObject_unittest.cc index 40a621868fd..abeb0761de3 100644 --- a/tests/unit/base/SGObject_unittest.cc +++ b/tests/unit/base/SGObject_unittest.cc @@ -9,7 +9,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -24,7 +24,7 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 TEST(SGObject,equals_same) { CGaussianKernel* kernel=new CGaussianKernel(); @@ -48,7 +48,7 @@ TEST(SGObject,equals_NULL_parameter) SG_UNREF(mmd); SG_UNREF(mmd2); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 void* stress_test(void* args) { @@ -65,7 +65,7 @@ void* stress_test(void* args) pthread_exit(0); } -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING TEST(SGObject,ref_unref) { CBinaryLabels* labs = new CBinaryLabels(10); @@ -120,7 +120,7 @@ TEST(SGObject,equals_DynamicObjectArray_equal) SG_UNREF(array2); } -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 TEST(SGObject,equals_DynamicObjectArray_equal_after_resize) { CDynamicObjectArray* array1=new CDynamicObjectArray(); @@ -228,4 +228,4 @@ TEST(SGObject,equals_complex_equal) SG_UNREF(gpr); SG_UNREF(gpr_copy); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/base/Serialization_unittest.cc b/tests/unit/base/Serialization_unittest.cc index 8756fa01941..10c58cc7607 100644 --- a/tests/unit/base/Serialization_unittest.cc +++ b/tests/unit/base/Serialization_unittest.cc @@ -72,7 +72,7 @@ TEST(Serialization,multiclass_labels) SG_UNREF(labels); } -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(Serialization, liblinear) { index_t num_samples = 50; diff --git a/tests/unit/classifier/GaussianProcessBinaryClassification_unittest.cc b/tests/unit/classifier/GaussianProcessBinaryClassification_unittest.cc index 2066c39de93..220738e0d15 100644 --- a/tests/unit/classifier/GaussianProcessBinaryClassification_unittest.cc +++ b/tests/unit/classifier/GaussianProcessBinaryClassification_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -331,4 +331,4 @@ TEST(GaussianProcessBinaryClassification,get_probabilities) SG_UNREF(gpc); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/classifier/svm/SVMOcas_unittest.cc b/tests/unit/classifier/svm/SVMOcas_unittest.cc index b8b00786be4..8d87cc53fba 100644 --- a/tests/unit/classifier/svm/SVMOcas_unittest.cc +++ b/tests/unit/classifier/svm/SVMOcas_unittest.cc @@ -5,7 +5,7 @@ using namespace shogun; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(SVMOcasTest,train) { index_t num_samples = 50; @@ -48,5 +48,5 @@ TEST(SVMOcasTest,train) SG_UNREF(test_feats); SG_UNREF(pred); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK diff --git a/tests/unit/converter/Isomap_unittest.cc b/tests/unit/converter/Isomap_unittest.cc index 66782539589..9eea791be7e 100644 --- a/tests/unit/converter/Isomap_unittest.cc +++ b/tests/unit/converter/Isomap_unittest.cc @@ -12,9 +12,9 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(IsomapTest,DISABLED_distance_preserving_max_k) { const index_t n_samples = 5; @@ -60,7 +60,7 @@ TEST(IsomapTest,DISABLED_distance_preserving_max_k) SG_UNREF(euclidean_distance); SG_UNREF(euclidean_distance_for_embedding); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK struct index_and_distance_struct { diff --git a/tests/unit/converter/ManifoldSculpting_unittest.cc b/tests/unit/converter/ManifoldSculpting_unittest.cc index d716c6089aa..a6763ee63ba 100644 --- a/tests/unit/converter/ManifoldSculpting_unittest.cc +++ b/tests/unit/converter/ManifoldSculpting_unittest.cc @@ -5,9 +5,9 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /* Basic test for manifold sculpting, that just checks that it works anyhow */ TEST(ManifoldSculptingTest,DISABLED_basic) { @@ -34,6 +34,6 @@ TEST(ManifoldSculptingTest,DISABLED_basic) SG_UNREF(embedder); SG_UNREF(high_dimensional_features); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif diff --git a/tests/unit/converter/MultidimensionalScaling_unittest.cc b/tests/unit/converter/MultidimensionalScaling_unittest.cc index 77619e8d943..900219c6c50 100644 --- a/tests/unit/converter/MultidimensionalScaling_unittest.cc +++ b/tests/unit/converter/MultidimensionalScaling_unittest.cc @@ -6,9 +6,9 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(MultidimensionaScalingTest,distance_preserving) { const index_t n_samples = 10; @@ -51,6 +51,6 @@ TEST(MultidimensionaScalingTest,distance_preserving) SG_UNREF(euclidean_distance); SG_UNREF(euclidean_distance_for_embedding); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif diff --git a/tests/unit/converter/TDistributedStochasticNeighborEmbedding_unittest.cc b/tests/unit/converter/TDistributedStochasticNeighborEmbedding_unittest.cc index 6f77c6c34af..14f4d008717 100644 --- a/tests/unit/converter/TDistributedStochasticNeighborEmbedding_unittest.cc +++ b/tests/unit/converter/TDistributedStochasticNeighborEmbedding_unittest.cc @@ -5,9 +5,9 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK /* Basic test for t-SNE, that just checks that it works anyhow */ TEST(TDistributedStochasticNeighborEmbeddingTest,basic) { @@ -38,6 +38,6 @@ TEST(TDistributedStochasticNeighborEmbeddingTest,basic) SG_UNREF(high_dimensional_features); SG_UNREF(low_dimensional_features); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK #endif diff --git a/tests/unit/converter/ica/FFSep_unittest.cc b/tests/unit/converter/ica/FFSep_unittest.cc index 6b3bc250ca4..2d43ad7fd25 100644 --- a/tests/unit/converter/ica/FFSep_unittest.cc +++ b/tests/unit/converter/ica/FFSep_unittest.cc @@ -3,7 +3,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -65,4 +65,4 @@ TEST(CFFSep, blind_source_separation) SG_UNREF(signals); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/converter/ica/FastICA_unittest.cc b/tests/unit/converter/ica/FastICA_unittest.cc index c2ce33744ce..ff54a473315 100644 --- a/tests/unit/converter/ica/FastICA_unittest.cc +++ b/tests/unit/converter/ica/FastICA_unittest.cc @@ -3,7 +3,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -65,4 +65,4 @@ TEST(CFastICA, blind_source_separation) SG_UNREF(signals); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/converter/ica/Jade_unittest.cc b/tests/unit/converter/ica/Jade_unittest.cc index 104228ac892..b82e00b4fdb 100644 --- a/tests/unit/converter/ica/Jade_unittest.cc +++ b/tests/unit/converter/ica/Jade_unittest.cc @@ -3,7 +3,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -65,4 +65,4 @@ TEST(CJade, blind_source_separation) SG_UNREF(signals); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/converter/ica/JediSep_unittest.cc b/tests/unit/converter/ica/JediSep_unittest.cc index 5c0bfb41679..c776fea33f7 100644 --- a/tests/unit/converter/ica/JediSep_unittest.cc +++ b/tests/unit/converter/ica/JediSep_unittest.cc @@ -3,7 +3,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -65,4 +65,4 @@ TEST(CJediSep, blind_source_separation) SG_UNREF(signals); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/converter/ica/SOBI_unittest.cc b/tests/unit/converter/ica/SOBI_unittest.cc index 8d5d8c5c93f..70e7118e3fe 100644 --- a/tests/unit/converter/ica/SOBI_unittest.cc +++ b/tests/unit/converter/ica/SOBI_unittest.cc @@ -3,7 +3,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -65,4 +65,4 @@ TEST(CSOBI, blind_source_separation) SG_UNREF(signals); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/converter/ica/UWedgeSep_unittest.cc b/tests/unit/converter/ica/UWedgeSep_unittest.cc index 0b9a0ef3471..4a98619f32b 100644 --- a/tests/unit/converter/ica/UWedgeSep_unittest.cc +++ b/tests/unit/converter/ica/UWedgeSep_unittest.cc @@ -3,7 +3,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -65,4 +65,4 @@ TEST(CUWedgeSep, blind_source_separation) SG_UNREF(signals); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/distance/Distance_unittest.cc b/tests/unit/distance/Distance_unittest.cc index 876887f9108..d2e596a21b2 100644 --- a/tests/unit/distance/Distance_unittest.cc +++ b/tests/unit/distance/Distance_unittest.cc @@ -8,7 +8,7 @@ * Copyright (C) 2013 Fernando J. Iglesias Garcia */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -44,4 +44,4 @@ TEST(Distance, custom_mahalanobis) SG_UNREF(distance) } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/distribution/classical/GaussianDistribution_unittest.cc b/tests/unit/distribution/classical/GaussianDistribution_unittest.cc index ac55618ca5a..2747d6fdc0d 100644 --- a/tests/unit/distribution/classical/GaussianDistribution_unittest.cc +++ b/tests/unit/distribution/classical/GaussianDistribution_unittest.cc @@ -7,7 +7,7 @@ * Written (W) 2013 Heiko Strathmann */ -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -157,4 +157,4 @@ TEST(GaussianDistribution,sample_2d) SG_UNREF(gauss); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/evaluation/ica/AmariIndex_unittest.cc b/tests/unit/evaluation/ica/AmariIndex_unittest.cc index 5276db97ff4..6e7314a752e 100644 --- a/tests/unit/evaluation/ica/AmariIndex_unittest.cc +++ b/tests/unit/evaluation/ica/AmariIndex_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -19,4 +19,4 @@ TEST(AmariIndex, amari_zero) EXPECT_NEAR(error, 0.0, 1e-5); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/evaluation/ica/PermutationMatrix_unittest.cc b/tests/unit/evaluation/ica/PermutationMatrix_unittest.cc index 247b8542a94..044a852f7d1 100644 --- a/tests/unit/evaluation/ica/PermutationMatrix_unittest.cc +++ b/tests/unit/evaluation/ica/PermutationMatrix_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include @@ -28,4 +28,4 @@ TEST(PermutationMatrix, is_not_perm) EXPECT_FALSE(isperm); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/features/DataGenerators_unittest.cc b/tests/unit/features/DataGenerators_unittest.cc index 912bb0d3220..683144e0c9c 100644 --- a/tests/unit/features/DataGenerators_unittest.cc +++ b/tests/unit/features/DataGenerators_unittest.cc @@ -41,9 +41,9 @@ TEST(GaussianBlobsDataGenerator,get_next_example) SGVector mean=CStatistics::matrix_mean(samples, false); SGMatrix::transpose_matrix(samples.matrix, samples.num_rows, samples.num_cols); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGMatrix cov=CStatistics::covariance_matrix(samples); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK //mean.display_vector("mean"); //cov.display_matrix("cov"); @@ -52,12 +52,12 @@ TEST(GaussianBlobsDataGenerator,get_next_example) float64_t accuracy=0.5; /* matrix is expected to look like [1.5, 0.5; 0.5, 1.5] */ -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK EXPECT_LE(CMath::abs(cov(0,0)-1.5), accuracy); EXPECT_LE(CMath::abs(cov(0,1)-0.5), accuracy); EXPECT_LE(CMath::abs(cov(1,0)-0.5), accuracy); EXPECT_LE(CMath::abs(cov(1,1)-1.5), accuracy); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK /* mean is supposed to do [0, 0] */ EXPECT_LE(CMath::abs(mean[0]-0), 0.1); @@ -80,20 +80,20 @@ TEST(GaussianBlobsDataGenerator,get_next_example) SGVector mean2=CStatistics::matrix_mean(samples2, false); SGMatrix::transpose_matrix(samples2.matrix, samples2.num_rows, samples2.num_cols); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGMatrix cov2=CStatistics::covariance_matrix(samples2); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK //mean2.display_vector("mean2"); //cov2.display_matrix("cov2"); /* matrix is expected to look like [7.55, 0.55; 0.55, 7.55] */ -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK EXPECT_LE(CMath::abs(cov2(0,0)-7.55), accuracy); EXPECT_LE(CMath::abs(cov2(0,1)-0.55), accuracy); EXPECT_LE(CMath::abs(cov2(1,0)-0.55), accuracy); EXPECT_LE(CMath::abs(cov2(1,1)-7.55), accuracy); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK /* mean is supposed to do [3, 3] */ EXPECT_LE(CMath::abs(mean2[0]-3), accuracy); diff --git a/tests/unit/io/MLDataHDF5File_unittest.cc b/tests/unit/io/MLDataHDF5File_unittest.cc index c6508b181a3..7cb733f8f18 100644 --- a/tests/unit/io/MLDataHDF5File_unittest.cc +++ b/tests/unit/io/MLDataHDF5File_unittest.cc @@ -1,7 +1,7 @@ #include #include -#if defined(HAVE_HDF5) && defined( HAVE_CURL) +#if defined(SHOGUN_HAVE_HDF5) && defined( SHOGUN_HAVE_CURL) #include #include #include diff --git a/tests/unit/io/ProtobufFile_unittest.cc b/tests/unit/io/ProtobufFile_unittest.cc index e4a1a4cdbb7..a08d0a723f8 100644 --- a/tests/unit/io/ProtobufFile_unittest.cc +++ b/tests/unit/io/ProtobufFile_unittest.cc @@ -11,7 +11,7 @@ using namespace shogun; -#ifdef HAVE_PROTOBUF +#ifdef SHOGUN_HAVE_PROTOBUF #include TEST(ProtobufFileTest, vector_int32) @@ -306,4 +306,4 @@ TEST(ProtobufFileTest, DISABLED_string_list_char) unlink("ProtobufFileTest_string_list_char_output.txt"); } -#endif /* HAVE_PROTOBUF */ \ No newline at end of file +#endif /* SHOGUN_HAVE_PROTOBUF */ \ No newline at end of file diff --git a/tests/unit/io/SerializationHDF5_unittest.cc.jinja2 b/tests/unit/io/SerializationHDF5_unittest.cc.jinja2 index 67578c8a0ee..3795d9f50a5 100644 --- a/tests/unit/io/SerializationHDF5_unittest.cc.jinja2 +++ b/tests/unit/io/SerializationHDF5_unittest.cc.jinja2 @@ -11,7 +11,7 @@ using namespace shogun; -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 {% set ignores = ['IndividualJobResultAggregator', 'RationalApproximationCGMJob', 'RationalApproximationIndividualJob', @@ -102,4 +102,4 @@ TEST(SerializationHDF5,{{class}}_{{type}}) {% endfor %} {% endfor %} -#endif /* HAVE_HDF5 */ +#endif /* SHOGUN_HAVE_HDF5 */ diff --git a/tests/unit/io/SerializationJSON_unittest.cc.jinja2 b/tests/unit/io/SerializationJSON_unittest.cc.jinja2 index f05f9cfb590..7d413da034d 100644 --- a/tests/unit/io/SerializationJSON_unittest.cc.jinja2 +++ b/tests/unit/io/SerializationJSON_unittest.cc.jinja2 @@ -11,7 +11,7 @@ using namespace shogun; -#ifdef HAVE_JSON +#ifdef SHOGUN_HAVE_JSON {% set ignores = ['RationalApproximationIndividualJob', 'CCSOSVM', 'TwoStateModel'] %} @@ -100,4 +100,4 @@ TEST(SerializationJSON,{{class}}_{{type}}) {% endfor %} {% endfor %} -#endif /* HAVE_JSON */ +#endif /* SHOGUN_HAVE_JSON */ diff --git a/tests/unit/io/SerializationXML_unittest.cc.jinja2 b/tests/unit/io/SerializationXML_unittest.cc.jinja2 index 1c1ba44cf5d..453f4218763 100644 --- a/tests/unit/io/SerializationXML_unittest.cc.jinja2 +++ b/tests/unit/io/SerializationXML_unittest.cc.jinja2 @@ -11,7 +11,7 @@ using namespace shogun; -#ifdef HAVE_XML +#ifdef SHOGUN_HAVE_XML {% set ignores = ['ScalarResult', 'StoreScalarAggregator'] %} @@ -99,4 +99,4 @@ TEST(SerializationXML,{{class}}_{{type}}) {% endfor %} {% endfor %} -#endif /* HAVE_XML */ +#endif /* SHOGUN_HAVE_XML */ diff --git a/tests/unit/io/Serialization_unittest.cc b/tests/unit/io/Serialization_unittest.cc index 8ad18c249ff..24f3396a763 100644 --- a/tests/unit/io/Serialization_unittest.cc +++ b/tests/unit/io/Serialization_unittest.cc @@ -559,7 +559,7 @@ TEST(Serialization, Ascii_matrix_equal_COMPLEX128) delete param2; } -#ifdef HAVE_JSON +#ifdef SHOGUN_HAVE_JSON TEST(Serialization, Json_scalar_equal_BOOL) { bool a=true; @@ -744,9 +744,9 @@ TEST(Serialization, Json_matrix_equal_FLOAT64) delete param1; delete param2; } -#endif // HAVE_JSON +#endif // SHOGUN_HAVE_JSON -#ifdef HAVE_XML +#ifdef SHOGUN_HAVE_XML TEST(Serialization, Xml_scalar_equal_BOOL) { bool a=true; @@ -1289,9 +1289,9 @@ TEST(Serialization, Xml_matrix_equal_COMPLEX128) delete param2; } -#endif // HAVE_XML +#endif // SHOGUN_HAVE_XML -#ifdef HAVE_HDF5 +#ifdef SHOGUN_HAVE_HDF5 TEST(Serialization, Hdf5_scalar_equal_BOOL) { bool a=true; @@ -1738,4 +1738,4 @@ TEST(Serialization, Hdf5_matrix_equal_FLOAT64) delete param2; } -#endif // HAVE_HDF5 +#endif // SHOGUN_HAVE_HDF5 diff --git a/tests/unit/latent/LatentSVM_unittest.cc b/tests/unit/latent/LatentSVM_unittest.cc index 3421d95dec3..84d1e1d465b 100644 --- a/tests/unit/latent/LatentSVM_unittest.cc +++ b/tests/unit/latent/LatentSVM_unittest.cc @@ -37,7 +37,7 @@ TEST(LatentModel, argmax_h) SG_UNREF(data); } -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING #ifdef FREEBSD TEST(LatentSVM, DISABLED_ctor) diff --git a/tests/unit/lib/SGSparseMatrix_unittest.cc b/tests/unit/lib/SGSparseMatrix_unittest.cc index e176c51d77b..7ceaf36a513 100644 --- a/tests/unit/lib/SGSparseMatrix_unittest.cc +++ b/tests/unit/lib/SGSparseMatrix_unittest.cc @@ -16,7 +16,7 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include using namespace Eigen; @@ -100,7 +100,7 @@ TEST(SGSparseMatrix, multiply_complex128_float64) EXPECT_NEAR(r.norm(), 22.80350850198275836078, 1E-16); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 TEST(SGSparseMatrix, access_by_index) { diff --git a/tests/unit/lib/computation/SerialComputationEngine_unittest.cc b/tests/unit/lib/computation/SerialComputationEngine_unittest.cc index 7ee58e50636..8b7ae9b7959 100644 --- a/tests/unit/lib/computation/SerialComputationEngine_unittest.cc +++ b/tests/unit/lib/computation/SerialComputationEngine_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #if EIGEN_VERSION_AT_LEAST(3,1,0) @@ -77,4 +77,4 @@ TEST(SerialComputationEngine, dense_log_det) SG_UNREF(agg); } #endif // EIGEN_VERSION_AT_LEAST(3,1,0) -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/machine/gp/EPInferenceMethod_unittest.cc b/tests/unit/machine/gp/EPInferenceMethod_unittest.cc index aa5e97e2cfc..a9f08d19e27 100644 --- a/tests/unit/machine/gp/EPInferenceMethod_unittest.cc +++ b/tests/unit/machine/gp/EPInferenceMethod_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -410,4 +410,4 @@ TEST(EPInferenceMethod, get_posterior_covariance_probit_likelihood) SG_UNREF(inf); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/machine/gp/ExactInferenceMethod_unittest.cc b/tests/unit/machine/gp/ExactInferenceMethod_unittest.cc index 443aa68540b..f012efc436e 100644 --- a/tests/unit/machine/gp/ExactInferenceMethod_unittest.cc +++ b/tests/unit/machine/gp/ExactInferenceMethod_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -370,4 +370,4 @@ TEST(ExactInferenceMethod,get_posterior_covariance) SG_UNREF(inf); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/machine/gp/FITCInferenceMethod_unittest.cc b/tests/unit/machine/gp/FITCInferenceMethod_unittest.cc index f8076d039dc..9093d0e30c5 100644 --- a/tests/unit/machine/gp/FITCInferenceMethod_unittest.cc +++ b/tests/unit/machine/gp/FITCInferenceMethod_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -591,4 +591,4 @@ TEST(FITCInferenceMethod,get_marginal_likelihood_derivatives_sparse) SG_UNREF(inf); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/machine/gp/GaussianLikelihood_unittest.cc b/tests/unit/machine/gp/GaussianLikelihood_unittest.cc index 4e6b667e14a..9c0d893c4d9 100644 --- a/tests/unit/machine/gp/GaussianLikelihood_unittest.cc +++ b/tests/unit/machine/gp/GaussianLikelihood_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -471,4 +471,4 @@ TEST(GaussianLikelihood,get_second_moments) SG_UNREF(labels); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/machine/gp/InferenceMethod_unittest.cc b/tests/unit/machine/gp/InferenceMethod_unittest.cc index b0c49d6e721..5ce238d4738 100644 --- a/tests/unit/machine/gp/InferenceMethod_unittest.cc +++ b/tests/unit/machine/gp/InferenceMethod_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -54,4 +54,4 @@ TEST(InferenceMethod,get_marginal_likelihood_estimate_logit_laplace) SG_UNREF(inf); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/machine/gp/LaplacianInferenceMethod_unittest.cc b/tests/unit/machine/gp/LaplacianInferenceMethod_unittest.cc index 99989ab1dc1..55469dea281 100644 --- a/tests/unit/machine/gp/LaplacianInferenceMethod_unittest.cc +++ b/tests/unit/machine/gp/LaplacianInferenceMethod_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -1204,4 +1204,4 @@ TEST(LaplacianInferenceMethod,get_posterior_covariance_probit_likelihood) SG_UNREF(inf); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/machine/gp/LogitLikelihood_unittest.cc b/tests/unit/machine/gp/LogitLikelihood_unittest.cc index aa95931e431..c1031416063 100644 --- a/tests/unit/machine/gp/LogitLikelihood_unittest.cc +++ b/tests/unit/machine/gp/LogitLikelihood_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -486,4 +486,4 @@ TEST(LogitLikelihood,get_second_moments) SG_UNREF(labels); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/machine/gp/ProbitLikelihood_unittest.cc b/tests/unit/machine/gp/ProbitLikelihood_unittest.cc index 1126fb55a60..fc046891e65 100644 --- a/tests/unit/machine/gp/ProbitLikelihood_unittest.cc +++ b/tests/unit/machine/gp/ProbitLikelihood_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -427,4 +427,4 @@ TEST(ProbitLikelihood,get_second_moments) SG_UNREF(labels); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/machine/gp/StudentsTLikelihood_unittest.cc b/tests/unit/machine/gp/StudentsTLikelihood_unittest.cc index b8104e82857..28b3821dfe6 100644 --- a/tests/unit/machine/gp/StudentsTLikelihood_unittest.cc +++ b/tests/unit/machine/gp/StudentsTLikelihood_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -498,4 +498,4 @@ TEST(StudentsTLikelihood,get_second_moments) SG_UNREF(labels); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/mathematics/Integration_unittest.cc b/tests/unit/mathematics/Integration_unittest.cc index c358650665a..ad842392a8f 100644 --- a/tests/unit/mathematics/Integration_unittest.cc +++ b/tests/unit/mathematics/Integration_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -565,4 +565,4 @@ TEST(Integration,integrate_quadgh_product_students_t_pdf_normal_pdf) SG_UNREF(g); } -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/mathematics/JacobiEllipticFunctions_unittest.cc b/tests/unit/mathematics/JacobiEllipticFunctions_unittest.cc index 061115d5f11..b5a82e3fce1 100644 --- a/tests/unit/mathematics/JacobiEllipticFunctions_unittest.cc +++ b/tests/unit/mathematics/JacobiEllipticFunctions_unittest.cc @@ -11,10 +11,10 @@ #include #include -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC #include #include -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC using namespace shogun; @@ -24,7 +24,7 @@ typedef complex128_t Complex; TEST(JacobiEllipticFunctions, ellipKKp) { Real K, Kp; -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC CJacobiEllipticFunctions::ellipKKp(0.9999999999, K, Kp); EXPECT_NEAR(K, 1.57153044117197637775, 1E-19); EXPECT_NEAR(Kp, 4.52953569660335286784, 1E-19); @@ -56,13 +56,13 @@ TEST(JacobiEllipticFunctions, ellipKKp) CJacobiEllipticFunctions::ellipKKp(0.0, K, Kp); EXPECT_EQ(K, std::numeric_limits::max()); EXPECT_NEAR(Kp, 1.5707963267948965580, 1E-15); -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC } TEST(JacobiEllipticFunctions, ellipJC) { Complex sn, cn, dn; -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC CJacobiEllipticFunctions::ellipJC(Complex(0.5,0.0), 0.0, sn, cn, dn); EXPECT_NEAR(sn.real(), 0.47942553860420300538, 1E-19); EXPECT_NEAR(cn.real(), 0.87758256189037275874, 1E-19); @@ -162,5 +162,5 @@ TEST(JacobiEllipticFunctions, ellipJC) EXPECT_NEAR(sn.imag(), 0.40389645531602574868, 1E-15); EXPECT_NEAR(cn.imag(), -0.23982763093808803778, 1E-15); EXPECT_NEAR(dn.imag(), -0.23982763093808801003, 1E-15); -#endif //HAVE_ARPREC +#endif //SHOGUN_HAVE_ARPREC } diff --git a/tests/unit/mathematics/Lapack_wrapper_dstemr.cc b/tests/unit/mathematics/Lapack_wrapper_dstemr.cc index bbd8aa9f400..1c252014f3f 100644 --- a/tests/unit/mathematics/Lapack_wrapper_dstemr.cc +++ b/tests/unit/mathematics/Lapack_wrapper_dstemr.cc @@ -9,9 +9,9 @@ #include -#ifdef HAVE_LAPACK -#ifdef HAVE_EIGEN3 -#ifdef HAVE_ATLAS +#ifdef SHOGUN_HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_ATLAS #include #include #include @@ -59,6 +59,6 @@ TEST(Lapack_wrapper, dstemr) EXPECT_NEAR((map.cast()-eigenvals).norm(), 0.0, 1E-10); } -#endif // HAVE_ATLAS -#endif // HAVE_EIGEN3 -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_ATLAS +#endif // SHOGUN_HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK diff --git a/tests/unit/mathematics/Random_unittest.cc b/tests/unit/mathematics/Random_unittest.cc index 123ab929e9c..1e844990fad 100644 --- a/tests/unit/mathematics/Random_unittest.cc +++ b/tests/unit/mathematics/Random_unittest.cc @@ -45,7 +45,7 @@ TEST(Random, fill_array_uint32) EXPECT_EQ(t, rv[SFMT_N32]); } -#ifdef HAVE_SSE2 +#ifdef SHOGUN_HAVE_SSE2 TEST(Random, fill_array_uint32_simd) { CRandom* prng = new CRandom(12345); @@ -69,7 +69,7 @@ TEST(Random, fill_array_uint64) EXPECT_EQ(t, rv[SFMT_N64]); } -#ifdef HAVE_SSE2 +#ifdef SHOGUN_HAVE_SSE2 TEST(Random, fill_array_uint64_simd) { CRandom* prng = new CRandom(12345); @@ -93,7 +93,7 @@ TEST(Random, fill_array_oc) EXPECT_DOUBLE_EQ(t, rv[dsfmt_get_min_array_size()]); } -#ifdef HAVE_SSE2 +#ifdef SHOGUN_HAVE_SSE2 TEST(Random, fill_array_oc_simd) { CRandom* prng = new CRandom(12345); diff --git a/tests/unit/mathematics/Statistics_unittest.cc b/tests/unit/mathematics/Statistics_unittest.cc index 69c1f62aa19..22dd4414c53 100644 --- a/tests/unit/mathematics/Statistics_unittest.cc +++ b/tests/unit/mathematics/Statistics_unittest.cc @@ -1,5 +1,5 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -142,17 +142,17 @@ TEST(Statistics, sample_from_gaussian_dense1) // calculate the sample mean and covariance SGVector s_mean=CStatistics::matrix_mean(samples); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGMatrix s_cov=CStatistics::covariance_matrix(samples); Map s_c(s_cov.matrix, s_cov.num_rows, s_cov.num_cols); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK Map s_mu(s_mean.vector, s_mean.vlen); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK ASSERT_EQ(c.rows(), s_c.rows()); ASSERT_EQ(c.cols(), s_c.cols()); EXPECT_NEAR((s_c-c).norm(), 0.0, 1.0); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK ASSERT_EQ(mu.rows(), s_mu.rows()); EXPECT_NEAR((s_mu-mu).norm(), 0.0, 0.5); @@ -182,17 +182,17 @@ TEST(Statistics, sample_from_gaussian_dense2) // calculate the sample mean and covariance SGVector s_mean=CStatistics::matrix_mean(samples); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGMatrix s_cov=CStatistics::covariance_matrix(samples); Map s_c(s_cov.matrix, s_cov.num_rows, s_cov.num_cols); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK Map s_mu(s_mean.vector, s_mean.vlen); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK ASSERT_EQ(c.rows(), s_c.rows()); ASSERT_EQ(c.cols(), s_c.cols()); EXPECT_NEAR((s_c-c.inverse()).norm(), 0.0, 5.0); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK ASSERT_EQ(mu.rows(), s_mu.rows()); EXPECT_NEAR((s_mu-mu).norm(), 0.0, 0.5); @@ -247,10 +247,10 @@ TEST(Statistics, sample_from_gaussian_sparse1) // calculate the sample mean and covariance SGVector s_mean=CStatistics::matrix_mean(samples); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SGMatrix s_cov=CStatistics::covariance_matrix(samples); Map s_c(s_cov.matrix, s_cov.num_rows, s_cov.num_cols); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK Map s_mu(s_mean.vector, s_mean.vlen); // create a similar dense cov matrix as of the original one @@ -263,9 +263,9 @@ TEST(Statistics, sample_from_gaussian_sparse1) } EXPECT_NEAR((s_mu-mu).norm(), 0.0, 0.5); -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK EXPECT_NEAR((d_cov-s_c).norm(), 0.0, 2.5); -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK SG_FREE(vec); SG_FREE(rest); @@ -330,4 +330,4 @@ TEST(Statistics, lnormal_cdf) EXPECT_NEAR(lphi, 0.0, 1e-6); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/ajd/FFDiag_unittest.cc b/tests/unit/mathematics/ajd/FFDiag_unittest.cc index 3edbdb4fdc2..3627c09f762 100644 --- a/tests/unit/mathematics/ajd/FFDiag_unittest.cc +++ b/tests/unit/mathematics/ajd/FFDiag_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -71,4 +71,4 @@ TEST(CFFDiag, diagonalize) EXPECT_EQ(isperm,true); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/ajd/JADiagOrth_unittest.cc b/tests/unit/mathematics/ajd/JADiagOrth_unittest.cc index 1d6834ec0f7..2dea05755b3 100644 --- a/tests/unit/mathematics/ajd/JADiagOrth_unittest.cc +++ b/tests/unit/mathematics/ajd/JADiagOrth_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -75,4 +75,4 @@ TEST(CJADiagOrth, diagonalize) EXPECT_EQ(isperm,true); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/ajd/JADiag_unittest.cc b/tests/unit/mathematics/ajd/JADiag_unittest.cc index 18e0061d594..4d4d663673d 100644 --- a/tests/unit/mathematics/ajd/JADiag_unittest.cc +++ b/tests/unit/mathematics/ajd/JADiag_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -71,4 +71,4 @@ TEST(CJADiag, diagonalize) EXPECT_EQ(isperm,true); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/ajd/JediDiag_unittest.cc b/tests/unit/mathematics/ajd/JediDiag_unittest.cc index 38434e1e1b9..c00ca8de3de 100644 --- a/tests/unit/mathematics/ajd/JediDiag_unittest.cc +++ b/tests/unit/mathematics/ajd/JediDiag_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -72,4 +72,4 @@ TEST(CJediDiag, diagonalize) EXPECT_EQ(isperm,true); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/ajd/QDiag_unittest.cc b/tests/unit/mathematics/ajd/QDiag_unittest.cc index a34d394ccfb..cf2cac55bdc 100644 --- a/tests/unit/mathematics/ajd/QDiag_unittest.cc +++ b/tests/unit/mathematics/ajd/QDiag_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -71,4 +71,4 @@ TEST(CQDiag, diagonalize) EXPECT_EQ(isperm,true); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/ajd/UWedge_unittest.cc b/tests/unit/mathematics/ajd/UWedge_unittest.cc index c85b1d9c16f..31a048ab420 100644 --- a/tests/unit/mathematics/ajd/UWedge_unittest.cc +++ b/tests/unit/mathematics/ajd/UWedge_unittest.cc @@ -2,7 +2,7 @@ #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -72,4 +72,4 @@ TEST(CUWedge, diagonalize) EXPECT_EQ(isperm,true); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/CGMShiftedFamilySolver_unittest.cc b/tests/unit/mathematics/linalg/CGMShiftedFamilySolver_unittest.cc index 9662401c29c..c5c0181b5a5 100644 --- a/tests/unit/mathematics/linalg/CGMShiftedFamilySolver_unittest.cc +++ b/tests/unit/mathematics/linalg/CGMShiftedFamilySolver_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -171,4 +171,4 @@ TEST(CGMShiftedFamilySolver, solve_shifted_weight_complex_shift) SG_UNREF(A); SG_UNREF(B); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/ConjugateGradientSolver_unittest.cc b/tests/unit/mathematics/linalg/ConjugateGradientSolver_unittest.cc index da4c1d7e922..db20ccdf369 100644 --- a/tests/unit/mathematics/linalg/ConjugateGradientSolver_unittest.cc +++ b/tests/unit/mathematics/linalg/ConjugateGradientSolver_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -51,4 +51,4 @@ TEST(ConjugateGradientSolver, solve) SG_UNREF(A); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/ConjugateOrthogonalCGSolver_unittest.cc b/tests/unit/mathematics/linalg/ConjugateOrthogonalCGSolver_unittest.cc index 79be328a040..2a478804d3f 100644 --- a/tests/unit/mathematics/linalg/ConjugateOrthogonalCGSolver_unittest.cc +++ b/tests/unit/mathematics/linalg/ConjugateOrthogonalCGSolver_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -58,4 +58,4 @@ TEST(ConjugateOrthogonalCGSolver, solve) SG_UNREF(A); SG_UNREF(cocg_linear_solver); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/DenseExactLogJob_unittest.cc b/tests/unit/mathematics/linalg/DenseExactLogJob_unittest.cc index 66de2236065..13b380f8dfc 100644 --- a/tests/unit/mathematics/linalg/DenseExactLogJob_unittest.cc +++ b/tests/unit/mathematics/linalg/DenseExactLogJob_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #if EIGEN_VERSION_AT_LEAST(3,1,0) @@ -71,4 +71,4 @@ TEST(DenseExactLogJob, log_det) SG_UNREF(agg); } #endif // EIGEN_VERSION_AT_LEAST(3,1,0) -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/DenseMatrixExactLog_unittest.cc b/tests/unit/mathematics/linalg/DenseMatrixExactLog_unittest.cc index dd7f15d7aef..b11e87fac07 100644 --- a/tests/unit/mathematics/linalg/DenseMatrixExactLog_unittest.cc +++ b/tests/unit/mathematics/linalg/DenseMatrixExactLog_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #if EIGEN_VERSION_AT_LEAST(3,1,0) @@ -98,4 +98,4 @@ TEST(DenseMatrixExactLog, dense_log_det) SG_UNREF(e); } #endif // EIGEN_VERSION_AT_LEAST(3,1,0) -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/DenseMatrixOperator_unittest.cc b/tests/unit/mathematics/linalg/DenseMatrixOperator_unittest.cc index cf7dc48094f..d465187707c 100644 --- a/tests/unit/mathematics/linalg/DenseMatrixOperator_unittest.cc +++ b/tests/unit/mathematics/linalg/DenseMatrixOperator_unittest.cc @@ -16,7 +16,7 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 using namespace Eigen; TEST(DenseMatrixOperator, apply) @@ -94,7 +94,7 @@ TEST(DenseMatrixOperator, shift_apply) SGVector diag=op.get_diagonal(); for (index_t i=0; i -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -39,4 +39,4 @@ TEST(DirectEigenSolver, compute) SG_UNREF(A); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/DirectLinearSolverComplex_unittest.cc b/tests/unit/mathematics/linalg/DirectLinearSolverComplex_unittest.cc index 7571e49a644..11a29ccbb8b 100644 --- a/tests/unit/mathematics/linalg/DirectLinearSolverComplex_unittest.cc +++ b/tests/unit/mathematics/linalg/DirectLinearSolverComplex_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -166,4 +166,4 @@ TEST(DirectLinearSolverComplex, solve_LLT) SG_UNREF(A); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/DirectSparseLinearSolver_unittest.cc b/tests/unit/mathematics/linalg/DirectSparseLinearSolver_unittest.cc index 4981125e4c2..c0a2c50c77e 100644 --- a/tests/unit/mathematics/linalg/DirectSparseLinearSolver_unittest.cc +++ b/tests/unit/mathematics/linalg/DirectSparseLinearSolver_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -48,4 +48,4 @@ TEST(DirectSparseLinearSolver, solve) SG_UNREF(linear_solver); SG_UNREF(A); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/IndividualJobResultAggregator_unittest.cc b/tests/unit/mathematics/linalg/IndividualJobResultAggregator_unittest.cc index 40dd5ef9d37..751330652fe 100644 --- a/tests/unit/mathematics/linalg/IndividualJobResultAggregator_unittest.cc +++ b/tests/unit/mathematics/linalg/IndividualJobResultAggregator_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -60,4 +60,4 @@ TEST(IndividualJobResultAggregator, finalize) SG_UNREF(agg); SG_UNREF(op); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/LanczosEigenSolver_unittest.cc b/tests/unit/mathematics/linalg/LanczosEigenSolver_unittest.cc index 6477462569c..a90e5ff5cf6 100644 --- a/tests/unit/mathematics/linalg/LanczosEigenSolver_unittest.cc +++ b/tests/unit/mathematics/linalg/LanczosEigenSolver_unittest.cc @@ -9,8 +9,8 @@ #include -#ifdef HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK #include #include @@ -129,6 +129,6 @@ TEST(LanczosEigenSolver, set_eigenvalues_externally) SG_UNREF(eig_solver); SG_UNREF(A); } -#endif // HAVE_EIGEN3 -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK diff --git a/tests/unit/mathematics/linalg/LogDetEstimator_unittest.cc b/tests/unit/mathematics/linalg/LogDetEstimator_unittest.cc index 6585f7d757a..5cacb59bcd0 100644 --- a/tests/unit/mathematics/linalg/LogDetEstimator_unittest.cc +++ b/tests/unit/mathematics/linalg/LogDetEstimator_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -129,8 +129,8 @@ TEST(LogDetEstimator, sample_ratapp_dense) SG_UNREF(e); } -#ifdef HAVE_COLPACK -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_COLPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(LogDetEstimator, sample_ratapp_probing_sampler) { CSerialComputationEngine* e=new CSerialComputationEngine; @@ -426,6 +426,6 @@ TEST(LogDetEstimator, sample_ratapp_big_matrix) SG_UNREF(op); SG_UNREF(e); } -#endif // HAVE_LAPACK -#endif // HAVE_COLPACK -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK +#endif // SHOGUN_HAVE_COLPACK +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/MatrixOperator_unittest.cc b/tests/unit/mathematics/linalg/MatrixOperator_unittest.cc index 719f0a313d1..41284b6926c 100644 --- a/tests/unit/mathematics/linalg/MatrixOperator_unittest.cc +++ b/tests/unit/mathematics/linalg/MatrixOperator_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -72,4 +72,4 @@ TEST(MatrixOperator, cast_sparse_double_complex) SG_UNREF(orig_op); SG_UNREF(casted_op); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/NormalSampler_unittest.cc b/tests/unit/mathematics/linalg/NormalSampler_unittest.cc index 555279eedf5..d362aebe187 100644 --- a/tests/unit/mathematics/linalg/NormalSampler_unittest.cc +++ b/tests/unit/mathematics/linalg/NormalSampler_unittest.cc @@ -8,7 +8,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -19,7 +19,7 @@ using namespace shogun; using namespace Eigen; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(NormalSampler, sample) { const index_t dimension=2; @@ -44,7 +44,7 @@ TEST(NormalSampler, sample) EXPECT_NEAR((map_cov-MatrixXd::Identity(dimension, dimension)).norm(), 0.0, 0.1); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/ProbingSampler_unittest.cc b/tests/unit/mathematics/linalg/ProbingSampler_unittest.cc index 381e1d2fb77..f953c70f54f 100644 --- a/tests/unit/mathematics/linalg/ProbingSampler_unittest.cc +++ b/tests/unit/mathematics/linalg/ProbingSampler_unittest.cc @@ -9,8 +9,8 @@ #include -#ifdef HAVE_COLPACK -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_COLPACK +#ifdef SHOGUN_HAVE_EIGEN3 #include #include @@ -152,5 +152,5 @@ TEST(ProbingSampler, mean_variance) SG_UNREF(trace_sampler); SG_UNREF(A); } -#endif // HAVE_EIGEN3 -#endif // HAVE_COLPACK +#endif // SHOGUN_HAVE_EIGEN3 +#endif // SHOGUN_HAVE_COLPACK diff --git a/tests/unit/mathematics/linalg/RationalApproximationCGMJob_unittest.cc b/tests/unit/mathematics/linalg/RationalApproximationCGMJob_unittest.cc index 459d323a6d7..a0cf6464084 100644 --- a/tests/unit/mathematics/linalg/RationalApproximationCGMJob_unittest.cc +++ b/tests/unit/mathematics/linalg/RationalApproximationCGMJob_unittest.cc @@ -8,7 +8,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -72,4 +72,4 @@ TEST(RationalApproximationCGMJob, compute) SG_UNREF(linear_operator); SG_UNREF(linear_solver); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/RationalApproximationIndividualJob_unittest.cc b/tests/unit/mathematics/linalg/RationalApproximationIndividualJob_unittest.cc index ba435ff0aa6..9023897866a 100644 --- a/tests/unit/mathematics/linalg/RationalApproximationIndividualJob_unittest.cc +++ b/tests/unit/mathematics/linalg/RationalApproximationIndividualJob_unittest.cc @@ -8,7 +8,7 @@ */ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -124,4 +124,4 @@ TEST(RationalApproximationIndividualJob, compute_cocg) EXPECT_NEAR(result, -0.73170731707317049, 1E-15); } -#endif //HAVE_EIGEN3 +#endif //SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/RationalApproximation_unittest.cc b/tests/unit/mathematics/linalg/RationalApproximation_unittest.cc index f2893ef336d..f82a8913428 100644 --- a/tests/unit/mathematics/linalg/RationalApproximation_unittest.cc +++ b/tests/unit/mathematics/linalg/RationalApproximation_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -88,7 +88,7 @@ TEST(RationalApproximation, precompute) ref_weights[4]=complex128_t(0.03177788684575824640, -0.05246446606420653719); Map map_ref_weights(ref_weights.vector, ref_weights.vlen); -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC EXPECT_NEAR(const_multiplier, -10.02791094628079981987, 1E-19); EXPECT_NEAR(map_shifts.norm(), map_ref_shifts.norm(), 1E-14); EXPECT_NEAR(map_weights.norm(), map_ref_weights.norm(), 1E-14); @@ -190,7 +190,7 @@ TEST(RationalApproximation, trace_accuracy) float64_t trace_log_m=-11.51292546497021618279; #endif // EIGEN_VERSION_AT_LEAST(3,1,0) -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC EXPECT_NEAR(result, trace_log_m, 1E-13); #else EXPECT_NEAR(result, trace_log_m, 1E-07); @@ -372,7 +372,7 @@ TEST(RationalApproximation, trace_accuracy_cg_m) float64_t trace_log_m=-11.51292546497021618279; #endif // EIGEN_VERSION_AT_LEAST(3,1,0) -#ifdef HAVE_ARPREC +#ifdef SHOGUN_HAVE_ARPREC EXPECT_NEAR(result, trace_log_m, 1E-13); #else EXPECT_NEAR(result, trace_log_m, 1E-07); @@ -384,4 +384,4 @@ TEST(RationalApproximation, trace_accuracy_cg_m) SG_UNREF(e); SG_UNREF(op); } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/mathematics/linalg/SparseMatrixOperator_unittest.cc b/tests/unit/mathematics/linalg/SparseMatrixOperator_unittest.cc index 5aa942bdab9..2e55006283c 100644 --- a/tests/unit/mathematics/linalg/SparseMatrixOperator_unittest.cc +++ b/tests/unit/mathematics/linalg/SparseMatrixOperator_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include #include @@ -270,4 +270,4 @@ TEST(SparseMatrixOperator, get_sparsity_structure) delete sp_struct1; delete sp_struct2; } -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/metric/LMNNImpl_unittest.cc b/tests/unit/metric/LMNNImpl_unittest.cc index 9a9a279c3d7..2cff8d49b00 100644 --- a/tests/unit/metric/LMNNImpl_unittest.cc +++ b/tests/unit/metric/LMNNImpl_unittest.cc @@ -14,8 +14,8 @@ using namespace shogun; -#ifdef HAVE_EIGEN3 -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_LAPACK TEST(LMNNImpl,find_target_nn) { @@ -192,5 +192,5 @@ TEST(LMNNImpl,find_impostors_exact) SG_UNREF(labels) } -#endif /* HAVE_LAPACK */ -#endif /* HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_LAPACK */ +#endif /* SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/metric/LMNN_unittest.cc b/tests/unit/metric/LMNN_unittest.cc index d258690c03b..217bb9c80f4 100644 --- a/tests/unit/metric/LMNN_unittest.cc +++ b/tests/unit/metric/LMNN_unittest.cc @@ -14,7 +14,7 @@ using namespace shogun; -#if defined(HAVE_EIGEN3) && defined(HAVE_LAPACK) +#if defined(SHOGUN_HAVE_EIGEN3) && defined(SHOGUN_HAVE_LAPACK) TEST(LMNN,train_identity_init) { // create features, each column is a feature vector @@ -157,4 +157,4 @@ TEST(LMNN,train_diagonal) SG_UNREF(lmnn) } -#endif /* HAVE_LAPACK && HAVE_EIGEN3 */ +#endif /* SHOGUN_HAVE_LAPACK && SHOGUN_HAVE_EIGEN3 */ diff --git a/tests/unit/modelselection/GradientModelSelection_unittest.cc b/tests/unit/modelselection/GradientModelSelection_unittest.cc index c55fadfd548..4edba54eb78 100644 --- a/tests/unit/modelselection/GradientModelSelection_unittest.cc +++ b/tests/unit/modelselection/GradientModelSelection_unittest.cc @@ -9,7 +9,7 @@ #include -#if defined HAVE_EIGEN3 && defined HAVE_NLOPT +#if defined SHOGUN_HAVE_EIGEN3 && defined SHOGUN_HAVE_NLOPT #include #include @@ -176,4 +176,4 @@ TEST(GradientModelSelection,select_model_ep_inference) SG_UNREF(best_comb); } -#endif /* defined HAVE_EIGEN3 && defined HAVE_NLOPT */ +#endif /* defined SHOGUN_HAVE_EIGEN3 && defined SHOGUN_HAVE_NLOPT */ diff --git a/tests/unit/multiclass/BaggingMachine_unittest.cc b/tests/unit/multiclass/BaggingMachine_unittest.cc index df08d35c3d9..1951d072109 100644 --- a/tests/unit/multiclass/BaggingMachine_unittest.cc +++ b/tests/unit/multiclass/BaggingMachine_unittest.cc @@ -6,7 +6,7 @@ #include #include -#ifdef USE_REFERENCE_COUNTING +#ifdef SHOGUN_USE_REFERENCE_COUNTING using namespace shogun; using ::testing::Return; diff --git a/tests/unit/multiclass/MCLDA_unittest.cc b/tests/unit/multiclass/MCLDA_unittest.cc index 2cf911d68fd..06dbb47d0ce 100644 --- a/tests/unit/multiclass/MCLDA_unittest.cc +++ b/tests/unit/multiclass/MCLDA_unittest.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #define NUM 50 #define DIMS 2 @@ -11,7 +11,7 @@ using namespace shogun; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(MCLDA, train_and_apply) { SGVector< float64_t > lab(CLASSES*NUM); @@ -39,5 +39,5 @@ TEST(MCLDA, train_and_apply) SG_UNREF(output); SG_UNREF(lda); } -#endif // HAVE_LAPACK -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/multiclass/MulticlassOCAS_unittest.cc b/tests/unit/multiclass/MulticlassOCAS_unittest.cc index d0bf3bc7ad3..c58bf4d8397 100644 --- a/tests/unit/multiclass/MulticlassOCAS_unittest.cc +++ b/tests/unit/multiclass/MulticlassOCAS_unittest.cc @@ -5,7 +5,7 @@ using namespace shogun; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(MulticlassOCASTest,train) { float64_t C = 1.0; @@ -51,4 +51,4 @@ TEST(MulticlassOCASTest,train) SG_UNREF(test_feats); SG_UNREF(pred); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK diff --git a/tests/unit/multiclass/QDA_unittest.cc b/tests/unit/multiclass/QDA_unittest.cc index 0e7ef82660b..223b839f4b0 100644 --- a/tests/unit/multiclass/QDA_unittest.cc +++ b/tests/unit/multiclass/QDA_unittest.cc @@ -3,7 +3,7 @@ #include #include #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #define NUM 50 #define DIMS 2 @@ -11,7 +11,7 @@ using namespace shogun; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(QDA, train_and_apply) { SGVector< float64_t > lab(CLASSES*NUM); @@ -39,5 +39,5 @@ TEST(QDA, train_and_apply) SG_UNREF(output); SG_UNREF(qda); } -#endif // HAVE_LAPACK -#endif // HAVE_EIGEN3 +#endif // SHOGUN_HAVE_LAPACK +#endif // SHOGUN_HAVE_EIGEN3 diff --git a/tests/unit/preprocessor/KernelPCA_unittest.cc b/tests/unit/preprocessor/KernelPCA_unittest.cc index 2e34f91dadb..902fe582d48 100644 --- a/tests/unit/preprocessor/KernelPCA_unittest.cc +++ b/tests/unit/preprocessor/KernelPCA_unittest.cc @@ -15,7 +15,7 @@ using ::testing::Test; using namespace shogun; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK TEST(KernelPCA, DISABLED_apply_to_feature_matrix_input) { float64_t data[] = {1, 1, 1, @@ -48,4 +48,4 @@ TEST(KernelPCA, DISABLED_apply_to_feature_matrix_input) for (index_t i = 0; i < num_features * num_vectors; ++i) EXPECT_LE(CMath::abs(embedding.matrix[i] - s * resdata[i]), 1E-6); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK diff --git a/tests/unit/regression/GaussianProcessRegression_unittest.cc b/tests/unit/regression/GaussianProcessRegression_unittest.cc index ed8950f6595..60f90fe300f 100644 --- a/tests/unit/regression/GaussianProcessRegression_unittest.cc +++ b/tests/unit/regression/GaussianProcessRegression_unittest.cc @@ -9,7 +9,7 @@ #include -#ifdef HAVE_EIGEN3 +#ifdef SHOGUN_HAVE_EIGEN3 #include #include diff --git a/tests/unit/transfer/MALSAR_unittest.cc b/tests/unit/transfer/MALSAR_unittest.cc index aa6c887c592..a776222a109 100644 --- a/tests/unit/transfer/MALSAR_unittest.cc +++ b/tests/unit/transfer/MALSAR_unittest.cc @@ -14,7 +14,7 @@ using namespace shogun; typedef std::pair SplittedFeatures; typedef std::pair SplittedDataset; -#ifdef HAVE_LAPACK +#ifdef SHOGUN_HAVE_LAPACK SplittedDataset generate_data() { index_t num_samples = 50; @@ -97,5 +97,5 @@ TEST(MalsarTraceTest, train) SG_UNREF(data.first.first); SG_UNREF(data.first.second); } -#endif // HAVE_LAPACK +#endif // SHOGUN_HAVE_LAPACK