| 1 |
/** @file add.h |
/** @file add.h |
| 2 |
* |
* |
| 3 |
* Interface to GiNaC's sums of expressions. |
* Interface to GiNaC's sums of expressions. */ |
| 4 |
* |
|
| 5 |
|
/* |
| 6 |
* GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany |
* GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany |
| 7 |
* |
* |
| 8 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
| 23 |
#ifndef __GINAC_ADD_H__ |
#ifndef __GINAC_ADD_H__ |
| 24 |
#define __GINAC_ADD_H__ |
#define __GINAC_ADD_H__ |
| 25 |
|
|
| 26 |
|
#include <ginac/expairseq.h> |
| 27 |
|
|
| 28 |
|
namespace GiNaC { |
| 29 |
|
|
| 30 |
/** Sum of expressions. */ |
/** Sum of expressions. */ |
| 31 |
class add : public expairseq |
class add : public expairseq |
| 32 |
{ |
{ |
| 81 |
unsigned return_type_tinfo(void) const; |
unsigned return_type_tinfo(void) const; |
| 82 |
ex thisexpairseq(epvector const & v, ex const & oc) const; |
ex thisexpairseq(epvector const & v, ex const & oc) const; |
| 83 |
ex thisexpairseq(epvector * vp, ex const & oc) const; |
ex thisexpairseq(epvector * vp, ex const & oc) const; |
|
void printpair(ostream & os, expair const & p, |
|
|
unsigned upper_precedence) const; |
|
| 84 |
expair split_ex_to_pair(ex const & e) const; |
expair split_ex_to_pair(ex const & e) const; |
| 85 |
expair combine_ex_with_coeff_to_pair(ex const & e, |
expair combine_ex_with_coeff_to_pair(ex const & e, |
| 86 |
ex const & c) const; |
ex const & c) const; |
| 106 |
extern const add some_add; |
extern const add some_add; |
| 107 |
extern type_info const & typeid_add; |
extern type_info const & typeid_add; |
| 108 |
|
|
| 109 |
#define ex_to_add(X) static_cast<add const &>(*(X).bp) |
// utility functions |
| 110 |
|
inline const add &ex_to_add(const ex &e) |
| 111 |
|
{ |
| 112 |
|
return static_cast<const add &>(*e.bp); |
| 113 |
|
} |
| 114 |
|
|
| 115 |
#endif // ndef __GINAC_ADD_H__ |
} // namespace GiNaC |
| 116 |
|
|
| 117 |
|
#endif // ndef __GINAC_ADD_H__ |