00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 2011 Sergey Lisitsyn 00008 * Copyright (C) 2011 Berlin Institute of Technology and Max-Planck-Society 00009 */ 00010 00011 #ifndef ISOMAP_H_ 00012 #define ISOMAP_H_ 00013 #include <shogun/lib/config.h> 00014 #ifdef HAVE_LAPACK 00015 #include <shogun/converter/MultidimensionalScaling.h> 00016 #include <shogun/lib/common.h> 00017 #include <shogun/mathematics/Math.h> 00018 #include <shogun/io/SGIO.h> 00019 #include <shogun/features/SimpleFeatures.h> 00020 #include <shogun/features/Features.h> 00021 #include <shogun/distance/Distance.h> 00022 00023 namespace shogun 00024 { 00025 00026 class CFeatures; 00027 class CDistance; 00028 00045 class CIsomap: public CMultidimensionalScaling 00046 { 00047 public: 00048 00049 /* constructor */ 00050 CIsomap(); 00051 00052 /* destructor */ 00053 virtual ~CIsomap(); 00054 00056 const char* get_name() const; 00057 00061 void set_k(int32_t k); 00062 00066 int32_t get_k() const; 00067 00069 protected: 00070 00072 virtual void init(); 00073 00078 virtual SGMatrix<float64_t> process_distance_matrix(SGMatrix<float64_t> distance_matrix); 00079 00080 00082 protected: 00083 00085 int32_t m_k; 00086 00088 protected: 00089 00093 static void* run_dijkstra_thread(void* p); 00094 00099 SGMatrix<float64_t> isomap_distance(SGMatrix<float64_t> D_matrix); 00100 00101 }; 00102 } 00103 #endif /* HAVE_LAPACK */ 00104 #endif /* ISOMAP_H_ */