43#ifndef BERTINI_FUNCTION_TREE_SPECIAL_NUMBER_HPP
44#define BERTINI_FUNCTION_TREE_SPECIAL_NUMBER_HPP
59 namespace special_number{
66 class Pi :
public virtual Number,
public virtual NamedSymbol,
public virtual EnableSharedFromThisVirtual<Pi>
69 BERTINI_DEFAULT_VISITABLE()
71 virtual ~Pi() =
default;
73 template<
typename... Ts>
75 std::shared_ptr<Pi> Make(Ts&& ...ts){
76 return std::shared_ptr<Pi>(
new Pi(ts...) );
86 dbl FreshEval_d(std::shared_ptr<Variable>
const& diff_variable)
const override;
88 void FreshEval_d(dbl& evaluation_value, std::shared_ptr<Variable>
const& diff_variable)
const override;
91 mpfr_complex FreshEval_mp(std::shared_ptr<Variable>
const& diff_variable)
const override;
93 void FreshEval_mp(mpfr_complex& evaluation_value, std::shared_ptr<Variable>
const& diff_variable)
const override;
96 friend class boost::serialization::access;
98 template <
typename Archive>
99 void serialize(Archive& ar,
const unsigned version) {
100 ar & boost::serialization::base_object<Number>(*
this);
101 ar & boost::serialization::base_object<NamedSymbol>(*
this);
112 class E :
public virtual Number,
public virtual NamedSymbol,
public virtual EnableSharedFromThisVirtual<E>
115 BERTINI_DEFAULT_VISITABLE()
119 virtual ~E() =
default;
122 template<
typename... Ts>
124 std::shared_ptr<E> Make(Ts&& ...ts){
125 return std::shared_ptr<E>(
new E(ts...) );
136 dbl FreshEval_d(std::shared_ptr<Variable>
const& diff_variable)
const override;
138 void FreshEval_d(dbl& evaluation_value, std::shared_ptr<Variable>
const& diff_variable)
const override;
141 mpfr_complex FreshEval_mp(std::shared_ptr<Variable>
const& diff_variable)
const override;
143 void FreshEval_mp(mpfr_complex& evaluation_value, std::shared_ptr<Variable>
const& diff_variable)
const override;
146 friend class boost::serialization::access;
148 template <
typename Archive>
149 void serialize(Archive& ar,
const unsigned version) {
150 ar & boost::serialization::base_object<Number>(*
this);
151 ar & boost::serialization::base_object<NamedSymbol>(*
this);
162 std::shared_ptr<Node>
Pi();
167 std::shared_ptr<Node>
E();
172 std::shared_ptr<Node>
I();
177 std::shared_ptr<Node>
Two();
182 std::shared_ptr<Node>
One();
187 std::shared_ptr<Node>
Zero();
NamedSymbol(const std::string &new_name)
Definition symbol.cpp:54
Abstract Number type from which other Numbers derive.
Definition number.hpp:63
Provides the Number Node types, including Rational, Float, and Integer.
std::shared_ptr< Node > E()
Definition special_number.cpp:37
std::shared_ptr< Node > Two()
Definition special_number.cpp:48
std::shared_ptr< Node > Pi()
Definition special_number.cpp:32
std::shared_ptr< Node > One()
Definition special_number.cpp:53
std::shared_ptr< Node > I()
Definition special_number.cpp:42
std::shared_ptr< Node > Zero()
Definition special_number.cpp:58