Skip to content

Commit

Permalink
adaption for new SHOGUN-namespace-defines
Browse files Browse the repository at this point in the history
  • Loading branch information
Björn Esser committed Dec 8, 2013
1 parent 69afb16 commit 4b3c20f
Show file tree
Hide file tree
Showing 477 changed files with 1,834 additions and 1,842 deletions.
2 changes: 1 addition & 1 deletion 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()

Expand Down
Expand Up @@ -10,7 +10,7 @@
#include <lib/config.h>

// Eigen3 is required for working with this example
#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3

#include <base/init.h>
#include <labels/BinaryLabels.h>
Expand Down Expand Up @@ -126,4 +126,4 @@ int main(int argc, char **argv)
return 0;
}

#endif /* HAVE_EIGEN3 */
#endif /* SHOGUN_HAVE_EIGEN3 */
4 changes: 2 additions & 2 deletions examples/undocumented/libshogun/classifier_knn.cpp
Expand Up @@ -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<float64_t> lab(CLASSES*NUM);
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions examples/undocumented/libshogun/classifier_lda.cpp
Expand Up @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions examples/undocumented/libshogun/classifier_qda.cpp
Expand Up @@ -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);

Expand Down Expand Up @@ -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)
Expand Down
Expand Up @@ -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) */
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/DiffusionMaps.h>
Expand Down
Expand Up @@ -9,7 +9,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/FactorAnalysis.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/HessianLocallyLinearEmbedding.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/undocumented/libshogun/converter_isomap.cpp
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/Isomap.h>
Expand Down
8 changes: 4 additions & 4 deletions examples/undocumented/libshogun/converter_jade_bss.cpp
Expand Up @@ -16,7 +16,7 @@

using namespace shogun;

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3

#include <features/DenseFeatures.h>
#include <mathematics/Math.h>
Expand Down Expand Up @@ -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;
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/KernelLocallyLinearEmbedding.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/LaplacianEigenmaps.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/LinearLocalTangentSpaceAlignment.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/LocalityPreservingProjections.h>
Expand Down
Expand Up @@ -9,7 +9,7 @@
*/

#include <lib/config.h>
#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/LocallyLinearEmbedding.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/LocalTangentSpaceAlignment.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/MultidimensionalScaling.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/NeighborhoodPreservingEmbedding.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@

#include <lib/config.h>

#ifdef HAVE_EIGEN3
#ifdef SHOGUN_HAVE_EIGEN3
#include <base/init.h>
#include <features/DenseFeatures.h>
#include <converter/StochasticProximityEmbedding.h>
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion examples/undocumented/libshogun/library_hdf5.cpp
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions examples/undocumented/libshogun/library_mldatahdf5.cpp
Expand Up @@ -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;
Expand All @@ -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;
}
8 changes: 4 additions & 4 deletions examples/undocumented/libshogun/mathematics_lapack.cpp
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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();

Expand All @@ -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;
Expand Down
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down
Expand Up @@ -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();
Expand All @@ -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;
Expand Down
Expand Up @@ -10,7 +10,7 @@
#include <lib/config.h>

// 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 <base/init.h>
#include <labels/RegressionLabels.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@
#include <lib/config.h>

// 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 <base/init.h>
#include <labels/RegressionLabels.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@
#include <lib/config.h>

// 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 <base/init.h>
#include <labels/RegressionLabels.h>
Expand Down
Expand Up @@ -10,7 +10,7 @@
#include <lib/config.h>

// 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 <base/init.h>
#include <labels/RegressionLabels.h>
Expand Down

0 comments on commit 4b3c20f

Please sign in to comment.