+ virtual ex derivative(const symbol & s) const;
+public:
+ virtual ex series(const relational & r, int order, unsigned options = 0) const;
+
+ // rational functions
+ virtual ex normal(exmap & repl, exmap & rev_lookup, int level = 0) const;
+ virtual ex to_rational(exmap & repl) const;
+ virtual ex to_polynomial(exmap & repl) const;
+
+ // polynomial algorithms
+ virtual numeric integer_content() const;
+ virtual ex smod(const numeric &xi) const;
+ virtual numeric max_coefficient() const;
+
+ // indexed objects
+ virtual exvector get_free_indices() const;
+ virtual ex add_indexed(const ex & self, const ex & other) const;
+ virtual ex scalar_mul_indexed(const ex & self, const numeric & other) const;
+ virtual bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const;
+
+ // noncommutativity
+ virtual unsigned return_type() const;
+ virtual return_type_t return_type_tinfo() const;
+
+ // functions for complex expressions
+ virtual ex conjugate() const;
+ virtual ex real_part() const;
+ virtual ex imag_part() const;
+
+ // functions that should be called from class ex only
+protected:
+ virtual int compare_same_type(const basic & other) const;
+ virtual bool is_equal_same_type(const basic & other) const;
+
+ virtual unsigned calchash() const;
+
+ // non-virtual functions in this class
+public:
+ /** Like print(), but dispatch to the specified class. Can be used by
+ * implementations of print methods to dispatch to the method of the
+ * superclass.
+ *
+ * @see basic::print */
+ template <class T>
+ void print_dispatch(const print_context & c, unsigned level) const
+ {
+ print_dispatch(T::get_class_info_static(), c, level);
+ }
+
+ void print_dispatch(const registered_class_info & ri, const print_context & c, unsigned level) const;
+
+ /** Save (serialize) the object into archive node.
+ *
+ * Losely speaking, this method turns an expression into a byte
+ * stream (which can be saved and restored later on, or sent via
+ * network, etc.)
+ */
+ virtual void archive(archive_node& n) const;
+ /** Load (deserialize) the object from an archive node.
+ *
+ * @note This method is essentially a constructor. However,
+ * constructors can't be virtual. So, if unarchiving routines
+ * are implemented as constructors one would need to define such
+ * a constructor in every class, even if all it does is simply
+ * calling constructor of a superclass.
+ */
+ virtual void read_archive(const archive_node& n, lst& syms); // no const
+
+ ex subs_one_level(const exmap & m, unsigned options) const;
+ ex diff(const symbol & s, unsigned nth = 1) const;
+ int compare(const basic & other) const;
+ bool is_equal(const basic & other) const;
+ const basic & hold() const;
+
+ unsigned gethash() const
+ {
+#ifdef GINAC_COMPARE_STATISTICS
+ compare_statistics.total_gethash++;
+#endif
+ if (flags & status_flags::hash_calculated) {
+#ifdef GINAC_COMPARE_STATISTICS
+ compare_statistics.gethash_cached++;
+#endif
+ return hashvalue;
+ } else {
+ return calchash();
+ }
+ }
+
+ /** Set some status_flags. */
+ const basic & setflag(unsigned f) const {flags |= f; return *this;}
+
+ /** Clear some status_flags. */
+ const basic & clearflag(unsigned f) const {flags &= ~f; return *this;}