00001
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef __NESTEDSUMS_HARMONIC_SUM_H__
00027
#define __NESTEDSUMS_HARMONIC_SUM_H__
00028
00029
#include "ginac/ginac.h"
00030
00031
namespace nestedsums {
00032
00034
00048 class harmonic_sum :
public virtual Ssum
00049 {
00050 GINAC_DECLARE_REGISTERED_CLASS(
harmonic_sum,
Ssum)
00051
00052
00053
public:
00054
explicit harmonic_sum(
const GiNaC::ex & nc);
00055
harmonic_sum(
const GiNaC::ex & nc,
const GiNaC::ex & llc);
00056
00057
00058
public:
00059
void archive(GiNaC::archive_node &node)
const;
00060
void read_archive(
const GiNaC::archive_node &node, GiNaC::lst &sym_lst);
00061
00062 GiNaC::return_type_t return_type_tinfo()
const;
00063
00064
void print(
const GiNaC::print_context & c,
unsigned level = 0)
const;
00065 GiNaC::ex
eval(
int level = 0)
const;
00066
00067 GiNaC::ex
convert_to_Zsum_exvector(
const GiNaC::exvector & Z0,
const GiNaC::exvector & Z1)
const;
00068 GiNaC::ex
shuffle_exvector(
const GiNaC::exvector & Z0,
const GiNaC::exvector & Z1,
const GiNaC::exvector & Z2)
const;
00069
00070 GiNaC::ex
set_index(
const GiNaC::ex & i)
const;
00071 GiNaC::ex
shift_plus_one(
void)
const;
00072 GiNaC::ex
shift_minus_one(
void)
const;
00073 GiNaC::ex
adjust_upper_limit_downwards(
const GiNaC::ex & i)
const;
00074 GiNaC::ex
adjust_upper_limit_upwards(
const GiNaC::ex & i)
const;
00075 GiNaC::ex
adjust_upper_limit_plus_one(
void)
const;
00076 GiNaC::ex
remove_first_letter(
void)
const;
00077 GiNaC::ex
remove_first_letter(
const GiNaC::ex & nc)
const;
00078 };
00079
00080 GINAC_DECLARE_UNARCHIVER(
harmonic_sum);
00081
00087 inline GiNaC::ex
create_harmonic_sum(
const GiNaC::ex & nc,
const GiNaC::ex & llc)
00088 {
00089
return (
new harmonic_sum(nc,llc))->setflag(GiNaC::status_flags::dynallocated);
00090 }
00091
00092 GiNaC::ex
create_harmonic_sum_with_ones(
const GiNaC::ex &n,
const int &k);
00093
00094 GiNaC::ex
create_harmonic_sum_from_exvector(
const GiNaC::ex & nc,
const GiNaC::exvector & v);
00095
00096 }
00097
00098
namespace GiNaC {
00099
00100
00101
template<>
inline const nestedsums::harmonic_sum &ex_to<nestedsums::harmonic_sum>(
const ex &e)
00102 {
00103
return dynamic_cast<const nestedsums::harmonic_sum &>(*e.bp);
00104 }
00105
00106 }
00107
00108
#endif // ndef __NESTEDSUMS_HARMONIC_SUM_H__