00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef __NESTEDSUMS_hash_entry_H__
00027
#define __NESTEDSUMS_hash_entry_H__
00028
00029
#include "ginac/ginac.h"
00030
00031
namespace nestedsums {
00032
00034
00070 class hash_entry :
public GiNaC::basic
00071 {
00072 GINAC_DECLARE_REGISTERED_CLASS(
hash_entry, GiNaC::basic)
00073
00074
00075
public:
00076
hash_entry(
const GiNaC::ex & cd,
const GiNaC::ex & sd,
const GiNaC::ex & rd,
unsigned rkey);
00077
00078
00079
public:
00080
void archive(GiNaC::archive_node &node)
const;
00081
void read_archive(
const GiNaC::archive_node &node, GiNaC::lst &sym_lst);
00082
00083
unsigned return_type(
void)
const {
return GiNaC::return_types::noncommutative; }
00084
00085
void print(
const GiNaC::print_context & c,
unsigned level = 0)
const;
00086
unsigned precedence(
void)
const {
return 60;}
00087 GiNaC::ex
eval(
int level = 0)
const;
00088 GiNaC::ex subs(
const GiNaC::exmap & m,
unsigned options = 0)
const;
00089
00090
protected:
00091 GiNaC::ex
eval_ncmul(
const GiNaC::exvector & v)
const;
00092 GiNaC::ex derivative(
const GiNaC::symbol & s)
const;
00093
unsigned calchash(
void)
const;
00094
00095
00096
00097
00098
public :
00099 GiNaC::ex
return_value(
const GiNaC::ex & obj_data)
const;
00100 GiNaC::ex
hash_data(
void)
const;
00101 GiNaC::ex
subst_data(
void)
const;
00102
00103
protected:
00104
00105
00106
00107
protected:
00108
00109 GiNaC::ex compare_data;
00110 GiNaC::ex replace_data;
00111 GiNaC::ex return_data;
00112
unsigned rtti_key;
00113 };
00114
00115 GINAC_DECLARE_UNARCHIVER(
hash_entry);
00116
00122 inline GiNaC::ex
create_hash_entry(
const GiNaC::ex & cd,
const GiNaC::ex & sd,
const GiNaC::ex & rd,
unsigned rkey)
00123 {
00124
return (
new hash_entry(cd,sd,rd,rkey))->setflag(GiNaC::status_flags::dynallocated);
00125 }
00126
00127 }
00128
00129
#endif // ndef __NESTEDSUMS_hash_entry_H__