Cadabra
Computer algebra system for field theory problems
Classes | Functions
Notebooks and packages

Module Description

Functionality to store and manipulate Cadabra notebooks and use them as packages inside other notebooks or scripts.

Classes

class  cadabra::DataCell
 

Functions

std::string cadabra::cdb2python (const std::string &, bool display)
 
std::string cadabra::convert_line (const std::string &, std::string &lhs, std::string &rhs, std::string &op, std::string &indent, bool display)
 
std::string cadabra::cnb2python (const std::string &, bool display)
 
void cadabra::compile_package (const std::string &in_name, const std::string &out_name)
 

Function Documentation

◆ cdb2python()

std::string cadabra::cdb2python ( const std::string &  in_name,
bool  display 
)

Convert a block of Cadabra notation into pure Python. Mimics the functionality in the python script 'cadabra2' If display is false, this will not make ';' characters generate 'display' statements (used in the conversion of notebooks to python packages).

◆ cnb2python()

std::string cadabra::cnb2python ( const std::string &  in_name,
bool  display 
)

Convert a Cadabra notebook file to pure Python. This gets called on-the-fly when importing Cadabra notebooks written by users, and at install time for all system-supplied packages. If display is false, this will not make ';' characters generate 'display' statements (used in the conversion of notebooks to python packages).

◆ compile_package()

void cadabra::compile_package ( const std::string &  in_name,
const std::string &  out_name 
)

Convert a Cadabra notebook file to a python package which can be imported using standard 'import' notation.

◆ convert_line()

std::string cadabra::convert_line ( const std::string &  line,
std::string &  lhs,
std::string &  rhs,
std::string &  op,
std::string &  indent,
bool  display 
)

As above, but for a single line; for private use only. If display is false, this will not make ';' characters generate 'display' statements (used in the conversion of notebooks to python packages).