3 * Interface to GiNaC's isospin objects. */
14 /** Base class for isospin object */
15 class isospin : public indexed
19 // default constructor, destructor, copy constructor assignment operator and helpers
23 isospin(isospin const & other);
24 isospin const & operator=(isospin const & other);
26 void copy(isospin const & other);
27 void destroy(bool call_parent);
31 explicit isospin(string const & initname);
33 // functions overriding virtual functions from base classes
35 basic * duplicate() const;
36 void printraw(ostream & os) const;
37 void printtree(ostream & os, unsigned indent) const;
38 void print(ostream & os, unsigned upper_precedence=0) const;
39 void printcsrc(ostream & os, unsigned type, unsigned upper_precedence=0) const;
40 bool info(unsigned inf) const;
42 int compare_same_type(basic const & other) const;
43 ex simplify_ncmul(exvector const & v) const;
44 unsigned calchash(void) const;
46 // new virtual functions which can be overridden by derived classes
49 // non-virtual functions in this class
51 void setname(string const & n);
53 string & autoname_prefix(void);
59 unsigned serial; // unique serial number for comparision
61 static unsigned next_serial;
66 extern const isospin some_isospin;
67 extern type_info const & typeid_isospin;
71 #define ex_to_isospin(X) static_cast<isospin const &>(*(X).bp)
73 #endif // ndef _ISOSPIN_H_