Mercurial > hg > kwantix
changeset 32:bb8a95bf2aa4
Rename kwantxi to kwantix
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Thu, 04 Feb 2010 17:43:21 -0600 |
parents | 9a2279c9d003 |
children | 8725d274af42 |
files | src/Makefile src/include/bvp.hpp src/include/ddm.hpp src/include/diff_op.hpp src/include/error.hpp src/include/func.hpp src/include/interp_values.hpp src/include/interpolator.hpp src/include/linalg.hpp src/include/rbf.hpp src/include/utils.hpp |
diffstat | 11 files changed, 49 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Makefile +++ b/src/Makefile @@ -16,7 +16,7 @@ .cpp.o : $(CPP) $(CFLAGS) $(OPTIONS) -c $< -rbf-ddm: $(OBJECTFILES) +kwantix: $(OBJECTFILES) $(CPP) -o rbf-ddm $(OBJECTFILES) $(LINKING) all: doc test @@ -24,8 +24,8 @@ doc: Doxyfile doxygen Doxyfile -test: rbf-ddm - rbf-ddm +test: kwantix + kwantix linalg.o: linalg.cpp include/linalg.hpp error.o: error.cpp include/error.hpp
--- a/src/include/bvp.hpp +++ b/src/include/bvp.hpp @@ -18,13 +18,13 @@ #include "func.hpp" -namespace kwantxi{ +namespace kwantix{ using std::map; using std::set; using std::string; - using kwantxi::point; - using kwantxi::vector; - using kwantxi::matrix; + using kwantix::point; + using kwantix::vector; + using kwantix::matrix; using boost::shared_ptr; /*! \brief A domain is a bunch of interior points, a bunch of boundary points,
--- a/src/include/ddm.hpp +++ b/src/include/ddm.hpp @@ -16,7 +16,7 @@ #include "diff_op.hpp" #include "func.hpp" -namespace kwantxi{ +namespace kwantix{ using std::map; using std::set; using boost::shared_ptr;
--- a/src/include/diff_op.hpp +++ b/src/include/diff_op.hpp @@ -13,7 +13,7 @@ #include "linalg.hpp" #include "func.hpp" -namespace kwantxi{ +namespace kwantix{ /* *Class graph: (other leaves may also be present) *
--- a/src/include/error.hpp +++ b/src/include/error.hpp @@ -18,7 +18,7 @@ #include <gsl/gsl_errno.h> #include <string> -namespace kwantxi{ +namespace kwantix{ //Structs to be thrown as exceptions using std::string; @@ -82,7 +82,7 @@ //A few more details about the structs we're throwing as exceptions. -namespace kwantxi{ +namespace kwantix{ using std::string; ///GSL_CONTINUE = -2, /* iteration has not converged */
--- a/src/include/func.hpp +++ b/src/include/func.hpp @@ -17,13 +17,13 @@ #include "error.hpp" #include <gsl/gsl_deriv.h> -namespace kwantxi{ +namespace kwantix{ /*! \brief A real-valued function from \f$\mathbb{R}^n\f$ to * \f$\mathbb{R}\f$ . * * That is, a realfunc is a real-valued function that takes in - * kwantxi::point and returns doubles. This class is meant to be + * kwantix::point and returns doubles. This class is meant to be * generic and any other real-valued function (e.g. a * radial_basis_function) should derive from this one. * @@ -64,10 +64,10 @@ /// Have already initialised epsilon above? static bool initialised ; private: - /// Pointer to a function that takes kwantxi::point and returns double + /// Pointer to a function that takes kwantix::point and returns double double (*myfunc)(const point &p); /// Exception builder - kwantxi::badArgument + kwantix::badArgument no_init(int line, string file) const; };
--- a/src/include/interp_values.hpp +++ b/src/include/interp_values.hpp @@ -4,7 +4,7 @@ #include "linalg.hpp" #include <map> -namespace kwantxi{ +namespace kwantix{ using std::map; class bdry_values; @@ -30,7 +30,7 @@ private: template<typename RBF> friend class interpolator; ///Only constructor available for interpolator class - normals(size_t rbfs_hash_in, const map<point, kwantxi::vector>& + normals(size_t rbfs_hash_in, const map<point, kwantix::vector>& normals_in, size_t n_in); ///Does nothing normals(){}; @@ -46,7 +46,7 @@ size_t m; ///Store normals in a matrix - kwantxi::matrix N; + kwantix::matrix N; }; @@ -87,7 +87,7 @@ protected: /// Interpolator creates interp_values with this - interp_values(const kwantxi::vector& v_in, size_t rbfs_hash_in, + interp_values(const kwantix::vector& v_in, size_t rbfs_hash_in, size_t n_in, size_t m_in) : v(v_in), rbfs_hash(rbfs_hash_in), n(n_in), m(m_in) {}; @@ -99,7 +99,7 @@ badArgument different_rbfs(int line, string file) const; ///Interpolated values go here - kwantxi::vector v; + kwantix::vector v; ///Two interp_values can be added iff these two values matches. size_t rbfs_hash; ///Number of interior points @@ -122,7 +122,7 @@ private: friend class normals; ///Same as for parent class - bdry_values(const kwantxi::vector& v_in, size_t rbfs_hash_in, + bdry_values(const kwantix::vector& v_in, size_t rbfs_hash_in, size_t n_in, size_t m_in) : interp_values(v_in, rbfs_hash_in, n_in, m_in) {}; }; @@ -136,7 +136,7 @@ intr_values(const interp_values& v_in); private: ///Same as for parent class - intr_values(const kwantxi::vector& v_in, size_t rbfs_hash_in, + intr_values(const kwantix::vector& v_in, size_t rbfs_hash_in, size_t n_in, size_t m_in) : interp_values(v_in, rbfs_hash_in, n_in, m_in) {}; };
--- a/src/include/interpolator.hpp +++ b/src/include/interpolator.hpp @@ -21,7 +21,7 @@ #include "diff_op.hpp" #include "interp_values.hpp" -namespace kwantxi{ +namespace kwantix{ using std::map; using boost::shared_ptr; @@ -38,8 +38,8 @@ * * The interpolator can be used in various ways, initialised by * either a BVP::linear_bvp2 or by interpolation data - * (i.e. std::map< kwantxi::point, double>). Once an interpolator is - * initialised, it becomes a bona fide kwantxi::realfunc, so that its + * (i.e. std::map< kwantix::point, double>). Once an interpolator is + * initialised, it becomes a bona fide kwantix::realfunc, so that its * evaluations and derivatives become available. For certain * problems, it is convenient to be able to evaluate the * interpolator or its derivatives at all points of the domain. It @@ -184,7 +184,7 @@ */ normals get_normals() const; - /** \brief This will put into an ostream a kwantxi::matrix where + /** \brief This will put into an ostream a kwantix::matrix where * the first \f$n-1\f$ columns will be all the points where the * interpolator is defined and the \f$n^{th}\f$ column is the * values that the interpolator takes on that point. @@ -219,12 +219,12 @@ /** @name Exception builders */ //@{ - kwantxi::badArgument not_initted(int line, string file) const; - kwantxi::badArgument not_precomputed(int line, string file) const; + kwantix::badArgument not_initted(int line, string file) const; + kwantix::badArgument not_precomputed(int line, string file) const; //@} ///Coefficients of the RBFs - kwantxi::vector coeffs; + kwantix::vector coeffs; ///The RBFS std::vector<RBF> rbfs; ///Their hash @@ -264,10 +264,10 @@ mutable map<std::vector<size_t>, map<point, double> > precomp_values; /// Same, but storing the vectors. - mutable map<std::vector<size_t>, kwantxi::vector > + mutable map<std::vector<size_t>, kwantix::vector > precomp_values_vec; /// Convert vector of values to a map - map<point, double> valsvec2map(const kwantxi::vector& values) const; + map<point, double> valsvec2map(const kwantix::vector& values) const; };
--- a/src/include/linalg.hpp +++ b/src/include/linalg.hpp @@ -20,7 +20,7 @@ #include <boost/operators.hpp> -namespace kwantxi{ +namespace kwantix{ class slice; class vector; @@ -394,7 +394,7 @@ typedef vector point; //Useful alias. } -namespace kwantxi{ //Non-member functions. +namespace kwantix{ //Non-member functions. /*! @name I/O */ @@ -436,7 +436,7 @@ } //Inlined functions -namespace kwantxi{ +namespace kwantix{ inline double& matrix::operator()(const size_t i, const size_t j){ try{ if(LUfactored)
--- a/src/include/rbf.hpp +++ b/src/include/rbf.hpp @@ -13,7 +13,7 @@ #include "func.hpp" -namespace kwantxi{ +namespace kwantix{ ///An exception struct for RBFs when attempting to use the wrong dimension. struct badDimension : public badArgument{ badDimension() {}; @@ -23,10 +23,10 @@ }; } -namespace kwantxi{ +namespace kwantix{ ///Base abstract class. - class radial_basis_function : public kwantxi::realfunc{ + class radial_basis_function : public kwantix::realfunc{ public: /// Default constructor, centred at zero by default. radial_basis_function(); @@ -82,7 +82,7 @@ } //Two important subclasses -namespace kwantxi{ +namespace kwantix{ /// Piecewise smooth RBFs class piecewise_smooth_rbf : public radial_basis_function{ public: @@ -108,7 +108,7 @@ //Specific rbf's follow... -namespace kwantxi{ +namespace kwantix{ /// \f$r^n\f$ with \f$n\f$ odd class piecewise_polynomial : public piecewise_smooth_rbf{ @@ -137,7 +137,7 @@ typedef piecewise_polynomial conical; } -namespace kwantxi{ +namespace kwantix{ /// \f$r^n \log(r)\f$ with \f$n\f$ even class thin_plate_spline : public piecewise_smooth_rbf{ public: @@ -161,7 +161,7 @@ } -namespace kwantxi{ +namespace kwantix{ /// \f$\sqrt{1+(\epsilon r)^2}\f$ with \f$\epsilon > 0\f$ class multiquadric : public c_infty_rbf{ public: @@ -179,7 +179,7 @@ }; } -namespace kwantxi{ +namespace kwantix{ /// \f$1/\sqrt{1 + (\epsilon r)^2}\f$ with \f$\epsilon > 0\f$ class inverse_multiquadric : public c_infty_rbf{ public: @@ -197,7 +197,7 @@ }; } -namespace kwantxi{ +namespace kwantix{ /// \f$1/(1+(\epsilon r)^2)\f$ with \f$\epsilon > 0 \f$ class inverse_quadratic : public c_infty_rbf{ public: @@ -215,7 +215,7 @@ }; } -namespace kwantxi{ +namespace kwantix{ /// \f$ e^{- (\epsilon r)^2}\f$ with \f$\epsilon > 0\f$. class gaussian : public c_infty_rbf{ public:
--- a/src/include/utils.hpp +++ b/src/include/utils.hpp @@ -14,7 +14,7 @@ #include <set> #include "linalg.hpp" -namespace kwantxi{ +namespace kwantix{ ///Clears whitespace from front and back of string s. std::string trim(const std::string& s); @@ -30,19 +30,19 @@ bool includes(const std::set<E>& s1, const std::set<E>& s2); ///Reads matrices from filenames. - kwantxi::matrix read_matrix(std::string filename); + kwantix::matrix read_matrix(std::string filename); ///Reads vectors from filenames. - kwantxi::vector read_vector(std::string filename); + kwantix::vector read_vector(std::string filename); /*! \brief Reads map<point,double> from a matrix. * *Last column is the value at each point which is represented in *turn by the rest of the row. */ - std::map<kwantxi::point, double> read_pd_map(std::string filename); + std::map<kwantix::point, double> read_pd_map(std::string filename); ///Outputs some information about generic exceptions. - void show_exception(kwantxi::error exc); + void show_exception(kwantix::error exc); }