/[GiNaC]/ginac/idx.h
ViewVC logotype

Diff of /ginac/idx.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.8 by kreckel, Tue Jan 11 19:25:05 2000 UTC revision 1.9 by cbauer, Fri Jan 21 15:20:31 2000 UTC
# Line 40  class idx : public basic Line 40  class idx : public basic
40  public:  public:
41      idx();      idx();
42      ~idx();      ~idx();
43      idx (idx const & other);      idx (const idx & other);
44      idx const & operator=(idx const & other);      const idx & operator=(const idx & other);
45  protected:  protected:
46      void copy(idx const & other);      void copy(const idx & other);
47      void destroy(bool call_parent);      void destroy(bool call_parent);
48    
49      // other constructors      // other constructors
50  public:  public:
51      explicit idx(bool cov);      explicit idx(bool cov);
52      explicit idx(string const & n, bool cov=false);      explicit idx(const string & n, bool cov=false);
53      explicit idx(char const * n, bool cov=false);      explicit idx(const char * n, bool cov=false);
54      explicit idx(unsigned const v, bool cov=false);      explicit idx(unsigned v, bool cov=false);
55    
56      // functions overriding virtual functions from bases classes      // functions overriding virtual functions from bases classes
57  public:  public:
# Line 61  public: Line 61  public:
61      void print(ostream & os, unsigned upper_precedence=0) const;      void print(ostream & os, unsigned upper_precedence=0) const;
62      bool info(unsigned inf) const;      bool info(unsigned inf) const;
63  protected:  protected:
64      int compare_same_type(basic const & other) const;      int compare_same_type(const basic & other) const;
65      bool is_equal_same_type(basic const & other) const;      bool is_equal_same_type(const basic & other) const;
66      unsigned calchash(void) const;      unsigned calchash(void) const;
67      ex subs(lst const & ls, lst const & lr) const;      ex subs(const lst & ls, const lst & lr) const;
68    
69      // new virtual functions which can be overridden by derived classes      // new virtual functions which can be overridden by derived classes
70  public:  public:
71      virtual bool is_co_contra_pair(basic const & other) const;      virtual bool is_co_contra_pair(const basic & other) const;
72      virtual ex toggle_covariant(void) const;      virtual ex toggle_covariant(void) const;
73    
74      // non-virtual functions in this class      // non-virtual functions in this class
# Line 76  public: Line 76  public:
76      bool is_symbolic(void) const;      bool is_symbolic(void) const;
77      unsigned get_value(void) const;      unsigned get_value(void) const;
78      bool is_covariant(void) const;      bool is_covariant(void) const;
79      void setname(string const & n) {name=n;}      void setname(const string & n) {name=n;}
80      string getname(void) const {return name;}      string getname(void) const {return name;}
81    
82      // member variables      // member variables
# Line 92  protected: Line 92  protected:
92  // global constants  // global constants
93    
94  extern const idx some_idx;  extern const idx some_idx;
95  extern type_info const & typeid_idx;  extern const type_info & typeid_idx;
96    
97  // utility functions  // utility functions
98  inline const idx &ex_to_idx(const ex &e)  inline const idx &ex_to_idx(const ex &e)
# Line 105  inline const idx &ex_to_idx(const ex &e) Line 105  inline const idx &ex_to_idx(const ex &e)
105  // typedef vector<ex> exvector;  // typedef vector<ex> exvector;
106    
107  int canonicalize_indices(exvector & iv, bool antisymmetric=false);  int canonicalize_indices(exvector & iv, bool antisymmetric=false);
108  exvector idx_intersect(exvector const & iv1, exvector const & iv2);  exvector idx_intersect(const exvector & iv1, const exvector & iv2);
109  ex permute_free_index_to_front(exvector const & iv3, exvector const & iv2,  ex permute_free_index_to_front(const exvector & iv3, const exvector & iv2,
110                                 bool antisymmetric, int * sig);                                 bool antisymmetric, int * sig);
111  unsigned subs_index_in_exvector(exvector & v, ex const & is, ex const & ir);  unsigned subs_index_in_exvector(exvector & v, const ex & is, const ex & ir);
112  ex subs_indices(ex const & e, exvector const & idxv_contra,  ex subs_indices(const ex & e, const exvector & idxv_contra,
113                  exvector const & idxv_co);                  const exvector & idxv_co);
114  unsigned count_index(ex const & e, ex const & i);  unsigned count_index(const ex & e, const ex & i);
115    
116  #ifndef NO_GINAC_NAMESPACE  #ifndef NO_GINAC_NAMESPACE
117  } // namespace GiNaC  } // namespace GiNaC

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Christian Bauer">Christian Bauer
ViewVC Help
Powered by ViewVC 1.1.15