From 3af45ab78c7e2701a09abd17dcc2acb814691d43 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Wed, 18 Jun 2003 19:13:20 +0000 Subject: [PATCH] pole_error and do_taylor moved to public header files --- NEWS | 1 + ginac/function.pl | 7 +++++++ ginac/numeric.h | 14 ++++++++++++++ ginac/utils.h | 14 -------------- 4 files changed, 22 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index aa9c8f17..53e6947b 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ This file records noteworthy changes. sequential access this is one order faster than using op(). * Implemented relational::subs() (this was done in 1.0.9 but inadvertently omitted from the 1.1 branch). +* pole_error and do_taylor are available to library users. 1.1.0 (3 April 2003) * Removed deprecated macros is_ex_a, is_ex_exactly_a and friends for good. diff --git a/ginac/function.pl b/ginac/function.pl index 3ca1bb88..78deea4b 100755 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -223,6 +223,7 @@ typedef ex (* evalf_funcp_exvector)(const exvector &); typedef ex (* derivative_funcp_exvector)(const exvector &, unsigned); typedef ex (* series_funcp_exvector)(const exvector &, const relational &, int, unsigned); + class function_options { friend class function; @@ -288,6 +289,12 @@ protected: ex symtree; }; + +/** Exception class thrown by classes which provide their own series expansion + * to signal that ordinary Taylor expansion is safe. */ +class do_taylor {}; + + /** The class function is used to implement builtin functions like sin, cos... and user defined functions */ class function : public exprseq diff --git a/ginac/numeric.h b/ginac/numeric.h index e611484e..e699512b 100644 --- a/ginac/numeric.h +++ b/ginac/numeric.h @@ -26,6 +26,8 @@ #include "basic.h" #include "ex.h" +#include + #include // forward decln of cln::cl_N, since cln/complex_class.h is not included: namespace cln { class cl_N; } @@ -62,6 +64,17 @@ private: static bool too_late; ///< Already one object present }; + +/** Exception class thrown when a singularity is encountered. */ +class pole_error : public std::domain_error { +public: + explicit pole_error(const std::string& what_arg, int degree); + int degree() const; +private: + int deg; +}; + + /** This class is a wrapper around CLN-numbers within the GiNaC class * hierarchy. Objects of this type may directly be created by the user.*/ class numeric : public basic @@ -166,6 +179,7 @@ protected: cln::cl_number value; }; + // global constants extern const numeric I; diff --git a/ginac/utils.h b/ginac/utils.h index c81c8888..b68fff69 100644 --- a/ginac/utils.h +++ b/ginac/utils.h @@ -27,30 +27,16 @@ #include "config.h" #include -#include #include #include "assertion.h" namespace GiNaC { -/** Exception class thrown by classes which provide their own series expansion - * to signal that ordinary Taylor expansion is safe. */ -class do_taylor {}; - /** Exception class thrown by functions to signal unimplemented functionality * so the expression may just be .hold() */ class dunno {}; -/** Exception class thrown when a singularity is encountered. */ -class pole_error : public std::domain_error { -public: - explicit pole_error(const std::string& what_arg, int degree); - int degree(void) const; -private: - int deg; -}; - // some compilers (e.g. cygwin) define a macro log2, causing confusion #ifndef log2 unsigned log2(unsigned n); -- 2.49.0