Cadabra
Computer algebra system for field theory problems
Loading...
Searching...
No Matches
Kernel.hh
Go to the documentation of this file.
1
2#pragma once
3
4#include <functional>
5#include "Props.hh"
6
12
13namespace cadabra {
14
15 class Kernel {
16 public:
17 Kernel(bool inject_defaults=true);
18 Kernel(const Kernel& other) = delete;
19 ~Kernel();
20
23 void inject_property(property *prop, std::shared_ptr<Ex> pattern, std::shared_ptr<Ex> property_arguments);
24
26 std::shared_ptr<Ex> ex_from_string(const std::string&);
27
28
30
35
36
37 const static std::string version;
38 const static std::string build ;
39
40 // Warnings
41 enum class warn_t {
42 notset = 0,
43 debug = 10,
44 info = 20,
45 warning = 30,
46 error = 40,
47 critical = 50
48 };
50 std::function<void(const std::string&)> warning_callback;
51 void warn(const std::string& msg, warn_t level = warn_t::warning) const;
52 };
53
54 }
Definition Kernel.hh:15
bool call_embedded_python_functions
Definition Kernel.hh:33
scalar_backend_t
Settings.
Definition Kernel.hh:32
Properties properties
Definition Kernel.hh:29
static const std::string version
Definition Kernel.hh:37
void inject_property(property *prop, std::shared_ptr< Ex > pattern, std::shared_ptr< Ex > property_arguments)
Inject a property into the system and attach it to the given pattern.
Definition Kernel.cc:107
static const std::string build
Definition Kernel.hh:38
std::function< void(const std::string &)> warning_callback
Definition Kernel.hh:50
std::shared_ptr< Ex > ex_from_string(const std::string &)
Create an Ex expression object from a string, which will be parsed.
Definition Kernel.cc:122
~Kernel()
Definition Kernel.cc:102
void warn(const std::string &msg, warn_t level=warn_t::warning) const
Definition Kernel.cc:134
bool display_fractions
Definition Kernel.hh:34
Kernel(const Kernel &other)=delete
warn_t warning_level
Definition Kernel.hh:49
enum cadabra::Kernel::scalar_backend_t scalar_backend
warn_t
Definition Kernel.hh:41
Class holding a collection of properties attached to expressions.
Definition Props.hh:237
Definition Props.hh:39
Base class for all properties, handling argument parsing and defining the interface.
Definition Props.hh:127
Functions to handle the exchange properties of two or more symbols in a product.
Definition Adjform.cc:83
void set(rset_t::iterator &num, multiplier_t fac)
Definition Storage.cc:1063