X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fsimp_lor.h;h=643a6d91f5d49ce51fb70fc7c87d77823ebd34c8;hp=a3971bf411ee8728a60b0c459ee24b894e67341a;hb=9eab44408b9213d8909b7a9e525f404ad06064dd;hpb=487e5659efe401683eee0381b0d23f967ffffc3c;ds=sidebyside diff --git a/ginac/simp_lor.h b/ginac/simp_lor.h index a3971bf4..643a6d91 100644 --- a/ginac/simp_lor.h +++ b/ginac/simp_lor.h @@ -31,6 +31,8 @@ #include #include +namespace GiNaC { + typedef pair strstrpair; typedef pair spmapkey; @@ -151,10 +153,16 @@ protected: extern const simp_lor some_simp_lor; extern type_info const & typeid_simp_lor; -// macros +// utility functions +inline const simp_lor &ex_to_simp_lor(const ex &e) +{ + return static_cast(*e.bp); +} -#define ex_to_simp_lor(X) static_cast(*(X).bp) -#define ex_to_nonconst_simp_lor(X) static_cast(*(X).bp) +inline simp_lor &ex_to_nonconst_simp_lor(const ex &e) +{ + return static_cast(*e.bp); +} simp_lor lor_g(ex const & mu, ex const & nu); simp_lor lor_vec(string const & n, ex const & mu); @@ -162,6 +170,6 @@ ex simplify_simp_lor_mul(ex const & m, scalar_products const & sp); ex simplify_simp_lor(ex const & e, scalar_products const & sp); ex Dim(void); -#endif // ndef _SIMP__GINAC_LOR_H__ - +} // namespace GiNaC +#endif // ndef _SIMP__GINAC_LOR_H__