Full Code of kpeeters/cadabra2 for AI

master 0afcc652660a cached
1369 files
21.6 MB
5.7M tokens
7407 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (22,830K chars total). Download the full file to get everything.
Repository: kpeeters/cadabra2
Branch: master
Commit: 0afcc652660a
Files: 1369
Total size: 21.6 MB

Directory structure:
gitextract_noaq8p8m/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       ├── appimage-modern.yml
│       ├── c++lib.yml
│       ├── docker.yml
│       ├── fedora-40-package.yml
│       ├── fedora-41-package.yml
│       ├── fedora-42-package.yml
│       ├── freebsd.yml
│       ├── homebrew-devel.yml
│       ├── homebrew.yml
│       ├── linux.yml
│       ├── macos.yml
│       ├── opensuse-tumbleweed-package.yml
│       ├── tarball.yml
│       ├── ubuntu-22.04-package.yml
│       ├── ubuntu-24.04-package.yml
│       ├── windows-installer.yml
│       └── windows.yml
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CITATION.cff
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── JUPYTER.rst
├── LICENSE
├── Makefile
├── README.rst
├── c++lib/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── README.txt
│   ├── SympyDummy.cc
│   ├── adjform.cc
│   ├── cpplib.hh.in
│   ├── nevaluate.cc
│   ├── nevaluate.py
│   ├── simple.cc
│   └── trivial.cc
├── client_server/
│   ├── Actions.cc
│   ├── Actions.hh
│   ├── CMakeLists.txt
│   ├── ComputeThread.cc
│   ├── ComputeThread.hh
│   ├── DocumentThread.cc
│   ├── DocumentThread.hh
│   ├── GUIBase.hh
│   ├── ScriptThread.cc
│   ├── ScriptThread.hh
│   ├── Server.cc
│   ├── Server.hh
│   ├── Snoop.cc
│   ├── Snoop.hh
│   ├── TODO
│   ├── cadabra-jupyter-kernel.cc
│   ├── cadabra-jupyter-kernel.hh
│   ├── cadabra-jupyter-main.cc
│   ├── cadabra-server.cc
│   ├── cadabra2html.cc
│   ├── cadabra2latex.cc
│   ├── connection.json
│   ├── kernel.json
│   ├── notebook.html
│   ├── notebook.tex
│   ├── popen2.cc
│   ├── popen2.hh
│   ├── regexp_tester.cc
│   ├── test_client.cc
│   ├── test_talk_to_server.cc
│   ├── tree.hh
│   ├── websocket_client.cc
│   ├── websocket_client.hh
│   ├── websocket_server.cc
│   └── websocket_server.hh
├── cmake/
│   ├── cmake_uninstall.cmake.in
│   ├── functions.cmake
│   ├── modules/
│   │   ├── FindGLIBMM3.cmake
│   │   ├── FindGLIBMM4.cmake
│   │   ├── FindGMPXX.cmake
│   │   ├── FindGTKMM3.cmake
│   │   ├── FindGTKMM4.cmake
│   │   ├── FindJSONCPP.cmake
│   │   ├── FindLibPythonOSX.py
│   │   ├── FindMathematica.cmake
│   │   ├── FindMathematicaDocumentationBuild.cmake.in
│   │   ├── FindMathematicaTestDriver.cmd
│   │   ├── FindMathematicaTestDriver.sh
│   │   ├── FindPythonLibsOSX.cmake
│   │   ├── FindSQLITE3.cmake
│   │   ├── FindZeroMQ.cmake
│   │   └── cotire.cmake
│   ├── packaging.cmake
│   ├── policies.cmake
│   ├── version.cmake
│   └── windows.cmake
├── codemeta.json
├── conda/
│   ├── build.sh
│   └── meta.yaml
├── config/
│   ├── AppRun
│   ├── Doxyfile
│   ├── DoxygenLayout.xml
│   ├── DoxygenStyle.css
│   ├── README.txt
│   ├── buildbot.sh
│   ├── buildpkg.sh
│   ├── doxyrest-config.lua
│   ├── generate_keywords.py
│   ├── init-cadabra2.scm
│   ├── install_python_windows.cmake.in
│   ├── install_script.iss.in
│   ├── make.bat
│   ├── post_install.rtf
│   ├── postinst.in
│   ├── pre_install.rtf.in
│   ├── publish-doxygen
│   ├── science.cadabra.cadabra2-gtk.desktop.in
│   ├── shortcuts.wxs
│   ├── travisci_rsa.enc
│   └── travisci_rsa.pub
├── contrib/
│   ├── einstein_equations.cnb
│   └── structure_equations_and_bianchi.cnb
├── core/
│   ├── .gitignore
│   ├── Adjform.cc
│   ├── Adjform.hh
│   ├── Algorithm.cc
│   ├── Algorithm.hh
│   ├── Bridge.cc
│   ├── Bridge.hh
│   ├── CMakeLists.txt
│   ├── CdbPython.cc
│   ├── CdbPython.hh
│   ├── Cleanup.cc
│   ├── Cleanup.hh
│   ├── Combinatorics.cc
│   ├── Combinatorics.hh
│   ├── Compare.cc
│   ├── Compare.hh
│   ├── Config.hh.in
│   ├── DataCell.cc
│   ├── DataCell.hh
│   ├── Debug.hh
│   ├── DisplayBase.cc
│   ├── DisplayBase.hh
│   ├── DisplayMMA.cc
│   ├── DisplayMMA.hh
│   ├── DisplaySympy.cc
│   ├── DisplaySympy.hh
│   ├── DisplayTeX.cc
│   ├── DisplayTeX.hh
│   ├── DisplayTerminal.cc
│   ├── DisplayTerminal.hh
│   ├── Dummies.hh
│   ├── Equals.cc
│   ├── Equals.hh
│   ├── ExManip.cc
│   ├── ExManip.hh
│   ├── ExNode.cc
│   ├── ExNode.hh
│   ├── Exceptions.cc
│   ├── Exceptions.hh
│   ├── Exchange.cc
│   ├── Exchange.hh
│   ├── Functional.cc
│   ├── Functional.hh
│   ├── Grouping.cc
│   ├── Grouping.hh
│   ├── Hash.cc
│   ├── Hash.hh
│   ├── IndexClassifier.cc
│   ├── IndexClassifier.hh
│   ├── IndexIterator.cc
│   ├── IndexIterator.hh
│   ├── InstallPrefix.cc
│   ├── InstallPrefix.hh
│   ├── Kernel.cc
│   ├── Kernel.hh
│   ├── Linear.cc
│   ├── Linear.hh
│   ├── MMACdb.cc
│   ├── MMACdb.hh
│   ├── Media.cc
│   ├── Media.hh
│   ├── MultiIndex.hh
│   ├── Multiplier.cc
│   ├── Multiplier.hh
│   ├── NDSolver.cc
│   ├── NDSolver.hh
│   ├── NEvaluator.cc
│   ├── NEvaluator.hh
│   ├── NIntegrator.cc
│   ├── NIntegrator.hh
│   ├── NInterpolatingFunction.cc
│   ├── NInterpolatingFunction.hh
│   ├── NTensor.cc
│   ├── NTensor.hh
│   ├── Parser.cc
│   ├── Parser.hh
│   ├── Permutations.hh
│   ├── PreClean.cc
│   ├── PreClean.hh
│   ├── PreProcessor.cc
│   ├── PreProcessor.hh
│   ├── ProgressMonitor.cc
│   ├── ProgressMonitor.hh
│   ├── Props.cc
│   ├── Props.hh
│   ├── PythonException.cc
│   ├── PythonException.hh
│   ├── ReservedNode.cc
│   ├── ReservedNode.hh
│   ├── Stopwatch.cc
│   ├── Stopwatch.hh
│   ├── Storage.cc
│   ├── Storage.hh
│   ├── Sum.cc
│   ├── Sum.hh
│   ├── Symbols.cc
│   ├── Symbols.hh
│   ├── SympyCdb.cc
│   ├── SympyCdb.hh
│   ├── TerminalStream.cc
│   ├── TerminalStream.hh
│   ├── YoungTab.cc
│   ├── YoungTab.hh
│   ├── algorithms/
│   │   ├── all_contractions.tex
│   │   ├── asym.cnb
│   │   ├── canonicalise.cc
│   │   ├── canonicalise.cnb
│   │   ├── canonicalise.hh
│   │   ├── canonicalorder.tex
│   │   ├── coefficients.tex
│   │   ├── collect_components.cc
│   │   ├── collect_components.hh
│   │   ├── collect_factors.cc
│   │   ├── collect_factors.cnb
│   │   ├── collect_factors.hh
│   │   ├── collect_terms.cc
│   │   ├── collect_terms.cnb
│   │   ├── collect_terms.hh
│   │   ├── combine.cc
│   │   ├── combine.cnb
│   │   ├── combine.hh
│   │   ├── complete.cc
│   │   ├── complete.cnb
│   │   ├── complete.hh
│   │   ├── component.hh
│   │   ├── decompose.cc
│   │   ├── decompose.cnb
│   │   ├── decompose.hh
│   │   ├── decompose_product.cc
│   │   ├── decompose_product.cnb
│   │   ├── decompose_product.hh
│   │   ├── depprint.tex
│   │   ├── distribute.cc
│   │   ├── distribute.cnb
│   │   ├── distribute.hh
│   │   ├── drop_weight.cc
│   │   ├── drop_weight.cnb
│   │   ├── drop_weight.hh
│   │   ├── dualise_tensor.tex
│   │   ├── einsteinify.cc
│   │   ├── einsteinify.cnb
│   │   ├── einsteinify.hh
│   │   ├── eliminate_kronecker.cc
│   │   ├── eliminate_kronecker.cnb
│   │   ├── eliminate_kronecker.hh
│   │   ├── eliminate_metric.cc
│   │   ├── eliminate_metric.cnb
│   │   ├── eliminate_metric.hh
│   │   ├── eliminate_vielbein.cc
│   │   ├── eliminate_vielbein.cnb
│   │   ├── eliminate_vielbein.hh
│   │   ├── eliminate_vielbein.tex
│   │   ├── eliminateeps.tex
│   │   ├── epsilon_to_delta.cc
│   │   ├── epsilon_to_delta.cnb
│   │   ├── epsilon_to_delta.hh
│   │   ├── evaluate.cc
│   │   ├── evaluate.cnb
│   │   ├── evaluate.hh
│   │   ├── expand.cc
│   │   ├── expand.cnb
│   │   ├── expand.hh
│   │   ├── expand_delta.cc
│   │   ├── expand_delta.cnb
│   │   ├── expand_delta.hh
│   │   ├── expand_diracbar.cc
│   │   ├── expand_diracbar.cnb
│   │   ├── expand_diracbar.hh
│   │   ├── expand_dummies.cc
│   │   ├── expand_dummies.cnb
│   │   ├── expand_dummies.hh
│   │   ├── expand_power.cc
│   │   ├── expand_power.cnb
│   │   ├── expand_power.hh
│   │   ├── expand_product_shorthand.tex
│   │   ├── explicit_indices.cc
│   │   ├── explicit_indices.cnb
│   │   ├── explicit_indices.hh
│   │   ├── factor_in.cc
│   │   ├── factor_in.cnb
│   │   ├── factor_in.hh
│   │   ├── factor_out.cc
│   │   ├── factor_out.cnb
│   │   ├── factor_out.hh
│   │   ├── fierz.cc
│   │   ├── fierz.cnb
│   │   ├── fierz.hh
│   │   ├── first_order_form.cc
│   │   ├── first_order_form.hh
│   │   ├── flatten_product.cc
│   │   ├── flatten_product.hh
│   │   ├── flatten_sum.cc
│   │   ├── flatten_sum.hh
│   │   ├── impose_asym.tex
│   │   ├── impose_bianchi.tex
│   │   ├── index_rename.tex
│   │   ├── indexlist.tex
│   │   ├── indexsort.cc
│   │   ├── indexsort.hh
│   │   ├── indexsort.tex
│   │   ├── inner.tex
│   │   ├── integrate_by_parts.cc
│   │   ├── integrate_by_parts.cnb
│   │   ├── integrate_by_parts.hh
│   │   ├── join_gamma.cc
│   │   ├── join_gamma.cnb
│   │   ├── join_gamma.hh
│   │   ├── keep_terms.cc
│   │   ├── keep_terms.hh
│   │   ├── keep_terms.tex
│   │   ├── keep_weight.cnb
│   │   ├── list_sum.tex
│   │   ├── listflatten.tex
│   │   ├── lower_free_indices.cc
│   │   ├── lower_free_indices.cnb
│   │   ├── lower_free_indices.hh
│   │   ├── lr_tensor.cc
│   │   ├── lr_tensor.cnb
│   │   ├── lr_tensor.hh
│   │   ├── lsolve.tex
│   │   ├── map_mma.cc
│   │   ├── map_mma.hh
│   │   ├── map_sympy.cc
│   │   ├── map_sympy.cnb
│   │   ├── map_sympy.hh
│   │   ├── meld.cc
│   │   ├── meld.cnb
│   │   ├── meld.hh
│   │   ├── ndsolve.cnb
│   │   ├── nevaluate.cc
│   │   ├── nevaluate.cnb
│   │   ├── nevaluate.hh
│   │   ├── nval.cc
│   │   ├── nval.cnb
│   │   ├── nval.hh
│   │   ├── order.cc
│   │   ├── order.hh
│   │   ├── order.tex
│   │   ├── permute.tex
│   │   ├── product_rule.cc
│   │   ├── product_rule.cnb
│   │   ├── product_rule.hh
│   │   ├── product_shorthand.tex
│   │   ├── projweyl.tex
│   │   ├── properties.tex
│   │   ├── proplist.tex
│   │   ├── raise_free_indices.cnb
│   │   ├── range.tex
│   │   ├── reduce.tex
│   │   ├── reduce_delta.cc
│   │   ├── reduce_delta.cnb
│   │   ├── reduce_delta.hh
│   │   ├── remove_indexbracket.tex
│   │   ├── remove_weyl_traces.tex
│   │   ├── rename_dummies.cc
│   │   ├── rename_dummies.cnb
│   │   ├── rename_dummies.hh
│   │   ├── replace_match.cc
│   │   ├── replace_match.cnb
│   │   ├── replace_match.hh
│   │   ├── rewrite_indices.cc
│   │   ├── rewrite_indices.cnb
│   │   ├── rewrite_indices.hh
│   │   ├── simplify.cc
│   │   ├── simplify.cnb
│   │   ├── simplify.hh
│   │   ├── slot_asym.cnb
│   │   ├── sort_product.cc
│   │   ├── sort_product.cnb
│   │   ├── sort_product.hh
│   │   ├── sort_spinors.cc
│   │   ├── sort_spinors.cnb
│   │   ├── sort_spinors.hh
│   │   ├── sort_sum.cc
│   │   ├── sort_sum.cnb
│   │   ├── sort_sum.hh
│   │   ├── split.cc
│   │   ├── split.hh
│   │   ├── split_gamma.cc
│   │   ├── split_gamma.cnb
│   │   ├── split_gamma.hh
│   │   ├── split_index.cc
│   │   ├── split_index.cnb
│   │   ├── split_index.hh
│   │   ├── substitute.cc
│   │   ├── substitute.cnb
│   │   ├── substitute.hh
│   │   ├── sumflatten.tex
│   │   ├── sym.cc
│   │   ├── sym.hh
│   │   ├── sym.tex
│   │   ├── tab_basics.cc
│   │   ├── tab_basics.hh
│   │   ├── tab_dimension.cc
│   │   ├── tab_dimension.hh
│   │   ├── tabcanonicalise.tex
│   │   ├── tabdimension.tex
│   │   ├── tabstandardform.tex
│   │   ├── take_match.cc
│   │   ├── take_match.cnb
│   │   ├── take_match.hh
│   │   ├── tree.tex
│   │   ├── unique_indices.tex
│   │   ├── untrace.cc
│   │   ├── untrace.cnb
│   │   ├── untrace.hh
│   │   ├── unwrap.cc
│   │   ├── unwrap.cnb
│   │   ├── unwrap.hh
│   │   ├── unzoom.cc
│   │   ├── unzoom.hh
│   │   ├── vary.cc
│   │   ├── vary.cnb
│   │   ├── vary.hh
│   │   ├── weyl_index_order.tex
│   │   ├── young_project.cc
│   │   ├── young_project.hh
│   │   ├── young_project.tex
│   │   ├── young_project_product.cc
│   │   ├── young_project_product.cnb
│   │   ├── young_project_product.hh
│   │   ├── young_project_tensor.cc
│   │   ├── young_project_tensor.cnb
│   │   ├── young_project_tensor.hh
│   │   ├── zoom.cc
│   │   ├── zoom.cnb
│   │   └── zoom.hh
│   ├── cadabra2-cli.cc
│   ├── cadabra2-cli.hh
│   ├── cadabra2.in
│   ├── cadabra2_defaults.py.in
│   ├── cadabra2cadabra.cc
│   ├── cadabra2ipynb.cc
│   ├── cadabra2python.cc
│   ├── cdb-nbtool.cc
│   ├── echokernel.py
│   ├── lru_cache.hh
│   ├── modules/
│   │   ├── Lie.cc
│   │   ├── xperm_new.cc
│   │   └── xperm_new.h
│   ├── packages/
│   │   ├── CMakeLists.txt
│   │   └── cdb/
│   │       ├── core/
│   │       │   ├── _component.cc
│   │       │   ├── component.cnb
│   │       │   ├── manip.cnb
│   │       │   ├── solve.cnb
│   │       │   └── trace.cnb
│   │       ├── gauge_theory/
│   │       │   └── instantons.cnb
│   │       ├── graphics/
│   │       │   └── plot.cnb
│   │       ├── interact/
│   │       │   └── slider.cnb
│   │       ├── main.py
│   │       ├── numeric/
│   │       │   ├── evaluate.cnb
│   │       │   └── integrate.cnb
│   │       ├── relativity/
│   │       │   ├── __init__.cdb
│   │       │   ├── abstract.cnb
│   │       │   └── schwarzschild.cnb
│   │       ├── remote/
│   │       │   ├── __init__.py
│   │       │   ├── highlight.py
│   │       │   ├── record.py
│   │       │   └── speech.py
│   │       ├── sympy/
│   │       │   ├── calculus.cnb
│   │       │   └── solvers.cnb
│   │       └── utils/
│   │           ├── _algorithm.cc
│   │           ├── develop.cnb
│   │           ├── indices.cnb
│   │           ├── node.cnb
│   │           ├── tableau.cnb
│   │           └── types.cnb
│   ├── passing.cc
│   ├── properties/
│   │   ├── Accent.cc
│   │   ├── Accent.cnb
│   │   ├── Accent.hh
│   │   ├── Accent.tex
│   │   ├── AntiCommuting.cc
│   │   ├── AntiCommuting.cnb
│   │   ├── AntiCommuting.hh
│   │   ├── AntiCommuting.tex
│   │   ├── AntiSelfDual.tex
│   │   ├── AntiSymmetric.cc
│   │   ├── AntiSymmetric.cnb
│   │   ├── AntiSymmetric.hh
│   │   ├── AntiSymmetric.tex
│   │   ├── Commuting.cc
│   │   ├── Commuting.cnb
│   │   ├── Commuting.hh
│   │   ├── Commuting.tex
│   │   ├── CommutingAsProduct.cc
│   │   ├── CommutingAsProduct.cnb
│   │   ├── CommutingAsProduct.hh
│   │   ├── CommutingAsProduct.tex
│   │   ├── CommutingAsSum.cc
│   │   ├── CommutingAsSum.cnb
│   │   ├── CommutingAsSum.hh
│   │   ├── CommutingAsSum.tex
│   │   ├── CommutingBehaviour.cc
│   │   ├── CommutingBehaviour.hh
│   │   ├── Coordinate.cc
│   │   ├── Coordinate.cnb
│   │   ├── Coordinate.hh
│   │   ├── Coordinate.tex
│   │   ├── DAntiSymmetric.cc
│   │   ├── DAntiSymmetric.cnb
│   │   ├── DAntiSymmetric.hh
│   │   ├── DAntiSymmetric.tex
│   │   ├── Depends.cc
│   │   ├── Depends.cnb
│   │   ├── Depends.hh
│   │   ├── Depends.tex
│   │   ├── DependsBase.hh
│   │   ├── DependsInherit.cc
│   │   ├── DependsInherit.hh
│   │   ├── DependsInherit.tex
│   │   ├── Derivative.cc
│   │   ├── Derivative.cnb
│   │   ├── Derivative.hh
│   │   ├── Derivative.tex
│   │   ├── DerivativeOp.cc
│   │   ├── DerivativeOp.hh
│   │   ├── Determinant.cc
│   │   ├── Determinant.cnb
│   │   ├── Determinant.hh
│   │   ├── Diagonal.cc
│   │   ├── Diagonal.cnb
│   │   ├── Diagonal.hh
│   │   ├── Diagonal.tex
│   │   ├── DifferentialForm.cc
│   │   ├── DifferentialForm.hh
│   │   ├── DifferentialFormBase.hh
│   │   ├── DiracBar.cc
│   │   ├── DiracBar.cnb
│   │   ├── DiracBar.hh
│   │   ├── DiracBar.tex
│   │   ├── Distributable.cc
│   │   ├── Distributable.cnb
│   │   ├── Distributable.hh
│   │   ├── Distributable.tex
│   │   ├── EpsilonTensor.cc
│   │   ├── EpsilonTensor.cnb
│   │   ├── EpsilonTensor.hh
│   │   ├── EpsilonTensor.tex
│   │   ├── ExteriorDerivative.cc
│   │   ├── ExteriorDerivative.hh
│   │   ├── FilledTableau.cc
│   │   ├── FilledTableau.cnb
│   │   ├── FilledTableau.hh
│   │   ├── FilledTableau.tex
│   │   ├── GammaMatrix.cc
│   │   ├── GammaMatrix.cnb
│   │   ├── GammaMatrix.hh
│   │   ├── GammaMatrix.tex
│   │   ├── GammaTraceless.cc
│   │   ├── GammaTraceless.hh
│   │   ├── GammaTraceless.tex
│   │   ├── ImaginaryI.cc
│   │   ├── ImaginaryI.hh
│   │   ├── ImplicitIndex.cc
│   │   ├── ImplicitIndex.cnb
│   │   ├── ImplicitIndex.hh
│   │   ├── ImplicitIndex.tex
│   │   ├── IndexInherit.cc
│   │   ├── IndexInherit.cnb
│   │   ├── IndexInherit.hh
│   │   ├── IndexInherit.tex
│   │   ├── Indices.cc
│   │   ├── Indices.cnb
│   │   ├── Indices.hh
│   │   ├── Indices.tex
│   │   ├── Integer.cc
│   │   ├── Integer.cnb
│   │   ├── Integer.hh
│   │   ├── Integer.tex
│   │   ├── Integral.hh
│   │   ├── InverseMetric.cc
│   │   ├── InverseMetric.cnb
│   │   ├── InverseMetric.hh
│   │   ├── InverseMetric.tex
│   │   ├── InverseVielbein.cnb
│   │   ├── InverseVielbein.tex
│   │   ├── KeepHistory.tex
│   │   ├── KroneckerDelta.cc
│   │   ├── KroneckerDelta.cnb
│   │   ├── KroneckerDelta.hh
│   │   ├── KroneckerDelta.tex
│   │   ├── LaTeXForm.cc
│   │   ├── LaTeXForm.cnb
│   │   ├── LaTeXForm.hh
│   │   ├── LaTeXForm.tex
│   │   ├── Matrix.cc
│   │   ├── Matrix.hh
│   │   ├── Matrix.tex
│   │   ├── Metric.cc
│   │   ├── Metric.cnb
│   │   ├── Metric.hh
│   │   ├── Metric.tex
│   │   ├── NonCommuting.cc
│   │   ├── NonCommuting.cnb
│   │   ├── NonCommuting.hh
│   │   ├── NonCommuting.tex
│   │   ├── NumericalFlat.cc
│   │   ├── NumericalFlat.hh
│   │   ├── NumericalFlat.tex
│   │   ├── PartialDerivative.cc
│   │   ├── PartialDerivative.cnb
│   │   ├── PartialDerivative.hh
│   │   ├── PartialDerivative.tex
│   │   ├── PostDefaultRules.tex
│   │   ├── PreDefaultRules.tex
│   │   ├── PropertyInherit.tex
│   │   ├── RiemannTensor.cc
│   │   ├── RiemannTensor.cnb
│   │   ├── RiemannTensor.hh
│   │   ├── RiemannTensor.tex
│   │   ├── SatisfiesBianchi.cc
│   │   ├── SatisfiesBianchi.cnb
│   │   ├── SatisfiesBianchi.hh
│   │   ├── SatisfiesBianchi.tex
│   │   ├── SelfAntiCommuting.cc
│   │   ├── SelfAntiCommuting.cnb
│   │   ├── SelfAntiCommuting.hh
│   │   ├── SelfAntiCommuting.tex
│   │   ├── SelfCommuting.cc
│   │   ├── SelfCommuting.cnb
│   │   ├── SelfCommuting.hh
│   │   ├── SelfCommuting.tex
│   │   ├── SelfCommutingBehaviour.hh
│   │   ├── SelfDual.tex
│   │   ├── SelfNonCommuting.cc
│   │   ├── SelfNonCommuting.cnb
│   │   ├── SelfNonCommuting.hh
│   │   ├── SelfNonCommuting.tex
│   │   ├── SigmaBarMatrix.tex
│   │   ├── SigmaMatrix.hh
│   │   ├── SigmaMatrix.tex
│   │   ├── SortOrder.cc
│   │   ├── SortOrder.cnb
│   │   ├── SortOrder.hh
│   │   ├── SortOrder.tex
│   │   ├── Spinor.cc
│   │   ├── Spinor.cnb
│   │   ├── Spinor.hh
│   │   ├── Spinor.tex
│   │   ├── Symbol.cc
│   │   ├── Symbol.cnb
│   │   ├── Symbol.hh
│   │   ├── Symmetric.cc
│   │   ├── Symmetric.cnb
│   │   ├── Symmetric.hh
│   │   ├── Symmetric.tex
│   │   ├── Tableau.cc
│   │   ├── Tableau.cnb
│   │   ├── Tableau.hh
│   │   ├── TableauBase.cc
│   │   ├── TableauBase.hh
│   │   ├── TableauInherit.cc
│   │   ├── TableauInherit.hh
│   │   ├── TableauSymmetry.cc
│   │   ├── TableauSymmetry.cnb
│   │   ├── TableauSymmetry.hh
│   │   ├── TableauSymmetry.tex
│   │   ├── Trace.cc
│   │   ├── Trace.cnb
│   │   ├── Trace.hh
│   │   ├── Traceless.cc
│   │   ├── Traceless.hh
│   │   ├── Traceless.tex
│   │   ├── Vielbein.cc
│   │   ├── Vielbein.cnb
│   │   ├── Vielbein.hh
│   │   ├── Vielbein.tex
│   │   ├── Weight.cc
│   │   ├── Weight.cnb
│   │   ├── Weight.hh
│   │   ├── WeightBase.hh
│   │   ├── WeightInherit.cc
│   │   ├── WeightInherit.cnb
│   │   ├── WeightInherit.hh
│   │   ├── WeylTensor.cc
│   │   ├── WeylTensor.hh
│   │   └── WeylTensor.tex
│   ├── pythoncdb/
│   │   ├── py_algorithms.cc
│   │   ├── py_algorithms.hh
│   │   ├── py_ex.cc
│   │   ├── py_ex.hh
│   │   ├── py_globals.cc
│   │   ├── py_globals.hh
│   │   ├── py_helpers.cc
│   │   ├── py_helpers.hh
│   │   ├── py_kernel.cc
│   │   ├── py_kernel.hh
│   │   ├── py_media.cc
│   │   ├── py_media.hh
│   │   ├── py_module.cc
│   │   ├── py_ntensor.cc
│   │   ├── py_ntensor.hh
│   │   ├── py_packages.cc
│   │   ├── py_packages.hh
│   │   ├── py_progress.cc
│   │   ├── py_progress.hh
│   │   ├── py_properties.cc
│   │   ├── py_properties.hh
│   │   ├── py_stopwatch.cc
│   │   ├── py_stopwatch.hh
│   │   ├── py_tableau.cc
│   │   └── py_tableau.hh
│   ├── test_benchmark.cc
│   ├── test_compile_command.py
│   ├── test_internals.cc
│   ├── test_multiindex.cc
│   ├── test_multiplier.cc
│   ├── test_permutations.cc
│   ├── test_preprocessor.cc
│   ├── test_wstp.cc
│   └── tree.hh
├── doc/
│   ├── .gitignore
│   ├── adjacency_form.md
│   ├── autogobble.sty
│   ├── cadabra2.tex
│   ├── cadabra2_hep.tex
│   ├── description
│   ├── license.txt
│   ├── main.md
│   ├── modules.dox
│   ├── random.md
│   ├── reserved/
│   │   ├── anticommutator.tex
│   │   ├── arrow.tex
│   │   ├── cdot.tex
│   │   ├── comma.tex
│   │   ├── commutator.tex
│   │   ├── conditional.tex
│   │   ├── equals.tex
│   │   ├── expression.tex
│   │   ├── factorial.tex
│   │   ├── frac.tex
│   │   ├── indexbracket.tex
│   │   ├── infty.tex
│   │   ├── label.tex
│   │   ├── matrix.tex
│   │   ├── pow.tex
│   │   ├── prod.tex
│   │   ├── regex.tex
│   │   ├── sequence.tex
│   │   ├── sum.tex
│   │   └── unequals.tex
│   ├── tableaux.sty
│   ├── the_cadabra_book.bib
│   ├── the_cadabra_book.tex
│   ├── users/
│   │   ├── command_line.tex
│   │   ├── comparison.tex
│   │   ├── components.tex
│   │   ├── input.tex
│   │   └── notebook_comparisons.tex
│   └── writing_algorithms.tex
├── docker/
│   ├── Dockerfile
│   └── entrypoint.sh
├── examples/
│   ├── .gitignore
│   ├── auto_meld.cnb
│   ├── automatic_multiterm.cnb
│   ├── beginners.cnb
│   ├── bianchi_identities.cnb
│   ├── canonicalise.cnb
│   ├── cell_ids.cnb
│   ├── component_evaluation.cnb
│   ├── components2.cnb
│   ├── converge.cnb
│   ├── covariant_derivative.cdb
│   ├── equations_of_motion.cnb
│   ├── exterior.cnb
│   ├── fermionic_oscillator_algebra.cnb
│   ├── fierz.cnb
│   ├── for_previous_users.cnb
│   ├── frw.cnb
│   ├── gamma_matrix_algebra.cnb
│   ├── gamma_traces.cnb
│   ├── graphical_user_interface.cnb
│   ├── ho.cnb
│   ├── indexing_expressions.cnb
│   ├── input_format.cnb
│   ├── kaluza_klein.cnb
│   ├── kerr.cnb
│   ├── library.cnb
│   ├── lovelock.cnb
│   ├── nintegrate.cnb
│   ├── numerics.cnb
│   ├── packages.cnb
│   ├── packages2.cnb
│   ├── plotting.cnb
│   ├── poincare_algebra.cnb
│   ├── post_processing.cnb
│   ├── quickstart.cnb
│   ├── ref_accents.cnb
│   ├── ref_c++_library.cnb
│   ├── ref_core_package.cnb
│   ├── ref_default_simplification.cnb
│   ├── ref_derivatives.cnb
│   ├── ref_dynamical_updates.cnb
│   ├── ref_exponents.cnb
│   ├── ref_flags_variables.cnb
│   ├── ref_implicit_versus_explicit.cnb
│   ├── ref_import.cnb
│   ├── ref_indexbrackets.cnb
│   ├── ref_indices.cnb
│   ├── ref_kernel.cnb
│   ├── ref_ndsolve.cnb
│   ├── ref_numerical.cnb
│   ├── ref_ordering.cnb
│   ├── ref_patterns.cnb
│   ├── ref_plotting.cnb
│   ├── ref_printing.cnb
│   ├── ref_programming.cnb
│   ├── ref_properties.cnb
│   ├── ref_selecting.cnb
│   ├── ref_spacing.cnb
│   ├── ref_sympy.cnb
│   ├── reset.cnb
│   ├── sample_dyn.cnb
│   ├── scalar_manipulations.cnb
│   ├── scalar_manipulations2.cnb
│   ├── schwarzschild.cnb
│   ├── schwarzschild.ipynb
│   ├── simple_evaluate.cnb
│   ├── slider.cnb
│   ├── sphere.cnb
│   ├── spinors.cnb
│   ├── string_states.cnb
│   ├── super_maxwell.cnb
│   ├── supergravity.cnb
│   ├── sympy_bridge.cnb
│   ├── sympy_examples.cnb
│   ├── tensor_monomials.cnb
│   ├── tensors_in_denominators.cnb
│   ├── typesetting.cnb
│   ├── utf8.cnb
│   ├── vacuum_einstein_first_order.cnb
│   ├── variational_derivatives.cnb
│   ├── working_with_ex.cnb
│   └── world-sheet_susy.cnb
├── frontend/
│   ├── CMakeLists.txt
│   ├── common/
│   │   ├── CMakeLists.txt
│   │   ├── TeXEngine.cc
│   │   ├── TeXEngine.hh
│   │   ├── lodepng.cc
│   │   ├── lodepng.h
│   │   ├── preamble.tex
│   │   ├── test_tex.cc
│   │   └── testpre.tex
│   ├── gtkmm/
│   │   ├── CMakeLists.txt
│   │   ├── Cadabra.cc
│   │   ├── Cadabra.hh
│   │   ├── ChooseColoursDialog.cc
│   │   ├── ChooseColoursDialog.hh
│   │   ├── CodeInput.cc
│   │   ├── CodeInput.hh
│   │   ├── Console.cc
│   │   ├── Console.hh
│   │   ├── DiffViewer.cc
│   │   ├── DiffViewer.hh
│   │   ├── ImageView.cc
│   │   ├── ImageView.hh
│   │   ├── Keywords.cc
│   │   ├── Keywords.hh
│   │   ├── NotebookCanvas.cc
│   │   ├── NotebookCanvas.hh
│   │   ├── NotebookWindow.cc
│   │   ├── NotebookWindow.hh
│   │   ├── Preferences.hh
│   │   ├── SelectFileDialog.cc
│   │   ├── SelectFileDialog.hh
│   │   ├── SliderView.cc
│   │   ├── SliderView.hh
│   │   ├── TeXView.cc
│   │   ├── TeXView.hh
│   │   ├── VisualCell.hh
│   │   ├── cadabra2-gtk.appdata.xml.in
│   │   ├── cdb-icons/
│   │   │   └── README.md
│   │   ├── config/
│   │   │   ├── gschemas.compiled
│   │   │   └── settings.ini
│   │   ├── icons/
│   │   │   ├── Adwaita/
│   │   │   │   ├── cursors/
│   │   │   │   │   ├── 00008160000006810000408080010102.cur
│   │   │   │   │   ├── 028006030e0e7ebffc7f7070c0600140.cur
│   │   │   │   │   ├── 03b6e0fcb3499374a867c041f52298f0.cur
│   │   │   │   │   ├── 08e8e1c95fe2fc01f976f1e063a24ccd.ani
│   │   │   │   │   ├── 1081e37283d90000800003c07f3ef6bf.cur
│   │   │   │   │   ├── 14fef782d02440884392942c11205230.cur
│   │   │   │   │   ├── 2870a09082c103050810ffdffffe0204.cur
│   │   │   │   │   ├── 3085a0e285430894940527032f8b26df.cur
│   │   │   │   │   ├── 3ecb610c1bf2410f44200f48c40d3599.ani
│   │   │   │   │   ├── 4498f0e0c1937ffe01fd06f973665830.cur
│   │   │   │   │   ├── 5c6cd98b3f3ebcb1f9c7f1c204630408.cur
│   │   │   │   │   ├── 6407b0e94181790501fd1e167b474872.cur
│   │   │   │   │   ├── 640fb0e74195791501fd1ed57b41487f.cur
│   │   │   │   │   ├── 9081237383d90e509aa00f00170e968f.cur
│   │   │   │   │   ├── 9d800788f1b08800ae810202380a0822.cur
│   │   │   │   │   ├── X_cursor.cur
│   │   │   │   │   ├── alias.cur
│   │   │   │   │   ├── all-scroll.cur
│   │   │   │   │   ├── arrow.cur
│   │   │   │   │   ├── bd_double_arrow.cur
│   │   │   │   │   ├── bottom_left_corner.cur
│   │   │   │   │   ├── bottom_right_corner.cur
│   │   │   │   │   ├── bottom_side.cur
│   │   │   │   │   ├── bottom_tee.cur
│   │   │   │   │   ├── c7088f0f3e6c8088236ef8e1e3e70000.cur
│   │   │   │   │   ├── cell.cur
│   │   │   │   │   ├── circle.cur
│   │   │   │   │   ├── col-resize.cur
│   │   │   │   │   ├── context-menu.cur
│   │   │   │   │   ├── copy.cur
│   │   │   │   │   ├── cross.cur
│   │   │   │   │   ├── cross_reverse.cur
│   │   │   │   │   ├── crossed_circle.cur
│   │   │   │   │   ├── crosshair.cur
│   │   │   │   │   ├── d9ce0ab605698f320427677b458ad60b.cur
│   │   │   │   │   ├── default.cur
│   │   │   │   │   ├── diamond_cross.cur
│   │   │   │   │   ├── dnd-ask.cur
│   │   │   │   │   ├── dnd-copy.cur
│   │   │   │   │   ├── dnd-link.cur
│   │   │   │   │   ├── dnd-move.cur
│   │   │   │   │   ├── dnd-no-drop.cur
│   │   │   │   │   ├── dnd-none.cur
│   │   │   │   │   ├── dot_box_mask.cur
│   │   │   │   │   ├── dotbox.cur
│   │   │   │   │   ├── double_arrow.cur
│   │   │   │   │   ├── draft_large.cur
│   │   │   │   │   ├── draft_small.cur
│   │   │   │   │   ├── draped_box.cur
│   │   │   │   │   ├── e-resize.cur
│   │   │   │   │   ├── e29285e634086352946a0e7090d73106.cur
│   │   │   │   │   ├── ew-resize.cur
│   │   │   │   │   ├── fcf1c3c7cd4491d801f1e1c78f100000.cur
│   │   │   │   │   ├── fd_double_arrow.cur
│   │   │   │   │   ├── fleur.cur
│   │   │   │   │   ├── grab.cur
│   │   │   │   │   ├── grabbing.cur
│   │   │   │   │   ├── h_double_arrow.cur
│   │   │   │   │   ├── hand.cur
│   │   │   │   │   ├── hand1.cur
│   │   │   │   │   ├── hand2.cur
│   │   │   │   │   ├── help.cur
│   │   │   │   │   ├── icon.cur
│   │   │   │   │   ├── left_ptr.cur
│   │   │   │   │   ├── left_ptr_help.cur
│   │   │   │   │   ├── left_ptr_watch.ani
│   │   │   │   │   ├── left_side.cur
│   │   │   │   │   ├── left_tee.cur
│   │   │   │   │   ├── link.cur
│   │   │   │   │   ├── ll_angle.cur
│   │   │   │   │   ├── lr_angle.cur
│   │   │   │   │   ├── move.cur
│   │   │   │   │   ├── n-resize.cur
│   │   │   │   │   ├── ne-resize.cur
│   │   │   │   │   ├── nesw-resize.cur
│   │   │   │   │   ├── no-drop.cur
│   │   │   │   │   ├── not-allowed.cur
│   │   │   │   │   ├── ns-resize.cur
│   │   │   │   │   ├── nw-resize.cur
│   │   │   │   │   ├── nwse-resize.cur
│   │   │   │   │   ├── pencil.cur
│   │   │   │   │   ├── pirate.cur
│   │   │   │   │   ├── plus.cur
│   │   │   │   │   ├── pointer-move.cur
│   │   │   │   │   ├── pointer.cur
│   │   │   │   │   ├── progress.ani
│   │   │   │   │   ├── question_arrow.cur
│   │   │   │   │   ├── right_ptr.cur
│   │   │   │   │   ├── right_side.cur
│   │   │   │   │   ├── right_tee.cur
│   │   │   │   │   ├── row-resize.cur
│   │   │   │   │   ├── s-resize.cur
│   │   │   │   │   ├── sb_down_arrow.cur
│   │   │   │   │   ├── sb_h_double_arrow.cur
│   │   │   │   │   ├── sb_left_arrow.cur
│   │   │   │   │   ├── sb_right_arrow.cur
│   │   │   │   │   ├── sb_up_arrow.cur
│   │   │   │   │   ├── sb_v_double_arrow.cur
│   │   │   │   │   ├── se-resize.cur
│   │   │   │   │   ├── size_all.cur
│   │   │   │   │   ├── size_bdiag.cur
│   │   │   │   │   ├── size_fdiag.cur
│   │   │   │   │   ├── size_hor.cur
│   │   │   │   │   ├── size_ver.cur
│   │   │   │   │   ├── sw-resize.cur
│   │   │   │   │   ├── target.cur
│   │   │   │   │   ├── tcross.cur
│   │   │   │   │   ├── text.cur
│   │   │   │   │   ├── top_left_arrow.cur
│   │   │   │   │   ├── top_left_corner.cur
│   │   │   │   │   ├── top_right_corner.cur
│   │   │   │   │   ├── top_side.cur
│   │   │   │   │   ├── top_tee.cur
│   │   │   │   │   ├── ul_angle.cur
│   │   │   │   │   ├── ur_angle.cur
│   │   │   │   │   ├── v_double_arrow.cur
│   │   │   │   │   ├── vertical-text.cur
│   │   │   │   │   ├── w-resize.cur
│   │   │   │   │   ├── wait.ani
│   │   │   │   │   ├── watch.ani
│   │   │   │   │   ├── xterm.cur
│   │   │   │   │   ├── zoom-in.cur
│   │   │   │   │   └── zoom-out.cur
│   │   │   │   ├── icon-theme.cache
│   │   │   │   └── index.theme
│   │   │   ├── README.txt
│   │   │   └── hicolor/
│   │   │       └── icon-theme.cache
│   │   ├── main.cc
│   │   ├── science.cadabra.cadabra2-gtk.appdata.xml.in
│   │   ├── theme/
│   │   │   ├── README.txt
│   │   │   └── Windows10/
│   │   │       └── gtk-3.20/
│   │   │           ├── apps/
│   │   │           │   └── gnome-terminal.css
│   │   │           ├── gtk-cadabra.css
│   │   │           ├── gtk-contained-dark.css
│   │   │           ├── gtk-contained.css
│   │   │           ├── gtk-dark.css
│   │   │           ├── gtk.css
│   │   │           └── settings.ini
│   │   └── win_res.rc.in
│   ├── latex/
│   │   ├── install.cmake
│   │   ├── tableaux.sty
│   │   └── young.html
│   ├── osx/
│   │   ├── CMakeLists.txt
│   │   ├── Cadabra/
│   │   │   ├── Cadabra/
│   │   │   │   ├── AppDelegate.h
│   │   │   │   ├── AppDelegate.mm
│   │   │   │   ├── Base.lproj/
│   │   │   │   │   └── Cadabra.xib
│   │   │   │   ├── Images.xcassets/
│   │   │   │   │   └── AppIcon.appiconset/
│   │   │   │   │       └── Contents.json
│   │   │   │   ├── Info.plist
│   │   │   │   ├── Notebook.xib
│   │   │   │   ├── NotebookCanvas.hh
│   │   │   │   ├── NotebookCanvas.mm
│   │   │   │   ├── NotebookWindow.hh
│   │   │   │   ├── NotebookWindow.mm
│   │   │   │   ├── Test.xib
│   │   │   │   └── main.m
│   │   │   ├── Cadabra.xcodeproj/
│   │   │   │   ├── project.pbxproj
│   │   │   │   ├── project.xcworkspace/
│   │   │   │   │   ├── contents.xcworkspacedata
│   │   │   │   │   ├── xcshareddata/
│   │   │   │   │   │   └── Cadabra.xccheckout
│   │   │   │   │   └── xcuserdata/
│   │   │   │   │       └── kasper.xcuserdatad/
│   │   │   │   │           └── UserInterfaceState.xcuserstate
│   │   │   │   └── xcuserdata/
│   │   │   │       └── kasper.xcuserdatad/
│   │   │   │           ├── .gitignore
│   │   │   │           └── xcschemes/
│   │   │   │               ├── Cadabra.xcscheme
│   │   │   │               └── xcschememanagement.plist
│   │   │   ├── CadabraTests/
│   │   │   │   ├── CadabraTests.m
│   │   │   │   └── Info.plist
│   │   │   ├── NotebookController.h
│   │   │   └── NotebookController.mm
│   │   └── fake.cc
│   ├── qt5/
│   │   └── README.txt
│   └── web/
│       ├── CMakeLists.txt
│       ├── Makefile
│       ├── README.md
│       ├── css/
│       │   └── cadabra.css
│       ├── docker/
│       │   ├── .gitignore
│       │   └── Dockerfile
│       ├── html/
│       │   └── index.html
│       ├── js/
│       │   └── cadabra.js
│       └── src/
│           ├── NotebookWindow.cc
│           ├── NotebookWindow.hh
│           └── server.py
├── jupyterkernel/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── cadabra2_jupyter/
│   │   ├── __init__.py.in
│   │   ├── __main__.py
│   │   ├── completer.py
│   │   ├── context.py
│   │   ├── kernel.py
│   │   └── server.py
│   ├── kernelspec/
│   │   └── kernel.json.in
│   ├── lexer/
│   │   ├── cadabra.js
│   │   └── cadabra.py
│   └── readme.txt
├── libs/
│   ├── appdirs/
│   │   └── cdb_appdirs.py
│   ├── base64/
│   │   ├── base64.cc
│   │   └── base64.hh
│   ├── cm/
│   │   ├── cmunbbx.clm1
│   │   ├── cmunbbx.otf
│   │   ├── cmunbi.clm1
│   │   ├── cmunbi.otf
│   │   ├── cmunbl.clm1
│   │   ├── cmunbl.otf
│   │   ├── cmunbmo.clm1
│   │   ├── cmunbmo.otf
│   │   ├── cmunbmr.clm1
│   │   ├── cmunbmr.otf
│   │   ├── cmunbso.clm1
│   │   ├── cmunbso.otf
│   │   ├── cmunbsr.clm1
│   │   ├── cmunbsr.otf
│   │   ├── cmunbtl.clm1
│   │   ├── cmunbtl.otf
│   │   ├── cmunbto.clm1
│   │   ├── cmunbto.otf
│   │   ├── cmunbx.clm1
│   │   ├── cmunbx.otf
│   │   ├── cmunbxo.clm1
│   │   ├── cmunbxo.otf
│   │   ├── cmunci.clm1
│   │   ├── cmunci.otf
│   │   ├── cmunit.clm1
│   │   ├── cmunit.otf
│   │   ├── cmunobi.clm1
│   │   ├── cmunobi.otf
│   │   ├── cmunobx.clm1
│   │   ├── cmunobx.otf
│   │   ├── cmunorm.clm1
│   │   ├── cmunorm.otf
│   │   ├── cmunoti.clm1
│   │   ├── cmunoti.otf
│   │   ├── cmunrb.clm1
│   │   ├── cmunrb.otf
│   │   ├── cmunrm.clm1
│   │   ├── cmunrm.otf
│   │   ├── cmunsi.clm1
│   │   ├── cmunsi.otf
│   │   ├── cmunsl.clm1
│   │   ├── cmunsl.otf
│   │   ├── cmunso.clm1
│   │   ├── cmunso.otf
│   │   ├── cmunss.clm1
│   │   ├── cmunss.otf
│   │   ├── cmunssdc.clm1
│   │   ├── cmunssdc.otf
│   │   ├── cmunst.clm1
│   │   ├── cmunst.otf
│   │   ├── cmunsx.clm1
│   │   ├── cmunsx.otf
│   │   ├── cmuntb.clm1
│   │   ├── cmuntb.otf
│   │   ├── cmunti.clm1
│   │   ├── cmunti.otf
│   │   ├── cmuntt.clm1
│   │   ├── cmuntt.otf
│   │   ├── cmuntx.clm1
│   │   ├── cmuntx.otf
│   │   ├── cmunui.clm1
│   │   ├── cmunui.otf
│   │   ├── cmunvi.clm1
│   │   ├── cmunvi.otf
│   │   ├── cmunvt.clm1
│   │   └── cmunvt.otf
│   ├── dbg/
│   │   └── dbg.h
│   ├── internal/
│   │   └── include/
│   │       └── internal/
│   │           ├── difflib.h
│   │           ├── string_tools.h
│   │           ├── uniconv.h
│   │           ├── unistd.h
│   │           └── uuid.h
│   ├── linenoise/
│   │   ├── LICENSE
│   │   └── linenoise.hpp
│   ├── nlohmann/
│   │   └── nlohmann/
│   │       └── json.hpp
│   ├── pybind11/
│   │   ├── CMakeLists.txt
│   │   ├── LICENSE
│   │   ├── include/
│   │   │   └── pybind11/
│   │   │       ├── attr.h
│   │   │       ├── buffer_info.h
│   │   │       ├── cast.h
│   │   │       ├── chrono.h
│   │   │       ├── common.h
│   │   │       ├── complex.h
│   │   │       ├── detail/
│   │   │       │   ├── class.h
│   │   │       │   ├── common.h
│   │   │       │   ├── cpp_conduit.h
│   │   │       │   ├── descr.h
│   │   │       │   ├── exception_translation.h
│   │   │       │   ├── init.h
│   │   │       │   ├── internals.h
│   │   │       │   ├── type_caster_base.h
│   │   │       │   ├── typeid.h
│   │   │       │   └── value_and_holder.h
│   │   │       ├── eigen/
│   │   │       │   ├── common.h
│   │   │       │   ├── matrix.h
│   │   │       │   └── tensor.h
│   │   │       ├── eigen.h
│   │   │       ├── embed.h
│   │   │       ├── eval.h
│   │   │       ├── functional.h
│   │   │       ├── gil.h
│   │   │       ├── gil_safe_call_once.h
│   │   │       ├── iostream.h
│   │   │       ├── numpy.h
│   │   │       ├── operators.h
│   │   │       ├── options.h
│   │   │       ├── pybind11.h
│   │   │       ├── pytypes.h
│   │   │       ├── stl/
│   │   │       │   └── filesystem.h
│   │   │       ├── stl.h
│   │   │       ├── stl_bind.h
│   │   │       ├── type_caster_pyobject_ptr.h
│   │   │       └── typing.h
│   │   ├── pybind11/
│   │   │   ├── __init__.py
│   │   │   ├── __main__.py
│   │   │   ├── _version.py
│   │   │   ├── commands.py
│   │   │   ├── py.typed
│   │   │   └── setup_helpers.py
│   │   └── tools/
│   │       ├── FindCatch.cmake
│   │       ├── FindEigen3.cmake
│   │       ├── FindPythonLibsNew.cmake
│   │       ├── JoinPaths.cmake
│   │       ├── check-style.sh
│   │       ├── cmake_uninstall.cmake.in
│   │       ├── codespell_ignore_lines_from_errors.py
│   │       ├── libsize.py
│   │       ├── make_changelog.py
│   │       ├── pybind11.pc.in
│   │       ├── pybind11Common.cmake
│   │       ├── pybind11Config.cmake.in
│   │       ├── pybind11GuessPythonExtSuffix.cmake
│   │       ├── pybind11NewTools.cmake
│   │       ├── pybind11Tools.cmake
│   │       ├── pyproject.toml
│   │       ├── setup_global.py.in
│   │       ├── setup_main.py.in
│   │       └── test-pybind11GuessPythonExtSuffix.cmake
│   ├── sqlite3/
│   │   ├── include/
│   │   │   └── sqlite3.h
│   │   └── sqlite3.c
│   ├── tiny-process-library/
│   │   ├── LICENSE
│   │   ├── process.cpp
│   │   ├── process.hpp
│   │   ├── process_unix.cpp
│   │   └── process_win.cpp
│   ├── tinyxml2/
│   │   ├── CMakeLists.txt
│   │   ├── cmake/
│   │   │   ├── tinyxml2-config.cmake
│   │   │   └── tinyxml2.pc.in
│   │   ├── tinyxml2.cpp
│   │   └── tinyxml2.h
│   └── whereami/
│       ├── LICENSE.WTFPLv2
│       ├── whereami.c
│       └── whereami.h
├── man/
│   └── man1/
│       ├── cadabra-server.1
│       ├── cadabra2-cli.1
│       ├── cadabra2-gtk.1
│       ├── cadabra2.1
│       ├── cadabra2cadabra.1
│       ├── cadabra2html.1
│       ├── cadabra2ipynb.1
│       ├── cadabra2latex.1
│       └── cadabra2python.1
├── paper/
│   ├── paper.bib
│   └── paper.md
├── tests/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── algebra.cdb
│   ├── basic.cdb
│   ├── callbacks.cdb
│   ├── canonicalise.cdb
│   ├── components.cdb
│   ├── decompose.cdb
│   ├── decompose.cnb
│   ├── delta.cdb
│   ├── derivative.cdb
│   ├── display.cdb
│   ├── display.cnb
│   ├── dummies.cdb
│   ├── explicit_implicit.cdb
│   ├── factor.cdb
│   ├── field_theory.cdb
│   ├── fierz.cdb
│   ├── fixed_point.cdb
│   ├── forms.cdb
│   ├── gamma.cdb
│   ├── gamma_paper.cdb
│   ├── implicit.cdb
│   ├── index_positions.cdb
│   ├── integrals.cdb
│   ├── ipynb_module.ipynb
│   ├── kaluza_klein.cdb
│   ├── kerr.cnb
│   ├── latexform.cnb
│   ├── manip.cdb
│   ├── meld.cdb
│   ├── mma.cdb
│   ├── mma.cnb
│   ├── module01.cnb
│   ├── module02.cnb
│   ├── module03.cdb
│   ├── modules.cdb
│   ├── multiterm.cdb
│   ├── nevaluate.cdb
│   ├── new_paper.cdb
│   ├── noncovariant.cdb
│   ├── numerical.cdb
│   ├── output.cdb
│   ├── packages.cdb
│   ├── packages.cnb
│   ├── paper.cdb
│   ├── programming.cdb
│   ├── properties.cdb
│   ├── reduce.cdb
│   ├── relativity.cdb
│   ├── scope.cdb
│   ├── selecting.cdb
│   ├── semicolon-is-display.cnb
│   ├── serialize.cdb
│   ├── simplify.cdb
│   ├── spinors.cdb
│   ├── substitute.cdb
│   ├── symmetry.cdb
│   ├── sympy_bridge.cnb
│   ├── sympy_cdb.cdb
│   ├── test_comparison.cc
│   ├── tests.cdb
│   ├── trigonometric.cdb
│   ├── unicode.cdb
│   ├── vary.cdb
│   ├── working.cdb
│   ├── young.cdb
│   └── yrtrace.cdb
├── tutorials/
│   └── 01_basics.py
├── vcpkg.json
└── web2/
    ├── CMakeLists.txt
    ├── README.txt
    ├── cadabra2/
    │   ├── .gitignore
    │   ├── robots.txt
    │   └── source/
    │       ├── blog.html
    │       ├── changelog.html
    │       ├── changes12.html
    │       ├── clay.yaml
    │       ├── comparison.html
    │       ├── developers.html
    │       ├── download.html
    │       ├── faq.html
    │       ├── features.html
    │       ├── help.html
    │       ├── index.html
    │       ├── jupyter.html
    │       ├── layout.html
    │       ├── license.html
    │       ├── man.html
    │       ├── manual/
    │       │   ├── .gitignore
    │       │   └── README.txt
    │       ├── notebook_layout.html
    │       ├── notebooks/
    │       │   ├── .gitignore
    │       │   └── README.txt
    │       ├── papers.html
    │       ├── people.html
    │       ├── quickstart.html
    │       ├── static/
    │       │   ├── cadabra_in_ipython.nb
    │       │   ├── cadabra_in_ipython.nb.html
    │       │   ├── fonts/
    │       │   │   ├── Bright/
    │       │   │   │   ├── OFL-FAQ.txt
    │       │   │   │   ├── OFL.txt
    │       │   │   │   ├── README.txt
    │       │   │   │   └── cmun-bright.css
    │       │   │   ├── cmunbx.otf
    │       │   │   └── cmunrm.otf
    │       │   ├── humans.txt
    │       │   ├── images/
    │       │   │   └── logo.tex
    │       │   ├── js/
    │       │   │   └── cadabra.js
    │       │   ├── robots.txt
    │       │   └── styles/
    │       │       ├── cadabra-web.css
    │       │       └── normalize.css
    │       ├── tutorials.html
    │       ├── user_notebooks.html
    │       └── v1x.html
    └── scan.py

================================================
FILE CONTENTS
================================================

================================================
FILE: .editorconfig
================================================
root = true

[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
[*.{cc,hh}]
charset = utf-8
indent_style = tab
indent_size = 3
trim_trailing_whitespace = true



================================================
FILE: .gitattributes
================================================
*.hh    linguist-language=C++
*.cc    linguist-language=C++
libs/** linguist-vendored

================================================
FILE: .github/workflows/appimage-modern.yml
================================================
# Modern AppImage build using AppImageBuilder
# Supports both x86_64 and arm64 architectures on current GitHub runners
# Uses Ubuntu 22.04 base for maximum compatibility

name: AppImage (Modern)

on:
  release:
    types: [created]
  # Uncomment for testing
  #push:
  #  branches: [devel]

jobs:
  build:
    name: AppImage ${{ matrix.arch }}

    strategy:
      fail-fast: false
      matrix:
        include:
          - arch: x86_64
            os: ubuntu-24.04
            ubuntu_arch: amd64
            appimage_arch: x86_64
            repo: http://archive.ubuntu.com/ubuntu/
          - arch: arm64
            os: ubuntu-24.04-arm
            ubuntu_arch: arm64
            appimage_arch: aarch64
            repo: http://ports.ubuntu.com/ubuntu-ports/

    runs-on: ${{ matrix.os }}

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install AppImageBuilder
        run: |
          sudo apt update
          sudo apt install -y python3-pip

      - name: Clean up any existing AppDir
        run: |
          sudo rm -rf AppDir || true

      - name: Create AppImageBuilder recipe
        run: |
          cat > AppImageBuilder.yml << 'EOF'
          version: 1

          script:
            - mkdir -p AppDir

          AppDir:
            path: ./AppDir
            app_info:
              id: science.cadabra.cadabra2-gtk
              name: Cadabra2
              icon: cadabra2-gtk
              version: latest
              exec: usr/bin/cadabra2-gtk
              exec_args: $@

            apt:
              arch: ${{ matrix.ubuntu_arch }}
              sources:
                - sourceline: deb ${{ matrix.repo }} jammy main universe
                  key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
                - sourceline: deb ${{ matrix.repo }} jammy-updates main universe
                  key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'

              include:
                # Core system libraries
                - libc6
                - libstdc++6
                - libgcc-s1

                # Shell interpreters
                - bash
                - dash
                - perl-base
                
                # Cadabra dependencies
                - libgmp10
                - libgmpxx4ldbl
                - libboost-system1.74.0
                - libboost-filesystem1.74.0
                - libboost-program-options1.74.0
                - libboost-date-time1.74.0
                - libsqlite3-0
                - uuid-runtime
                - libssl3
                - libtbb12

                # GTK and GUI dependencies
                - libgtkmm-3.0-1v5
                - libgtk-3-0
                - libgdk-pixbuf2.0-0
                - libcairo2
                - libpango-1.0-0
                - libpangocairo-1.0-0
                - libatk1.0-0
                - libglib2.0-0
                - librsvg2-common
                - adwaita-icon-theme
                - hicolor-icon-theme
                - libwayland-client0
                - libwayland-cursor0
                - libwayland-egl1-mesa
 
                # Python dependencies (Ubuntu 22.04 uses Python 3.10)
                - python3.10
                - libpython3.10
                - python3-pip
                - python3-gmpy2

              exclude:
                - adwaita-icon-theme-full
                - humanity-icon-theme
                - ubuntu-mono

            files:
              exclude:
                - usr/lib/python*/site-packages/pip*
                - usr/lib/python*/site-packages/setuptools*
                - usr/share/doc
                - usr/share/man
                - usr/share/locale
                - var/cache
                - var/lib/apt
                - etc/apt

            runtime:
              env:
                PATH: '${APPDIR}/usr/bin:${PATH}'
                PYTHONHOME: '${APPDIR}/usr'
                PYTHONPATH: '${APPDIR}/usr/lib/python3.10/site-packages:${APPDIR}/usr/lib/python3.10:${APPDIR}/usr/lib/python3.10/dist-packages'
                LD_LIBRARY_PATH: '${APPDIR}/usr/lib:${APPDIR}/usr/lib/${{ matrix.arch }}-linux-gnu:${LD_LIBRARY_PATH}'
                LC_ALL: C.UTF-8
                LANG: C.UTF-8

          AppImage:
            update-information: gh-releases-zsync|kpeeters|cadabra2|latest|Cadabra*${{ matrix.arch }}.AppImage.zsync
            sign-key: None
            arch: ${{ matrix.appimage_arch }}
            comp: gzip
          EOF

      - name: Build Cadabra2 in container
        run: |
          # Use Docker to build for the target architecture with Ubuntu 22.04
          docker run --rm --privileged \
            --platform linux/${{ matrix.arch }} \
            -v $PWD:/workspace \
            -w /workspace \
            ubuntu:22.04 /bin/bash -c "
            # Stop on error inside the Docker container
            set -e
            
            # Install dependencies
            apt update
            DEBIAN_FRONTEND=noninteractive apt install -y \
              build-essential cmake git \
              python3-dev python3-pip g++ \
              libgmp3-dev libgtkmm-3.0-dev \
              libboost-all-dev libssl-dev \
              libsqlite3-dev uuid-dev \
              python3-matplotlib python3-sympy \
              python3-gmpy2 python3-numpy \
              squashfs-tools file desktop-file-utils fakeroot strace patchelf zsync

            # Install directly from the main branch of the appimage-builder repository,
            # to deal with the issue reported in
            # https://github.com/AppImageCrafters/appimage-builder/pull/281
            pip3 install git+https://github.com/AppImageCrafters/appimage-builder.git@main

            # Patch mpmath (bug fixed only in ubuntu-22.04)
            # sed -i \"s/if other is 0:/if other == 0:/g\" /usr/lib/python3/dist-packages/mpmath/ctx_mp_python.py
            # cat /usr/lib/python3/dist-packages/mpmath/ctx_mp_python.py
            
            # Build Cadabra2
            git config --global --add safe.directory /workspace
            mkdir -p build
            cd build
            cmake -DCMAKE_INSTALL_PREFIX=/usr \
                  -DCMAKE_BUILD_TYPE=Release \
                  -DENABLE_MATHEMATICA=OFF \
                  -DAPPIMAGE_MODE=ON \
                  ..

            VERSION=\$(cat /workspace/build/VERSION)
            echo \"Building version \${VERSION}\"

            make -j\$(nproc)
            make install DESTDIR=/workspace/build/AppDir
            make test
                  
            # Install Python packages directly into the AppDir after 'make install'
            # Ensure the target path is correct for your AppDir's Python installation
            pip3 install --target=/workspace/build/AppDir/usr/lib/python3.10/site-packages --upgrade mpmath>=1.2.0
            pip3 install --target=/workspace/build/AppDir/usr/lib/python3.10/site-packages astunparse
            pip3 install --target=/workspace/build/AppDir/usr/lib/python3.10/site-packages pillow sympy matplotlib numpy

            # Update version in AppImageBuilder.yml
            sed -i \"s/version: latest/version: \${VERSION}/\" /workspace/AppImageBuilder.yml

            # Build the AppImage
            echo \"Now going to run appimage-builder, using:\"
            echo \"---------\"
            cat /workspace/AppImageBuilder.yml
            echo \"---------\"
            echo \"Here we go...\"
            appimage-builder --recipe /workspace/AppImageBuilder.yml --skip-test
            echo \"This is /workspace/build/AppDir/usr/bin/ :\"
            echo \"---------\"
            ls -la /workspace/build/AppDir/usr/bin/
            echo \"---------\"
          "

      - name: Rename AppImage
        run: |
          VERSION=`cat build/VERSION`
          sudo chown runner:docker build -R

          # Find and rename the AppImage
          ls -la .
          APPIMAGE_FILE=$(find . -name "*.AppImage" -type f | head -n 1)
          if [ -n "$APPIMAGE_FILE" ]; then
            mv "$APPIMAGE_FILE" "Cadabra_${VERSION}_${{ matrix.arch }}.AppImage"
            chmod +x "Cadabra_${VERSION}_${{ matrix.arch }}.AppImage"
          fi

      - name: Upload artifacts
        uses: actions/upload-artifact@v4
        with:
          name: cadabra2-appimage-${{ matrix.arch }}
          path: Cadabra_*_${{ matrix.arch }}.AppImage
          retention-days: 7

      - name: Upload to release
        if: github.event_name == 'release'
        run: |
          gh release upload "${{ github.ref_name }}" Cadabra_*_${{ matrix.arch }}.AppImage --clobber
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

#       - name: Generate zsync file
#         if: github.event_name == 'release'
#         run: |
#           # Install zsync
#           sudo apt install -y zsync
# 
#           # Generate zsync file for the AppImage
#           APPIMAGE_FILE=$(find . -name "Cadabra_*_${{ matrix.arch }}.AppImage" -type f | head -n 1)
#           if [ -n \"$APPIMAGE_FILE\" ]; then
#             zsyncmake \"$APPIMAGE_FILE\"
# 
#             # Upload zsync file to release
#             gh release upload ${{ github.ref_name }} *.zsync --clobber || true
#           fi
#         env:
#           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .github/workflows/c++lib.yml
================================================
# This is a build which gets triggered on every commit push, to
# ensure that Cadabra builds as c++lib. Does not yet contain any
# tests, it just checks for build issues.

name: c++lib

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

    - name: get dependencies
      run:  sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install git cmake python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev libmpfr-dev libmpc-dev 

    - name: configure
      run:  mkdir build-lib && cd build-lib && cmake -DBUILD_AS_CPP_LIBRARY=ON ..
      
    - name: make
      run:  cd build-lib && make
      


================================================
FILE: .github/workflows/docker.yml
================================================

# Build docker images with a Jupyter server with Cadabra
# kernel whenever a commit is pushed to github.
#
# Lint this thing with
#
#   yq eval docker.yml

name: Docker

# on: [push]

on:
  release:
    types: [released]

jobs:
  build:
    runs-on: ubuntu-latest

#     strategy:
#       fail-fast: false
#       matrix:
#         arch:
#           - amd64
#           - arm64

    steps:
    - name: Prepare
      run: |
        platform=${{ matrix.platform }}
        echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV          

    - name: Set up QEMU
      uses: docker/setup-qemu-action@master

    - uses: actions/checkout@v3

#     - name: Exit if not on master branch
#       if: github.ref != 'refs/heads/master'
#       run: exit 1
      
    - name: Log in to Docker Hub
      uses: docker/login-action@master
      with:
        username: ${{ secrets.DOCKER_USERNAME }}
        password: ${{ secrets.DOCKER_PASSWORD }}

    - name: Extract metadata (tags, labels) for Docker
      id: meta
      uses: docker/metadata-action@master
      with:
        images: kpeeters/cadabra2-jupyter

    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Build Docker image
      uses: docker/build-push-action@master
      with:
        platforms: linux/amd64, linux/arm64
        context: .
        file: docker/Dockerfile
        push: true
#${{ github.ref == 'master' }}
        labels: ${{ steps.meta.outputs.labels }}
        tags:   kpeeters/cadabra2-jupyter:latest
#        outputs: type=docker

#     - name: Upload artifact to github assets
#       uses: actions/upload-artifact@main
#       with:
#         name: cadabra2-jupyter-${{ matrix.arch }}
#         path: cadabra2-jupyter-${{ matrix.arch }}.tar


================================================
FILE: .github/workflows/fedora-40-package.yml
================================================
# Create a Fedora 40 package on a github release event.
# This assumes that the cadabra version is the same as the
# release name, and it will attempt to add the .rpm file
# to the release assets.

name: Fedora-40 package

# on: [push]

on:
  release:
    types: [created]

jobs:
  build:

    strategy:
      matrix:
        include:
          - os: ubuntu-24.04
            name: x86_64
            display-name: "Fedora 40 x86_64"
          - os: ubuntu-24.04-arm
            name: arm64
            display-name: "Fedora 40 arm64"
    runs-on: ${{ matrix.os }}
    
    steps:
    - uses: actions/checkout@v3

    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull Fedora image
      run: docker pull fedora:40

    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Build RPM in Fedora container
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           fedora:40 \
           bash -c " 
             git config --global --add safe.directory /workspace
             dnf install -y rpm-build make gcc-c++ git python3-devel cmake gmp-devel libuuid-devel sqlite-devel openssl-devel gtkmm30-devel boost-devel python3-matplotlib python3-pip 
             pip3 install sympy 
             mkdir build 
             cd build 
             cmake -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr .. 
             make 
             cpack 
           "

    - name: Set version variables from output of cmake
      run: |
        VER=$(cat ${{ github.workspace }}/build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV

    - name: Upload Release Assets
      run: |
        gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-fedora40-${{ matrix.name }}.rpm --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  test:
    needs: build
    runs-on: ubuntu-24.04
    
    steps:
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull Fedora image
      run: docker pull fedora:40

    - name: Download package and run inside Fedora container
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           fedora:40 \
           bash -c " 
             dnf install -y xorg-x11-server-Xvfb wget curl jq
             export VERSION=\$(curl -s https://api.github.com/repos/kpeeters/cadabra2/releases|& jq .[0].tag_name -r)
             export RPMNAME=cadabra2-\${VERSION}-fedora40-x86_64.rpm
             wget https://github.com/kpeeters/cadabra2/releases/download/\${VERSION}/\${RPMNAME}
             dnf install -y \${RPMNAME}
             printf 'import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n' > tst.cdb
             cadabra2 tst.cdb
             
             xvfb-run -a cadabra2-gtk &
             APP_PID=\$!
             sleep 10
             if kill -0 \$APP_PID 2>/dev/null; then
                echo 'cadabra2-gtk started successfully'
                kill \$APP_PID
                exit 0
             else
                echo 'cadabra2-gtk failed to start'
                exit 1
             fi
           "


================================================
FILE: .github/workflows/fedora-41-package.yml
================================================
# Create a Fedora 41 package on a github release event.
# This assumes that the cadabra version is the same as the
# release name, and it will attempt to add the .rpm file
# to the release assets.

name: Fedora-41 package

# on: [push]

on:
  release:
    types: [created]

jobs:
  build:

    strategy:
      matrix:
        include:
          - os: ubuntu-24.04
            name: x86_64
            display-name: "Fedora 41 x86_64"
          - os: ubuntu-24.04-arm
            name: arm64
            display-name: "Fedora 41 arm64"
    runs-on: ${{ matrix.os }}
    
    steps:
    - uses: actions/checkout@v3

    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull Fedora image
      run: docker pull fedora:41

    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Build RPM in Fedora container
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           fedora:41 \
           bash -c " 
             git config --global --add safe.directory /workspace
             dnf install -y rpm-build make gcc-c++ git python3-devel cmake gmp-devel libuuid-devel sqlite-devel openssl-devel gtkmm30-devel boost-devel python3-matplotlib python3-pip 
             pip3 install sympy 
             mkdir build 
             cd build 
             cmake -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr .. 
             make 
             cpack 
           "

    - name: Set version variables from output of cmake
      run: |
        VER=$(cat ${{ github.workspace }}/build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV

    - name: Upload Release Assets
      run: |
        gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-fedora41-${{ matrix.name }}.rpm --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  test:
    needs: build
    runs-on: ubuntu-24.04
    
    steps:
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull Fedora image
      run: docker pull fedora:41

    - name: Download package and run inside Fedora container
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           fedora:41 \
           bash -c " 
             dnf install -y xorg-x11-server-Xvfb wget curl jq
             export VERSION=\$(curl -s https://api.github.com/repos/kpeeters/cadabra2/releases|& jq .[0].tag_name -r)
             export RPMNAME=cadabra2-\${VERSION}-fedora41-x86_64.rpm
             wget https://github.com/kpeeters/cadabra2/releases/download/\${VERSION}/\${RPMNAME}
             dnf install -y \${RPMNAME}
             printf 'import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n' > tst.cdb
             cadabra2 tst.cdb
             
             xvfb-run -a cadabra2-gtk &
             APP_PID=\$!
             sleep 10
             if kill -0 \$APP_PID 2>/dev/null; then
                echo 'cadabra2-gtk started successfully'
                kill \$APP_PID
                exit 0
             else
                echo 'cadabra2-gtk failed to start'
                exit 1
             fi
           "


================================================
FILE: .github/workflows/fedora-42-package.yml
================================================
# Create a Fedora 41 package on a github release event.
# This assumes that the cadabra version is the same as the
# release name, and it will attempt to add the .rpm file
# to the release assets.

name: Fedora-42 package

# on: [push]

on:
  release:
    types: [created]

jobs:
  build:

    strategy:
      matrix:
        include:
          - os: ubuntu-24.04
            name: x86_64
            display-name: "Fedora 42 x86_64"
          - os: ubuntu-24.04-arm
            name: arm64
            display-name: "Fedora 42 arm64"
    runs-on: ${{ matrix.os }}
    
    steps:
    - uses: actions/checkout@v3

    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull Fedora image
      run: docker pull fedora:42

    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Build RPM in Fedora container
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           fedora:42 \
           bash -c " 
             git config --global --add safe.directory /workspace
             dnf install -y rpm-build make gcc-c++ git python3-devel cmake gmp-devel libuuid-devel sqlite-devel openssl-devel gtkmm30-devel boost-devel python3-matplotlib python3-pip 
             pip3 install sympy 
             mkdir build 
             cd build 
             cmake -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr .. 
             make 
             cpack 
           "

    - name: Set version variables from output of cmake
      run: |
        VER=$(cat ${{ github.workspace }}/build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV

    - name: Upload Release Assets
      if:   github.event_name == 'release'
      run: |
        gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-fedora42-${{ matrix.name }}.rpm --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    - name: Store package as build artifact
      uses: actions/upload-artifact@v4
      if:   github.event_name == 'push'
      with:
        name: cadabra2-fedora42-${{ matrix.name }}.rpm
        path: build/cadabra2-${{ env.VERSION }}-fedora42-${{ matrix.name }}.rpm

  test:
    needs: build
    runs-on: ubuntu-latest
    if:   github.event_name == 'release' # only test release builds
    
    steps:
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull Fedora image
      run: docker pull fedora:42

    - name: Download package and run inside Fedora container
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           fedora:42 \
           bash -c " 
             dnf install -y xorg-x11-server-Xvfb wget curl jq
             export VERSION=\$(curl -s https://api.github.com/repos/kpeeters/cadabra2/releases|& jq .[0].tag_name -r)
             export RPMNAME=cadabra2-\${VERSION}-fedora42-x86_64.rpm
             wget https://github.com/kpeeters/cadabra2/releases/download/\${VERSION}/\${RPMNAME}
             dnf install -y \${RPMNAME}
             printf 'import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n' > tst.cdb
             cadabra2 tst.cdb
             
             xvfb-run -a cadabra2-gtk &
             APP_PID=\$!
             sleep 10
             if kill -0 \$APP_PID 2>/dev/null; then
                echo 'cadabra2-gtk started successfully'
                kill \$APP_PID
                exit 0
             else
                echo 'cadabra2-gtk failed to start'
                exit 1
             fi
           "


================================================
FILE: .github/workflows/freebsd.yml
================================================
# This is a build which gets triggered on every commit push, to
# ensure that we get some warnings when we push code that does
# not build on Linux.

name: FreeBSD

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v4

    - name: Build and test in FreeBSD
      id: test
      uses: vmactions/freebsd-vm@v1
      with:
        usesh: true
        prepare: |
          pkg install -y curl cmake python311 gettext-runtime pkgconf boost-libs
          pkg install -y fontconfig harfbuzz pcre jsoncpp gmp atkmm cairomm glibmm gtkmm30 pangomm
          pkg install -y git py311-sympy py311-numpy

        run: |
          pwd
          env
          freebsd-version
          sysctl hw.model
          sysctl hw.ncpu
          sysctl hw.physmem
          sysctl hw.usermem
          mkdir build && cd build && cmake -DENABLE_MATHEMATICA=OFF ..
          make
          make install
          make check


================================================
FILE: .github/workflows/homebrew-devel.yml
================================================
# This is a build which gets triggered on every push to the
# 'devel' branch, to update the homebrew-repo the cadabra2-devel
# package.

name: Homebrew-devel

on:
  push:
    branches:
      - devel
      
jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - name: Checkout Cadabra
      uses: actions/checkout@v4
      with:
        ref: 'devel'
      
    - name: Checkout Homebrew repo
      uses: actions/checkout@v4
      with:
        repository: kpeeters/homebrew-repo
        path: homebrew-repo
        token:  ${{ secrets.ACTIONS_HOMEBREW_REPO_TOKEN }}
    
    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Get dependencies
      run:  sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install git cmake jq python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev libgtkmm-3.0-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev libmpfr-dev libmpc-dev

    - name: Configure
      run:  mkdir build && cd build && cmake -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr ..

    - name: Set variables
      run: |
        export VERSION=$(cat build/VERSION)
        export COMMIT=$(curl -s https://api.github.com/repos/kpeeters/cadabra2/commits/devel | jq -r .sha)
        wget  https://github.com/kpeeters/cadabra2/archive/${COMMIT}.tar.gz
        export SHA=`cat ${COMMIT}.tar.gz | sha256sum -b | cut -d " " -f 1`
        echo "SHA=${SHA}" >> $GITHUB_ENV
        echo "VERSION=$VERSION" >> $GITHUB_ENV
        echo "COMMIT=$COMMIT" >> $GITHUB_ENV
      
    - name: Update Homebrew repo
      run: |
        cd homebrew-repo
        cat cadabra2-devel.rb | sed -e 's/^  url .*/  url "https:\/\/github.com\/kpeeters\/cadabra2\/archive\/${{ env.COMMIT }}.tar.gz"/'  | sed -e 's/^  sha256.*/  sha256 "${{ env.SHA }}"/' | sed -e 's/^  version.*/  version "${{ env.VERSION }}.${{ env.COMMIT }}"/' > out.rb
        mv out.rb cadabra2-devel.rb
        cat cadabra2-devel.rb
        git config user.name "Kasper Peeters"
        git config user.email "info@cadabra.science"
        git add cadabra2-devel.rb
        git diff-index --quiet HEAD || (git commit -a -m "Update to release ${{ env.VERSION }} commit ${{ env.COMMIT }}." && git push)

        
  test:
    needs: build
    runs-on: macos-latest
    
    steps:
    - name: get dependencies
      run:  brew update && brew upgrade && brew tap kpeeters/repo && brew install --verbose cadabra2-devel

    - name: show where cadabra is located
      run:  cat `which cadabra2`
      
    - name: test simple cli run
      run:  printf "import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n" > tst.cdb && cadabra2 tst.cdb
    
    - name: test gtk app launch
      run: |
        cadabra2-gtk &
        APP_PID=$!
        sleep 10
        
        if kill -0 $APP_PID 2>/dev/null; then
          echo "cadabra2-gtk started successfully"
          kill $APP_PID
          exit 0
        else
          echo "cadabra2-gtk failed to start"
          exit 1
        fi

    - name: Upload build logs
      if: always()  
      uses: actions/upload-artifact@v4
      with:
        name: brew-build-logs
        path: |
          ~/Library/Logs/Homebrew/
        retention-days: 2

        


================================================
FILE: .github/workflows/homebrew.yml
================================================
# This is a build which gets triggered on every release, to
# update the homebrew-repo.

name: Homebrew

on:
  release:
    types: [released]

# on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - name: Checkout Cadabra
      uses: actions/checkout@v4

    - name: Checkout Homebrew repo
      uses: actions/checkout@v4
      with:
        repository: kpeeters/homebrew-repo
        path: homebrew-repo
        token:  ${{ secrets.ACTIONS_HOMEBREW_REPO_TOKEN }}
    
    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Get dependencies
      run:  sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install git cmake jq python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev libgtkmm-3.0-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev libmpfr-dev libmpc-dev

    - name: Configure
      run:  mkdir build && cd build && cmake -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr ..

    - name: Set variables
      run: |
        export VERSION=$(cat build/VERSION)
        echo "VERSION=$VERSION" >> $GITHUB_ENV
        wget https://github.com/kpeeters/cadabra2/archive/refs/tags/${VERSION}.tar.gz
        export SHA=`cat ${VERSION}.tar.gz | sha256sum -b | cut -d " " -f 1`
        echo "SHA=${SHA}" >> $GITHUB_ENV
      
    - name: Update Homebrew repo
      run: |
        cd homebrew-repo
        cat cadabra2.rb | sed -e 's/^  url .*/  url "https:\/\/github.com\/kpeeters\/cadabra2\/archive\/refs\/tags\/${{ env.VERSION }}.tar.gz"/'  | sed -e 's/^  sha256.*/  sha256 "${{ env.SHA }}"/' | sed -e 's/^  version.*/  version "${{ env.VERSION }}"/' > out.rb
        mv out.rb cadabra2.rb
        cat cadabra2.rb
        git config user.name "Kasper Peeters"
        git config user.email "info@cadabra.science"
        git add cadabra2.rb
        git diff-index --quiet HEAD || (git commit -a -m "Update to release ${{ env.VERSION }}." && git push)


  test:
    needs: build
    runs-on: macos-latest
    
    steps:
    - name: get dependencies
      run:  brew update && brew upgrade && brew tap kpeeters/repo && brew install cadabra2

    - name: show where cadabra is located
      run:  cat `which cadabra2`
      
    - name: test simple cli run
      run:  printf "ex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n" > tst.cdb && cadabra2 tst.cdb

    - name: test gtk app launch
      run: |
        cadabra2-gtk &
        APP_PID=$!
        sleep 10
        
        if kill -0 $APP_PID 2>/dev/null; then
          echo "Application started successfully"
          kill $APP_PID
          exit 0
        else
          echo "Application failed to start"
          exit 1
        fi



================================================
FILE: .github/workflows/linux.yml
================================================
# This is a build which gets triggered on every commit push, to
# ensure that we get some warnings when we push code that does
# not build on Linux.

name: Linux

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - uses: actions/checkout@v3

#     - name: Exit if not on devel branch
#       if: github.ref != 'refs/heads/devel'
#       run: exit 1
      
#    - name: setup python
#      uses: actions/setup-python@v4
#      with:
#          python-version: 3.11

    - name: get dependencies
      run:  sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install ninja-build git cmake python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev libgtkmm-3.0-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev libmpfr-dev libmpc-dev libtbb-dev catch2 && python3 --version && which python3 && python3 -m pip install --upgrade pip && python3 -m pip install wheel && python3 -m pip install sympy gmpy2 numpy

    - name: configure
      run:  mkdir build && cd build && cmake -G Ninja -DENABLE_MATHEMATICA=OFF ..
      
    - name: build
      run:  cd build && cmake --build .
      
    - name: test
      env:
        CTEST_OUTPUT_ON_FAILURE: 1
      run:  cd build && ctest ARGS="-V"


================================================
FILE: .github/workflows/macos.yml
================================================
# This is a build which gets triggered on every commit push, to
# ensure that we get some warnings when we push code that does
# not build on macOS.

name: macOS

on: [push]

jobs:
  build:

    runs-on: macos-latest
    
    steps:
    - uses: actions/checkout@v4

#     - name: Exit if not on devel branch
#       if: github.ref != 'refs/heads/devel'
#       run: exit 1
      
#    - name: remove python 3.12
#      run:  brew uninstall python@3.12
          
    - name: get dependencies
      run:  brew install cmake ninja boost pcre gmp python@3.13 pkgconfig gtkmm3 adwaita-icon-theme catch2 tbb && python3 -m pip install --break-system-packages --user sympy gmpy2 numpy

    - name: configure
      run:  mkdir build && cd build && cmake -G Ninja -DENABLE_MATHEMATICA=OFF -DPython_EXECUTABLE=python3.12 ..
      
    - name: build
      run:  cd build && cmake --build .
      
    - name: test
      env:
        CTEST_OUTPUT_ON_FAILURE: 1
      run:  cd build && ctest ARGS="-V"


================================================
FILE: .github/workflows/opensuse-tumbleweed-package.yml
================================================
# Create a OpenSUSE Tumbleweed package on a github release event.
# This assumes that the cadabra version is the same as the
# release name, and it will attempt to add the .rpm file
# to the release assets.

name: OpenSUSE-Tumbleweed package

# on: [push]

on:
  release:
    types: [created]


jobs:
  build:

    runs-on: ubuntu-24.04
    
    steps:
    - uses: actions/checkout@v3

#    - name: Exit if not on devel branch
#      if: github.ref != 'refs/heads/devel'
#      run: exit 1
      
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull OpenSUSE image
      run: docker pull opensuse/tumbleweed:latest

    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Build RPM
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           opensuse/tumbleweed:latest \
           bash -c "
             zypper refresh
             zypper update
             zypper -n install --no-recommends rpmbuild git cmake python313-devel gcc-c++ \
                  gmp-devel libuuid-devel  \
                  gtkmm3-devel sqlite3-devel \
                  python313-matplotlib libopenssl-devel \
                  libboost_system-devel libboost_filesystem-devel \
                  libboost_date_time-devel libboost_program_options-devel             
             git config --global --add safe.directory /workspace
             mkdir build 
             cd build 
             cmake -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr .. 
             make 
             cpack 
           "

    - name: Set version variables from output of cmake
      run: |
        VER=$(cat ${{ github.workspace }}/build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV

    - name: Upload Release Assets
      run: |
        gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-tumbleweed.rpm --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  test:
    needs: build
    runs-on: ubuntu-24.04
    
    steps:
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@master

    - name: Pull OpenSUSE image
      run: docker pull opensuse/tumbleweed:latest

    - name: Download package and run inside OpenSUSE container
      run: |
        docker run --rm \
           -v ${{ github.workspace }}:/workspace \
           -w /workspace \
           opensuse/tumbleweed:latest \
           bash -c "
             zypper clean --all
             zypper refresh
             zypper update
             zypper se -s libboost_filesystem
             zypper -n install xvfb-run wget curl jq
             export VERSION=\$(curl -s https://api.github.com/repos/kpeeters/cadabra2/releases|& jq .[0].tag_name -r)
             export RPMNAME=cadabra2-\${VERSION}-tumbleweed.rpm
             wget https://github.com/kpeeters/cadabra2/releases/download/\${VERSION}/\${RPMNAME}
             zypper --no-gpg-checks -n install \${RPMNAME}
             printf 'import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n' > tst.cdb
             cadabra2 tst.cdb
             
             xvfb-run -a cadabra2-gtk &
             APP_PID=\$!
             sleep 10
             if kill -0 \$APP_PID 2>/dev/null; then
                echo 'cadabra2-gtk started successfully'
                kill \$APP_PID
                exit 0
             else
                echo 'cadabra2-gtk failed to start'
                exit 1
             fi
           "


================================================
FILE: .github/workflows/tarball.yml
================================================
# This is a build which gets triggered on every release, to
# generate a tarball which includes all submodules.

name: Tarball

on:
  release:
    types: [released]

# on: [push]

jobs:
  build:

    runs-on: ubuntu-latest
    
    steps:
    - name: Checkout Cadabra
      uses: actions/checkout@v4

    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Create tarball
      run: |
        export CDB_MAJOR=`cat cmake/version.cmake |grep 'MAJOR '|sed -e 's/[^ ]* \([0-9]*\).*/\1/'`
        export CDB_MINOR=`cat cmake/version.cmake |grep 'MINOR '|sed -e 's/[^ ]* \([0-9]*\).*/\1/'`
        export CDB_PATCH=`cat cmake/version.cmake |grep 'PATCH '|sed -e 's/[^ ]* \([0-9]*\).*/\1/'`
        export VERSION=${CDB_MAJOR}.${CDB_MINOR}.${CDB_PATCH}
        echo "VERSION=$VERSION" >> $GITHUB_ENV
        mkdir -p submodules
        cd submodules
        git clone -b kpeeters/cadabra https://github.com/kpeeters/MicroTeX.git microtex
        cd ../..
        mv cadabra2 cadabra2-${VERSION}
        tar zcf cadabra2-${VERSION}-source-inclusive.tar.gz --exclude ".git" cadabra2-${VERSION}
        mv cadabra2-${VERSION} cadabra2 
      
    - name: Upload tarball to assets
      run: |
        gh release upload "${{ env.VERSION }}" ${{ github.workspace }}/../cadabra2-${VERSION}-source-inclusive.tar.gz --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      


================================================
FILE: .github/workflows/ubuntu-22.04-package.yml
================================================
# Create an Ubuntu 22.04 package on a github release event.
# This assumes that the cadabra version is the same as the
# release name, and it will attempt to add the .deb file
# to the release assets.

name: Ubuntu-22.04 package

# on: [push]

on:
 release:
   types: [created]

jobs:
  build:

    strategy:
      matrix:
        include:
          - os: ubuntu-22.04
            name: x86_64
            display-name: "Ubuntu 22.04 x86_64"
          - os: ubuntu-22.04-arm
            name: arm64
            display-name: "Ubuntu 22.04 arm64"
    runs-on: ${{ matrix.os }}
    
    steps:
    - uses: actions/checkout@v3

#    - name: Exit if not on devel branch
#      if: github.ref != 'refs/heads/devel'
#      run: exit 1
      
    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Get dependencies
      run:  sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install git cmake ninja-build python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev libgtkmm-3.0-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev libmpfr-dev libmpc-dev libtbb-dev catch2 && python3 --version && which python3 && python3 -m pip install --upgrade pip && python3 -m pip install wheel && python3 -m pip install sympy gmpy2 numpy

    - name: Configure
      run:  mkdir build && cd build && cmake -G Ninja -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
      
    - name: Build
      run:  cd build && cmake --build .
      
    - name: Create the .deb package
      run:  cd build && cpack
      
    - name: Set version variables from output of cmake
      run: |
        VER=$(cat build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV

    - name: Upload Release Assets
      run: |
        gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-ubuntu-22.04-jammy-${{ matrix.name }}.deb --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


  test:
    needs: build
    runs-on: ubuntu-22.04

    steps:
    - name: Get and install package
      run: |
        sudo apt install xvfb
        export VERSION=$(curl -s https://api.github.com/repos/kpeeters/cadabra2/releases|& jq .[0].tag_name -r)
        export DEBNAME=cadabra2-${VERSION}-ubuntu-22.04-jammy-x86_64.deb
        wget https://github.com/kpeeters/cadabra2/releases/download/${VERSION}/${DEBNAME}
        sudo apt -y update
        sudo apt -y upgrade
        sudo apt -y install ./${DEBNAME}

    - name: Test simple cli run
      run:  printf "import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n" > tst.cdb && cadabra2 tst.cdb

    - name: Test gtk app launch
      run: |
        xvfb-run -a cadabra2-gtk &
        APP_PID=$!
        sleep 10
        
        if kill -0 $APP_PID 2>/dev/null; then
          echo "Application started successfully"
          kill $APP_PID
          exit 0
        else
          echo "Application failed to start"
          exit 1
        fi


================================================
FILE: .github/workflows/ubuntu-24.04-package.yml
================================================
# Create an Ubuntu 24.04 package on a github release event.
# This assumes that the cadabra version is the same as the
# release name, and it will attempt to add the .deb file
# to the release assets.

name: Ubuntu-24.04 package

# on: [push]

on:
  release:
    types: [created]

jobs:
  build:

    strategy:
      matrix:
        include:
          - os: ubuntu-24.04
            name: x86_64
            display-name: "Ubuntu 24.04 x86_64"
          - os: ubuntu-24.04-arm
            name: arm64
            display-name: "Ubuntu 24.04 arm64"
    runs-on: ${{ matrix.os }}
    
    steps:
    - uses: actions/checkout@v3

#    - name: Exit if not on devel branch
#      if: github.ref != 'refs/heads/devel'
#      run: exit 1
      
    - name: Set up GitHub CLI
      run: |
        sudo apt-get update
        sudo apt-get install -y gh

    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - name: Get dependencies
      run:  sudo apt-get update && sudo DEBIAN_FRONTEND=noninteractive apt-get install git cmake ninja-build python3-dev g++ libpcre3 libpcre3-dev libgmp3-dev libgtkmm-3.0-dev libboost-all-dev libgmp-dev libsqlite3-dev uuid-dev libmpfr-dev libmpc-dev libtbb-dev catch2 && python3 --version && which python3 && python3 -m pip install --upgrade pip && python3 -m pip install wheel && python3 -m pip install sympy gmpy2 numpy

    - name: configure
      run:  mkdir build && cd build && cmake -G Ninja -DPACKAGING_MODE=ON -DENABLE_MATHEMATICA=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
      
    - name: Make
      run:  cd build && cmake --build .
      
    - name: Create the .deb package
      run:  cd build && cpack
      
    - name: Set version variables from output of cmake
      run: |
        VER=$(cat build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV

    - name: Upload Release Assets
      if:   github.event_name == 'release'
      run: |
        gh release upload "${{ env.VERSION }}" build/cadabra2-${{ env.VERSION }}-ubuntu-24.04-noble-${{ matrix.name }}.deb --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    - name: Store package as build artifact
      uses: actions/upload-artifact@v4
      if:   github.event_name == 'push'
      with:
        name: cadabra2-ubuntu-24.04-noble-${{ matrix.name }}.deb
        path: build/cadabra2-${{ env.VERSION }}-ubuntu-24.04-noble.deb


  test:
    needs: build
    runs-on: ubuntu-24.04

    steps:
    - name: Install prerequisites for testing
      run: |
        sudo apt install xvfb imagemagick
        sudo apt-mark hold firefox
        
    - name: Get and install package (release mode)
      if:   github.event_name == 'release'
      run: |
        export VERSION=$(curl -s https://api.github.com/repos/kpeeters/cadabra2/releases|& jq .[0].tag_name -r)
        export DEBNAME=cadabra2-${VERSION}-ubuntu-24.04-noble-x86_64.deb
        wget https://github.com/kpeeters/cadabra2/releases/download/${VERSION}/${DEBNAME}
        sudo apt -y update
        sudo apt -y upgrade
        sudo apt -y install ./${DEBNAME}

    - name: Download package (push mode)
      uses: actions/download-artifact@v4
      if:   github.event_name == 'push'
      with:
        name: cadabra2-ubuntu-24.04-noble-x86_64.deb

    - name: Install package (push mode)
      if:   github.event_name == 'push'
      run: |
        ls -la
        sudo apt -y update
        sudo apt -y upgrade
        sudo apt -y install ./cadabra2*.deb

    - name: Test simple cli run
      run:  printf "import sys\nprint(sys.path)\nimport cdb.main\nex:=(A+B) (C+D);\ndistribute(ex);\nquit()\n" > tst.cdb && cadabra2 tst.cdb

    - name: Test gtk app launch and take screenshot
      run: |
        MESA_LOADER_DRIVER_OVERRIDE=llvmpipe LIBGL_ALWAYS_SOFTWARE=1 xvfb-run -a -s "-screen 0 1920x1080x24 -ac" cadabra2-gtk -n &
        APP_PID=$!
        sleep 10
        
        if kill -0 $APP_PID 2>/dev/null; then
          echo "Application started successfully"
          DISPLAY=:99 import -window root screenshot.png
          kill $APP_PID
          exit 0
        else
          echo "Application failed to start"
          exit 1
        fi

    - name: Upload screenshot
      uses: actions/upload-artifact@v4
      with:
        name: app-screenshot-ubuntu-24.04
        path: screenshot.png


================================================
FILE: .github/workflows/windows-installer.yml
================================================
# Create Windows installer on a github release event.  This assumes
# that the cadabra version is the same as the release name, and it
# will attempt to add the installer file to the release assets.

name: Windows 11 installer

# on: [push]

on:
  release:
    types: [created]

defaults:
    run:
      shell: msys2 {0}

jobs:
  msys2-ucrt64:
    strategy:
      matrix:
        include:
          - os: windows-2022
            name: x86_64
            display-name: "Windows 11 x86_64"
            msystem: ucrt64
            midfix: ucrt-x86_64
          - os: windows-11-arm
            name: arm64
            msystem: clangarm64
            midfix: clang-aarch64
            display-name: "Windows 11 arm64"
    runs-on: ${{ matrix.os }}
    name: Windows 11
    defaults:
      run:
        shell: msys2 {0}

    steps:
    - name: Install WiX v4/v5 Tool
      run: |
        dotnet tool install --tool-path c:\WiX\bin wix --version 5.0.2
        c:\WiX\bin\wix extension add --global WixToolset.UI.wixext/5.0.2
      shell: pwsh

    - name: Add WiX toolkit to PATH
      shell: bash
      run: |
        echo "WiX installed at ${WIX}, hopefully..."
        echo "Listing C:/WiX/bin"
        ls "C:/WiX/bin"
        echo "Listing Program Files (x86):"
        ls "C:/Program Files (x86)/"
        echo "Listing Program Files:"        
        ls "C:/Program Files/"
        echo "${WIX}bin" >> $GITHUB_PATH

    - uses: msys2/setup-msys2@v2
      with:
        msystem: ${{ matrix.msystem }}
        update: true
        install: >-
          curl
          git
          mingw-w64-${{ matrix.midfix }}-gcc
          mingw-w64-${{ matrix.midfix }}-python
          mingw-w64-${{ matrix.midfix }}-gtkmm3
          mingw-w64-${{ matrix.midfix }}-boost    
          mingw-w64-${{ matrix.midfix }}-sqlite3
          mingw-w64-${{ matrix.midfix }}-cmake
          mingw-w64-${{ matrix.midfix }}-python-matplotlib
          mingw-w64-${{ matrix.midfix }}-python-sympy
          mingw-w64-${{ matrix.midfix }}-github-cli
          
    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - uses: actions/checkout@master
      name: Checkout source
      
    - name: Build
      run: |
        mkdir build
        cd build
        # Turn off searching Python in the registry, as that contains the
        # windows Python which is not the MSYS python that we want to use.
        cmake -DPython_FIND_REGISTRY=NEVER ..
        ninja
        ninja install
        cpack

    - name: Upload WiX log file
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: wix-${{ matrix.name }}.log
        path: build/_CPack_Packages/win64/WIX/wix.log
        retention-days: 2

    - name: Set version variables from output of cmake
      run: |
        VER=$(cat build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV
        GITVER=$(cat build/GIT_TAG_VERSION)
        echo "GIT_TAG_VERSION=$GITVER" >> $GITHUB_ENV

    - name: Upload release assets
      run: |
        gh release upload "${{ env.GIT_TAG_VERSION }}" build/cadabra2-${{ env.VERSION }}-win64.msi --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}



================================================
FILE: .github/workflows/windows.yml
================================================
# Create Windows installer on a github push or release event
# (upload to the release assets in the latter case).

name: Windows 11

on: [push]

#on:
#  release:
#    types: [created]

defaults:
    run:
      shell: msys2 {0}

jobs:
  msys2-ucrt64:
    strategy:
      matrix:
        include:
          - os: windows-2022
            name: x86_64
            display-name: "Windows 11 x86_64"
            msystem: ucrt64
            midfix: ucrt-x86_64
          - os: windows-11-arm
            name: arm64
            msystem: clangarm64
            midfix: clang-aarch64
            display-name: "Windows 11 arm64"
    runs-on: ${{ matrix.os }}
    name: Windows build
    defaults:
      run:
        shell: msys2 {0}

    steps:
    - name: Install WiX v4/v5 Tool
      run: |
        dotnet tool install --tool-path c:\WiX\bin wix --version 5.0.2
        c:\WiX\bin\wix extension add --global WixToolset.UI.wixext/5.0.2
      shell: pwsh

    - name: Add WiX toolkit to PATH
      shell: bash
      run: |
        echo "WiX installed at ${WIX}, hopefully..."
        echo "Listing C:/WiX/bin"
        ls "C:/WiX/bin"
        echo "Listing Program Files (x86):"
        ls "C:/Program Files (x86)/"
        echo "Listing Program Files:"        
        ls "C:/Program Files/"
        echo "${WIX}bin" >> $GITHUB_PATH

    - uses: msys2/setup-msys2@v2
      with:
        msystem: ${{ matrix.msystem }}
        update: true
        install: >-
          curl
          git
          mingw-w64-${{ matrix.midfix }}-gcc
          mingw-w64-${{ matrix.midfix }}-python
          mingw-w64-${{ matrix.midfix }}-gtkmm3
          mingw-w64-${{ matrix.midfix }}-boost    
          mingw-w64-${{ matrix.midfix }}-sqlite3
          mingw-w64-${{ matrix.midfix }}-cmake
          mingw-w64-${{ matrix.midfix }}-python-matplotlib
          mingw-w64-${{ matrix.midfix }}-python-sympy
          mingw-w64-${{ matrix.midfix }}-github-cli
          
    - name: Authenticate GitHub CLI
      run: gh auth setup-git
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          
    - uses: actions/checkout@master
      name: Checkout source
      
    - name: Build
      run: |
        mkdir build
        cd build
        # Turn off searching Python in the registry, as that contains the
        # windows Python which is not the MSYS python that we want to use.
        cmake -DPython_FIND_REGISTRY=NEVER ..
        ninja
        ninja install
        cpack

    - name: Upload cmake_install.cmake file
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: cmake_install-${{ matrix.name }}.cmake
        path: build/cmake_install.cmake
        retention-days: 2

    - name: Upload frontend/cmake_install.cmake file
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: frontend-cmake_install-${{ matrix.name }}.cmake
        path: build/frontend/cmake_install.cmake
        retention-days: 2
        
    - name: Upload frontend/gtkmm/cmake_install.cmake file
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: frontend-gtkmm-cmake_install-${{ matrix.name }}.cmake
        path: build/frontend/gtkmm/cmake_install.cmake
        retention-days: 2
        
    - name: Upload WiX log file
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: wix-${{ matrix.name }}.log
        path: build/_CPack_Packages/win64/WIX/wix.log
        retention-days: 2

    - name: Set version variables from output of cmake
      run: |
        VER=$(cat build/VERSION)
        echo "VERSION=$VER" >> $GITHUB_ENV
        GITVER=$(cat build/GIT_TAG_VERSION)
        echo "GIT_TAG_VERSION=$GITVER" >> $GITHUB_ENV

    - name: Upload installer as build artifact
      uses: actions/upload-artifact@v4
      with:
        name: cadabra2-windows-${{ matrix.name }}.msi
        path: build/cadabra2-${{ env.VERSION }}-win64.msi
        retention-days: 2

    - name: Upload release assets
      if:   github.event_name == 'release'
      run: |
        mv build/cadabra2-${{ env.VERSION }}-win64.msi build/cadabra2-${{ env.GIT_TAG_VERSION }}-windows-${{ matrix.name }}.msi
        gh release upload "${{ env.GIT_TAG_VERSION }}" build/cadabra2-${{ env.GIT_TAG_VERSION }}-windows-${{ matrix.name }}.msi --clobber
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  test:
    needs: msys2-ucrt64
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: windows-2022
            name: x86_64
            display-name: "Windows 11 x86_64"
          - os: windows-11-arm
            name: arm64
            display-name: "Windows 11 arm64"
    runs-on: ${{ matrix.os }}
    
    steps:
    - name: Download installer
      uses: actions/download-artifact@v4
      with:
        name: cadabra2-windows-${{ matrix.name }}.msi

    - name: Install silently
      shell: pwsh
      run: |
        dir
        $installer = Get-ChildItem -Filter "cadabra*.msi" | Select-Object -First 1 -ExpandProperty Name
        if (-not $installer) {
            Write-Error "No installer found"
            exit 1
        }
        $installerPath = (Get-Item -Path ".\$installer").FullName        
        Write-Host "Installing $installerPath"
        Start-Process -FilePath "msiexec" -ArgumentList "/i", "$installerPath", "/qn", "/l*v", "install.log" -Wait
        Write-Host "Installer finished"

    - name: Upload installation log
      uses: actions/upload-artifact@v4
      with:
        name: install-${{ matrix.os }}.log
        path: install.log

    - name: Check installation location
      shell: cmd
      run: |
        echo "Main folder:"
        dir "C:\Program Files\Cadabra" 
        
    - name: Start GUI and take screenshot
      shell: pwsh
      run: |
        # Attempt to start the notebook
        if (-not (Test-Path "C:\Program Files\Cadabra\cadabra2-gtk.exe")) {
        Write-Host "Executable not found"
        exit 1
        }
        $process = Start-Process "C:\Program Files\Cadabra\cadabra2-gtk.exe" -ArgumentList "-n", "Examples\schwarzschild.cnb" -WorkingDirectory "C:\Program Files\Cadabra" -PassThru
        Start-Sleep -Seconds 120

        # Take screenshot
        Add-Type -AssemblyName System.Windows.Forms
        Add-Type -AssemblyName System.Drawing
        
        $screen = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds
        $bitmap = New-Object System.Drawing.Bitmap($screen.Width, $screen.Height)
        $graphics = [System.Drawing.Graphics]::FromImage($bitmap)
        $graphics.CopyFromScreen($screen.Location, [System.Drawing.Point]::Empty, $screen.Size)
        $bitmap.Save("screenshot.png")
        $graphics.Dispose()
        $bitmap.Dispose()

        # Cleanup
        Stop-Process -Id $process.Id -Force
      
    - name: Upload cadabra_log.txt
      if: always()
      uses: actions/upload-artifact@v4
      with:
        name: cadabra_log-${{ matrix.os }}.txt
        path: C:\Windows\Temp\cadabra_log.txt

    - name: Upload screenshot
      uses: actions/upload-artifact@v4
      with:
        name: app-screenshot-${{ matrix.os }}
        path: screenshot.png
        


================================================
FILE: .gitignore
================================================
.cache
web2/cadabra2/source/book
*.orig
*.bak
doxygen
.DS_Store
*~
*.o
build
build-lib
jbuild
install
.ipynb_checkpoints
__pycache__
.vscode
.vs
CMakeSettings.json
config/pre_install.rtf
.ccls-cache
*appdata.xml
config/install_script.iss
config/science.cadabra.cadabra2-gtk.desktop


================================================
FILE: .gitmodules
================================================
[submodule "submodules/microtex"]
	path = submodules/microtex
	url = https://github.com/kpeeters/MicroTeX
	branch = kpeeters/cadabra


================================================
FILE: .travis.yml
================================================
branches:
  only:
  - master
  - feature/pybind
  
os:
   - linux
     addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-6
     env:
        - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"	
   - osx

compiler:
   - gcc

language: cpp

sudo: required

dist: trusty

env:
  global:
    - CTEST_EXT_COLOR_OUTPUT=TRUE
    - CTEST_BUILD_FLAGS=-j4

matrix:
   exclude:
     - os: osx
       compiler: gcc
script:
   - cmake --build .
   - ctest -VV .

before_script:
   - mkdir build
   - cd build
   - cmake ..

before_install:
   - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then openssl aes-256-cbc -K $encrypted_0c0fd3a7dbd0_key -iv $encrypted_0c0fd3a7dbd0_iv -in config/travisci_rsa.enc -out config/travisci_rsa -d; fi
   - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then chmod 0600 config/travisci_rsa; cp config/travisci_rsa ~/.ssh/id_rsa; fi
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update; fi
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y cmake python3-dev
     g++ libpcre3 libpcre3-dev libgmp3-dev uuid-dev python3-pip; fi
   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y libgtkmm-3.0-dev
     libjsoncpp-dev libboost-regex-dev libboost-system-dev libboost-program-options-dev libboost-date-time-dev libboost-filesystem-dev libgmp-dev libsqlite3-dev; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew unlink json-c; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated cmake || brew upgrade cmake; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated boost || travis_wait brew upgrade boost; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated gmp || brew upgrade gmp; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated pkgconfig || brew upgrade pkgconfig; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install jsoncpp python3 gtkmm3 gnome-icon-theme; fi
   - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo pip3 install matplotlib sympy; fi
   - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "`${CC} --version |grep gcc`" != "" ]]; then sudo apt-get install --yes doxygen graphviz texlive-font-utils; ./config/publish-doxygen; fi; fi; fi

install:
   - pip3 install --user sympy


notifications:
  email:
    recipients:
      - kasper.peeters@phi-sci.com
    on_success: always
    on_failure: always


================================================
FILE: CITATION.cff
================================================
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Peeters"
  given-names: "Kasper"
  orcid: "https://orcid.org/0000-0002-3077-8193"
title: "My Research Software"
version: 2.0.4
doi: 10.5281/zenodo.2500762
date-released: 2017-12-18
url: "https://github.com/kpeeters/cadabra2"
preferred-citation:
  type: article
  authors:
  - family-names: "Peeters"
    given-names: "Kasper"
    orcid: "https://orcid.org/0000-0002-3077-8193"
  doi: doi.org/10.21105/joss.01118
  journal: "The Journal of Open Source Software"
  start: 1118 # First page number
  end: 1119 # Last page number
  title: "Cadabra2: computer algebra for field theory revisited"
  issue: 3
  volume: 32
  year: 2018

================================================
FILE: CMakeLists.txt
================================================
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
if(WIN32)
  # We want to use WiX 4.x but cpack only supports that from 3.30.
  set(CADABRA_CMAKE_VERSION 3.30)
else()
  set(CADABRA_CMAKE_VERSION 3.12)
endif()

# Policy settings for CMake to resolve ambiguities.

if(POLICY CMP0042)
  cmake_policy(SET CMP0042 NEW)
  message(STATUS "Set CMake policy CMP0042 to NEW")
endif()
if(POLICY CMP0054)
  cmake_policy(SET CMP0054 NEW)
  message(STATUS "Set CMake policy CMP0054 to NEW")
endif()
if(POLICY CMP0127)
  cmake_policy(SET CMP0127 NEW)
  message(STATUS "Set CMake policy CMP0127 to NEW")
endif()
if(POLICY CMP0148)
  cmake_policy(SET CMP0148 NEW)
  message(STATUS "Set CMake policy CMP0148 to NEW")
endif()
if(POLICY CMP0167)
  cmake_policy(SET CMP0167 NEW)
  message(STATUS "Set CMake policy CMP0167 to NEW")
endif()
if(POLICY CMP0094)
  cmake_policy(SET CMP0094 NEW)
  message(STATUS "Set CMake policy CMP0094 to NEW (use first Python found)")
endif()
if(POLICY CMP0169)
  cmake_policy(SET CMP0169 NEW)
  message(STATUS "Set CMake policy CMP0169 to NEW (use new FetchContent)")
  # CMake 3.30: call FetchContent_Populate() with just the name of a
  # dependency. This modern alternative was introduced in cmake 3.14
  # but we still support 3.12; we call the old behaviour in
  # frontend/gtkmm/CMakeLists.txt
endif()
if(POLICY CMP0177)
  cmake_policy(SET CMP0177 NEW)
  message(STATUS "Set CMake policy CMP0177 to NEW (destination paths are normalised)")
endif()
if(POLICY CMP0087)
  cmake_policy(SET CMP0087 NEW)
  message(STATUS "Set CMake policy CMP0089 to NEW (evaluate generator expressions in install(CODE))")
endif()

cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

project(Cadabra)

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
    set(MACOS TRUE)
endif()

#---------------------------------------------------------------------------
# Preamble
#---------------------------------------------------------------------------

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Aliases for directories
set(CADABRA_ROOT_DIR ${CMAKE_SOURCE_DIR})
set(CADABRA_CLIENT_SERVER_DIR ${CADABRA_ROOT_DIR}/client_server)
set(CADABRA_CORE_DIR ${CADABRA_ROOT_DIR}/core)
set(CADABRA_FRONTEND_DIR ${CADABRA_ROOT_DIR}/frontend)
set(CADABRA_IMAGES_DIR ${CADABRA_ROOT_DIR}/images)
set(CADABRA_LIBS_DIR ${CADABRA_ROOT_DIR}/libs)

include(cmake/functions.cmake)

# Include Visual Studio specific build commands
if (MSVC)
  # https://developercommunity.visualstudio.com/content/problem/618088/cmake-msvc-toolset-version-is-incorrect-in-visual.html
  if ((MSVC_VERSION EQUAL 1921 OR MSVC_VERSION EQUAL 1922) AND MSVC_TOOLSET_VERSION EQUAL 141)
	 set(MSVC_TOOLSET_VERSION 142)
  endif()
  message(STATUS "MSVC_VERSION = ${MSVC_VERSION}, MSVC_TOOLSET_VERSION = ${MSVC_TOOLSET_VERSION}")
  include(cmake/windows.cmake)
endif()

# Make sure the build type is non-empty.
if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
  set(CMAKE_BUILD_TYPE "Release")
endif()
set(CADABRA_BUILD_TYPE "${CMAKE_BUILD_TYPE}")
if (CMAKE_BUILD_TYPE MATCHES "^Debug$")
  set(CADABRA_DEBUG_BUILD TRUE)
endif()
message(STATUS "Build type = ${CMAKE_BUILD_TYPE}")

# Set path to additional cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules")
if (APPLE)
   set(ENV{PKG_CONFIG_PATH} "/usr/local/opt/libffi/lib/pkgconfig:")
endif()

set(PKG_CONFIG_USE_STATIC_LIBS OFF)

if(NOT APPLE)
  find_package(TBB QUIET)  
  if(TBB_FOUND)
    message(STATUS "TBB found, will make some operations parallel")
  else()
    message(STATUS "TBB not found, parallel operations disabled")
  endif()
else()
  message(STATUS "Apple's toolchain not yet supporting TBB properly, disabled")
endif()

# Get version information.
include(cmake/version.cmake)
print_header("Building Cadabra version ${CADABRA_VERSION_SEM} (${SYSTEM_BITS}-bit)")
message(STATUS "Build id '${CADABRA_VERSION_BUILD}' dated ${CADABRA_VERSION_DATE}")
message(STATUS "Build mode is set to '${CMAKE_BUILD_TYPE}'")
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} STANDARD_ARCH_NAME)
if(STANDARD_ARCH_NAME STREQUAL "aarch64")
  set(STANDARD_ARCH_NAME "arm64")
endif()
if(STANDARD_ARCH_NAME STREQUAL "amd64")
  set(STANDARD_ARCH_NAME "x86_64")
endif()
message(STATUS "Architecture is '${CMAKE_SYSTEM_PROCESSOR}' (package names will use '${STANDARD_ARCH_NAME}')")
if(WIN32)
  if("${STANDARD_ARCH_NAME}" STREQUAL "x86_64")
    set(MSYS_ENV "ucrt64")
    set(WIX_SHORT_ARCH "x64")
  else()
    set(MSYS_ENV "clangarm64")
    set(WIX_SHORT_ARCH "arm64")
  endif()
  message(STATUS "MSYS environment set to ${MSYS_ENV}")
endif()

# Store the version number in a build/VERSION file (so that e.g. github
# actions can pick it up).
file(WRITE build/VERSION         "${CADABRA_VERSION_SEM}")
file(WRITE build/GIT_TAG_VERSION "${CADABRA_VERSION_GITHUB_TAG}")

# Notify about install directory
if ("${CMAKE_INSTALL_PREFIX}" STREQUAL "")
	message(STATUS "Install directory not set")
else()
	message(STATUS "Install directory set to ${CMAKE_INSTALL_PREFIX}")
endif()

# Turn Mathematica support on/off.
option(ENABLE_MATHEMATICA "Enable Mathematica support" OFF)

# Are we trying to build cadabra as a c++ library?
option(BUILD_AS_CPP_LIBRARY "Build cadabra as a C++ library" OFF)
if (BUILD_AS_CPP_LIBRARY)
  enable_testing()
  add_subdirectory(c++lib)
  configure_file(
	 "${PROJECT_SOURCE_DIR}/core/Config.hh.in"
	 "${PROJECT_SOURCE_DIR}/core/Config.hh"
    )
  # Bail out early.
  return()
endif()

# Switch between GTK4 and GTK3.
option(USE_GTK4 "Build for GTK4 (instead of GTK3)" OFF)

# Include packaging logic.
include(cmake/packaging.cmake)

#---------------------------------------------------------------------------
# User options and other notifications
#---------------------------------------------------------------------------

#
option(MSVC_TARGET_CONSOLE "Force Release book on MSVC to display a console window" OFF)

option(APPIMAGE_MODE "Run in AppImage mode, overriding path settings" OFF)
if(APPIMAGE_MODE)
  message(STATUS "Building for AppImage packaging (Debian paths, MicroTeX)")
  if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
  else()
    MESSAGE(FATAL_ERROR "Building with -DAPPIMAGE_MODE=ON also requires -DCMAKE_INSTALL_PREFIX=/usr")
  endif()
endif()

option(PACKAGING_MODE "Run in packaging mode, overriding path settings" OFF)
if (PACKAGING_MODE)
	message(STATUS "Building in packaging mode")
	if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
	else()
		MESSAGE(FATAL_ERROR "Building with -DPACKAGING_MODE=ON also requires -DCMAKE_INSTALL_PREFIX=/usr")
	endif()
else()
	message(STATUS "Building in user mode")
endif()

option(ENABLE_JUPYTER    "Enable building the Xeus-based Jupyter kernel" OFF)
option(ENABLE_PY_JUPYTER "Enable building the default Jupyter kernel"    ON)

if(ENABLE_JUPYTER)
  # Currently only possible when building against Conda.
  set(CONDA_FOUND TRUE)
else()
   set(CONDA_FOUND FALSE)
endif()

option(BUILD_TESTS "Build tests" ON)
if (BUILD_TESTS)
  message(STATUS "Building tests")
  # Allows tests to be built in all subdirectories.
  enable_testing()
endif()

option(ENABLE_FRONTEND    "Enable the UI frontend" ON)

option(ENABLE_SYSTEM_JSONCPP "Use the system-provided jsoncpp library" OFF)

option(INSTALL_TARGETS_ONLY "Only install targets; skipping icons, shared libraries etc..." OFF)
if (INSTALL_TARGETS_ONLY)
	message(STATUS "INSTALL_TARGETS_ONLY is enabled, please make sure all auxillary files and programs Cadabra requires are already installed")
endif()

#---------------------------------------------------------------------------
# Compiler flags.
#---------------------------------------------------------------------------

# - Set the C++ standard to C++17
# - Turn optimizations on
# - Turn off warnings we don't need

include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_SUPPORTED OUTPUT error)
if( IPO_SUPPORTED )
    message(STATUS "IPO / LTO enabled")
else()
    message(STATUS "IPO / LTO not supported: <${error}>")
endif()



# GCC
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
  if (ENABLE_FRONTEND)
    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
      message(FATAL_ERROR "GCC version must be at least 4.9 for regex support! See http://askubuntu.com/questions/428198/getting-installing-gcc-g-4-9-on-ubuntu and then set the environment variables CXX to g++-4.9 and CC to gcc-4.9. You may have to erase the build directory before re-running cmake.")
    endif()
    if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
      message(STATUS "This version of g++ (${CMAKE_CXX_COMPILER_VERSION}) incorrectly warns about possibly uninitialised memory when using std::variant containing a std::shared_ptr. Disabling this warning.")
      set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
    endif()
  endif()
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -Wall -Wextra -Wunused -Wno-psabi -Wno-unknown-pragmas -Wno-misleading-indentation -fvisibility=hidden -Wno-unused-but-set-variable -Wno-unused-parameter")
endif()

# Clang
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
  # For Clang, need to additionally check version to avoid compiler bugs
  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
    message(FATAL_ERROR "Clang version must be at least 3.5 to avoid known bugs.")
  endif()
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O2 -fvisibility=hidden -Wall -Wextra -Wunused -Wno-unused-parameter -Wno-null-pointer-subtraction")
endif()

# Visual Studio
if(MSVC)
  set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
  # Disable specific warnings
  set(MSVC_FLAGS
    "/wd4250"						# inherits via dominance (rampant in the GTKMM codebase)
    "/wd4101"						# unreferenced local variable
    "/wd4244"						# conversion from x to y, possible loss of data
    "/wd4267"						# same as 4244
    "/wd4305"						# truncation from '' to 'char'
    "/wd4309"						# truncation of constant value
    "/wd4390"						# empty control statement, due to a DEBUG macro which requires trailing ;
    "/wd4996"						# deprecated POSIX functions
    "-D_CRT_SECURE_NO_WARNINGS"		# don't warn about deprecated functions
    "-D_SCL_SECURE_NO_WARNINGS"		# don't warn about unsafe function calls (e.g. std::copy with raw pointers)
    "-DNOMINMAX"					# prevent windows headers from defining min and max macros
    "-DWIN32_LEAN_AND_MEAN"			# stop windows from including a bunch of garbage
    "-DBOOST_ALL_DYN_LINK"			# ensure boost's auto-linking is enabled
  )
  foreach(FLAG ${MSVC_FLAGS})
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}")
  endforeach()
endif()


#---------------------------------------------------------------------------
# Configure the various parts of Cadabra.
#---------------------------------------------------------------------------

# if(MATHEMATICA_FOUND)
#    # To avoid issues finding Mathematica's libWSTP64i4,
#    # when linking to Mathematica we set the RPATH.
#    # That's not something we want to do in general, as e.g. Debian's
#    # packages are not supposed to set RPATH.
#    SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
#    SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
#    SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
#    SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# endif()

configure_file(
	"${CMAKE_CURRENT_SOURCE_DIR}/config/postinst.in"
	"${CMAKE_CURRENT_BINARY_DIR}/postinst"
	@ONLY
)
configure_file(
   "${CMAKE_CURRENT_SOURCE_DIR}/config/install_script.iss.in"
   "${CMAKE_CURRENT_SOURCE_DIR}/config/install_script.iss"
   )
configure_file(
   "${CMAKE_CURRENT_SOURCE_DIR}/config/pre_install.rtf.in"
   "${CMAKE_CURRENT_SOURCE_DIR}/config/pre_install.rtf"
   )
configure_file(
   "${CMAKE_CURRENT_SOURCE_DIR}/config/science.cadabra.cadabra2-gtk.desktop.in"
   "${CMAKE_CURRENT_SOURCE_DIR}/config/science.cadabra.cadabra2-gtk.desktop"
   )
configure_file(
  "${CMAKE_CURRENT_SOURCE_DIR}/frontend/gtkmm/science.cadabra.cadabra2-gtk.appdata.xml.in"
  "${CMAKE_CURRENT_SOURCE_DIR}/frontend/gtkmm/science.cadabra.cadabra2-gtk.appdata.xml"  
)


#---------------------------------------------------------------------------
# Configure Mathematica (if enabled).
#---------------------------------------------------------------------------

if(ENABLE_MATHEMATICA)
   print_header("Configuring Mathematica")
   cmake_policy(SET CMP0077 NEW)
   set(Mathematica_USE_STATIC_LIBRARIES TRUE)
   find_package(Mathematica COMPONENTS WSTP)
endif()


#---------------------------------------------------------------------------
# Configure Python.
#---------------------------------------------------------------------------

print_header("Configuring Python")

include(GNUInstallDirs)

set(Python_POSTFIX "3")
find_package(Python REQUIRED COMPONENTS Interpreter Development)
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE} CACHE INTERNAL "")
set(PYBIND11_PYTHON_VERSION ${Python_VERSION} CACHE INTERNAL "")
find_package(pybind11 CONFIG)
if (NOT pybind11_FOUND OR pybind11_VERSION VERSION_LESS 2.13.6)
  if(pybind11_FOUND)
    message(STATUS "Found pybind11 with version ${pybind11_VERSION} < 2.13.6, using included pybind11 instead.")
  else()
    message(STATUS "System-supplied pybind11 not found, using included pybind11.")
  endif()
  add_subdirectory(libs/pybind11)
endif()

message(STATUS "Found python ${Python_LIBRARIES}")
message(STATUS "Python version is ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}.")

# The PYTHON_SITE_PATH variable is used for installation purposes
# only. It is ideally a path relative to CMAKE_INSTALL_PREFIX, not an
# absolute path which uses this variable explictly. See the CMake docs
# for `install`.
if(WIN32)
  set(PYTHON_SITE_PATH lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/site-packages)
  # NOTE: if you change the CDB_BIN_PATH, you also need to change the stripping
  # logic in InstallPrefix.cc. Note that CDB_BIN_PATH needs to be a relative path.
  set(CDB_BIN_PATH .)
else()
  set(CDB_BIN_PATH bin)
  if(PACKAGING_MODE AND IS_DEBIAN_PACKAGE)
    # Debian packages install all their Python things in 'dist-packages', not 'site-packages'.
    set(PYTHON_SITE_PATH lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages)
    # set(Python_SITE_DIST "dist-packages")
  elseif(APPIMAGE_MODE)
    set(PYTHON_SITE_PATH lib/python${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}/dist-packages)
    set(Python_SITE_DIST "dist-packages")
  else()
    # The builder can override the path by setting it externally.
    if(NOT DEFINED PYTHON_SITE_PATH)
      # set(PYTHON_SITE_PATH ${Python_SITEARCH})
      # For everyone else there is 'site-packages' which we get from
      # calling into python's 'site' package (and hoping that the 0th
      # element is where we should be writing).
      execute_process(
	COMMAND ${Python_EXECUTABLE} -c "import site; print(site.getsitepackages()[0])"
	OUTPUT_VARIABLE PYTHON_SITE_PATH
	OUTPUT_STRIP_TRAILING_WHITESPACE
      )
    endif()
  endif()
endif()
if(IS_ABSOLUTE ${PYTHON_SITE_PATH})
  # CPack on windows complains if `install` commands contain absolute paths,
  # so we do our best to make PYTHON_SITE_PATH relative to CMAKE_INSTALL_PREFIX.
  # Of course, the net effect will be the same, as `install` with a relative
  # DESTINATION will prepend CMAKE_INSTALL_PREFIX.
  message(STATUS "Making PYTHON_SITE_PATH relative if possible")
  string(REPLACE "${CMAKE_INSTALL_PREFIX}/" "" PYTHON_SITE_PATH_REL "${PYTHON_SITE_PATH}")
  set(PYTHON_SITE_PATH ${PYTHON_SITE_PATH_REL})
else()
  message(STATUS "PYTHON_SITE_PATH is already relative")
endif()

message(STATUS "PYTHON_SITE_PATH = ${PYTHON_SITE_PATH}")
if(IS_ABSOLUTE ${PYTHON_SITE_PATH})
  message(STATUS "Installing Cadabra Python module in ${PYTHON_SITE_PATH}")
  message(STATUS "Installing Cadabra packages in ${PYTHON_SITE_PATH}/cdb/")
else()
  message(STATUS "Installing Cadabra Python module in ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PATH}")
  message(STATUS "Installing Cadabra packages in ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PATH}/cdb/")
endif()
message(STATUS "Installing binaries in ${CMAKE_INSTALL_PREFIX}/bin/")
message(STATUS "Installing manual pages in ${CMAKE_INSTALL_PREFIX}/share/man/")
message(STATUS "Installing fonts/icons in ${CMAKE_INSTALL_PREFIX}/share/cadabra2/")
if("${Python_CDB_EXECUTABLE}" STREQUAL "")
  # We start the cadabra2 python script by using the current environment,
  # so that e.g. Fedora 42 does not hard-code the python path as a
  # dependency. However, on macOS with Homebrew, we need to be able
  # to override this because otherwise we will not be running in the
  # venv which homebrew created for our package. See cadabra2.rb and
  # cadabra2-devel.rb where this is used.
  set(Python_CDB_EXECUTABLE "/usr/bin/env python3")
endif()
message(STATUS "Starting cadabra2 using '${Python_CDB_EXECUTABLE}'")
message(STATUS "For reference:")
message(STATUS "  Python executable (Python_EXECUTABLE)                                          ${Python_EXECUTABLE}")
message(STATUS "  Python standard  platform-independent installation directory (Python_STDLIB)   ${Python_STDLIB}")
message(STATUS "  Python standard  platform-dependent   installation directory (Python_STDARCH)  ${Python_STDARCH}")
message(STATUS "  Python 3rd-party platform-independent installation directory (Python_SITELIB)  ${Python_SITELIB}")
message(STATUS "  Python 3rd-party platform-dependent   installation directory (Python_SITEARCH) ${Python_SITEARCH}")
# We need to give our Python module an abi-name extension
# so that it can be installed in a folder which does not
# contain the abi name. See
# https://www.python.org/dev/peps/pep-3149/
execute_process(
	COMMAND ${Python_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('SOABI'))"
	OUTPUT_VARIABLE Python_SOABI
	OUTPUT_STRIP_TRAILING_WHITESPACE
	)
message(STATUS "Python abi name ${Python_SOABI}")

# Suffixes
if(WIN32)
	set(STATIC_LIB_SUFFIX "lib")
	set(SHARED_LIB_SUFFIX "dll")
	set(Python_MOD_SUFFIX "pyd")
	set(CMAKE_FIND_LIBRARY_PREFIXES "lib" ${CMAKE_FIND_LIBRARY_PREFIXES})
	set(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")
	set(CMAKE_FIND_LIBRARY_SUFFIXES ".dll.a")
else()
	set(STATIC_LIB_SUFFIX "a")
	set(SHARED_LIB_SUFFIX "so")
	set(Python_MOD_EXT    "so")   
	set(Python_MOD_SUFFIX "${Python_SOABI}.so")
endif()

message(STATUS "Python module extension ${Python_MOD_SUFFIX}")


#---------------------------------------------------------------------------
# Add subdirectories to project.
#---------------------------------------------------------------------------

print_header("Build tools and options")
# Mimalloc makes the cadabra2 module crash when run
# as jupyter kernel, so disable for now.
#find_package(mimalloc 2.0 QUIET)
if(mimalloc_FOUND)
  message(STATUS "Using mimalloc allocator")
else()
  message(STATUS "Using glibc allocator")
endif()
find_package(Catch2 3 QUIET) # This is optional; we will not run the C++ tests if Catch2 is not found
if(Catch2_FOUND)
  message(STATUS "Will run C++ tests with Catch2")
  include(Catch)
else()
  message(STATUS "Catch2 not found, will not run C++ tests")
endif()

# Jupyter kernel
print_header("Configuring Jupyter kernel")
if(ENABLE_JUPYTER)
  message(STATUS "Building the Xeus-based Jupyter kernel")
  # Currently only possible when building against Conda.
  set(CONDA_FOUND TRUE)
else()
   set(CONDA_FOUND FALSE)
   if(ENABLE_PY_JUPYTER)
      message(STATUS "Building the default Jupyter kernel")
   else()
      message(STATUS "Not building a Jupyter kernel")
   endif()
endif()
if(ENABLE_PY_JUPYTER)
   add_subdirectory(jupyterkernel)
endif()

# Core/packages
add_subdirectory(client_server)
add_subdirectory(core)

# Frontend
if(ENABLE_FRONTEND)
  set(ENABLE_MICROTEX TRUE)
  if(ENABLE_MICROTEX)
    set(USE_MICROTEX TRUE)
    set(tinyxml2_BUILD_TESTING FALSE)
  endif()
  add_subdirectory(frontend)
endif()

# Tests
if(BUILD_TESTS)
  add_subdirectory(tests)
endif()

add_subdirectory(web2 EXCLUDE_FROM_ALL)

# Generate the core/Config.hh file; this needs to come as late as possible
# in this CMakeLists.txt to ensure that all variables have been set.
configure_file(
	"${PROJECT_SOURCE_DIR}/core/Config.hh.in"
	"${PROJECT_SOURCE_DIR}/core/Config.hh"
)

# Some additional logic to install all runtime dependencies of our binaries
# into the target installation directory on windows. 
if(WIN32)
  set(EXECUTABLES
    core/cadabra2-cli
    core/cdb-nbtool
    client_server/cadabra-server
    frontend/gtkmm/cadabra2-gtk
  )
  list(JOIN EXECUTABLES " " LEXECUTABLES)
  # Custom command to run ldd, get dependencies, and install these in a
  # folder ready to be processed by `install`. The 'ldd' command does not
  # run on the '*.pyd' file, but if we rename or copy it to have extension '.dll'
  # all goes through fine...
  set(LDDSTR "ldd /${MSYS_ENV}/lib/gdk-pixbuf-2.0/2.10.0/loaders/pixbufloader_svg.dll core/cadabra2.dll ${LEXECUTABLES} | sed -e '/not found/d' -e '/Windows/d' -e '/System32/d' -e '/SysWOW64/d' | grep '=>' | sed -e 's/^[^=]*=>[ ]*\\([^ ]*\\).*/\\1/' | sort | uniq > ${CMAKE_BINARY_DIR}/ldd_dependencies.txt")
  message(STATUS "Determining dependencies using command ${LDDSTR}")
  add_custom_command(
    OUTPUT  dummy1
    COMMAND cp core/cadabra2.pyd core/cadabra2.dll
    COMMAND ${CMAKE_COMMAND} -E env bash -c "${LDDSTR}"
    COMMAND touch dummy1
    VERBATIM
    DEPENDS  core/cadabra2.pyd ${EXECUTABLES}
    COMMENT "Using ldd to determine dependencies of ${EXECUTABLES}"
  )
  add_custom_command(
    OUTPUT dummy2
    DEPENDS dummy1
    COMMAND ${CMAKE_COMMAND} -E env bash -c "cat ${CMAKE_BINARY_DIR}/ldd_dependencies.txt && mkdir -p ${CMAKE_SOURCE_DIR}/deps && for f in `cat ${CMAKE_BINARY_DIR}/ldd_dependencies.txt`; do cp \${f} ${CMAKE_SOURCE_DIR}/deps/; done"
    COMMAND touch dummy2
    VERBATIM
    COMMENT "Copying dependencies into ${CMAKE_SOURCE_DIR}/deps"
  )
  add_custom_target("do_deps" ALL DEPENDS dummy2)
  
  # Install all the dependencies into the root destination folder.
  install(DIRECTORY deps/ DESTINATION . FILES_MATCHING PATTERN "*.dll")      

  # And install a few more which, for reasons unknown, are not reported by dll.
  install(CODE "execute_process(COMMAND ls \"/${MSYS_ENV}/bin\") " )
  winstall(FILES /${MSYS_ENV}/bin/libcharset-1.dll                DESTINATION .)
  winstall(FILES /${MSYS_ENV}/bin/librsvg-2-2.dll                 DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libxml2-2.dll                   DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/liblzma-5.dll                   DESTINATION .)
  # FIXME: these can be found by running ldd on numpy and matplotlib dlls.
  winstall(FILES /${MSYS_ENV}/bin/libopenblas.dll                 DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libgomp-1.dll                   DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libgfortran-5.dll               DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libquadmath-0.dll               DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libsharpyuv-0.dll               DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libjpeg-8.dll                   DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libtiff-6.dll                   DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libdeflate.dll                  DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libjbig-0.dll                   DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libLerc.dll                     DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libwebp-7.dll                   DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libzstd.dll                     DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libimagequant.dll               DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libopenjp2-7.dll                DESTINATION .)  

  # These are necessary only on ARM64.
  winstall(FILES /${MSYS_ENV}/bin/libgmp-10.dll                   DESTINATION .)  
  winstall(FILES /${MSYS_ENV}/bin/libgmpxx-4.dll                  DESTINATION .)  
  
  # We need gdbus to setup the dbus, needed by Glib, otherwise anything
  # gtk-related will just bail out at start. We also need the helper
  # program to spawn programs using Glib.
  winstall(FILES /${MSYS_ENV}/bin/gdbus.exe                       DESTINATION .)
  winstall(FILES /${MSYS_ENV}/bin/gspawn-win64-helper.exe         DESTINATION .)
  winstall(FILES /${MSYS_ENV}/bin/gspawn-win64-helper-console.exe DESTINATION .)
  winstall(FILES /${MSYS_ENV}/bin/gdk-pixbuf-query-loaders.exe    DESTINATION .)
endif()
    
#---------------------------------------------------------------------------
# Provide uninstall target.
#---------------------------------------------------------------------------

configure_file(
	"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
	"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
	IMMEDIATE @ONLY
)

add_custom_target(uninstall
	"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
)

#---------------------------------------------------------------------------
# Provide target to build AppImage.
#---------------------------------------------------------------------------

# if(APPIMAGE_MODE)
#   add_custom_target(appimage
#     COMMAND mkdir -p AppDir/${Python_SITELIB}
#     COMMAND cp -a ${CMAKE_SOURCE_DIR}/config/AppRun AppDir/
#     COMMAND chmod gou+x ${CMAKE_SOURCE_DIR}/config/AppRun AppDir/AppRun
#     COMMAND cp -a ${Python_SITELIB}/setuptools AppDir/${Python_SITELIB}/
#     COMMAND cp -a ${Python_STDARCH}/* AppDir/${Python_STDARCH}/
#   )
# endif()

if(WIN32)
  add_custom_target(windows-installer
    COMMAND cpack
#    COMMAND osslsigncode sign -pkcs12 "/mnt/c/path/to/certificate.p12" -pass "certificate password" -n "Cadabra2" -i "https://cadabra.science" -t "http://timestamp.comodoca.com/authenticode" -in "cadabra2-${CADABRA_VERSION_SEM}-win64.exe" -out "cadabra2-${CADABRA_VERSION_SEM}-win64-installer.exe"
    COMMAND gh auth setup-git
    COMMAND release upload "${CADABRA_VERSION_SEM}" cadabra2-${CADABRA_VERSION_SEM}-win64.msi --clobber
  )
endif()

print_header("All scripts completed")


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at kasper.peeters@phi-sci.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: CONTRIBUTING.md
================================================
How to contribute
=================

If you want to help out with Cadabra, or think you can contribute a
useful add-on package or perhaps just a sample notebook or a bit of
documentation, you are more than welcome! Even just dropping us a
note with some details about what computations you do with Cadabra
is a useful contribution, and helps to get a better idea of what
people expect from the software. 

Below are some tips on how to get started contributing to Cadabra. For
any questions, please post in the [questions and answers][1] forum or
get in touch directly via [email][2]


Get familiar with the software
------------------------------

The first thing to do is to get familiar with how the software works,
by playing with the [tutorials][3] Details of the software, including
some of the logic that is behind its inner workings, are described in
the [reference guide][4], and documentation is available separately
for all [properties and algorithms][5]. If you get stuck, do not
hesitate to post a question on the [questions and answers][1] site. If
you want to contribute at the level of the C++ core, or if you are
simply interested in how things work behind the scenes, you will find
the [doxygen][6] documentation useful.


Identify something to work on
-----------------------------

Most likely you will have used (or will have tried to use) Cadabra for
a concrete project, and found that you see room for improvement. This
can be as simple as reporting a bug, perhaps even fixing it, or adding
a tutorial or other documentation, providing add-on functionality in
the form of packages, or helping with the core. We are also always
interested to hear about issues installing Cadabra on new systems.


Setup your development environment
----------------------------------

Contributions in any form are welcome, but if you want to submit
substantial code contributions, it is useful to get familiar with the
git version control system. This is used to track software changes
over time and to effectively manage contributions from different
authors. We also utilise [github][7], a web interface to git,
extensively and use it for communication, issue tracking, merging
patches (pull requests) and so on. Check out the source code from
there and follow the instructions on how to build it.


Code conventions
----------------

To generate debug output, we use the [dbg][8] facility. To turn this
on for a particular source file, comment out the `DBG_MACRO_DISABLE`
definition at the top. You will then get nicely formatted debug output
while running.

Code is formatted using tabs for indentation, K&R style braces,
with some fine-tuning. All is taken care of by `make format` in the
top-level directory, which runs through the entire source tree and
does a reformat using `astyle`.


Documentation
-------------

We have tutorials, manual pages and reference documentation. In
addition, there are user-contributed notebooks. In this sense, we try
to follow [divio][9]. Contributions to all of these parts of the
documentation are welcome.


[1] https://cadabra.science/qa/
[2] mailto:info@cadabra.science
[3] https://cadabra.science/tutorials.html
[4] https://cadabra.science/help.html
[5] https://cadabra.science/man.html
[6] https://cadabra.science/doxygen/html/
[7] https://github.com/kpeeters/cadabra2
[8] https://github.com/sharkdp/dbg-macro
[9] https://www.divio.com/blog/documentation/


================================================
FILE: JUPYTER.rst
================================================
Building the Cadabra Jupyter kernel
===================================

The Cadabra build scripts can now build a Jupyter kernel, so that you
can use the Jupyter notebook to write Cadabra code (using all of the
Cadabra notation, i.e. without having to resort to the much more ugly
Python interface). At the moment this is only supported by compiling
against a Conda python, simply because that enables us to build on the
'xeus' library more easily.

Building a Conda package
------------------------

After installation, first activate your miniconda distribution::

    source ~/miniconda3/bin/activate

All dependencies to build a Conda package of Cadabra can then be
installed from Conda directly, with::

    conda install conda-build

Then build with::

    cd conda
    conda-build .
    
To install::

    conda install --use-local cadabra2



    

Building using Conda (old)
--------------------------

The following instructions have been tested on a clean Ubuntu 18.04
installation.

The Cadabra Jupyter kernel uses the Xeus library, which is most easily
obtained by getting it from Conda. If you do not have Conda yet, get
a minimal installation (MiniConda) from

  https://docs.conda.io/en/latest/miniconda.html

(install a Python3.x version).  

When building against Conda, Cadabra will build only the Python module
and the cadabra-jupyter-kernel binary. It is not possible to build
many of the other parts of Cadabra using Conda, for various reasons:
Conda's glibmm is not built with C++11 enabled, there is no gtkmm
library, and probably others. For a discussion on this, see

  https://groups.google.com/a/continuum.io/d/msg/anaconda/oHtExJU9oiM/oMZLGpn1CAAJ

and if you don't think this is a problem, see e.g.

  https://unix.stackexchange.com/questions/414904/anaconda-qt-vs-system-qt

After installation, first activate your miniconda distribution::

    source ~/miniconda3/bin/activate

All dependencies for Cadabra's Jupyter kernel can then be installed from
Conda directly, with::

    conda install cmake pkg-config glibmm zeromq cppzmq xtl cryptopp \
	               sqlite util-linux xeus nlohmann_json sympy \
						jupyter -c conda-forge
	 
Now it is time to do the Cadabra build. Configure with options which
ensure that CMake picks up the Conda libraries first, and make it
install the Cadabra things in a place which does not interfere with
any 'normal' build you may have sitting around::

    cd cadabra2
    mkdir build
    cd build
    cmake -DENABLE_JUPYTER=ON -DENABLE_FRONTEND=OFF \
                              -DCMAKE_INCLUDE_PATH=${HOME}/miniconda3/include \
                              -DCMAKE_LIBRARY_PATH=${HOME}/miniconda3/lib \
                              -DCMAKE_INSTALL_PREFIX=${HOME}/miniconda3 \
                              ..

You should see that it has configured using the Conda Python; look for
the `Configuring Python` block, which should be something like::

    -------------------------------------------
      Configuring Python
    -------------------------------------------
    -- Building for use with Python 3 (good!)
    -- Found PythonInterp: /home/kasper/miniconda3/bin/python3.7 (found version "3.7.1") 
    -- Found PythonLibs: /home/kasper/miniconda3/lib/libpython3.7m.so
    -- pybind11 v2.3.dev0
    -- Found python /home/kasper/miniconda3/lib/libpython3.7m.so

Note the reference to the Conda installation path. Further down you
should then also see a block for the Jupyter kernel::

    -------------------------------------------
      Configuring Jupyter kernel build
    -------------------------------------------
 
If that's all ok, you can build with the standard::

    make
    sudo make install

This will install the kernel in::

    ${HOME}/miniconda3/bin/

and the JSON configuration files in::

    ${HOME}/miniconda3/share/jupyter/kernels/cadabra/

If you now start Jupyter, you should be able to choose a Cadabra
kernel::

    ${HOME}/miniconda3/bin/jupyter notebook

There is a sample `schwarzschild.ipynb` in the `examples` directory.	



Setting up a Jupyterhub server for Cadabra
------------------------------------------

The following instructions setup a JupyterHub installation using 'The
Littlest JupyterHub' (TLJH). These instructions have been tested on a
clean Ubuntu 18.04 installation.

First install TLJH as per the instructions at::

    https://the-littlest-jupyterhub.readthedocs.io/en/latest/install/custom-server.html

(note that you *first* need to do a sudo command, otherwise the
installer will ask for the password but you won't see that prompt,
making it look like the installation process hangs).

*New*: it should now also be possible to simply install the conda
package for the Jupyter kernel. *New*

Become root (you cannot write into `/opt/tljh` otherwise) and set the
conda path using::

    sudo su
    export PATH=/opt/tljh/user/bin:${PATH}

Install the prerequisites with::

    conda install cmake pkg-config glibmm zeromq cppzmq xtl cryptopp \
	               sqlite util-linux xeus nlohmann_json sympy \
						-c conda-forge
	 
Build the Cadabra Jupyter kernel with::
  
    cd cadabra2
    mkdir build
    cd build
    cmake -DENABLE_JUPYTER=ON -DENABLE_FRONTEND=OFF \
                              -DCMAKE_INCLUDE_PATH=/opt/tljh/user/include \
                              -DCMAKE_LIBRARY_PATH=/opt/tljh/user/lib \
                              -DCMAKE_INSTALL_PREFIX=/opt/tljh/user/ \
                              ..
    make install

The 'new' button in the Jupyterhub file browser should now offer you
the option of creating a new Cadabra notebook.


Creating a Conda package of the Cadabra Jupyter kernel
------------------------------------------------------

To build a Conda package of the Cadabra Jupyter kernel from scratch,
first install miniconda as above, and activate::

    source ~/miniconda3/bin/activate

Now the fun starts. Conda is an absolutely horrendous packaging
system, which absolutely does *not* get dependencies right, but we
will have to live with it. First, update the base conda distribution::

    conda update -n base -c defaults conda     
    conda update --all

Then activate the `conda-forge` channel, and update to the latest of
everything::

    conda config --add channels conda-forge
    conda update --all

Do *not* use `conda config --set channel_priority strict` as that
*will* break the build with an endless list of package conflicts.
There are other ways to add the conda-forge channel, all subtly
different; avoid adding `-c conda-forge` as that is just broken beyond
belief too. Now install the prerequisites for building conda
packages::

    conda install conda-build anaconda-client \
         xeus pkg-config glibmm

That last line should not have been necessary, as build requirements
in `meta.yaml` should have taken care of it, but alas, it does not
work that way. It spits out various messages about packages being
*downgraded*; don't ask, I told you the system was broken.

Now change to the `conda` directory and build the package::

    cd cadabra2/conda
    export PKG_CONFIG_PATH=${HOME}/miniconda3/lib/pkgconfig
    conda build .

Again, that path setting should have been handled automatically...
To upload::

    anaconda login
    anaconda upload /path/to/conda-package.tar.bz2




================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    {one line to give the program's name and a brief idea of what it does.}
    Copyright (C) {year}  {name of author}

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    {project}  Copyright (C) {year}  {fullname}
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.


================================================
FILE: Makefile
================================================

all:
	@echo -n "\nTo build Cadabra, \n\n   mkdir build\n   cd build\n   cmake ..\n   make\n\nThe other targets here are (for maintainer purposes only)\n\n   tarball:     build a tarball cadabra2-latest.tar.gz of current HEAD\n   doc:         generate doxygen docs in doc\n   webup:       build web pages/tutorials/man pages and upload to server\n   updatesnoop: sync snoop repo\n   packages:    create deb/rpm packages on buildbot\n\nIf you need help, email info@cadabra.science\n\n"

.PHONY: doc tarball findclay webbuild claybuild webup format packages updatesnoop

tarball:
	git archive --format=tar --prefix=cadabra2-latest/ HEAD | gzip > ${HOME}/tmp/cadabra2-latest.tar.gz

doc:
	doxygen config/Doxyfile

webbuild:
	cd build; make -f web2/Makefile

claybuild:
	cd web2/cadabra2/source; rm -Rf build; clay build

CMD_NOT_FOUND = $(error $(1) is required for this rule)
CHECK_CMD = $(if $(shell command -v $(1)),,$(call CMD_NOT_FOUND,$(1)))

findclay:
	$(call CHECK_CMD, clay)

webup: findclay webbuild claybuild
	doxygen config/Doxyfile
	rsync -avz --chmod=+rx doxygen/ cadabra_web:/var/www/cadabra2/doxygen/
	cd web2/cadabra2/source; rsync -avz --chmod=+rx build/ cadabra_web:/var/www/cadabra2/;  rsync -avz --chmod=+rx static/styles/ cadabra_web:/var/www/cadabra2/static/styles;   scp static/cadabra_in* cadabra_web:/var/www/cadabra2/static/; rsync -avz --chmod=+rx static/fonts/ cadabra_web:/var/www/cadabra2/static/fonts; rsync -avz --chmod=+rx static/images/ cadabra_web:/var/www/cadabra2/static/images/; rsync -avz --chmod=+rx static/icons/ cadabra_web:/var/www/cadabra2/static/icons/; rsync -avz --chmod=+rx static/pdf/ cadabra_web:/var/www/cadabra2/static/pdf/; rsync -avz --chmod=+rx static/js/ cadabra_web:/var/www/cadabra2/static/js/; rsync -avz --chmod=+r static/robots.txt cadabra_web:/var/www/cadabra2

format:
	astyle --style=k/r --indent=tab=3 --recursive --attach-classes --attach-namespaces --indent-classes --indent-namespaces --indent-switches --break-closing-braces '*.hh'
	astyle --style=k/r --indent=tab=3 --recursive --attach-classes --attach-namespaces --indent-classes --indent-namespaces --indent-switches --break-closing-braces '*.cc'
	find . -name "*.cc" -exec sed -i -e 's/^\([ \t]*\)\([\{\}]\)/\1\t\2/' '{}' ';'
	find . -name "*.hh" -exec sed -i -e 's/^\([ \t]*\)\([\{\}]\)/\1\t\2/' '{}' ';'

packages:
	bash config/buildbot.sh

appimage:
	(mkdir build-appimage; cd build-appimage; cmake -DAPPIMAGE_MODE=ON -DCMAKE_INSTALL_PREFIX=/usr ..; make; make install DESTDIR=AppDir; make appimage)

updatesnoop:
	cp ../snoop/src/Snoop.cc ../snoop/src/SnoopPrivate.hh ../snoop/src/Snoop.hh client_server/


================================================
FILE: README.rst
================================================
Cadabra
=======

.. image:: https://joss.theoj.org/papers/10.21105/joss.01118/status.svg
   :target: https://doi.org/10.21105/joss.01118

.. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.2500762.svg
   :target: https://doi.org/10.5281/zenodo.2500762

.. image:: https://github.com/kpeeters/cadabra2/workflows/Linux/badge.svg
   :target: https://github.com/kpeeters/cadabra2/actions?query=workflow%3ALinux

.. image:: https://github.com/kpeeters/cadabra2/workflows/macOS/badge.svg
   :target: https://github.com/kpeeters/cadabra2/actions?query=workflow%3AmacOS

.. image:: https://github.com/kpeeters/cadabra2/workflows/Docker/badge.svg
   :target: https://github.com/kpeeters/cadabra2/actions?query=workflow%3ADocker

.. image:: https://github.com/kpeeters/cadabra2/workflows/Windows%2011/badge.svg
   :target: https://github.com/kpeeters/cadabra2/actions?query=workflow%3AWindows%2011

.. image:: https://github.com/kpeeters/cadabra2/workflows/FreeBSD/badge.svg
   :target: https://github.com/kpeeters/cadabra2/actions?query=workflow%3AFreeBSD

*A field-theory motivated approach to computer algebra.*

Kasper Peeters <info@cadabra.science>

- End-user documentation at https://cadabra.science/
- Source code documentation at https://cadabra.science/doxygen/html

This repository holds the 2.x series of the Cadabra computer algebra
system. It supersedes the 1.x series, which can still be found at
https://github.com/kpeeters/cadabra.

Cadabra is a symbolic computer algebra system, designed specifically
for the solution of problems encountered in quantum and classical
field theory. It has extensive functionality for tensor computer
algebra, tensor polynomial simplification including multi-term
symmetries, fermions and anti-commuting variables, Clifford algebras
and Fierz transformations, implicit coordinate dependence, multiple
index types and many more. The input format is a subset of TeX. Both a
command-line and a graphical interface are available, and there is a
kernel for Jupyter.


Installation
-------------

Cadabra builds on Linux, macOS, OpenBSD, FreeBSD and Windows. Select
your system from the list below for detailed instructions.

- `Linux (Debian/Ubuntu/Mint)`_
- `Linux (Fedora 24 and later)`_
- `Linux (CentOS/Scientific Linux)`_
- `Linux (openSUSE)`_
- `Linux (Arch/Manjaro)`_
- `Linux (Solus)`_
- `OpenBSD`_
- `FreeBSD`_
- `macOS`_
- `Windows`_

Binaries for most of these platforms are provided from the download
page at https://cadabra.science/download.html, which links to
https://github.com/kpeeters/cadabra2/releases/latest.  These binaries
are automatically generated on every release.

See `Building Cadabra as C++ library`_ for instructions on how to
build the entire Cadabra functionality as a library which you can use
in a C++ program.

See `Building a Jupyter kernel`_ for information on the Jupyter kernel
for Cadabra sessions.

See `Notes on Python paths`_ for some remarks on where Cadabra
installs its Python modules and how this plays with various types of
Python installations.


Linux (Debian/Ubuntu/Mint)
~~~~~~~~~~~~~~~~~~~~~~~~~~

On Debian/Ubuntu you can install all that is needed with::

    sudo apt install git cmake libpython3-dev python3-dev g++ libgmp3-dev \
          libgtkmm-3.0-dev libboost-all-dev libssl-dev libgmp-dev libsqlite3-dev uuid-dev  \
          python3-matplotlib python3-mpmath python3-sympy python3-gmpy2

(on Ubuntu 14.04 you need to replace `cmake` with `cmake3` and also
install g++-4.9; get in touch if you don't know how to do this). On
older systems you may want to install `sympy` using `sudo pip3 install
sympy`, but that is discouraged in general.
	 
This is the development platform and issues are typically first fixed
here. You can use either g++ or the clang++ compiler to build. You need to
clone the cadabra2 git repository (if you download the .zip file you
will not have all data necessary to build). So first do::

    git clone https://github.com/kpeeters/cadabra2

Building is then done with the standard::

    cd cadabra2
    mkdir build
    cd build
    cmake ..
    make
    sudo make install

This will produce the command line app ``cadabra2`` and the Gtk
notebook interface ``cadabra2-gtk``. You can also find the latter in
the 'Education' menu.

Linux (Fedora 24 and later)
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fedora 24 is the first Fedora to have Python 3; you can build Cadabra
using Python 2 but you are strongly encouraged to upgrade. The Fedora
platform receives less testing so please get in touch if you run into
any issues. You can use either g++ or the clang++ compiler.

Install the dependencies with::

    sudo dnf install git python3-devel make cmake gcc-c++ \
         gmp-devel libuuid-devel sqlite-devel \
         gtkmm30-devel boost-devel \
         python3-matplotlib \
         python3-pip
    sudo pip3 install sympy

You need to clone the cadabra2 git repository (if you download the
.zip file you will not have all data necessary to build). So first do::

    git clone https://github.com/kpeeters/cadabra2

Building is then done with the standard::

    cd cadabra2
    mkdir build
    cd build
    cmake ..
    make
    sudo make install

This will produce the command line app ``cadabra2`` and the Gtk
notebook interface ``cadabra2-gtk``. You can also find the latter
when searching for the 'Cadabra' app from the 'Activities' menu.

Linux (CentOS/Scientific Linux)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On CentOS/Scientific Linux you need to activate The Software
Collections (SCL) and Extra Packages for Enterprise Linux (EPEL) to
get access to a modern C++ compiler, Python3 and all required build
tools.

On *CentOS* first do::

    sudo yum install centos-release-scl epel-release

On *Scientific Linux* the equivalent is::

    sudo yum install yum-conf-softwarecollections epel-release
	 
Now install all build dependencies with::
  
    sudo yum install devtoolset-7 rh-python36 cmake3 \
	          gmp-devel libuuid-devel sqlite-devel \
                  gtkmm30-devel boost-devel git \
	          python-matplotlib 

You need to enable the Python3 and C++ compiler which you just
installed with::

    scl enable rh-python36 bash					
    scl enable devtoolset-7 bash

(note: do *not* use sudo here!).
	 
You also need to install sympy by hand::

    sudo pip3 install sympy

Now need to clone the cadabra2 git repository (if you download the
.zip file you will not have all data necessary to build)::

    git clone https://github.com/kpeeters/cadabra2

Building is then done with the standard::

    cd cadabra2
    mkdir build
    cd build
    cmake3 .. 
    make
    sudo make install

This will produce the command line app ``cadabra2`` and the Gtk
notebook interface ``cadabra2-gtk``. You can also find the latter in
the 'Education' menu.


Linux (openSUSE)
~~~~~~~~~~~~~~~~

For openSUSE (tested on 'Leap 15.2', probably also fine with minor
changes for 'Tumbleweed') you first need to install the dependencies
with::

    sudo zypper install --no-recommends git cmake python3-devel gcc-c++ \
                  gmp-devel libuuid-devel sqlite-devel \
                  gtkmm3-devel  \
                  python3-matplotlib \
                  python3-sympy \
                  libboost_system1_71_0-devel libboost_filesystem1_71_0-devel \
                  libboost_date_time1_71_0-devel libboost_program_options1_71_0-devel

This platform receives less testing so please get in touch if you run
into any issues. You need to clone the cadabra2 git repository (if you
download the .zip file you will not have all data necessary to
build). So first do::

    git clone https://github.com/kpeeters/cadabra2

Building is then done with the standard::

    cd cadabra2
    mkdir build
    cd build
    cmake .. 
    make
    sudo make install

This will produce the command line app ``cadabra2`` and the Gtk
notebook interface ``cadabra2-gtk``. 


Linux (Arch/Manjaro)
~~~~~~~~~~~~~~~~~~~~

The package for Arch Linux is cadabra2
https://aur.archlinux.org/packages/cadabra2/  Building and
installing (including dependencies) can be accomplished with::

    yay -S cadabra2

Alternatively use ``makepkg``::

    git clone https://aur.archlinux.org/cadabra2.git
    cd cadabra2
    makepkg -si

Please consult the Arch Wiki
https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
for more information regarding installing packages from the AUR.


Linux (Solus)
~~~~~~~~~~~~~

Support for Solux Linux is experimental. To build from source on Solus
Linux, first install the dependencies by doing::

    sudo eopkg install -c system.devel
    sudo eopkg install libboost-devel gmp-devel libgtkmm-3-devel 
    sudo eopkg install sqlite3-devel python3-devel
    sudo eopkg install git cmake make g++

Then configure and build with::

    cd cadabra2
    mkdir build
    cd build
    cmake .. -DCMAKE_INSTALL_PREFIX=/usr
    make
    sudo make install

This installs below ``/usr`` (instead of ``/usr/local`` on other
platforms) because I could not figure out how to make it pick up
libraries there.

Any feedback on these instructions is welcome.


OpenBSD
~~~~~~~

Install the dependencies with::

  pkg_add git cmake boost python-3.6.2 gtk3mm gmp gmpxx py3-sympy

We will build using the default clang-4.0.0 compiler; building with
the alternative g++-4.9.4 leads to trouble when linking against the
libraries added with pkg_add.

Configure and build with::

  cd cadabra2
  mkdir build
  cd build
  cmake -DENABLE_MATHEMATICA=OFF ..
  make
  su
  make install

The command-line version is now available as ``cadabra2`` and the
notebook interface as ``cadabra2-gtk``.

Any feedback on this platform is welcome as this is not our
development platform and testing is done only occasionally.


FreeBSD
~~~~~~~

The recommended way to install Cadabra is through::

  pkg install cadabra2

It is also possible to build and install Cadabra from the port::

  cd /usr/ports/math/cadabra2 && make install clean

The command-line version is now available as ``cadabra2`` and the
notebook interface as ``cadabra2-gtk``.

Any feedback on this platform is welcome as this is not our
development platform.


macOS
~~~~~

Cadabra builds with the standard Apple compiler, on both Intel and
Apple silicon, but you do need a number of packages from Homebrew (see
https://brew.sh). Install the required dependencies with::

    brew install cmake boost gmp python3 
    brew install pkgconfig 
    brew install gtkmm3 adwaita-icon-theme
    pip3 install sympy gmpy2

If the lines above prompt you to install XCode, go ahead and let it do
that.

You can build against an Anaconda Python installation (in case you
prefer Anaconda over the Homebrew Python); cmake will automatically
pick this up if available.

You need to clone the cadabra2 git repository (if you download the
.zip file you will not have all data necessary to build). So do::

    git clone https://github.com/kpeeters/cadabra2

After that you can build with the standard::

    cd cadabra2
    mkdir build
    cd build
    cmake -DENABLE_MATHEMATICA=OFF ..
    make
    sudo make install

(*note* the `-DENABLE_MATHEMATICA=OFF` in the `cmake` line above; the
Mathematica scalar backend does not yet work on macOS).
  
This will produce the command line app ``cadabra2`` and the Gtk
notebook interface ``cadabra2-gtk``. 

Feedback from macOS users is *very* welcome because this is not the main
development platform.


Windows
~~~~~~~

On Windows compilation is easiest by using the MSYS2 system, as their
gtkmm-3.0 packages just work and the whole system can be driven from the
command line. We used to build Cadabra using the vcpkg packages, but
they no longer provide packages for gtkmm-3.0, and in general the lack
of binary packages means that build times are on the order of many, many
hours, instead of just a few minutes with MSYS2. More info on building and
packaging gtk apps on windows at https://www.gtk.org/docs/installations/windows/.

Install MSYS2 from https://www.msys2.org and start a UCRT64 shell.
First update with (if you don't do this you may end up not being able
to install some of the required packages due to version conflicts)::

    pacman -Suy

Then install a compiler and the dependencies of Cadabra with::

    pacman -S mingw-w64-ucrt-x86_64-gcc
    pacman -S mingw-w64-ucrt-x86_64-gtkmm3
    pacman -S mingw-w64-ucrt-x86_64-boost    
    pacman -S mingw-w64-ucrt-x86_64-sqlite3
    pacman -S mingw-w64-ucrt-x86_64-cmake
    pacman -S mingw-w64-ucrt-x86_64-python
    pacman -S mingw-w64-ucrt-x86_64-python-matplotlib
    pacman -S mingw-w64-ucrt-x86_64-python-sympy
    pacman -S mingw-w64-ucrt-x86_64-osslsigncode
    pacman -S git

Checkout Cadabra and build::

    git clone https://github.com/kpeeters/cadabra2
    cd cadabra2
    mkdir build
    cd build
    cmake ..
    ninja
    ninja install

This will leave an installation in `Program Files (x86)/Cadabra`, from where
you can start `cadabra2-gtk`. 

To build an installer, simply run `cpack` after having built
Cadabra. 
    

Building a Jupyter kernel
-------------------------

As of version 2.3.4 the standard build process (as described above)
also creates a Jupyter kernel, which is written in Python on top of
`ipykernel` (thanks to Fergus Baker). This should work on most
platforms out-of-the-box; you do not need to do anything else. The
Jupyter kernel allows you to use Cadabra notation inside a Jupyter
notebook session.

The distribution also still contains code for the 'old' Jupyter
kernel, which is written in C++ on top of `xeus`. Building this kernel
is more complicated mainly because of this dependency, and there is
not much of an advantage over the Python kernel; it's mainly left in
the tree for future reference, For full instructions on how to build
the old `xeus`-based kernel, see
https://github.com/kpeeters/cadabra2/blob/master/JUPYTER.rst.


Creating an AppImage
--------------------

The Cadabra build system can create an AppImage for use on a wide
variety of Linux distributions (this is used to create the AppImage
which is available from the `releases` on github). This build process
has been tested by using Ubuntu 20.04 as base system. Install the
prerequisites as above,::

    sudo apt install git cmake libpython3-dev python3-dev g++ libgmp3-dev \
          libgtkmm-3.0-dev libboost-all-dev libssl-dev libgmp-dev libsqlite3-dev uuid-dev  \
          python3-matplotlib python3-mpmath python3-sympy python3-gmpy2

Now configure and build with::

    cmake -DAPPIMAGE_MODE=ON -DCMAKE_INSTALL_PREFIX=/usr ..
    make
    make install DESTDIR=AppDir

This installs everything in the `AppDir` folder ready for packaging.
Then run::

    make appimage

to create the AppImage itself. If you run into trouble with this,
please first consult the comments in the top-level `CMakeLists.txt`
file about `linuxdeploy` and friends.



Tutorials and other help
------------------------

Please consult https://cadabra.science/ for tutorial-style notebooks
and all other documentation, and https://cadabra.science/doxygen/html/
for doxygen documentation of the current master branch. The latter can
also be generated locally; you will need (on Debian and derivatives)::

    sudo apt-get install doxygen libjs-mathjax  

For any questions, please contact info@cadabra.science .


Building Cadabra as C++ library
-------------------------------

If you want to use the functionality of Cadabra inside your own C++
programs, you can build Cadabra as a shared library. To do this::

    mkdir build-lib
    cd build-lib
    cmake -DBUILD_AS_CPP_LIBRARY=ON ..
    make
    sudo make install

There is a sample program `simple.cc
<https://github.com/kpeeters/cadabra2/blob/master/c%2B%2Blib/simple.cc>`_
in the `c++lib` directory which shows how to use the Cadabra library.


Notes on Python paths
---------------------

Cadabra tries to play nice with a large variety of Python
installations, which is not an easy task. In general, it will try to
install in such a way that the Python interpreter which is specified
at build time will be able to import the `cadabra2` Python module
without any change to its path.  This is necessary so that e.g. a
Jupyter notebook will be able to find this module.  Cadabra will
therefore install its Python module in
`site.getsitepackages()[0]`. Since this module constructs its
docstrings dynamically on load, the manual pages are also stored
relative to this module.

However, Cadabra will install its binaries according to standard
CMake logic in `$CMAKE_INSTALL_PREFIX/bin/`. On systems that have
Python installed in subtree which is not below `$CMAKE_INSTALL_PREFIX`,
this means that the Cadabra binaries and the Cadabra Python module
will not be in the same subtree. This typically happens on systems
with Python coming from Homebrew, as these will have Python somewhere
below `/opt/homebrew` even when `$CMAKE_INSTALL_PREFIX` is `/usr/local/`.

On some systems, users or package managers prefer that
`site.getsitepackages()[0]` remains under control of the package
manager (Homebrew is the typical example). In this case, if you do not
want to write there, your only option is to first create a virtual
environment before you run Cadabra's `cmake`.


Special thanks
--------------

Special thanks to José M. Martín-García (for the xPerm
canonicalisation code), James Allen (for writing much of the factoring
code), Dominic Price (for the meld algorithm implementation, many
additions to the notebook interface, the conversion to pybind and the
Windows port), Fergus Baker (for the new Jupyter kernel), Isuru
Fernando (for the Conda packaging), the Software Sustainability
Institute and the Institute of Advanced Study. Thanks to the many
people who have sent me bug reports (keep 'm coming), and thanks to
all of you who use Cadabra, sent feedback or cited the Cadabra
papers.

Licenses
--------

Cadabra itself is licensed under the GPL-3.0. It includes some dependencies
which have the following licenses:

* tiny-process-lib [https://gitlab.com/eidheim/tiny-process-library/]
  MIT license

   


================================================
FILE: c++lib/.gitignore
================================================
Makefile
treetracker


================================================
FILE: c++lib/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.12)

set(CMAKE_CXX_STANDARD 17)
project(Cadabra)

#---------------------------------------------------------------------------
# Preamble.
#---------------------------------------------------------------------------

# Set path to additional cmake files
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules")

# Disable warning 'MACOSX_RPATH is enabled by default'
if (POLICY CMP0042)
  cmake_policy(SET CMP0042 NEW)
endif(POLICY CMP0042)

# Disable warning 'Only interpret if() arguments as variables or keywords when unquoted'
if (POLICY CMP0054)
  cmake_policy(SET CMP0054 NEW)
endif()

# Ensure that we can build the library and install it without having to
# build the samples.
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE)

find_package(Python REQUIRED COMPONENTS Interpreter Development)
message(STATUS "Found python library: ${Python_LIBRARIES}")
message(STATUS "Found python headers: ${Python_INCLUDE_DIRS}")
message(STATUS "Python version is ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR}.")

#---------------------------------------------------------------------------
# User options.
#---------------------------------------------------------------------------

set(INSTALL_LIB_DIR     lib                CACHE PATH "Installation directory for library")
set(INSTALL_INCLUDE_DIR include/cadabra2++ CACHE PATH "Installation directory for header files")

# Scalar backend options
option(USE_TREETRACKER "Use the TreeTracker scalar backend" OFF)
set(PATH_TREETRACKER   "./treetracker" CACHE STRING "Path to the TreeTracker library")


#---------------------------------------------------------------------------
# Compiler flags.
#---------------------------------------------------------------------------

add_definitions("-DNO_SYMPY")
if(CMAKE_COMPILER_IS_GNUCXX)
  add_definitions("-Wall -g -Wno-unused-but-set-variable")
endif()

if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
  if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14.0)
    message(STATUS "This version of g++ (${CMAKE_CXX_COMPILER_VERSION}) incorrectly warns about possibly uninitialised memory when using std::variant containing a std::shared_ptr. Disabling this warning.")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized")
  endif()
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
endif()

if(MSVC)
	set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
	set(MSVC_FLAGS
		"/wd4101"						# unreferenced local variable
		"/wd4250"						# inherits via dominance
		"/wd4244"						# conversion from x to y, possible loss of data
		"/wd4267"						# same as 4244
		"/wd4996"						# deprecated POSIX functions
		"-D_CRT_SECURE_NO_WARNINGS"		# don't warn about deprecated functions
	)
	foreach(FLAG ${MSVC_FLAGS})
		set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}")
	endforeach()

endif()


#---------------------------------------------------------------------------
# Find libraries.
#---------------------------------------------------------------------------

# Locate gmpxx. On Homebrew there seems to be constantly something wrong with
# the pkgconfig for gmpxx. So we just add the include path by hand.
if(APPLE)
   add_definitions("-I/usr/local/include -I/opt/local/include")
endif()
if(MSVC)
  find_package(GMPXX REQUIRED)
  set(GMP_LIB "${GMPXX_LIBRARIES}")
  set(GMPXX_LIB "${GMPXX_LIBRARIES}")
  include_directories("${VCPKG_INCLUDE_DIRS}")
else()
  find_library(GMP_LIB gmp REQUIRED)
  find_library(GMPXX_LIB gmpxx REQUIRED)
  message(STATUS "Found gmp ${GMP_LIB}")
  message(STATUS "Found gmpxx ${GMPXX_LIB}")
endif()


#---------------------------------------------------------------------------
# Enumerate source files.
#---------------------------------------------------------------------------

SET(RESERVED_NODE_SRC_FILES
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/ReservedNode.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Equals.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Sum.cc
)

set(LOCAL_SRC_FILES
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Adjform.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Algorithm.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Cleanup.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Combinatorics.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Compare.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/DisplayBase.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/DisplayTeX.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/DisplaySympy.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/DisplayTerminal.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Grouping.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/TerminalStream.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Multiplier.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/NDSolver.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/NEvaluator.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/NTensor.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/NInterpolatingFunction.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Exceptions.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Exchange.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/ExManip.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Functional.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/IndexIterator.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/IndexClassifier.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Hash.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Kernel.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Parser.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/PreClean.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/PreProcessor.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/ProgressMonitor.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Props.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Stopwatch.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Storage.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Symbols.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/YoungTab.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Accent.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/AntiCommuting.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/AntiSymmetric.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Commuting.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/CommutingAsProduct.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/CommutingAsSum.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/CommutingBehaviour.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Coordinate.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/DAntiSymmetric.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Depends.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/DependsInherit.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Derivative.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/DerivativeOp.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Determinant.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Diagonal.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/DifferentialForm.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/DiracBar.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Distributable.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/EpsilonTensor.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/ExteriorDerivative.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/FilledTableau.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/GammaMatrix.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/GammaTraceless.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/ImaginaryI.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/ImplicitIndex.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Indices.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Integer.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/InverseMetric.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/KroneckerDelta.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/LaTeXForm.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Matrix.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Metric.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/NonCommuting.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/NumericalFlat.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/PartialDerivative.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/RiemannTensor.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/SatisfiesBianchi.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/SelfAntiCommuting.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/SelfCommuting.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/SelfNonCommuting.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/SortOrder.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Spinor.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Symbol.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Symmetric.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Tableau.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/TableauBase.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/TableauInherit.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/TableauSymmetry.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Trace.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Traceless.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/Weight.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/WeightInherit.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/WeylTensor.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/modules/xperm_new.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/canonicalise.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/collect_components.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/collect_factors.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/collect_terms.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/combine.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/complete.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/decompose_product.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/distribute.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/drop_weight.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/einsteinify.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/eliminate_kronecker.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/eliminate_metric.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/epsilon_to_delta.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/evaluate.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/expand.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/expand_delta.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/expand_diracbar.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/expand_power.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/factor_in.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/factor_out.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/fierz.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/first_order_form.cc  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/flatten_product.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/flatten_sum.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/indexsort.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/integrate_by_parts.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/join_gamma.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/keep_terms.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/lr_tensor.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/order.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/product_rule.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/reduce_delta.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/rename_dummies.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/rewrite_indices.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/simplify.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/sort_product.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/sort_sum.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/split_gamma.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/split_index.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/substitute.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/sym.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/tab_basics.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/take_match.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/replace_match.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/unwrap.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/vary.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/young_project.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/young_project_product.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/young_project_tensor.cc
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/meld.cc
  SympyDummy.cc
)
set(MAIN_HEADERS
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Adjform.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Algorithm.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Combinatorics.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Compare.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/DisplayBase.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/DisplayTerminal.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/NEvaluator.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Equals.hh  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Exceptions.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/ExManip.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/IndexClassifier.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/IndexIterator.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Kernel.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/lru_cache.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Hash.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Multiplier.hh  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/NTensor.hh  
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Parser.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/ProgressMonitor.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Props.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/ReservedNode.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Storage.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Stopwatch.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/Sum.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/TerminalStream.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/tree.hh
  ${CMAKE_CURRENT_SOURCE_DIR}/../core/YoungTab.hh
  )
FILE(GLOB ALGO_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../core/algorithms/*.hh)
FILE(GLOB PROP_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../core/properties/*.hh)

# Copy relevant header files to the binary directory
file(COPY ${MAIN_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/include/cadabra2++)
file(COPY ${ALGO_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/include/cadabra2++/algorithms)
file(COPY ${PROP_HEADERS} DESTINATION ${CMAKE_BINARY_DIR}/include/cadabra2++/properties)

# Create a 'master' header which includes all the above for convenience
file(WRITE "${CMAKE_BINARY_DIR}/include/cadabra2++.hh" "// Main headers\n")
foreach(HEADER ${MAIN_HEADERS})
	get_filename_component(FILENAME "${HEADER}" NAME)
	file(APPEND "${CMAKE_BINARY_DIR}/include/cadabra2++.hh" "#include \"cadabra2++/${FILENAME}\"\n")
endforeach()
file(APPEND "${CMAKE_BINARY_DIR}/include/cadabra2++.hh" "\n// Properties\n")
foreach(HEADER ${PROP_HEADERS})
	get_filename_component(FILENAME "${HEADER}" NAME)
	file(APPEND "${CMAKE_BINARY_DIR}/include/cadabra2++.hh" "#include \"cadabra2++/properties/${FILENAME}\"\n")
endforeach()
file(APPEND "${CMAKE_BINARY_DIR}/include/cadabra2++.hh" "\n// Algorithms\n")
foreach(HEADER ${ALGO_HEADERS})
	get_filename_component(FILENAME "${HEADER}" NAME)
	file(APPEND "${CMAKE_BINARY_DIR}/include/cadabra2++.hh" "#include \"cadabra2++/algorithms/${FILENAME}\"\n")
endforeach()
file(READ ${CMAKE_CURRENT_SOURCE_DIR}/cpplib.hh.in CPPLIB_HH_IN)
file(APPEND "${CMAKE_BINARY_DIR}/include/cadabra2++.hh" "\n//Helper functions\n${CPPLIB_HH_IN}")

set(LIB_INCLUDE_DIRS
	"." 
	"${CADABRA_CORE_DIR}"
	"${CADABRA_LIBS_DIR}/pybind11/include"
	"${CADABRA_LIBS_DIR}/internal/include"
	"${CADABRA_LIBS_DIR}/dbg"
	${Python_INCLUDE_DIRS}
)
message("${LIB_INCLUDE_DIRS}")

if(USE_TREETRACKER)
  add_definitions(-DUSE_TREETRACKER)
  if(EXISTS "${PATH_TREETRACKER}/treetracker.h" OR EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${PATH_TREETRACKER}/treetracker.h")
	 include_directories(${PATH_TREETRACKER})
	 message("-- Using the TreeTracker scalar backend at ${PATH_TREETRACKER}")
  else()
	 message(FATAL_ERROR "-- Cannot find the 'treetracker.h' file in '${PATH_TREETRACKER}'")
  endif()
else()
  message("-- Not using the TreeTracker scalar backend")
endif()


#---------------------------------------------------------------------------
# Targets
#---------------------------------------------------------------------------

add_library(cadabra2++objects         OBJECT ${LOCAL_SRC_FILES} ${RESERVED_NODE_SRC_FILES})
set_property(TARGET cadabra2++objects PROPERTY POSITION_INDEPENDENT_CODE 1)
target_include_directories(cadabra2++objects PUBLIC "${LIB_INCLUDE_DIRS}")

add_library(cadabra2++         SHARED $<TARGET_OBJECTS:cadabra2++objects>)
set_target_properties(cadabra2++        PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADER_FILES}")

target_link_libraries(cadabra2++        ${GMPXX_LIB} ${GMP_LIB} ${Python_LIBRARIES})

add_library(cadabra2++_static  STATIC $<TARGET_OBJECTS:cadabra2++objects>)
target_link_libraries(cadabra2++_static ${GMPXX_LIB} ${GMP_LIB} ${Python_LIBRARIES})

if(TBB_FOUND)
  target_link_libraries(cadabra2++ TBB::tbb)
  target_compile_definitions(cadabra2++objects PRIVATE HAS_TBB)
endif()

# Trivial example
add_executable(trivial trivial.cc)
target_include_directories(trivial PUBLIC
  "${CADABRA_LIBS_DIR}/pybind11/include"
  "${CMAKE_BINARY_DIR}/include"
  "${CMAKE_BINARY_DIR}/include/cadabra2++"
  ${Python_INCLUDE_DIRS}
)
target_link_libraries(trivial cadabra2++)

# Sample executable
add_executable(simple simple.cc)
target_include_directories(simple PUBLIC
  "${CADABRA_LIBS_DIR}/pybind11/include"
  "${CMAKE_BINARY_DIR}/include"
  "${CMAKE_BINARY_DIR}/include/cadabra2++"
  ${Python_INCLUDE_DIRS}
)
target_link_libraries(simple cadabra2++)
 
# Test for adjform
add_executable(adjform adjform.cc)
target_include_directories(adjform PUBLIC
  "${CADABRA_LIBS_DIR}/pybind11/include"
  "${CMAKE_BINARY_DIR}/include"
  "${CMAKE_BINARY_DIR}/include/cadabra2++"
  ${Python_INCLUDE_DIRS}
)
target_link_libraries(adjform cadabra2++)
 
# Test for numerical evaluation
add_executable(nevaluate nevaluate.cc)
target_include_directories(nevaluate PUBLIC
  "${CADABRA_LIBS_DIR}/pybind11/include"
  "${CMAKE_BINARY_DIR}/include"
  "${CMAKE_BINARY_DIR}/include/cadabra2++"
  ${Python_INCLUDE_DIRS}
)
target_link_libraries(nevaluate cadabra2++)
 

#---------------------------------------------------------------------------
# Installation
#---------------------------------------------------------------------------

install(TARGETS  cadabra2++        LIBRARY DESTINATION "${INSTALL_LIB_DIR}")
install(TARGETS  cadabra2++_static LIBRARY DESTINATION "${INSTALL_LIB_DIR}" ARCHIVE DESTINATION "${INSTALL_LIB_DIR}")
install(DIRECTORY ${CMAKE_BINARY_DIR}/include DESTINATION "${INSTALL_INCLUDE_DIR}")

install(DIRECTORY 
	DESTINATION bin 
	DIRECTORY_PERMISSIONS 
		OWNER_READ 
		OWNER_WRITE 
		OWNER_EXECUTE
		GROUP_READ 
		GROUP_EXECUTE
		WORLD_READ 
		WORLD_EXECUTE
)

install(DIRECTORY 
	DESTINATION lib
	DIRECTORY_PERMISSIONS 
		OWNER_READ 
		OWNER_WRITE 
		OWNER_EXECUTE
		GROUP_READ 
		GROUP_EXECUTE
		WORLD_READ 
		WORLD_EXECUTE
)


================================================
FILE: c++lib/README.txt
================================================
This directory contains code to illustrate the use of Cadabra from
within C++ programs.


================================================
FILE: c++lib/SympyDummy.cc
================================================

#include "Parser.hh"
#include "Cleanup.hh"
#include "PreClean.hh"
#include "SympyCdb.hh"
#include "DisplaySympy.hh"
#ifdef USE_TREETRACKER
#include "treetracker.h"
#endif
#include <sstream>

cadabra::Ex::iterator sympy::apply(const cadabra::Kernel& kernel, cadabra::Ex& ex, cadabra::Ex::iterator& it,
                                   const std::vector<std::string>& head, std::vector<std::string> args,
                                   const std::string& method)
	{
	std::ostringstream str;

	if(head.size()>0)
		str << head[0] << "(";

	cadabra::DisplaySympy ds(kernel, ex);
	ds.output(str, it);

	if(head.size()>0)
		if(args.size()>0)
			str << ", " << args[0] << ")";
	str << method;

	if(head.size()>0)
		str << ")";

	//	std::cerr << "Send: " << str.str() << std::endl;

#ifdef USE_TREETRACKER

	auto res = TreeTracker::FromString(str.str());
	res.RecursiveSimplify();
	std::stringstream istr;
	res.ShowTree(istr, 0, false, true);
	//	std::cerr << "Return: " << istr.str() << std::endl;
	auto ptr = std::make_shared<cadabra::Ex>();
	cadabra::Parser parser(ptr);
	istr >> parser;
	pre_clean_dispatch_deep(kernel, *parser.tree);
	cleanup_dispatch_deep(kernel, *parser.tree);
	//parser.tree->print_recursive_treeform(std::cerr, parser.tree->begin());
	ds.import(*parser.tree);

	cadabra::Ex::iterator first=parser.tree->begin();
	it = ex.move_ontop(it, first);
#endif

	return it;
	}

void sympy::invert_matrix(const cadabra::Kernel& kernel, cadabra::Ex& ex,
								  cadabra::Ex& rules, const cadabra::Ex& tocompute)
	{
	throw std::logic_error("Not implemented: sympy::invert_matrix");
	}

void sympy::determinant(const cadabra::Kernel&, cadabra::Ex& ex, cadabra::Ex& rules, const cadabra::Ex& tocompute)
	{
	throw std::logic_error("Not implemented: sympy::determinant");
	}

void sympy::trace(const cadabra::Kernel&, cadabra::Ex& ex, cadabra::Ex& rules, const cadabra::Ex& tocompute)
	{
	throw std::logic_error("Not implemented: sympy::trace");
	}


================================================
FILE: c++lib/adjform.cc
================================================
#include "cadabra2++.hh"
#include <iostream>

using namespace cadabra;
using namespace cadabra::cpplib;

int main(int, char**)
{
	Kernel k(true);
	pprint_enable_utf8();
    //{\mu,\nu}::Indices(vector).
    //tr{#}::Trace.
    //u^{\mu}::SelfNonCommuting.
    //u^{\mu}::ImplicitIndex.
    //ex:=tr{A u^{\nu} u^{\mu} u^{\mu} u^{\nu} + B u^{\mu} u^{\mu} u^{\nu} u^{\nu}}:
    //meld(_);

	inject_property<SelfNonCommuting>(k, "{A,B,C,D }");
	inject_property<Trace>(k, "tr{#}");

	auto ex = R"(tr(A B C D + B C D A)"_ex(k);
	meld m(k, *ex);
	std::cout << pprint(k, ex) << '\n';
	m.apply_pre_order();
	std::cout << pprint(k, ex) << '\n';
	// assert ex == $2 * Tr{ A B C D }$
	
}


================================================
FILE: c++lib/cpplib.hh.in
================================================
#ifdef _MSC_VER
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif

namespace cadabra {
	namespace cpplib {

		using ExPtr = std::shared_ptr<Ex>;

		namespace detail {
			struct ExConstructorProxy
			{
				ExConstructorProxy(const char* data) : data(data) {}
				ExPtr operator () (Kernel& kernel)
				{
					return kernel.ex_from_string(data);
				}
				std::string data;
			};

			struct ExPrettyPrinter
			{
				ExPrettyPrinter(const Kernel& kernel, Ex::iterator it, bool use_unicode = true)
					: kernel(kernel)
					, ex(it)
					, use_unicode(use_unicode) {}
				const Kernel& kernel;
				Ex ex;
				bool use_unicode;
			};
		}

		ExPtr copy(const ExPtr& ex)
		{
			return std::make_shared<Ex>(*ex);
		}

		template <typename Prop>
		void inject_property(Kernel& kernel, const ExPtr& pattern, const ExPtr& args = nullptr)
		{
			kernel.inject_property(new Prop(), pattern, args);
		}

		template <typename Prop>
		void inject_property(Kernel& kernel, const char* pattern, const ExPtr& args = nullptr)
		{
			inject_property<Prop>(kernel, kernel.ex_from_string(pattern), args);
		}

		template <typename Prop>
		void inject_property(Kernel& kernel, const ExPtr& pattern, const char* args)
		{
			inject_property<Prop>(kernel, pattern, kernel.ex_from_string(args));
		}

		template <typename Prop>
		void inject_property(Kernel& kernel, const char* pattern, const char* args)
		{
			inject_property<Prop>(kernel, kernel.ex_from_string(pattern), kernel.ex_from_string(args));
		}

		template <typename Algo, typename... Args>
		ExPtr apply(const Kernel& kernel, const ExPtr& ex, Args&&... args,  bool deep = true, bool repeat = false, unsigned int depth = 0)
		{
			Algo algo(kernel, *ex, std::forward<Args>(args)...);
			algo.apply_generic(deep, repeat, depth);
			return ex;
		}

		template <typename Algo, typename... Args>
		ExPtr apply(const Kernel& kernel, const ExPtr& ex, Ex::iterator it, Args&&... args, bool deep = true, bool repeat = false, unsigned int depth = 0)
		{
			Algo algo(kernel, *ex, std::forward<Args>(args)...);
			algo.apply_generic(it, deep, repeat, depth);
			return ex;
		}

		template <typename Algo, typename... Args>
		ExPtr apply_preorder(const Kernel& kernel, const ExPtr& ex, Args&&... args)
		{
			Algo algo(kernel, *ex, std::forward<Args>(args)...);
			algo.apply_pre_order();
			return ex;
		}

		inline void pprint_enable_utf8()
		{
			// Set the codepage on windows to utf8
#ifdef _MSC_VER
			SetConsoleOutputCP(65001);
#endif
		}

		inline detail::ExConstructorProxy operator "" _ex(const char* ex, std::size_t n)
		{
			return detail::ExConstructorProxy(ex);
		}

		inline detail::ExPrettyPrinter pprint(const Kernel& kernel, const ExPtr& ex, bool use_unicode = true)
		{
			return detail::ExPrettyPrinter(kernel, ex->begin(), use_unicode);
		}

		inline detail::ExPrettyPrinter pprint(const Kernel& kernel, const Ex& ex, bool use_unicode = true)
		{
			return detail::ExPrettyPrinter(kernel, ex.begin(), use_unicode);
		}

		inline detail::ExPrettyPrinter pprint(const Kernel& kernel, Ex::iterator it, bool use_unicode = true)
		{
			return detail::ExPrettyPrinter(kernel, it, use_unicode);
		}

		inline std::ostream& operator << (std::ostream& stream, const detail::ExPrettyPrinter& pretty_printer)
		{
			DisplayTerminal dt(pretty_printer.kernel, pretty_printer.ex, pretty_printer.use_unicode);
			dt.output(stream);
			return stream;
		}
	}
}


================================================
FILE: c++lib/nevaluate.cc
================================================
#include "cadabra2++.hh"
#include <iostream>

using namespace cadabra;
using namespace cadabra::cpplib;

int main(int, char **)
	{
	Kernel k(true);
	pprint_enable_utf8();
	//{\mu,\nu}::Indices(vector).
	// tr{#}::Trace.
	// u^{\mu}::SelfNonCommuting.
	// u^{\mu}::ImplicitIndex.
	// ex:=tr{A u^{\nu} u^{\mu} u^{\mu} u^{\nu} + B u^{\mu} u^{\mu} u^{\nu}
	// u^{\nu}}: meld(_);

//	inject_property<SelfNonCommuting>(k, "{A,B,C,D }");
//	inject_property<Trace>(k, "tr{#}");

	// Scalar broadcast
	NTensor t3a( { 2.0 } );
	std::cerr << "t3a.shape.size() = " << t3a.shape.size() << std::endl;
	std::cerr << "t3a.shape[0]     = " << t3a.shape[0] << std::endl;	
	NTensor t432a=t3a.broadcast( {4, 1}, 1 );
	std::cerr << t432a << std::endl;

	// NTensor broadcast
	NTensor t3( { 1.0, 2.0, 3.0 } );
	NTensor t432=t3.broadcast( {4,3,2}, 1 );
	std::cerr << t432 << std::endl;

	NTensor t3c( { 1.0, 2.0, 3.0 } );
	NTensor t432c1=t3c.broadcast( {3,3,2}, 1 );
	std::cerr << t432c1 << std::endl;
	NTensor t432c2=t3c.broadcast( {3,3,2}, 0 );
	std::cerr << t432c2 << std::endl;


	// Multiplying two scalar variables which each take
	// an array of values leads to an outer product.

	auto ex1b = "B*A + A"_ex(k);
	NEvaluator ev1b(ex1b->begin());
	ev1b.set_variable(Ex("A"), NTensor({1.0, 2.0, 3.0}));
	ev1b.set_variable(Ex("B"), NTensor({0.5, 1.0, 5.0, 10.0}));
	// This should give a {3, 4} tensor.
	auto res1b = ev1b.evaluate();
	std::cout << "B*A + A = " << res1b << "\n\n";

	auto ex1 = "B*A + C"_ex(k);
	NEvaluator ev1(ex1->begin());
	ev1.set_variable(Ex("A"), NTensor({1.0, 2.0, 3.0}));
	ev1.set_variable(Ex("B"), NTensor({0.5, 1.0, 5.0, 10.0}));
	ev1.set_variable(Ex("C"), NTensor({1.0, -1.0}));
	// This should give a {3, 4, 2} tensor.
	auto res1 = ev1.evaluate();
	std::cout << "B*A + C = " << res1 << "\n\n";

	// Trigonometric functions.

	auto ex2 = R"( A + B \cos( C ) )"_ex(k);
	std::cout << pprint(k, ex2) << '\n';
	NTensor nt2({2,4}, 0.0);
	nt2.at({1,2}) = 3.1415;
	for(auto& v: nt2.values)
		std::cout << v << ", ";
	std::cout << "\n\n";
	std::cout << nt2 << std::endl;

	NEvaluator ev(ex2->begin());
	ev.set_variable(Ex("C"), { 3.0 });
	ev.set_variable(Ex("B"), { 2.3 });
	ev.set_variable(Ex("A"), { 1.2 });
	auto res2 = ev.evaluate();
	std::cout << "A + B cos(C) = " << res2 << "\n\n";

	// Double trig.
	Stopwatch sw;
	auto ex3 = R"( \cos(x) \sin(y) )"_ex(k);
	NEvaluator ev3(ex3->begin());
	ev3.set_variable(Ex("x"), NTensor::linspace(0.0, 3.14, 1000));
	ev3.set_variable(Ex("y"), NTensor::linspace(0.0, 3.14, 1000));
	sw.start();
	int num=100;
	for(int i=0; i<num; ++i) {
		auto res3 = ev3.evaluate();
		}
	sw.stop();
	sw /= num;
	std::cout << "cos(x) sin(y) over a 1000x1000 grid took " << sw << " on average\n\n";

	// Array indexing.

	NTensor nt({2,4,3}, 0.0);
	nt.at({1,2,0}) = 6.2830;
	nt.at({0,3,2}) = -6.2830;
	std::cout << nt << std::endl;

	std::cout << "is this real? " << nt.is_real() << std::endl;
	}


================================================
FILE: c++lib/nevaluate.py
================================================
#!/usr/bin/python3
#
# Test program to determine the speed of sympy/numpy numerical
# evaluation of functions, to compare with our C++ implementation (see
# nevaluate.cc for details; we about 1.5 faster for this example,
# provided we force numpy to do the computations over the complex
# numbers, like we do in Cadabra).

from sympy import *
from sympy.abc import x,y
import numpy
import time

expr = cos(x)*sin(y)
f = lambdify([x,y], expr, "numpy")
xl = numpy.linspace(0, 3.14, 1000, dtype=complex)
yl = numpy.linspace(0, 3.14, 1000, dtype=complex)
X, Y = numpy.meshgrid(xl, yl)
#F = numpy.vectorize(f)

total = 0
num = 100
for i in range(num):
    start = time.time()
    q = f(X, Y)
    end = time.time()
    total += (end - start)

print("cos(x)*sin(y) with numpy over a 1000x1000 grid took", total/num, "seconds on average")



================================================
FILE: c++lib/simple.cc
================================================
#include "cadabra2++/Parser.hh"
#include "cadabra2++/Storage.hh"
#include "cadabra2++/DisplayTerminal.hh"
#include "cadabra2++/algorithms/substitute.hh"
#include "cadabra2++/algorithms/evaluate.hh"
#include "cadabra2++/TerminalStream.hh"
#include "cadabra2++/properties/PartialDerivative.hh"
#include "cadabra2++/properties/Coordinate.hh"

#include <iostream>
#include <sstream>

/// \file simple.cc
/// \ingroup libcadabra
///
/// Sample program to demonstrate the use of Cadabra directly from C++ code.

void test1()
	{
	// The following few lines are equivalent to entering
	//
	//    {r,t}::Coordinate.
	//    {m,n}::Indices(values={t,r}, position=free).
	//    ex:= A_{m} A^{m};
	//    rl:= A_{t} = 3 + a;
	//    evaluate(ex, rl);
	//
	// in the Cadabra notebook.

	cadabra::Kernel kernel;

	kernel.inject_property(new cadabra::Coordinate(), kernel.ex_from_string("{r,t}"), 0);
	kernel.inject_property(new cadabra::Indices(),    kernel.ex_from_string("{m,n}"),
	                       kernel.ex_from_string("values={t,r}, position=free"));

	auto ex = kernel.ex_from_string("A_{m} A^{m}");
	auto rl = kernel.ex_from_string("A_{t} = 3 + a ");
	cadabra::evaluate ev(kernel, *ex, *rl);
	ev.apply_generic();

	// Pretty-printing stream object.
	cadabra::TerminalStream ss(kernel, std::cerr);
	ss << ex << std::endl;
	}

void test2()
	{
	// The following few lines are equivalent to entering
	//
	//    {m,n,p,q}::Indices(position=free).
	//    \partial{#}::PartialDerivative;
	//    ex:= \int{ F_{m n} F^{m n} }{x};
	//    rl:= F_{m n} = \\partial_{m}{A_{n}} - \\partial_{n}{A_{m}};
	//    substitute(ex, rl, deep=True);
	//
	// in the Cadabra notebook.

	cadabra::Kernel kernel;

	auto ind1 = kernel.ex_from_string("{m,n,p,q}");
	auto ind2 = kernel.ex_from_string("position=free");
	kernel.inject_property(new cadabra::Indices(), ind1, ind2);

	auto pd   = kernel.ex_from_string("\\partial{#}");
	kernel.inject_property(new cadabra::PartialDerivative(), pd, 0);

	auto ex = kernel.ex_from_string("\\int{ F_{m n} F^{m n} }{x}");
	auto rl = kernel.ex_from_string("F_{m n} = \\partial_{m}{A_{n}} - \\partial_{n}{A_{m}}");

	// Pretty-printing stream object.
	cadabra::TerminalStream ss(kernel, std::cerr);

	ss << ex << std::endl;
	ss << rl << std::endl;

	// Apply the 'substitute' algorithm.
	cadabra::substitute subs(kernel, *ex, *rl);
	subs.apply_generic();

	ss << ex << std::endl;
	}


int main(int argc, char **argv)
	{
	test1();
	test2();
	}


================================================
FILE: c++lib/trivial.cc
================================================
#include "cadabra2++.hh"
#include <iostream>

using namespace cadabra;
using namespace cadabra::cpplib;

int main() {
   Kernel k(true);
   inject_property<AntiCommuting>(k, "{A,B}");
   auto ex = "A B - B A"_ex(k);
   sort_product sp(k, *ex);
   sp.apply_generic();

	collect_terms ct(k, *ex);
	ct.apply_generic();
	
   std::cout << pprint(k, ex) << std::endl;
}


================================================
FILE: client_server/Actions.cc
================================================


#include "Actions.hh"
#include "DataCell.hh"
#include "DocumentThread.hh"
#include "GUIBase.hh"

#include <boost/core/demangle.hpp>
#include <iostream>
#include <fstream>

using namespace cadabra;

#define DEBUG(ln)
// #define DEBUG(ln) ln


ActionBase::ActionBase(DataCell::id_t id)
	: ref_id(id)
	{
	}

bool ActionBase::undoable() const
	{
	return true;
	}

void ActionBase::execute(DocumentThread& cl, GUIBase& )
	{
	if(ref_id.id==0) {
		// A zero ID means the current cell.
		ref = cl.current_cell;
		return;
		}
	else {
		// Lookup the cell with the given ID.
		auto it=cl.doc.begin();
		while(it!=cl.doc.end()) {
			if((*it).id().id==ref_id.id) {
				ref=it;
				return;
				}
			++it;
			}
		}

	// Not found, throw exception.
	std::string class_name = boost::core::demangle(typeid(*this).name());
	throw std::logic_error(class_name + ": cannot find cell with id "+std::to_string(ref_id.id));
	}

ActionAddCell::ActionAddCell(DataCell cell, DataCell::id_t ref_id, Position pos_, bool activate_)
	: ActionBase(ref_id)
	, newcell(cell)
	, pos(pos_)
	, activate(activate_)
	, is_replacement(false)
	, is_input_form(false)
	{
	}

void ActionAddCell::execute(DocumentThread& cl, GUIBase& gb)
	{
	ActionBase::execute(cl, gb);

	// Insert this DataCell into the DTree document. We first need
	// to figure out whether we already have a cell with the DataCell's
	// cell_id; in this case we have to replace, not append/insert.
	auto it=cl.doc.begin();
	while(it!=cl.doc.end()) {
		if((*it).id().id==newcell.id().id) {
			// FIXME: right now we only change textbuf.
			DEBUG( std::cerr << "found! " << it->id().id << ", " << static_cast<int>(it->cell_type) << std::endl; )
			it->textbuf=newcell.textbuf;
			gb.update_cell(cl.doc, it);
			is_replacement=true;
			return;
			}
		++it;
		}

	// If we get here we have to append/insert.
	DEBUG( std::cerr << "ActionAddCell::execute: add cell with id " << newcell.id().id; )
	switch(pos) {
		case Position::before:
			newref = cl.doc.insert(ref, newcell);
			DEBUG( std::cerr << " before "; )
			break;
		case Position::after:
			newref = cl.doc.insert_after(ref, newcell);
			DEBUG( std::cerr << " after "; )			
			break;
		case Position::child:
			newref = cl.doc.append_child(ref, newcell);
			DEBUG( std::cerr << " as child of "; )			
			break;
		}
	DEBUG( std::cerr << "  " << ref->id().id << std::endl; )
		
	child_num=cl.doc.index(newref);
	DEBUG( std::cerr << "ActionAddCell::execute: added as child " << child_num <<
			 ": |" << newcell.textbuf << "|" << std::endl; )
	gb.add_cell(cl.doc, newref, true);
	if(activate)
		gb.position_cursor(cl.doc, newref, -1);
	
	if(newcell.cell_type == DataCell::CellType::input_form)
		is_input_form=true;
	}

void ActionAddCell::revert(DocumentThread& cl, GUIBase& gb)
	{
	// Remove the GUI cell from the notebook and then
	// remove the corresponding DataCell from the DTree.

	DEBUG( std::cerr << "ActionAddCell::revert: removing child " << child_num << std::endl; )

	DTree::sibling_iterator ch;
	switch(pos) {
		case Position::before:
			// `ref` is a cell after our cell.
			ch = cl.doc.child(cl.doc.parent(ref), child_num);
			break;
		case Position::after:
			// `ref` is a cell before our cell.
			ch = cl.doc.child(cl.doc.parent(ref), child_num);
			break;
		case Position::child:
			// `ref` is a parent of our cell.
			ch = cl.doc.child(ref, child_num);
			break;
		}
	DEBUG( std::cerr << "ActionAddCell::revert: removing cell " << ch->textbuf << std::endl; )
	gb.remove_cell(cl.doc, ch);
	// std::cerr << "ActionAddCell::revert: finally erase datacell" << std::endl;
	cl.doc.erase(ch);
	}

bool ActionAddCell::undoable() const
	{
	return !(is_replacement || is_input_form);
	}

ActionPositionCursor::ActionPositionCursor(DataCell::id_t ref_id, Position pos_)
	: ActionBase(ref_id), needed_new_cell_with_id(0), pos(pos_)
	{
	}

void ActionPositionCursor::execute(DocumentThread& cl, GUIBase& gb)
	{
	ActionBase::execute(cl, gb);

	switch(pos) {
		case Position::in:
			// std::cerr << "in" << std::endl;
			newref = ref;
			break;
		case Position::next: {
			DTree::sibling_iterator sib=ref;
			bool found=false;
			while(cl.doc.is_valid(++sib)) {
				if(sib->cell_type==DataCell::CellType::python || sib->cell_type==DataCell::CellType::latex) {
					if(!sib->hidden) {
						newref=sib;
						found=true;
						break;
						}
					}
				}
			if(!found) {
				if(ref->textbuf=="") { // If the last cell is empty, stay where we are.
					newref=ref;
					}
				else {
					// Make sure that we store the generated cell id so we
					// can re-use it if we execute this in redo.
					if(needed_new_cell_with_id > 0) {
						DataCell::id_t id;
						id.id = needed_new_cell_with_id;
						DataCell newcell(id, DataCell::CellType::python, "");
						newref = cl.doc.insert(sib, newcell);
						}
					else {
						DataCell newcell(DataCell::CellType::python, "");
						needed_new_cell_with_id=newcell.id().id;
						newref = cl.doc.insert(sib, newcell);
						}
					}
				}
			break;
			}
		case Position::previous: {
			bool found=false;
			DTree::sibling_iterator sib=ref;
			while(cl.doc.is_valid(--sib)) {
				if(sib->cell_type==DataCell::CellType::python || sib->cell_type==DataCell::CellType::latex) {
					if(!sib->hidden) {
						newref=sib;
						found=true;
						break;
						}
					}
				}
			if(!found)
				newref=ref; // No previous sibling cell. FIXME: walk tree structure
			break;
			}
		}

	// Update GUI.
	if(needed_new_cell_with_id > 0) {
		// std::cerr << "cadabra-client: adding new visual cell before positioning cursor" << std::endl;
		gb.add_cell(cl.doc, newref, true);
		}
	// std::cerr << "cadabra-client: positioning cursor" << std::endl;
	gb.position_cursor(cl.doc, newref, -1);
	DEBUG( std::cerr << "ActionPositionCursor::execute: done" << std::endl; )
	}

void ActionPositionCursor::revert(DocumentThread& cl, GUIBase& gb)
	{
	if(needed_new_cell_with_id > 0) {
		gb.remove_cell(cl.doc, newref);
		cl.doc.erase(newref);
		}
	gb.position_cursor(cl.doc, ref, -1);
	DEBUG( std::cerr << "ActionPositionCursor::revert: done" << std::endl; )
	}

ActionRemoveCell::ActionRemoveCell(DataCell::id_t ref_id)
	: ActionBase(ref_id)
	{
	}

ActionRemoveCell::~ActionRemoveCell()
	{
	}

void ActionRemoveCell::execute(DocumentThread& cl, GUIBase& gb)
	{
	ActionBase::execute(cl, gb);

	gb.remove_cell(cl.doc, ref);

	reference_parent_cell = cl.doc.parent(ref);
	reference_child_index = cl.doc.index(ref);
	removed_tree=DTree(ref);
	DEBUG( std::cerr << "removed has " << cl.doc.number_of_children(ref) << " children" << std::endl; )
	cl.doc.erase(ref);
	}

void ActionRemoveCell::revert(DocumentThread& cl, GUIBase& gb)
	{
	DEBUG( std::cerr << "need to undo a remove cell at index " << reference_child_index << std::endl; )
	DTree::iterator newcell;
	if(cl.doc.number_of_children(reference_parent_cell)==0) {
		newcell = cl.doc.append_child(reference_parent_cell, removed_tree.begin());
		}
	else {
		auto it = cl.doc.child(reference_parent_cell, reference_child_index);
		//		++it;
		newcell = cl.doc.insert_subtree(it, removed_tree.begin());
		DEBUG( std::cerr << "added doc cell " << newcell->textbuf << " at " << &(*newcell) << " before " << it->textbuf << std::endl; )
		}
	gb.add_cell(cl.doc, newcell, true);
	DEBUG( std::cerr << "added vis rep" << std::endl; )
	}


ActionReplaceCell::ActionReplaceCell(DataCell::id_t ref_id)
	: ActionBase(ref_id)
	{
	}

ActionReplaceCell::~ActionReplaceCell()
	{
	}

void ActionReplaceCell::execute(DocumentThread& cl, GUIBase& gb)
	{
	}

void ActionReplaceCell::revert(DocumentThread& cl, GUIBase& gb)
	{
	}

bool ActionReplaceCell::undoable() const
	{
	return false;
	}

ActionSplitCell::ActionSplitCell(DataCell::id_t ref_id)
	: ActionBase(ref_id)
	{
	}

ActionSplitCell::~ActionSplitCell()
	{
	}

void ActionSplitCell::execute(DocumentThread& cl, GUIBase& gb)
	{
	ActionBase::execute(cl, gb);

	size_t pos = gb.get_cursor_position(cl.doc, ref);

	std::string segment1=ref->textbuf.substr(0, pos);
	std::string segment2=ref->textbuf.substr(pos);

	// Strip leading newline in 2nd segment, if any.
	if(segm
Download .txt
gitextract_noaq8p8m/

├── .editorconfig
├── .gitattributes
├── .github/
│   └── workflows/
│       ├── appimage-modern.yml
│       ├── c++lib.yml
│       ├── docker.yml
│       ├── fedora-40-package.yml
│       ├── fedora-41-package.yml
│       ├── fedora-42-package.yml
│       ├── freebsd.yml
│       ├── homebrew-devel.yml
│       ├── homebrew.yml
│       ├── linux.yml
│       ├── macos.yml
│       ├── opensuse-tumbleweed-package.yml
│       ├── tarball.yml
│       ├── ubuntu-22.04-package.yml
│       ├── ubuntu-24.04-package.yml
│       ├── windows-installer.yml
│       └── windows.yml
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CITATION.cff
├── CMakeLists.txt
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── JUPYTER.rst
├── LICENSE
├── Makefile
├── README.rst
├── c++lib/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── README.txt
│   ├── SympyDummy.cc
│   ├── adjform.cc
│   ├── cpplib.hh.in
│   ├── nevaluate.cc
│   ├── nevaluate.py
│   ├── simple.cc
│   └── trivial.cc
├── client_server/
│   ├── Actions.cc
│   ├── Actions.hh
│   ├── CMakeLists.txt
│   ├── ComputeThread.cc
│   ├── ComputeThread.hh
│   ├── DocumentThread.cc
│   ├── DocumentThread.hh
│   ├── GUIBase.hh
│   ├── ScriptThread.cc
│   ├── ScriptThread.hh
│   ├── Server.cc
│   ├── Server.hh
│   ├── Snoop.cc
│   ├── Snoop.hh
│   ├── TODO
│   ├── cadabra-jupyter-kernel.cc
│   ├── cadabra-jupyter-kernel.hh
│   ├── cadabra-jupyter-main.cc
│   ├── cadabra-server.cc
│   ├── cadabra2html.cc
│   ├── cadabra2latex.cc
│   ├── connection.json
│   ├── kernel.json
│   ├── notebook.html
│   ├── notebook.tex
│   ├── popen2.cc
│   ├── popen2.hh
│   ├── regexp_tester.cc
│   ├── test_client.cc
│   ├── test_talk_to_server.cc
│   ├── tree.hh
│   ├── websocket_client.cc
│   ├── websocket_client.hh
│   ├── websocket_server.cc
│   └── websocket_server.hh
├── cmake/
│   ├── cmake_uninstall.cmake.in
│   ├── functions.cmake
│   ├── modules/
│   │   ├── FindGLIBMM3.cmake
│   │   ├── FindGLIBMM4.cmake
│   │   ├── FindGMPXX.cmake
│   │   ├── FindGTKMM3.cmake
│   │   ├── FindGTKMM4.cmake
│   │   ├── FindJSONCPP.cmake
│   │   ├── FindLibPythonOSX.py
│   │   ├── FindMathematica.cmake
│   │   ├── FindMathematicaDocumentationBuild.cmake.in
│   │   ├── FindMathematicaTestDriver.cmd
│   │   ├── FindMathematicaTestDriver.sh
│   │   ├── FindPythonLibsOSX.cmake
│   │   ├── FindSQLITE3.cmake
│   │   ├── FindZeroMQ.cmake
│   │   └── cotire.cmake
│   ├── packaging.cmake
│   ├── policies.cmake
│   ├── version.cmake
│   └── windows.cmake
├── codemeta.json
├── conda/
│   ├── build.sh
│   └── meta.yaml
├── config/
│   ├── AppRun
│   ├── Doxyfile
│   ├── DoxygenLayout.xml
│   ├── DoxygenStyle.css
│   ├── README.txt
│   ├── buildbot.sh
│   ├── buildpkg.sh
│   ├── doxyrest-config.lua
│   ├── generate_keywords.py
│   ├── init-cadabra2.scm
│   ├── install_python_windows.cmake.in
│   ├── install_script.iss.in
│   ├── make.bat
│   ├── post_install.rtf
│   ├── postinst.in
│   ├── pre_install.rtf.in
│   ├── publish-doxygen
│   ├── science.cadabra.cadabra2-gtk.desktop.in
│   ├── shortcuts.wxs
│   ├── travisci_rsa.enc
│   └── travisci_rsa.pub
├── contrib/
│   ├── einstein_equations.cnb
│   └── structure_equations_and_bianchi.cnb
├── core/
│   ├── .gitignore
│   ├── Adjform.cc
│   ├── Adjform.hh
│   ├── Algorithm.cc
│   ├── Algorithm.hh
│   ├── Bridge.cc
│   ├── Bridge.hh
│   ├── CMakeLists.txt
│   ├── CdbPython.cc
│   ├── CdbPython.hh
│   ├── Cleanup.cc
│   ├── Cleanup.hh
│   ├── Combinatorics.cc
│   ├── Combinatorics.hh
│   ├── Compare.cc
│   ├── Compare.hh
│   ├── Config.hh.in
│   ├── DataCell.cc
│   ├── DataCell.hh
│   ├── Debug.hh
│   ├── DisplayBase.cc
│   ├── DisplayBase.hh
│   ├── DisplayMMA.cc
│   ├── DisplayMMA.hh
│   ├── DisplaySympy.cc
│   ├── DisplaySympy.hh
│   ├── DisplayTeX.cc
│   ├── DisplayTeX.hh
│   ├── DisplayTerminal.cc
│   ├── DisplayTerminal.hh
│   ├── Dummies.hh
│   ├── Equals.cc
│   ├── Equals.hh
│   ├── ExManip.cc
│   ├── ExManip.hh
│   ├── ExNode.cc
│   ├── ExNode.hh
│   ├── Exceptions.cc
│   ├── Exceptions.hh
│   ├── Exchange.cc
│   ├── Exchange.hh
│   ├── Functional.cc
│   ├── Functional.hh
│   ├── Grouping.cc
│   ├── Grouping.hh
│   ├── Hash.cc
│   ├── Hash.hh
│   ├── IndexClassifier.cc
│   ├── IndexClassifier.hh
│   ├── IndexIterator.cc
│   ├── IndexIterator.hh
│   ├── InstallPrefix.cc
│   ├── InstallPrefix.hh
│   ├── Kernel.cc
│   ├── Kernel.hh
│   ├── Linear.cc
│   ├── Linear.hh
│   ├── MMACdb.cc
│   ├── MMACdb.hh
│   ├── Media.cc
│   ├── Media.hh
│   ├── MultiIndex.hh
│   ├── Multiplier.cc
│   ├── Multiplier.hh
│   ├── NDSolver.cc
│   ├── NDSolver.hh
│   ├── NEvaluator.cc
│   ├── NEvaluator.hh
│   ├── NIntegrator.cc
│   ├── NIntegrator.hh
│   ├── NInterpolatingFunction.cc
│   ├── NInterpolatingFunction.hh
│   ├── NTensor.cc
│   ├── NTensor.hh
│   ├── Parser.cc
│   ├── Parser.hh
│   ├── Permutations.hh
│   ├── PreClean.cc
│   ├── PreClean.hh
│   ├── PreProcessor.cc
│   ├── PreProcessor.hh
│   ├── ProgressMonitor.cc
│   ├── ProgressMonitor.hh
│   ├── Props.cc
│   ├── Props.hh
│   ├── PythonException.cc
│   ├── PythonException.hh
│   ├── ReservedNode.cc
│   ├── ReservedNode.hh
│   ├── Stopwatch.cc
│   ├── Stopwatch.hh
│   ├── Storage.cc
│   ├── Storage.hh
│   ├── Sum.cc
│   ├── Sum.hh
│   ├── Symbols.cc
│   ├── Symbols.hh
│   ├── SympyCdb.cc
│   ├── SympyCdb.hh
│   ├── TerminalStream.cc
│   ├── TerminalStream.hh
│   ├── YoungTab.cc
│   ├── YoungTab.hh
│   ├── algorithms/
│   │   ├── all_contractions.tex
│   │   ├── asym.cnb
│   │   ├── canonicalise.cc
│   │   ├── canonicalise.cnb
│   │   ├── canonicalise.hh
│   │   ├── canonicalorder.tex
│   │   ├── coefficients.tex
│   │   ├── collect_components.cc
│   │   ├── collect_components.hh
│   │   ├── collect_factors.cc
│   │   ├── collect_factors.cnb
│   │   ├── collect_factors.hh
│   │   ├── collect_terms.cc
│   │   ├── collect_terms.cnb
│   │   ├── collect_terms.hh
│   │   ├── combine.cc
│   │   ├── combine.cnb
│   │   ├── combine.hh
│   │   ├── complete.cc
│   │   ├── complete.cnb
│   │   ├── complete.hh
│   │   ├── component.hh
│   │   ├── decompose.cc
│   │   ├── decompose.cnb
│   │   ├── decompose.hh
│   │   ├── decompose_product.cc
│   │   ├── decompose_product.cnb
│   │   ├── decompose_product.hh
│   │   ├── depprint.tex
│   │   ├── distribute.cc
│   │   ├── distribute.cnb
│   │   ├── distribute.hh
│   │   ├── drop_weight.cc
│   │   ├── drop_weight.cnb
│   │   ├── drop_weight.hh
│   │   ├── dualise_tensor.tex
│   │   ├── einsteinify.cc
│   │   ├── einsteinify.cnb
│   │   ├── einsteinify.hh
│   │   ├── eliminate_kronecker.cc
│   │   ├── eliminate_kronecker.cnb
│   │   ├── eliminate_kronecker.hh
│   │   ├── eliminate_metric.cc
│   │   ├── eliminate_metric.cnb
│   │   ├── eliminate_metric.hh
│   │   ├── eliminate_vielbein.cc
│   │   ├── eliminate_vielbein.cnb
│   │   ├── eliminate_vielbein.hh
│   │   ├── eliminate_vielbein.tex
│   │   ├── eliminateeps.tex
│   │   ├── epsilon_to_delta.cc
│   │   ├── epsilon_to_delta.cnb
│   │   ├── epsilon_to_delta.hh
│   │   ├── evaluate.cc
│   │   ├── evaluate.cnb
│   │   ├── evaluate.hh
│   │   ├── expand.cc
│   │   ├── expand.cnb
│   │   ├── expand.hh
│   │   ├── expand_delta.cc
│   │   ├── expand_delta.cnb
│   │   ├── expand_delta.hh
│   │   ├── expand_diracbar.cc
│   │   ├── expand_diracbar.cnb
│   │   ├── expand_diracbar.hh
│   │   ├── expand_dummies.cc
│   │   ├── expand_dummies.cnb
│   │   ├── expand_dummies.hh
│   │   ├── expand_power.cc
│   │   ├── expand_power.cnb
│   │   ├── expand_power.hh
│   │   ├── expand_product_shorthand.tex
│   │   ├── explicit_indices.cc
│   │   ├── explicit_indices.cnb
│   │   ├── explicit_indices.hh
│   │   ├── factor_in.cc
│   │   ├── factor_in.cnb
│   │   ├── factor_in.hh
│   │   ├── factor_out.cc
│   │   ├── factor_out.cnb
│   │   ├── factor_out.hh
│   │   ├── fierz.cc
│   │   ├── fierz.cnb
│   │   ├── fierz.hh
│   │   ├── first_order_form.cc
│   │   ├── first_order_form.hh
│   │   ├── flatten_product.cc
│   │   ├── flatten_product.hh
│   │   ├── flatten_sum.cc
│   │   ├── flatten_sum.hh
│   │   ├── impose_asym.tex
│   │   ├── impose_bianchi.tex
│   │   ├── index_rename.tex
│   │   ├── indexlist.tex
│   │   ├── indexsort.cc
│   │   ├── indexsort.hh
│   │   ├── indexsort.tex
│   │   ├── inner.tex
│   │   ├── integrate_by_parts.cc
│   │   ├── integrate_by_parts.cnb
│   │   ├── integrate_by_parts.hh
│   │   ├── join_gamma.cc
│   │   ├── join_gamma.cnb
│   │   ├── join_gamma.hh
│   │   ├── keep_terms.cc
│   │   ├── keep_terms.hh
│   │   ├── keep_terms.tex
│   │   ├── keep_weight.cnb
│   │   ├── list_sum.tex
│   │   ├── listflatten.tex
│   │   ├── lower_free_indices.cc
│   │   ├── lower_free_indices.cnb
│   │   ├── lower_free_indices.hh
│   │   ├── lr_tensor.cc
│   │   ├── lr_tensor.cnb
│   │   ├── lr_tensor.hh
│   │   ├── lsolve.tex
│   │   ├── map_mma.cc
│   │   ├── map_mma.hh
│   │   ├── map_sympy.cc
│   │   ├── map_sympy.cnb
│   │   ├── map_sympy.hh
│   │   ├── meld.cc
│   │   ├── meld.cnb
│   │   ├── meld.hh
│   │   ├── ndsolve.cnb
│   │   ├── nevaluate.cc
│   │   ├── nevaluate.cnb
│   │   ├── nevaluate.hh
│   │   ├── nval.cc
│   │   ├── nval.cnb
│   │   ├── nval.hh
│   │   ├── order.cc
│   │   ├── order.hh
│   │   ├── order.tex
│   │   ├── permute.tex
│   │   ├── product_rule.cc
│   │   ├── product_rule.cnb
│   │   ├── product_rule.hh
│   │   ├── product_shorthand.tex
│   │   ├── projweyl.tex
│   │   ├── properties.tex
│   │   ├── proplist.tex
│   │   ├── raise_free_indices.cnb
│   │   ├── range.tex
│   │   ├── reduce.tex
│   │   ├── reduce_delta.cc
│   │   ├── reduce_delta.cnb
│   │   ├── reduce_delta.hh
│   │   ├── remove_indexbracket.tex
│   │   ├── remove_weyl_traces.tex
│   │   ├── rename_dummies.cc
│   │   ├── rename_dummies.cnb
│   │   ├── rename_dummies.hh
│   │   ├── replace_match.cc
│   │   ├── replace_match.cnb
│   │   ├── replace_match.hh
│   │   ├── rewrite_indices.cc
│   │   ├── rewrite_indices.cnb
│   │   ├── rewrite_indices.hh
│   │   ├── simplify.cc
│   │   ├── simplify.cnb
│   │   ├── simplify.hh
│   │   ├── slot_asym.cnb
│   │   ├── sort_product.cc
│   │   ├── sort_product.cnb
│   │   ├── sort_product.hh
│   │   ├── sort_spinors.cc
│   │   ├── sort_spinors.cnb
│   │   ├── sort_spinors.hh
│   │   ├── sort_sum.cc
│   │   ├── sort_sum.cnb
│   │   ├── sort_sum.hh
│   │   ├── split.cc
│   │   ├── split.hh
│   │   ├── split_gamma.cc
│   │   ├── split_gamma.cnb
│   │   ├── split_gamma.hh
│   │   ├── split_index.cc
│   │   ├── split_index.cnb
│   │   ├── split_index.hh
│   │   ├── substitute.cc
│   │   ├── substitute.cnb
│   │   ├── substitute.hh
│   │   ├── sumflatten.tex
│   │   ├── sym.cc
│   │   ├── sym.hh
│   │   ├── sym.tex
│   │   ├── tab_basics.cc
│   │   ├── tab_basics.hh
│   │   ├── tab_dimension.cc
│   │   ├── tab_dimension.hh
│   │   ├── tabcanonicalise.tex
│   │   ├── tabdimension.tex
│   │   ├── tabstandardform.tex
│   │   ├── take_match.cc
│   │   ├── take_match.cnb
│   │   ├── take_match.hh
│   │   ├── tree.tex
│   │   ├── unique_indices.tex
│   │   ├── untrace.cc
│   │   ├── untrace.cnb
│   │   ├── untrace.hh
│   │   ├── unwrap.cc
│   │   ├── unwrap.cnb
│   │   ├── unwrap.hh
│   │   ├── unzoom.cc
│   │   ├── unzoom.hh
│   │   ├── vary.cc
│   │   ├── vary.cnb
│   │   ├── vary.hh
│   │   ├── weyl_index_order.tex
│   │   ├── young_project.cc
│   │   ├── young_project.hh
│   │   ├── young_project.tex
│   │   ├── young_project_product.cc
│   │   ├── young_project_product.cnb
│   │   ├── young_project_product.hh
│   │   ├── young_project_tensor.cc
│   │   ├── young_project_tensor.cnb
│   │   ├── young_project_tensor.hh
│   │   ├── zoom.cc
│   │   ├── zoom.cnb
│   │   └── zoom.hh
│   ├── cadabra2-cli.cc
│   ├── cadabra2-cli.hh
│   ├── cadabra2.in
│   ├── cadabra2_defaults.py.in
│   ├── cadabra2cadabra.cc
│   ├── cadabra2ipynb.cc
│   ├── cadabra2python.cc
│   ├── cdb-nbtool.cc
│   ├── echokernel.py
│   ├── lru_cache.hh
│   ├── modules/
│   │   ├── Lie.cc
│   │   ├── xperm_new.cc
│   │   └── xperm_new.h
│   ├── packages/
│   │   ├── CMakeLists.txt
│   │   └── cdb/
│   │       ├── core/
│   │       │   ├── _component.cc
│   │       │   ├── component.cnb
│   │       │   ├── manip.cnb
│   │       │   ├── solve.cnb
│   │       │   └── trace.cnb
│   │       ├── gauge_theory/
│   │       │   └── instantons.cnb
│   │       ├── graphics/
│   │       │   └── plot.cnb
│   │       ├── interact/
│   │       │   └── slider.cnb
│   │       ├── main.py
│   │       ├── numeric/
│   │       │   ├── evaluate.cnb
│   │       │   └── integrate.cnb
│   │       ├── relativity/
│   │       │   ├── __init__.cdb
│   │       │   ├── abstract.cnb
│   │       │   └── schwarzschild.cnb
│   │       ├── remote/
│   │       │   ├── __init__.py
│   │       │   ├── highlight.py
│   │       │   ├── record.py
│   │       │   └── speech.py
│   │       ├── sympy/
│   │       │   ├── calculus.cnb
│   │       │   └── solvers.cnb
│   │       └── utils/
│   │           ├── _algorithm.cc
│   │           ├── develop.cnb
│   │           ├── indices.cnb
│   │           ├── node.cnb
│   │           ├── tableau.cnb
│   │           └── types.cnb
│   ├── passing.cc
│   ├── properties/
│   │   ├── Accent.cc
│   │   ├── Accent.cnb
│   │   ├── Accent.hh
│   │   ├── Accent.tex
│   │   ├── AntiCommuting.cc
│   │   ├── AntiCommuting.cnb
│   │   ├── AntiCommuting.hh
│   │   ├── AntiCommuting.tex
│   │   ├── AntiSelfDual.tex
│   │   ├── AntiSymmetric.cc
│   │   ├── AntiSymmetric.cnb
│   │   ├── AntiSymmetric.hh
│   │   ├── AntiSymmetric.tex
│   │   ├── Commuting.cc
│   │   ├── Commuting.cnb
│   │   ├── Commuting.hh
│   │   ├── Commuting.tex
│   │   ├── CommutingAsProduct.cc
│   │   ├── CommutingAsProduct.cnb
│   │   ├── CommutingAsProduct.hh
│   │   ├── CommutingAsProduct.tex
│   │   ├── CommutingAsSum.cc
│   │   ├── CommutingAsSum.cnb
│   │   ├── CommutingAsSum.hh
│   │   ├── CommutingAsSum.tex
│   │   ├── CommutingBehaviour.cc
│   │   ├── CommutingBehaviour.hh
│   │   ├── Coordinate.cc
│   │   ├── Coordinate.cnb
│   │   ├── Coordinate.hh
│   │   ├── Coordinate.tex
│   │   ├── DAntiSymmetric.cc
│   │   ├── DAntiSymmetric.cnb
│   │   ├── DAntiSymmetric.hh
│   │   ├── DAntiSymmetric.tex
│   │   ├── Depends.cc
│   │   ├── Depends.cnb
│   │   ├── Depends.hh
│   │   ├── Depends.tex
│   │   ├── DependsBase.hh
│   │   ├── DependsInherit.cc
│   │   ├── DependsInherit.hh
│   │   ├── DependsInherit.tex
│   │   ├── Derivative.cc
│   │   ├── Derivative.cnb
│   │   ├── Derivative.hh
│   │   ├── Derivative.tex
│   │   ├── DerivativeOp.cc
│   │   ├── DerivativeOp.hh
│   │   ├── Determinant.cc
│   │   ├── Determinant.cnb
│   │   ├── Determinant.hh
│   │   ├── Diagonal.cc
│   │   ├── Diagonal.cnb
│   │   ├── Diagonal.hh
│   │   ├── Diagonal.tex
│   │   ├── DifferentialForm.cc
│   │   ├── DifferentialForm.hh
│   │   ├── DifferentialFormBase.hh
│   │   ├── DiracBar.cc
│   │   ├── DiracBar.cnb
│   │   ├── DiracBar.hh
│   │   ├── DiracBar.tex
│   │   ├── Distributable.cc
│   │   ├── Distributable.cnb
│   │   ├── Distributable.hh
│   │   ├── Distributable.tex
│   │   ├── EpsilonTensor.cc
│   │   ├── EpsilonTensor.cnb
│   │   ├── EpsilonTensor.hh
│   │   ├── EpsilonTensor.tex
│   │   ├── ExteriorDerivative.cc
│   │   ├── ExteriorDerivative.hh
│   │   ├── FilledTableau.cc
│   │   ├── FilledTableau.cnb
│   │   ├── FilledTableau.hh
│   │   ├── FilledTableau.tex
│   │   ├── GammaMatrix.cc
│   │   ├── GammaMatrix.cnb
│   │   ├── GammaMatrix.hh
│   │   ├── GammaMatrix.tex
│   │   ├── GammaTraceless.cc
│   │   ├── GammaTraceless.hh
│   │   ├── GammaTraceless.tex
│   │   ├── ImaginaryI.cc
│   │   ├── ImaginaryI.hh
│   │   ├── ImplicitIndex.cc
│   │   ├── ImplicitIndex.cnb
│   │   ├── ImplicitIndex.hh
│   │   ├── ImplicitIndex.tex
│   │   ├── IndexInherit.cc
│   │   ├── IndexInherit.cnb
│   │   ├── IndexInherit.hh
│   │   ├── IndexInherit.tex
│   │   ├── Indices.cc
│   │   ├── Indices.cnb
│   │   ├── Indices.hh
│   │   ├── Indices.tex
│   │   ├── Integer.cc
│   │   ├── Integer.cnb
│   │   ├── Integer.hh
│   │   ├── Integer.tex
│   │   ├── Integral.hh
│   │   ├── InverseMetric.cc
│   │   ├── InverseMetric.cnb
│   │   ├── InverseMetric.hh
│   │   ├── InverseMetric.tex
│   │   ├── InverseVielbein.cnb
│   │   ├── InverseVielbein.tex
│   │   ├── KeepHistory.tex
│   │   ├── KroneckerDelta.cc
│   │   ├── KroneckerDelta.cnb
│   │   ├── KroneckerDelta.hh
│   │   ├── KroneckerDelta.tex
│   │   ├── LaTeXForm.cc
│   │   ├── LaTeXForm.cnb
│   │   ├── LaTeXForm.hh
│   │   ├── LaTeXForm.tex
│   │   ├── Matrix.cc
│   │   ├── Matrix.hh
│   │   ├── Matrix.tex
│   │   ├── Metric.cc
│   │   ├── Metric.cnb
│   │   ├── Metric.hh
│   │   ├── Metric.tex
│   │   ├── NonCommuting.cc
│   │   ├── NonCommuting.cnb
│   │   ├── NonCommuting.hh
│   │   ├── NonCommuting.tex
│   │   ├── NumericalFlat.cc
│   │   ├── NumericalFlat.hh
│   │   ├── NumericalFlat.tex
│   │   ├── PartialDerivative.cc
│   │   ├── PartialDerivative.cnb
│   │   ├── PartialDerivative.hh
│   │   ├── PartialDerivative.tex
│   │   ├── PostDefaultRules.tex
│   │   ├── PreDefaultRules.tex
│   │   ├── PropertyInherit.tex
│   │   ├── RiemannTensor.cc
│   │   ├── RiemannTensor.cnb
│   │   ├── RiemannTensor.hh
│   │   ├── RiemannTensor.tex
│   │   ├── SatisfiesBianchi.cc
│   │   ├── SatisfiesBianchi.cnb
│   │   ├── SatisfiesBianchi.hh
│   │   ├── SatisfiesBianchi.tex
│   │   ├── SelfAntiCommuting.cc
│   │   ├── SelfAntiCommuting.cnb
│   │   ├── SelfAntiCommuting.hh
│   │   ├── SelfAntiCommuting.tex
│   │   ├── SelfCommuting.cc
│   │   ├── SelfCommuting.cnb
│   │   ├── SelfCommuting.hh
│   │   ├── SelfCommuting.tex
│   │   ├── SelfCommutingBehaviour.hh
│   │   ├── SelfDual.tex
│   │   ├── SelfNonCommuting.cc
│   │   ├── SelfNonCommuting.cnb
│   │   ├── SelfNonCommuting.hh
│   │   ├── SelfNonCommuting.tex
│   │   ├── SigmaBarMatrix.tex
│   │   ├── SigmaMatrix.hh
│   │   ├── SigmaMatrix.tex
│   │   ├── SortOrder.cc
│   │   ├── SortOrder.cnb
│   │   ├── SortOrder.hh
│   │   ├── SortOrder.tex
│   │   ├── Spinor.cc
│   │   ├── Spinor.cnb
│   │   ├── Spinor.hh
│   │   ├── Spinor.tex
│   │   ├── Symbol.cc
│   │   ├── Symbol.cnb
│   │   ├── Symbol.hh
│   │   ├── Symmetric.cc
│   │   ├── Symmetric.cnb
│   │   ├── Symmetric.hh
│   │   ├── Symmetric.tex
│   │   ├── Tableau.cc
│   │   ├── Tableau.cnb
│   │   ├── Tableau.hh
│   │   ├── TableauBase.cc
│   │   ├── TableauBase.hh
│   │   ├── TableauInherit.cc
│   │   ├── TableauInherit.hh
│   │   ├── TableauSymmetry.cc
│   │   ├── TableauSymmetry.cnb
│   │   ├── TableauSymmetry.hh
│   │   ├── TableauSymmetry.tex
│   │   ├── Trace.cc
│   │   ├── Trace.cnb
│   │   ├── Trace.hh
│   │   ├── Traceless.cc
│   │   ├── Traceless.hh
│   │   ├── Traceless.tex
│   │   ├── Vielbein.cc
│   │   ├── Vielbein.cnb
│   │   ├── Vielbein.hh
│   │   ├── Vielbein.tex
│   │   ├── Weight.cc
│   │   ├── Weight.cnb
│   │   ├── Weight.hh
│   │   ├── WeightBase.hh
│   │   ├── WeightInherit.cc
│   │   ├── WeightInherit.cnb
│   │   ├── WeightInherit.hh
│   │   ├── WeylTensor.cc
│   │   ├── WeylTensor.hh
│   │   └── WeylTensor.tex
│   ├── pythoncdb/
│   │   ├── py_algorithms.cc
│   │   ├── py_algorithms.hh
│   │   ├── py_ex.cc
│   │   ├── py_ex.hh
│   │   ├── py_globals.cc
│   │   ├── py_globals.hh
│   │   ├── py_helpers.cc
│   │   ├── py_helpers.hh
│   │   ├── py_kernel.cc
│   │   ├── py_kernel.hh
│   │   ├── py_media.cc
│   │   ├── py_media.hh
│   │   ├── py_module.cc
│   │   ├── py_ntensor.cc
│   │   ├── py_ntensor.hh
│   │   ├── py_packages.cc
│   │   ├── py_packages.hh
│   │   ├── py_progress.cc
│   │   ├── py_progress.hh
│   │   ├── py_properties.cc
│   │   ├── py_properties.hh
│   │   ├── py_stopwatch.cc
│   │   ├── py_stopwatch.hh
│   │   ├── py_tableau.cc
│   │   └── py_tableau.hh
│   ├── test_benchmark.cc
│   ├── test_compile_command.py
│   ├── test_internals.cc
│   ├── test_multiindex.cc
│   ├── test_multiplier.cc
│   ├── test_permutations.cc
│   ├── test_preprocessor.cc
│   ├── test_wstp.cc
│   └── tree.hh
├── doc/
│   ├── .gitignore
│   ├── adjacency_form.md
│   ├── autogobble.sty
│   ├── cadabra2.tex
│   ├── cadabra2_hep.tex
│   ├── description
│   ├── license.txt
│   ├── main.md
│   ├── modules.dox
│   ├── random.md
│   ├── reserved/
│   │   ├── anticommutator.tex
│   │   ├── arrow.tex
│   │   ├── cdot.tex
│   │   ├── comma.tex
│   │   ├── commutator.tex
│   │   ├── conditional.tex
│   │   ├── equals.tex
│   │   ├── expression.tex
│   │   ├── factorial.tex
│   │   ├── frac.tex
│   │   ├── indexbracket.tex
│   │   ├── infty.tex
│   │   ├── label.tex
│   │   ├── matrix.tex
│   │   ├── pow.tex
│   │   ├── prod.tex
│   │   ├── regex.tex
│   │   ├── sequence.tex
│   │   ├── sum.tex
│   │   └── unequals.tex
│   ├── tableaux.sty
│   ├── the_cadabra_book.bib
│   ├── the_cadabra_book.tex
│   ├── users/
│   │   ├── command_line.tex
│   │   ├── comparison.tex
│   │   ├── components.tex
│   │   ├── input.tex
│   │   └── notebook_comparisons.tex
│   └── writing_algorithms.tex
├── docker/
│   ├── Dockerfile
│   └── entrypoint.sh
├── examples/
│   ├── .gitignore
│   ├── auto_meld.cnb
│   ├── automatic_multiterm.cnb
│   ├── beginners.cnb
│   ├── bianchi_identities.cnb
│   ├── canonicalise.cnb
│   ├── cell_ids.cnb
│   ├── component_evaluation.cnb
│   ├── components2.cnb
│   ├── converge.cnb
│   ├── covariant_derivative.cdb
│   ├── equations_of_motion.cnb
│   ├── exterior.cnb
│   ├── fermionic_oscillator_algebra.cnb
│   ├── fierz.cnb
│   ├── for_previous_users.cnb
│   ├── frw.cnb
│   ├── gamma_matrix_algebra.cnb
│   ├── gamma_traces.cnb
│   ├── graphical_user_interface.cnb
│   ├── ho.cnb
│   ├── indexing_expressions.cnb
│   ├── input_format.cnb
│   ├── kaluza_klein.cnb
│   ├── kerr.cnb
│   ├── library.cnb
│   ├── lovelock.cnb
│   ├── nintegrate.cnb
│   ├── numerics.cnb
│   ├── packages.cnb
│   ├── packages2.cnb
│   ├── plotting.cnb
│   ├── poincare_algebra.cnb
│   ├── post_processing.cnb
│   ├── quickstart.cnb
│   ├── ref_accents.cnb
│   ├── ref_c++_library.cnb
│   ├── ref_core_package.cnb
│   ├── ref_default_simplification.cnb
│   ├── ref_derivatives.cnb
│   ├── ref_dynamical_updates.cnb
│   ├── ref_exponents.cnb
│   ├── ref_flags_variables.cnb
│   ├── ref_implicit_versus_explicit.cnb
│   ├── ref_import.cnb
│   ├── ref_indexbrackets.cnb
│   ├── ref_indices.cnb
│   ├── ref_kernel.cnb
│   ├── ref_ndsolve.cnb
│   ├── ref_numerical.cnb
│   ├── ref_ordering.cnb
│   ├── ref_patterns.cnb
│   ├── ref_plotting.cnb
│   ├── ref_printing.cnb
│   ├── ref_programming.cnb
│   ├── ref_properties.cnb
│   ├── ref_selecting.cnb
│   ├── ref_spacing.cnb
│   ├── ref_sympy.cnb
│   ├── reset.cnb
│   ├── sample_dyn.cnb
│   ├── scalar_manipulations.cnb
│   ├── scalar_manipulations2.cnb
│   ├── schwarzschild.cnb
│   ├── schwarzschild.ipynb
│   ├── simple_evaluate.cnb
│   ├── slider.cnb
│   ├── sphere.cnb
│   ├── spinors.cnb
│   ├── string_states.cnb
│   ├── super_maxwell.cnb
│   ├── supergravity.cnb
│   ├── sympy_bridge.cnb
│   ├── sympy_examples.cnb
│   ├── tensor_monomials.cnb
│   ├── tensors_in_denominators.cnb
│   ├── typesetting.cnb
│   ├── utf8.cnb
│   ├── vacuum_einstein_first_order.cnb
│   ├── variational_derivatives.cnb
│   ├── working_with_ex.cnb
│   └── world-sheet_susy.cnb
├── frontend/
│   ├── CMakeLists.txt
│   ├── common/
│   │   ├── CMakeLists.txt
│   │   ├── TeXEngine.cc
│   │   ├── TeXEngine.hh
│   │   ├── lodepng.cc
│   │   ├── lodepng.h
│   │   ├── preamble.tex
│   │   ├── test_tex.cc
│   │   └── testpre.tex
│   ├── gtkmm/
│   │   ├── CMakeLists.txt
│   │   ├── Cadabra.cc
│   │   ├── Cadabra.hh
│   │   ├── ChooseColoursDialog.cc
│   │   ├── ChooseColoursDialog.hh
│   │   ├── CodeInput.cc
│   │   ├── CodeInput.hh
│   │   ├── Console.cc
│   │   ├── Console.hh
│   │   ├── DiffViewer.cc
│   │   ├── DiffViewer.hh
│   │   ├── ImageView.cc
│   │   ├── ImageView.hh
│   │   ├── Keywords.cc
│   │   ├── Keywords.hh
│   │   ├── NotebookCanvas.cc
│   │   ├── NotebookCanvas.hh
│   │   ├── NotebookWindow.cc
│   │   ├── NotebookWindow.hh
│   │   ├── Preferences.hh
│   │   ├── SelectFileDialog.cc
│   │   ├── SelectFileDialog.hh
│   │   ├── SliderView.cc
│   │   ├── SliderView.hh
│   │   ├── TeXView.cc
│   │   ├── TeXView.hh
│   │   ├── VisualCell.hh
│   │   ├── cadabra2-gtk.appdata.xml.in
│   │   ├── cdb-icons/
│   │   │   └── README.md
│   │   ├── config/
│   │   │   ├── gschemas.compiled
│   │   │   └── settings.ini
│   │   ├── icons/
│   │   │   ├── Adwaita/
│   │   │   │   ├── cursors/
│   │   │   │   │   ├── 00008160000006810000408080010102.cur
│   │   │   │   │   ├── 028006030e0e7ebffc7f7070c0600140.cur
│   │   │   │   │   ├── 03b6e0fcb3499374a867c041f52298f0.cur
│   │   │   │   │   ├── 08e8e1c95fe2fc01f976f1e063a24ccd.ani
│   │   │   │   │   ├── 1081e37283d90000800003c07f3ef6bf.cur
│   │   │   │   │   ├── 14fef782d02440884392942c11205230.cur
│   │   │   │   │   ├── 2870a09082c103050810ffdffffe0204.cur
│   │   │   │   │   ├── 3085a0e285430894940527032f8b26df.cur
│   │   │   │   │   ├── 3ecb610c1bf2410f44200f48c40d3599.ani
│   │   │   │   │   ├── 4498f0e0c1937ffe01fd06f973665830.cur
│   │   │   │   │   ├── 5c6cd98b3f3ebcb1f9c7f1c204630408.cur
│   │   │   │   │   ├── 6407b0e94181790501fd1e167b474872.cur
│   │   │   │   │   ├── 640fb0e74195791501fd1ed57b41487f.cur
│   │   │   │   │   ├── 9081237383d90e509aa00f00170e968f.cur
│   │   │   │   │   ├── 9d800788f1b08800ae810202380a0822.cur
│   │   │   │   │   ├── X_cursor.cur
│   │   │   │   │   ├── alias.cur
│   │   │   │   │   ├── all-scroll.cur
│   │   │   │   │   ├── arrow.cur
│   │   │   │   │   ├── bd_double_arrow.cur
│   │   │   │   │   ├── bottom_left_corner.cur
│   │   │   │   │   ├── bottom_right_corner.cur
│   │   │   │   │   ├── bottom_side.cur
│   │   │   │   │   ├── bottom_tee.cur
│   │   │   │   │   ├── c7088f0f3e6c8088236ef8e1e3e70000.cur
│   │   │   │   │   ├── cell.cur
│   │   │   │   │   ├── circle.cur
│   │   │   │   │   ├── col-resize.cur
│   │   │   │   │   ├── context-menu.cur
│   │   │   │   │   ├── copy.cur
│   │   │   │   │   ├── cross.cur
│   │   │   │   │   ├── cross_reverse.cur
│   │   │   │   │   ├── crossed_circle.cur
│   │   │   │   │   ├── crosshair.cur
│   │   │   │   │   ├── d9ce0ab605698f320427677b458ad60b.cur
│   │   │   │   │   ├── default.cur
│   │   │   │   │   ├── diamond_cross.cur
│   │   │   │   │   ├── dnd-ask.cur
│   │   │   │   │   ├── dnd-copy.cur
│   │   │   │   │   ├── dnd-link.cur
│   │   │   │   │   ├── dnd-move.cur
│   │   │   │   │   ├── dnd-no-drop.cur
│   │   │   │   │   ├── dnd-none.cur
│   │   │   │   │   ├── dot_box_mask.cur
│   │   │   │   │   ├── dotbox.cur
│   │   │   │   │   ├── double_arrow.cur
│   │   │   │   │   ├── draft_large.cur
│   │   │   │   │   ├── draft_small.cur
│   │   │   │   │   ├── draped_box.cur
│   │   │   │   │   ├── e-resize.cur
│   │   │   │   │   ├── e29285e634086352946a0e7090d73106.cur
│   │   │   │   │   ├── ew-resize.cur
│   │   │   │   │   ├── fcf1c3c7cd4491d801f1e1c78f100000.cur
│   │   │   │   │   ├── fd_double_arrow.cur
│   │   │   │   │   ├── fleur.cur
│   │   │   │   │   ├── grab.cur
│   │   │   │   │   ├── grabbing.cur
│   │   │   │   │   ├── h_double_arrow.cur
│   │   │   │   │   ├── hand.cur
│   │   │   │   │   ├── hand1.cur
│   │   │   │   │   ├── hand2.cur
│   │   │   │   │   ├── help.cur
│   │   │   │   │   ├── icon.cur
│   │   │   │   │   ├── left_ptr.cur
│   │   │   │   │   ├── left_ptr_help.cur
│   │   │   │   │   ├── left_ptr_watch.ani
│   │   │   │   │   ├── left_side.cur
│   │   │   │   │   ├── left_tee.cur
│   │   │   │   │   ├── link.cur
│   │   │   │   │   ├── ll_angle.cur
│   │   │   │   │   ├── lr_angle.cur
│   │   │   │   │   ├── move.cur
│   │   │   │   │   ├── n-resize.cur
│   │   │   │   │   ├── ne-resize.cur
│   │   │   │   │   ├── nesw-resize.cur
│   │   │   │   │   ├── no-drop.cur
│   │   │   │   │   ├── not-allowed.cur
│   │   │   │   │   ├── ns-resize.cur
│   │   │   │   │   ├── nw-resize.cur
│   │   │   │   │   ├── nwse-resize.cur
│   │   │   │   │   ├── pencil.cur
│   │   │   │   │   ├── pirate.cur
│   │   │   │   │   ├── plus.cur
│   │   │   │   │   ├── pointer-move.cur
│   │   │   │   │   ├── pointer.cur
│   │   │   │   │   ├── progress.ani
│   │   │   │   │   ├── question_arrow.cur
│   │   │   │   │   ├── right_ptr.cur
│   │   │   │   │   ├── right_side.cur
│   │   │   │   │   ├── right_tee.cur
│   │   │   │   │   ├── row-resize.cur
│   │   │   │   │   ├── s-resize.cur
│   │   │   │   │   ├── sb_down_arrow.cur
│   │   │   │   │   ├── sb_h_double_arrow.cur
│   │   │   │   │   ├── sb_left_arrow.cur
│   │   │   │   │   ├── sb_right_arrow.cur
│   │   │   │   │   ├── sb_up_arrow.cur
│   │   │   │   │   ├── sb_v_double_arrow.cur
│   │   │   │   │   ├── se-resize.cur
│   │   │   │   │   ├── size_all.cur
│   │   │   │   │   ├── size_bdiag.cur
│   │   │   │   │   ├── size_fdiag.cur
│   │   │   │   │   ├── size_hor.cur
│   │   │   │   │   ├── size_ver.cur
│   │   │   │   │   ├── sw-resize.cur
│   │   │   │   │   ├── target.cur
│   │   │   │   │   ├── tcross.cur
│   │   │   │   │   ├── text.cur
│   │   │   │   │   ├── top_left_arrow.cur
│   │   │   │   │   ├── top_left_corner.cur
│   │   │   │   │   ├── top_right_corner.cur
│   │   │   │   │   ├── top_side.cur
│   │   │   │   │   ├── top_tee.cur
│   │   │   │   │   ├── ul_angle.cur
│   │   │   │   │   ├── ur_angle.cur
│   │   │   │   │   ├── v_double_arrow.cur
│   │   │   │   │   ├── vertical-text.cur
│   │   │   │   │   ├── w-resize.cur
│   │   │   │   │   ├── wait.ani
│   │   │   │   │   ├── watch.ani
│   │   │   │   │   ├── xterm.cur
│   │   │   │   │   ├── zoom-in.cur
│   │   │   │   │   └── zoom-out.cur
│   │   │   │   ├── icon-theme.cache
│   │   │   │   └── index.theme
│   │   │   ├── README.txt
│   │   │   └── hicolor/
│   │   │       └── icon-theme.cache
│   │   ├── main.cc
│   │   ├── science.cadabra.cadabra2-gtk.appdata.xml.in
│   │   ├── theme/
│   │   │   ├── README.txt
│   │   │   └── Windows10/
│   │   │       └── gtk-3.20/
│   │   │           ├── apps/
│   │   │           │   └── gnome-terminal.css
│   │   │           ├── gtk-cadabra.css
│   │   │           ├── gtk-contained-dark.css
│   │   │           ├── gtk-contained.css
│   │   │           ├── gtk-dark.css
│   │   │           ├── gtk.css
│   │   │           └── settings.ini
│   │   └── win_res.rc.in
│   ├── latex/
│   │   ├── install.cmake
│   │   ├── tableaux.sty
│   │   └── young.html
│   ├── osx/
│   │   ├── CMakeLists.txt
│   │   ├── Cadabra/
│   │   │   ├── Cadabra/
│   │   │   │   ├── AppDelegate.h
│   │   │   │   ├── AppDelegate.mm
│   │   │   │   ├── Base.lproj/
│   │   │   │   │   └── Cadabra.xib
│   │   │   │   ├── Images.xcassets/
│   │   │   │   │   └── AppIcon.appiconset/
│   │   │   │   │       └── Contents.json
│   │   │   │   ├── Info.plist
│   │   │   │   ├── Notebook.xib
│   │   │   │   ├── NotebookCanvas.hh
│   │   │   │   ├── NotebookCanvas.mm
│   │   │   │   ├── NotebookWindow.hh
│   │   │   │   ├── NotebookWindow.mm
│   │   │   │   ├── Test.xib
│   │   │   │   └── main.m
│   │   │   ├── Cadabra.xcodeproj/
│   │   │   │   ├── project.pbxproj
│   │   │   │   ├── project.xcworkspace/
│   │   │   │   │   ├── contents.xcworkspacedata
│   │   │   │   │   ├── xcshareddata/
│   │   │   │   │   │   └── Cadabra.xccheckout
│   │   │   │   │   └── xcuserdata/
│   │   │   │   │       └── kasper.xcuserdatad/
│   │   │   │   │           └── UserInterfaceState.xcuserstate
│   │   │   │   └── xcuserdata/
│   │   │   │       └── kasper.xcuserdatad/
│   │   │   │           ├── .gitignore
│   │   │   │           └── xcschemes/
│   │   │   │               ├── Cadabra.xcscheme
│   │   │   │               └── xcschememanagement.plist
│   │   │   ├── CadabraTests/
│   │   │   │   ├── CadabraTests.m
│   │   │   │   └── Info.plist
│   │   │   ├── NotebookController.h
│   │   │   └── NotebookController.mm
│   │   └── fake.cc
│   ├── qt5/
│   │   └── README.txt
│   └── web/
│       ├── CMakeLists.txt
│       ├── Makefile
│       ├── README.md
│       ├── css/
│       │   └── cadabra.css
│       ├── docker/
│       │   ├── .gitignore
│       │   └── Dockerfile
│       ├── html/
│       │   └── index.html
│       ├── js/
│       │   └── cadabra.js
│       └── src/
│           ├── NotebookWindow.cc
│           ├── NotebookWindow.hh
│           └── server.py
├── jupyterkernel/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── cadabra2_jupyter/
│   │   ├── __init__.py.in
│   │   ├── __main__.py
│   │   ├── completer.py
│   │   ├── context.py
│   │   ├── kernel.py
│   │   └── server.py
│   ├── kernelspec/
│   │   └── kernel.json.in
│   ├── lexer/
│   │   ├── cadabra.js
│   │   └── cadabra.py
│   └── readme.txt
├── libs/
│   ├── appdirs/
│   │   └── cdb_appdirs.py
│   ├── base64/
│   │   ├── base64.cc
│   │   └── base64.hh
│   ├── cm/
│   │   ├── cmunbbx.clm1
│   │   ├── cmunbbx.otf
│   │   ├── cmunbi.clm1
│   │   ├── cmunbi.otf
│   │   ├── cmunbl.clm1
│   │   ├── cmunbl.otf
│   │   ├── cmunbmo.clm1
│   │   ├── cmunbmo.otf
│   │   ├── cmunbmr.clm1
│   │   ├── cmunbmr.otf
│   │   ├── cmunbso.clm1
│   │   ├── cmunbso.otf
│   │   ├── cmunbsr.clm1
│   │   ├── cmunbsr.otf
│   │   ├── cmunbtl.clm1
│   │   ├── cmunbtl.otf
│   │   ├── cmunbto.clm1
│   │   ├── cmunbto.otf
│   │   ├── cmunbx.clm1
│   │   ├── cmunbx.otf
│   │   ├── cmunbxo.clm1
│   │   ├── cmunbxo.otf
│   │   ├── cmunci.clm1
│   │   ├── cmunci.otf
│   │   ├── cmunit.clm1
│   │   ├── cmunit.otf
│   │   ├── cmunobi.clm1
│   │   ├── cmunobi.otf
│   │   ├── cmunobx.clm1
│   │   ├── cmunobx.otf
│   │   ├── cmunorm.clm1
│   │   ├── cmunorm.otf
│   │   ├── cmunoti.clm1
│   │   ├── cmunoti.otf
│   │   ├── cmunrb.clm1
│   │   ├── cmunrb.otf
│   │   ├── cmunrm.clm1
│   │   ├── cmunrm.otf
│   │   ├── cmunsi.clm1
│   │   ├── cmunsi.otf
│   │   ├── cmunsl.clm1
│   │   ├── cmunsl.otf
│   │   ├── cmunso.clm1
│   │   ├── cmunso.otf
│   │   ├── cmunss.clm1
│   │   ├── cmunss.otf
│   │   ├── cmunssdc.clm1
│   │   ├── cmunssdc.otf
│   │   ├── cmunst.clm1
│   │   ├── cmunst.otf
│   │   ├── cmunsx.clm1
│   │   ├── cmunsx.otf
│   │   ├── cmuntb.clm1
│   │   ├── cmuntb.otf
│   │   ├── cmunti.clm1
│   │   ├── cmunti.otf
│   │   ├── cmuntt.clm1
│   │   ├── cmuntt.otf
│   │   ├── cmuntx.clm1
│   │   ├── cmuntx.otf
│   │   ├── cmunui.clm1
│   │   ├── cmunui.otf
│   │   ├── cmunvi.clm1
│   │   ├── cmunvi.otf
│   │   ├── cmunvt.clm1
│   │   └── cmunvt.otf
│   ├── dbg/
│   │   └── dbg.h
│   ├── internal/
│   │   └── include/
│   │       └── internal/
│   │           ├── difflib.h
│   │           ├── string_tools.h
│   │           ├── uniconv.h
│   │           ├── unistd.h
│   │           └── uuid.h
│   ├── linenoise/
│   │   ├── LICENSE
│   │   └── linenoise.hpp
│   ├── nlohmann/
│   │   └── nlohmann/
│   │       └── json.hpp
│   ├── pybind11/
│   │   ├── CMakeLists.txt
│   │   ├── LICENSE
│   │   ├── include/
│   │   │   └── pybind11/
│   │   │       ├── attr.h
│   │   │       ├── buffer_info.h
│   │   │       ├── cast.h
│   │   │       ├── chrono.h
│   │   │       ├── common.h
│   │   │       ├── complex.h
│   │   │       ├── detail/
│   │   │       │   ├── class.h
│   │   │       │   ├── common.h
│   │   │       │   ├── cpp_conduit.h
│   │   │       │   ├── descr.h
│   │   │       │   ├── exception_translation.h
│   │   │       │   ├── init.h
│   │   │       │   ├── internals.h
│   │   │       │   ├── type_caster_base.h
│   │   │       │   ├── typeid.h
│   │   │       │   └── value_and_holder.h
│   │   │       ├── eigen/
│   │   │       │   ├── common.h
│   │   │       │   ├── matrix.h
│   │   │       │   └── tensor.h
│   │   │       ├── eigen.h
│   │   │       ├── embed.h
│   │   │       ├── eval.h
│   │   │       ├── functional.h
│   │   │       ├── gil.h
│   │   │       ├── gil_safe_call_once.h
│   │   │       ├── iostream.h
│   │   │       ├── numpy.h
│   │   │       ├── operators.h
│   │   │       ├── options.h
│   │   │       ├── pybind11.h
│   │   │       ├── pytypes.h
│   │   │       ├── stl/
│   │   │       │   └── filesystem.h
│   │   │       ├── stl.h
│   │   │       ├── stl_bind.h
│   │   │       ├── type_caster_pyobject_ptr.h
│   │   │       └── typing.h
│   │   ├── pybind11/
│   │   │   ├── __init__.py
│   │   │   ├── __main__.py
│   │   │   ├── _version.py
│   │   │   ├── commands.py
│   │   │   ├── py.typed
│   │   │   └── setup_helpers.py
│   │   └── tools/
│   │       ├── FindCatch.cmake
│   │       ├── FindEigen3.cmake
│   │       ├── FindPythonLibsNew.cmake
│   │       ├── JoinPaths.cmake
│   │       ├── check-style.sh
│   │       ├── cmake_uninstall.cmake.in
│   │       ├── codespell_ignore_lines_from_errors.py
│   │       ├── libsize.py
│   │       ├── make_changelog.py
│   │       ├── pybind11.pc.in
│   │       ├── pybind11Common.cmake
│   │       ├── pybind11Config.cmake.in
│   │       ├── pybind11GuessPythonExtSuffix.cmake
│   │       ├── pybind11NewTools.cmake
│   │       ├── pybind11Tools.cmake
│   │       ├── pyproject.toml
│   │       ├── setup_global.py.in
│   │       ├── setup_main.py.in
│   │       └── test-pybind11GuessPythonExtSuffix.cmake
│   ├── sqlite3/
│   │   ├── include/
│   │   │   └── sqlite3.h
│   │   └── sqlite3.c
│   ├── tiny-process-library/
│   │   ├── LICENSE
│   │   ├── process.cpp
│   │   ├── process.hpp
│   │   ├── process_unix.cpp
│   │   └── process_win.cpp
│   ├── tinyxml2/
│   │   ├── CMakeLists.txt
│   │   ├── cmake/
│   │   │   ├── tinyxml2-config.cmake
│   │   │   └── tinyxml2.pc.in
│   │   ├── tinyxml2.cpp
│   │   └── tinyxml2.h
│   └── whereami/
│       ├── LICENSE.WTFPLv2
│       ├── whereami.c
│       └── whereami.h
├── man/
│   └── man1/
│       ├── cadabra-server.1
│       ├── cadabra2-cli.1
│       ├── cadabra2-gtk.1
│       ├── cadabra2.1
│       ├── cadabra2cadabra.1
│       ├── cadabra2html.1
│       ├── cadabra2ipynb.1
│       ├── cadabra2latex.1
│       └── cadabra2python.1
├── paper/
│   ├── paper.bib
│   └── paper.md
├── tests/
│   ├── .gitignore
│   ├── CMakeLists.txt
│   ├── algebra.cdb
│   ├── basic.cdb
│   ├── callbacks.cdb
│   ├── canonicalise.cdb
│   ├── components.cdb
│   ├── decompose.cdb
│   ├── decompose.cnb
│   ├── delta.cdb
│   ├── derivative.cdb
│   ├── display.cdb
│   ├── display.cnb
│   ├── dummies.cdb
│   ├── explicit_implicit.cdb
│   ├── factor.cdb
│   ├── field_theory.cdb
│   ├── fierz.cdb
│   ├── fixed_point.cdb
│   ├── forms.cdb
│   ├── gamma.cdb
│   ├── gamma_paper.cdb
│   ├── implicit.cdb
│   ├── index_positions.cdb
│   ├── integrals.cdb
│   ├── ipynb_module.ipynb
│   ├── kaluza_klein.cdb
│   ├── kerr.cnb
│   ├── latexform.cnb
│   ├── manip.cdb
│   ├── meld.cdb
│   ├── mma.cdb
│   ├── mma.cnb
│   ├── module01.cnb
│   ├── module02.cnb
│   ├── module03.cdb
│   ├── modules.cdb
│   ├── multiterm.cdb
│   ├── nevaluate.cdb
│   ├── new_paper.cdb
│   ├── noncovariant.cdb
│   ├── numerical.cdb
│   ├── output.cdb
│   ├── packages.cdb
│   ├── packages.cnb
│   ├── paper.cdb
│   ├── programming.cdb
│   ├── properties.cdb
│   ├── reduce.cdb
│   ├── relativity.cdb
│   ├── scope.cdb
│   ├── selecting.cdb
│   ├── semicolon-is-display.cnb
│   ├── serialize.cdb
│   ├── simplify.cdb
│   ├── spinors.cdb
│   ├── substitute.cdb
│   ├── symmetry.cdb
│   ├── sympy_bridge.cnb
│   ├── sympy_cdb.cdb
│   ├── test_comparison.cc
│   ├── tests.cdb
│   ├── trigonometric.cdb
│   ├── unicode.cdb
│   ├── vary.cdb
│   ├── working.cdb
│   ├── young.cdb
│   └── yrtrace.cdb
├── tutorials/
│   └── 01_basics.py
├── vcpkg.json
└── web2/
    ├── CMakeLists.txt
    ├── README.txt
    ├── cadabra2/
    │   ├── .gitignore
    │   ├── robots.txt
    │   └── source/
    │       ├── blog.html
    │       ├── changelog.html
    │       ├── changes12.html
    │       ├── clay.yaml
    │       ├── comparison.html
    │       ├── developers.html
    │       ├── download.html
    │       ├── faq.html
    │       ├── features.html
    │       ├── help.html
    │       ├── index.html
    │       ├── jupyter.html
    │       ├── layout.html
    │       ├── license.html
    │       ├── man.html
    │       ├── manual/
    │       │   ├── .gitignore
    │       │   └── README.txt
    │       ├── notebook_layout.html
    │       ├── notebooks/
    │       │   ├── .gitignore
    │       │   └── README.txt
    │       ├── papers.html
    │       ├── people.html
    │       ├── quickstart.html
    │       ├── static/
    │       │   ├── cadabra_in_ipython.nb
    │       │   ├── cadabra_in_ipython.nb.html
    │       │   ├── fonts/
    │       │   │   ├── Bright/
    │       │   │   │   ├── OFL-FAQ.txt
    │       │   │   │   ├── OFL.txt
    │       │   │   │   ├── README.txt
    │       │   │   │   └── cmun-bright.css
    │       │   │   ├── cmunbx.otf
    │       │   │   └── cmunrm.otf
    │       │   ├── humans.txt
    │       │   ├── images/
    │       │   │   └── logo.tex
    │       │   ├── js/
    │       │   │   └── cadabra.js
    │       │   ├── robots.txt
    │       │   └── styles/
    │       │       ├── cadabra-web.css
    │       │       └── normalize.css
    │       ├── tutorials.html
    │       ├── user_notebooks.html
    │       └── v1x.html
    └── scan.py
Download .txt
Showing preview only (652K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (7407 symbols across 384 files)

FILE: c++lib/adjform.cc
  function main (line 7) | int main(int, char**)

FILE: c++lib/nevaluate.cc
  function main (line 7) | int main(int, char **)

FILE: c++lib/simple.cc
  function test1 (line 18) | void test1()
  function test2 (line 46) | void test2()
  function main (line 84) | int main(int argc, char **argv)

FILE: c++lib/trivial.cc
  function main (line 7) | int main() {

FILE: client_server/Actions.hh
  type cadabra (line 9) | namespace cadabra {
    class DocumentThread (line 11) | class DocumentThread
    class GUIBase (line 12) | class GUIBase
    class ActionBase (line 32) | class ActionBase {
    class ActionAddCell (line 68) | class ActionAddCell : public ActionBase {
      type Position (line 70) | enum class Position { before, after, child }
    class ActionPositionCursor (line 105) | class ActionPositionCursor : public ActionBase {
      type Position (line 107) | enum class Position { in, next, previous }
    class ActionSetRunStatus (line 125) | class ActionSetRunStatus : public ActionBase {
    class ActionSetVariableList (line 143) | class ActionSetVariableList : public ActionBase {
    class ActionRemoveCell (line 162) | class ActionRemoveCell : public ActionBase {
    class ActionReplaceCell (line 185) | class ActionReplaceCell : public ActionBase {
    class ActionSplitCell (line 201) | class ActionSplitCell : public ActionBase {
    class ActionRunCell (line 218) | class ActionRunCell : public ActionBase {
    class ActionOpen (line 239) | class ActionOpen : public ActionBase {
    class ActionInsertText (line 262) | class ActionInsertText : public ActionBase {
    class ActionCompleteText (line 284) | class ActionCompleteText : public ActionBase {
    class ActionEraseText (line 311) | class ActionEraseText : public ActionBase {

FILE: client_server/ComputeThread.hh
  type cadabra (line 12) | namespace cadabra {
    class GUIBase (line 14) | class GUIBase
    class DocumentThread (line 15) | class DocumentThread
    class ComputeThread (line 29) | class ComputeThread {
      method ComputeThread (line 35) | ComputeThread(const ComputeThread& )=delete;

FILE: client_server/DocumentThread.cc
  type ci_equal (line 155) | struct ci_equal {
  function ci_find_substr (line 162) | int ci_find_substr( const T& str1, const T& str2, int start_pos )

FILE: client_server/DocumentThread.hh
  type cadabra (line 13) | namespace cadabra {
    class ActionBase (line 15) | class ActionBase
    class ActionAddCell (line 16) | class ActionAddCell
    class ActionPositionCursor (line 17) | class ActionPositionCursor
    class ActionRemoveCell (line 18) | class ActionRemoveCell
    class ActionSetRunStatus (line 19) | class ActionSetRunStatus
    class ActionSplitCell (line 20) | class ActionSplitCell
    class ActionInsertText (line 21) | class ActionInsertText
    class ActionCompleteText (line 22) | class ActionCompleteText
    class ActionEraseText (line 23) | class ActionEraseText
    class ComputeThread (line 24) | class ComputeThread
    class GUIBase (line 25) | class GUIBase
    class DocumentThread (line 41) | class DocumentThread {
      method DocumentThread (line 49) | DocumentThread(const DocumentThread&)=delete;
      class Prefs (line 127) | class Prefs {
      type help_t (line 203) | enum class help_t { algorithm, property, latex, none }

FILE: client_server/GUIBase.hh
  type cadabra (line 8) | namespace cadabra {
    class GUIBase (line 16) | class GUIBase {

FILE: client_server/ScriptThread.hh
  type cadabra (line 7) | namespace cadabra {
    class DocumentThread (line 20) | class DocumentThread
    class GUIBase (line 21) | class GUIBase
    class ScriptThread (line 23) | class ScriptThread {
      method ScriptThread (line 28) | ScriptThread(const ScriptThread&) = delete;

FILE: client_server/Server.cc
  function PYBIND11_EMBEDDED_MODULE (line 82) | PYBIND11_EMBEDDED_MODULE(cadabra2_internal, m)
  function parse_error (line 98) | std::string parse_error(const std::string& error, const std::string& input)
  function InterruptCheck (line 201) | int InterruptCheck(PyObject* obj, _frame* frame, int what, PyObject* arg)
  function quit (line 328) | int quit(void *)

FILE: client_server/Server.hh
  class Server (line 33) | class Server {
    method Server (line 36) | Server(const Server&)=delete;
    class CatchOutput (line 55) | class CatchOutput {
    class Connection (line 128) | class Connection {
    class Block (line 156) | class Block {

FILE: client_server/Snoop.cc
  function u64_to_time (line 74) | static std::chrono::time_point<std::chrono::system_clock, u64_millis> u6...
  function local_utc_offset_minutes (line 84) | int local_utc_offset_minutes()
  function safestring (line 93) | std::string safestring(const unsigned char *c)
  type utsname (line 146) | struct utsname
  type passwd (line 183) | struct passwd
  function Snoop (line 1593) | Snoop& Snoop::operator()(const std::string& type, std::string fl, int lo...
  function Snoop (line 1608) | Snoop& Snoop::operator<<(const Flush&)
  function Snoop (line 1640) | Snoop& Snoop::payload(const std::vector<char>& data)
  function is_base64 (line 1949) | static inline bool is_base64(unsigned char c) {
  function snoop_base64_encode (line 1953) | std::string snoop_base64_encode(unsigned char const* bytes_to_encode, un...
  function snoop_base64_decode (line 1995) | std::string snoop_base64_decode(std::string const& encoded_string) {

FILE: client_server/Snoop.hh
  type snoop (line 38) | namespace snoop {
    class SnoopImpl (line 40) | class SnoopImpl
    class Flush (line 41) | class Flush {}
    class Snoop (line 47) | class Snoop {
      method Snoop (line 80) | Snoop& operator<<(const T& obj) {
      class ParseError (line 142) | class ParseError : public std::logic_error {
      class Ticket (line 149) | class Ticket {
      class AppEntry (line 161) | class AppEntry {
      class LogEntry (line 190) | class LogEntry {
      class PayLoad (line 219) | class PayLoad {

FILE: client_server/cadabra-jupyter-kernel.cc
  function xjson (line 29) | xjson cadabra::CadabraJupyter::execute_request_impl(int execution_counter,
  function xjson (line 104) | xjson cadabra::CadabraJupyter::complete_request_impl(const std::string& ...
  function xjson (line 121) | xjson cadabra::CadabraJupyter::inspect_request_impl(const std::string& c...
  function xjson (line 138) | xjson cadabra::CadabraJupyter::is_complete_request_impl(const std::strin...
  function xjson (line 150) | xjson cadabra::CadabraJupyter::kernel_info_request_impl()

FILE: client_server/cadabra-jupyter-kernel.hh
  type cadabra (line 11) | namespace cadabra {
    class CadabraJupyter (line 19) | class CadabraJupyter : public xinterpreter, public Server {

FILE: client_server/cadabra-jupyter-main.cc
  function main (line 8) | int main(int argc, char* argv[])

FILE: client_server/cadabra-server.cc
  function getRegKey (line 15) | std::string getRegKey(const std::string& location, const std::string& na...
  function main (line 42) | int main(int argc, char **argv)
  function WinMain (line 74) | int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin...

FILE: client_server/cadabra2html.cc
  function main (line 5) | int main(int argc, char **argv)

FILE: client_server/cadabra2latex.cc
  function main (line 6) | int main(int argc, char **argv)

FILE: client_server/popen2.cc
  function FILE (line 11) | FILE * popen2(std::string command, std::string type, int & pid)
  function pclose2 (line 55) | int pclose2(FILE * fp, pid_t pid)

FILE: client_server/regexp_tester.cc
  function main (line 6) | int main(int argc, char **argv)

FILE: client_server/test_client.cc
  class MyClient (line 9) | class MyClient : public cadabra::Client {
  class UI (line 21) | class UI {
  function main (line 83) | int main(int, char **)

FILE: client_server/test_talk_to_server.cc
  function on_open (line 16) | void on_open(client* c, websocketpp::connection_hdl hdl)
  function on_message (line 40) | void on_message(client* c, websocketpp::connection_hdl hdl, message_ptr ...
  function main (line 49) | int main(int argc, char **argv)

FILE: client_server/tree.hh
  class tree_node_ (line 41) | class tree_node_ { // size: 5*4=20 bytes (on 32 bit arch), can be reduce...
  class iterator_base (line 72) | class iterator_base
    class iterator_base (line 91) | class iterator_base {
    class pre_order_iterator (line 122) | class pre_order_iterator : public iterator_base {
    class post_order_iterator (line 142) | class post_order_iterator : public iterator_base {
    class breadth_first_queued_iterator (line 163) | class breadth_first_queued_iterator : public iterator_base {
    class fixed_depth_iterator (line 184) | class fixed_depth_iterator : public iterator_base {
    class sibling_iterator (line 205) | class sibling_iterator : public iterator_base {
    class leaf_iterator (line 229) | class leaf_iterator : public iterator_base {
    class iterator_base_less (line 418) | class iterator_base_less {
    class compare_nodes (line 434) | class compare_nodes {
      method compare_nodes (line 436) | compare_nodes(StrictWeakOrdering comp) : comp_(comp) {}
  class pre_order_iterator (line 73) | class pre_order_iterator
  class post_order_iterator (line 74) | class post_order_iterator
  class sibling_iterator (line 75) | class sibling_iterator
  class leaf_iterator (line 76) | class leaf_iterator
  class iterator_base (line 89) | class iterator_base : public stlport::bidirectional_iterator<T, ptrdiff_...
    class iterator_base (line 91) | class iterator_base {
    class pre_order_iterator (line 122) | class pre_order_iterator : public iterator_base {
    class post_order_iterator (line 142) | class post_order_iterator : public iterator_base {
    class breadth_first_queued_iterator (line 163) | class breadth_first_queued_iterator : public iterator_base {
    class fixed_depth_iterator (line 184) | class fixed_depth_iterator : public iterator_base {
    class sibling_iterator (line 205) | class sibling_iterator : public iterator_base {
    class leaf_iterator (line 229) | class leaf_iterator : public iterator_base {
    class iterator_base_less (line 418) | class iterator_base_less {
    class compare_nodes (line 434) | class compare_nodes {
      method compare_nodes (line 436) | compare_nodes(StrictWeakOrdering comp) : comp_(comp) {}
  function iter (line 635) | iter tree<T, tree_node_allocator>::erase(iter it)
  function iter (line 805) | iter tree<T, tree_node_allocator>::parent(iter position)
  function iter (line 813) | iter tree<T, tree_node_allocator>::previous_sibling(iter position)
  function iter (line 823) | iter tree<T, tree_node_allocator>::next_sibling(iter position)
  function iter (line 833) | iter tree<T, tree_node_allocator>::next_at_same_depth(iter position) const
  function iter (line 878) | iter tree<T, tree_node_allocator>::append_child(iter position)
  function iter (line 905) | iter tree<T, tree_node_allocator>::prepend_child(iter position)
  function iter (line 932) | iter tree<T, tree_node_allocator>::append_child(iter position, const T& x)
  function iter (line 963) | iter tree<T, tree_node_allocator>::prepend_child(iter position, const T& x)
  function iter (line 990) | iter tree<T, tree_node_allocator>::append_child(iter position, iter other)
  function iter (line 1002) | iter tree<T, tree_node_allocator>::prepend_child(iter position, iter other)
  function iter (line 1014) | iter tree<T, tree_node_allocator>::append_children(iter position, siblin...
  function iter (line 1031) | iter tree<T, tree_node_allocator>::prepend_children(iter position, sibli...
  function iter (line 1055) | iter tree<T, tree_node_allocator>::insert(iter position, const T& x)
  function iter (line 1113) | iter tree<T, tree_node_allocator>::insert_after(iter position, const T& x)
  function iter (line 1138) | iter tree<T, tree_node_allocator>::insert_subtree(iter position, const i...
  function iter (line 1148) | iter tree<T, tree_node_allocator>::insert_subtree_after(iter position, c...
  function iter (line 1168) | iter tree<T, tree_node_allocator>::replace(iter position, const T& x)
  function iter (line 1180) | iter tree<T, tree_node_allocator>::replace(iter position, const iterator...
  function iter (line 1293) | iter tree<T, tree_node_allocator>::flatten(iter position)
  function iter (line 1321) | iter tree<T, tree_node_allocator>::reparent(iter position, sibling_itera...
  function iter (line 1369) | iter tree<T, tree_node_allocator>::reparent(iter position, iter from)
  function iter (line 1376) | iter tree<T, tree_node_allocator>::wrap(iter position, const T& x)
  function iter (line 1387) | iter tree<T, tree_node_allocator>::move_after(iter target, iter source)
  function iter (line 1416) | iter tree<T, tree_node_allocator>::move_before(iter target, iter source)
  function iter (line 1483) | iter tree<T, tree_node_allocator>::move_ontop(iter target, iter source)
  function iter (line 1547) | iter tree<T, tree_node_allocator>::move_in(iter loc, tree& other)
  function iter (line 1579) | iter tree<T, tree_node_allocator>::move_in_as_nth_child(iter loc, size_t...
  function T (line 2135) | T& tree<T, tree_node_allocator>::iterator_base::operator*() const
  function T (line 2141) | T* tree<T, tree_node_allocator>::iterator_base::operator->() const

FILE: client_server/websocket_client.hh
  class websocket_client (line 15) | class websocket_client {
    method websocket_client (line 27) | websocket_client(const websocket_client&) = delete;
    method websocket_client (line 28) | websocket_client& operator=(const websocket_client&) = delete;
    type queued_message (line 74) | struct queued_message {
  class Uri (line 84) | class Uri {

FILE: client_server/websocket_server.hh
  class websocket_server (line 16) | class websocket_server {
    method websocket_server (line 27) | websocket_server() = default;
    method websocket_server (line 31) | websocket_server(const websocket_server&) = delete;
    method websocket_server (line 32) | websocket_server& operator=(const websocket_server&) = delete;
    class connection (line 61) | class connection : public std::enable_shared_from_this<connection> {
      class queued_message (line 88) | class queued_message {
        method queued_message (line 90) | queued_message() {

FILE: config/generate_keywords.py
  function get_functions (line 5) | def get_functions(module):
  function get_classes (line 9) | def get_classes(module):
  function generate_set (line 13) | def generate_set(name, items, line_begin = '\t', line_size = 80):
  function generate_find_func (line 25) | def generate_find_func(*sets):

FILE: core/Adjform.cc
  function next_perm (line 15) | int next_perm(std::vector<size_t>& term)
  function index_of (line 58) | size_t index_of(It begin, It end, const T& val, size_t offset = 0)
  function slots_to_pairs (line 64) | size_t slots_to_pairs(size_t slots)
  function ifactorial (line 72) | size_t ifactorial(size_t n, size_t den = 1)
  type cadabra (line 83) | namespace cadabra {
    function is_coordinate (line 85) | bool is_coordinate(const Kernel& kernel, Ex::iterator it)
    function is_index (line 95) | bool is_index(const Kernel& kernel, Ex::iterator it, bool include_coor...
    function ProjectedAdjform (line 444) | ProjectedAdjform& ProjectedAdjform::operator += (const ProjectedAdjfor...
    function ProjectedAdjform (line 450) | ProjectedAdjform operator + (ProjectedAdjform lhs, const ProjectedAdjf...
    function ProjectedAdjform (line 461) | ProjectedAdjform& ProjectedAdjform::operator *= (const integer_type& k)
    function ProjectedAdjform (line 467) | ProjectedAdjform operator * (ProjectedAdjform lhs, const ProjectedAdjf...

FILE: core/Adjform.hh
  type cadabra (line 12) | namespace cadabra {
    class IndexMap (line 14) | class IndexMap
    class Adjform (line 29) | class Adjform
    class IndexMap (line 120) | class IndexMap
    class ProjectedAdjform (line 139) | class ProjectedAdjform

FILE: core/Algorithm.cc
  function index_iterator (line 514) | index_iterator Algorithm::begin_index(iterator it) const
  function index_iterator (line 519) | index_iterator Algorithm::end_index(iterator it) const
  type cadabra (line 1086) | namespace cadabra {

FILE: core/Algorithm.hh
  type cadabra (line 32) | namespace cadabra {
    class Algorithm (line 54) | class Algorithm : public ExManip /* , public IndexClassifier */ {

FILE: core/Bridge.cc
  function pull_in (line 11) | void pull_in(std::shared_ptr<Ex> ex, Kernel *kernel)
  function run_python_functions (line 64) | void run_python_functions(std::shared_ptr<Ex> ex, Kernel *kernel)

FILE: core/CdbPython.cc
  function replace_dollar_expressions (line 459) | std::string replace_dollar_expressions(const std::string& input,

FILE: core/CdbPython.hh
  type cadabra (line 8) | namespace cadabra {
    class ConvertData (line 59) | class ConvertData {

FILE: core/Cleanup.cc
  type cadabra (line 22) | namespace cadabra {
    function cleanup_dispatch (line 24) | void cleanup_dispatch(const Kernel& kernel, Ex& tr, Ex::iterator& it)
    function check_index_consistency (line 114) | void check_index_consistency(const Kernel& k, Ex& tr, Ex::iterator it)
    function cleanup_fraclike (line 122) | bool cleanup_fraclike(const Kernel& k, Ex&tr, Ex::iterator& it)
    function cleanup_powlike (line 149) | bool cleanup_powlike(const Kernel& k, Ex&tr, Ex::iterator& it)
    function cleanup_productlike (line 254) | bool cleanup_productlike(const Kernel& k, Ex&tr, Ex::iterator& it)
    function cleanup_sumlike (line 419) | bool cleanup_sumlike(const Kernel& k, Ex&tr, Ex::iterator& it)
    function push_down_multiplier (line 541) | bool push_down_multiplier(const Kernel& k, Ex& tr, Ex::iterator it)
    function cleanup_components (line 587) | bool cleanup_components(const Kernel& k, Ex&tr, Ex::iterator& it)
    function cleanup_partialderivative (line 693) | bool cleanup_partialderivative(const Kernel&, Ex& tr, Ex::iterator& it)
    function cleanup_derivative (line 731) | bool cleanup_derivative(const Kernel& k, Ex& tr, Ex::iterator& it)
    function cleanup_numericalflat (line 784) | bool cleanup_numericalflat(const Kernel&, Ex& tr, Ex::iterator& it)
    function cleanup_diagonal (line 821) | bool cleanup_diagonal(const Kernel& k, Ex& tr, Ex::iterator& it)
    function cleanup_kronecker (line 852) | bool cleanup_kronecker(const Kernel&, Ex& tr, Ex::iterator& it)
    function cleanup_exterior_derivative (line 878) | bool cleanup_exterior_derivative(const Kernel& k, Ex& tr, Ex::iterator...
    function cleanup_comma (line 893) | bool cleanup_comma(const Kernel& k, Ex& tr, Ex::iterator& it)
    function cleanup_tie (line 907) | bool cleanup_tie(const Kernel& k, Ex& tr, Ex::iterator& it)
    function cleanup_dispatch_deep (line 930) | void cleanup_dispatch_deep(const Kernel& k, Ex& tr, dispatcher_t dispa...
    function cleanup_dispatch_deep (line 936) | void cleanup_dispatch_deep(const Kernel& k, Ex& tr, Ex::iterator&, dis...

FILE: core/Cleanup.hh
  type cadabra (line 27) | namespace cadabra {

FILE: core/Combinatorics.hh
  type combin (line 37) | namespace combin {
    class combinations_base (line 57) | class combinations_base {
      type weight_cond (line 71) | enum weight_cond { weight_equals, weight_less, weight_greater }
    class combinations (line 101) | class combinations : public combinations_base<T> {
    class symmetriser (line 125) | class symmetriser
    class symm_helper (line 128) | class symm_helper : public combinations_base<T> {
    class symm_val_helper (line 141) | class symm_val_helper : public combinations_base<T> {
    class symmetriser (line 154) | class symmetriser {
    function ordersign (line 224) | int ordersign(iterator1 b1, iterator1 e1, iterator2 b2, iterator2 e2, ...
    function ordersign (line 274) | int ordersign(iterator1 b1, iterator1 e1)
    function T (line 283) | T fact(T x)
    function range_t (line 912) | range_t symmetriser<T>::values_to_locations(const std::vector<T>& valu...

FILE: core/Compare.cc
  type cadabra (line 24) | namespace cadabra {
    function subtree_compare (line 28) | int subtree_compare(const Properties *properties,
    function tree_less (line 140) | bool tree_less(const Properties* properties, const Ex& one, const Ex& ...
    function tree_equal (line 145) | bool tree_equal(const Properties* properties, const Ex& one, const Ex&...
    function tree_exact_less (line 150) | bool tree_exact_less(const Properties* properties, const Ex& one, cons...
    function tree_exact_less (line 155) | bool tree_exact_less(const Properties* properties, Ex::iterator one, E...
    function tree_exact_equal (line 160) | bool tree_exact_equal(const Properties* properties, const Ex& one, con...
    function subtree_less (line 165) | bool subtree_less(const Properties* properties, Ex::iterator one, Ex::...
    function subtree_equal (line 172) | bool subtree_equal(const Properties* properties, Ex::iterator one, Ex:...
    function subtree_exact_less (line 179) | bool subtree_exact_less(const Properties* properties, Ex::iterator one...
    function subtree_exact_equal (line 187) | bool subtree_exact_equal(const Properties* properties, Ex::iterator on...
    function DEBUGLN (line 461) | DEBUGLN(

FILE: core/Compare.hh
  type cadabra (line 8) | namespace cadabra {
    class tree_less_obj (line 99) | class tree_less_obj {
    class tree_less_modprel_obj (line 107) | class tree_less_modprel_obj {
    class tree_equal_obj (line 115) | class tree_equal_obj {
    class tree_exact_less_obj (line 125) | class tree_exact_less_obj {
    class tree_exact_less_mod_prel_obj (line 134) | class tree_exact_less_mod_prel_obj {
    class tree_exact_equal_obj (line 142) | class tree_exact_equal_obj {
    class tree_exact_equal_mod_prel_obj (line 150) | class tree_exact_equal_mod_prel_obj {
    class tree_exact_less_for_indexmap_obj (line 165) | class tree_exact_less_for_indexmap_obj {
    class tree_exact_less_no_wildcards_obj (line 172) | class tree_exact_less_no_wildcards_obj {
    class tree_exact_less_no_wildcards_mod_prel_obj (line 181) | class tree_exact_less_no_wildcards_mod_prel_obj {
    class Ex_comparator (line 197) | class Ex_comparator {
      type match_t (line 201) | enum class match_t {
      type useprops_t (line 212) | enum class useprops_t {
    class Ex_is_equivalent (line 387) | class Ex_is_equivalent {
    class Ex_is_less (line 395) | class Ex_is_less {

FILE: core/DataCell.cc
  function trim (line 20) | static std::string trim(const std::string& s)

FILE: core/DataCell.hh
  type cadabra (line 10) | namespace cadabra {
    class DataCell (line 27) | class DataCell {
      type CellType (line 34) | enum class CellType {
      class id_t (line 53) | class id_t {
    class DTree (line 116) | class DTree : public tree<DataCell> {

FILE: core/DisplayBase.hh
  type cadabra (line 8) | namespace cadabra {
    class DisplayBase (line 19) | class DisplayBase {
    function ex_to_string (line 42) | std::string ex_to_string(const Kernel& kernel, const Ex& ex)
    function ex_to_string (line 50) | std::string ex_to_string(const Kernel& kernel, Ex::iterator it)

FILE: core/DisplayMMA.hh
  type cadabra (line 11) | namespace cadabra {
    class DisplayMMA (line 20) | class DisplayMMA : public DisplayBase {

FILE: core/DisplaySympy.hh
  type cadabra (line 11) | namespace cadabra {
    class Derivative (line 13) | class Derivative
    class DisplaySympy (line 23) | class DisplaySympy : public DisplayBase {

FILE: core/DisplayTeX.cc
  function k_unichar_to_utf8 (line 1109) | int k_unichar_to_utf8(kunichar c, char *buf)

FILE: core/DisplayTeX.hh
  type cadabra (line 11) | namespace cadabra {
    class DisplayTeX (line 21) | class DisplayTeX : public DisplayBase {

FILE: core/DisplayTerminal.hh
  type cadabra (line 13) | namespace cadabra {
    class DisplayTerminal (line 26) | class DisplayTerminal : public DisplayBase {

FILE: core/Dummies.hh
  class rename_dummies (line 27) | class rename_dummies : public algorithm {

FILE: core/Equals.hh
  type cadabra (line 7) | namespace cadabra {
    type visit (line 9) | namespace visit {
      class Equals (line 11) | class Equals : public cadabra::visit::ReservedNode {

FILE: core/ExManip.hh
  type cadabra (line 5) | namespace cadabra {
    class Kernel (line 7) | class Kernel
    class ExManip (line 9) | class ExManip {

FILE: core/ExNode.cc
  function ExNode (line 32) | ExNode ExNode::copy() const
  function ExNode (line 71) | ExNode ExNode::getitem_string(std::string tag)
  function ExNode (line 84) | ExNode ExNode::getitem_iterator(ExNode it)
  function ExNode (line 138) | ExNode ExNode::terms()
  function ExNode (line 149) | ExNode ExNode::factors()
  function ExNode (line 160) | ExNode ExNode::own_indices()
  function ExNode (line 170) | ExNode ExNode::indices()
  function ExNode (line 182) | ExNode ExNode::free_indices()
  function ExNode (line 196) | ExNode ExNode::components()
  function ExNode (line 214) | ExNode ExNode::args()
  function ExNode (line 224) | ExNode ExNode::children()
  function ExNode (line 251) | ExNode ExNode::insert(std::shared_ptr<Ex> rep)
  function ExNode (line 258) | ExNode ExNode::insert_it(ExNode rep)
  function ExNode (line 265) | ExNode ExNode::append_child(std::shared_ptr<Ex> rep)
  function ExNode (line 272) | ExNode ExNode::append_child_it(ExNode rep)
  function ExNode (line 279) | ExNode ExNode::add_ex(std::shared_ptr<cadabra::Ex> other)
  function ExNode (line 336) | ExNode& ExNode::iter()
  function ExNode (line 430) | ExNode& ExNode::next()
  function ExNode (line 481) | ExNode Ex_iter(std::shared_ptr<Ex> ex)
  function ExNode (line 491) | ExNode Ex_top(std::shared_ptr<Ex> ex)
  function Ex_matches (line 501) | bool Ex_matches(std::shared_ptr<Ex> ex, ExNode& other)
  function Ex_matches_Ex (line 509) | bool Ex_matches_Ex(std::shared_ptr<Ex> ex, std::shared_ptr<Ex> other)
  function ExNode_less (line 520) | bool ExNode_less(ExNode& one, ExNode& two)
  function ExNode_greater (line 528) | bool ExNode_greater(ExNode& one, ExNode& two)
  function ExNode (line 536) | ExNode Ex_getitem_string(std::shared_ptr<Ex> ex, std::string tag)
  function ExNode (line 547) | ExNode Ex_getitem_iterator(std::shared_ptr<Ex> ex, ExNode en)

FILE: core/ExNode.hh
  class ExNode (line 29) | class ExNode : public cadabra::IndexClassifier {

FILE: core/Exceptions.hh
  class CadabraException (line 7) | class CadabraException : public std::logic_error {
  class ConsistencyException (line 14) | class ConsistencyException : public CadabraException {
  class ParseException (line 21) | class ParseException : public CadabraException {
  class InterruptionException (line 28) | class InterruptionException : public CadabraException {
  class ArgumentException (line 35) | class ArgumentException : public CadabraException {
  class NonScalarException (line 45) | class NonScalarException : public CadabraException {
  class RuntimeException (line 56) | class RuntimeException : public CadabraException {
  class InternalError (line 65) | class InternalError : public CadabraException {
  class NotYetImplemented (line 75) | class NotYetImplemented : public CadabraException {

FILE: core/Exchange.hh
  type cadabra (line 43) | namespace cadabra {
    class exchange (line 45) | class exchange {
      type identical_tensors_t (line 47) | struct identical_tensors_t {
      type tensor_type_t (line 69) | struct tensor_type_t {

FILE: core/Functional.cc
  type cadabra (line 4) | namespace cadabra {
    function do_list (line 6) | void do_list(const Ex& tr, Ex::iterator it, std::function<bool(Ex::ite...
    function do_sum (line 25) | void do_sum(const Ex& tr, Ex::iterator it, std::function<bool(Ex::iter...
    function list_size (line 44) | int list_size(const Ex& tr, Ex::iterator it)
    function find_in_subtree (line 52) | Ex::iterator find_in_subtree(const Ex& tr, Ex::iterator it, std::funct...
    function find_in_list (line 78) | Ex::iterator find_in_list(const Ex& tr, Ex::iterator it, std::function...
    function Ex (line 95) | Ex make_list(Ex el)

FILE: core/Functional.hh
  type cadabra (line 7) | namespace cadabra {
    function do_subtree (line 63) | typename T::iterator do_subtree(const T& tr, typename T::iterator it, ...
    type split_it (line 89) | struct split_it
      type iterator (line 91) | struct iterator {
        method iterator (line 100) | iterator() {}
        method iterator (line 101) | iterator(Ex::sibling_iterator it) : it(it) {}
        method reference (line 105) | reference operator* () { return it; }
        method pointer (line 106) | pointer operator-> () { return &it; }
        method reference (line 107) | reference operator ++ () { return ++it; }
        method value_type (line 108) | value_type operator ++ (int) { return it++; }
      method split_it (line 114) | split_it(Ex::iterator it, const std::string& delim = "")
      method iterator (line 127) | iterator begin() { return iterator(begin_); }
        method iterator (line 100) | iterator() {}
        method iterator (line 101) | iterator(Ex::sibling_iterator it) : it(it) {}
        method reference (line 105) | reference operator* () { return it; }
        method pointer (line 106) | pointer operator-> () { return &it; }
        method reference (line 107) | reference operator ++ () { return ++it; }
        method value_type (line 108) | value_type operator ++ (int) { return it++; }
      method iterator (line 128) | iterator end() { return iterator(end_); }
        method iterator (line 100) | iterator() {}
        method iterator (line 101) | iterator(Ex::sibling_iterator it) : it(it) {}
        method reference (line 105) | reference operator* () { return it; }
        method pointer (line 106) | pointer operator-> () { return &it; }
        method reference (line 107) | reference operator ++ () { return ++it; }
        method value_type (line 108) | value_type operator ++ (int) { return it++; }

FILE: core/Grouping.hh
  type cadabra (line 7) | namespace cadabra {

FILE: core/Hash.cc
  function hash_combine (line 5) | void hash_combine(size_t& seed, size_t modifier)
  function do_hash (line 11) | size_t do_hash(const T& t)
  type cadabra (line 17) | namespace cadabra
    function HashFlags (line 110) | HashFlags operator ~ (HashFlags flags)
    function HashFlags (line 115) | HashFlags operator | (HashFlags lhs, HashFlags rhs)
    function HashFlags (line 120) | HashFlags operator & (HashFlags lhs, HashFlags rhs)
    function HashFlags (line 125) | HashFlags& operator |= (HashFlags& lhs, HashFlags rhs)
    function HashFlags (line 130) | HashFlags& operator &= (HashFlags& lhs, HashFlags rhs)
    function hash_ex (line 135) | Ex_hasher::result_t hash_ex(Ex::iterator it, HashFlags flags)
    function hash_compare (line 141) | bool hash_compare(Ex::iterator lhs, Ex::iterator rhs, HashFlags flags)

FILE: core/Hash.hh
  type cadabra (line 5) | namespace cadabra
    type HashFlags (line 7) | enum HashFlags : unsigned int
    class Ex_hasher (line 23) | class Ex_hasher

FILE: core/IndexClassifier.cc
  function Ex (line 486) | Ex IndexClassifier::get_dummy(const list_property *dums,
  function Ex (line 550) | Ex IndexClassifier::get_dummy(const list_property *dums, Ex::iterator it...
  function Ex (line 562) | Ex IndexClassifier::get_dummy(const list_property *dums, Ex::iterator it...

FILE: core/IndexClassifier.hh
  type cadabra (line 11) | namespace cadabra {
    class IndexClassifier (line 13) | class IndexClassifier {

FILE: core/IndexIterator.cc
  function index_iterator (line 12) | index_iterator index_iterator::create(const Properties& k, const iterato...
  function index_iterator (line 74) | index_iterator& index_iterator::operator+=(unsigned int num)
  function index_iterator (line 84) | index_iterator& index_iterator::operator++()
  function index_iterator (line 122) | index_iterator index_iterator::begin(const Properties& properties, const...
  function index_iterator (line 130) | index_iterator index_iterator::end(const Properties& properties, const i...
  function index_iterator (line 138) | index_iterator& index_iterator::operator=(const index_iterator& other)

FILE: core/IndexIterator.hh
  type cadabra (line 7) | namespace cadabra {
    class index_iterator (line 20) | class index_iterator : public Ex::iterator_base {
    type iter_indices (line 44) | struct iter_indices
      type iterator (line 46) | struct iterator {
        method iterator (line 55) | iterator(index_iterator it) : it(it) {}
        method reference (line 59) | reference operator* () { return it; }
        method pointer (line 60) | pointer operator-> () { return &it; }
        method reference (line 61) | reference operator ++ () { return ++it; }
        method value_type (line 62) | value_type operator ++ (int) { return it++; }
      method iter_indices (line 68) | iter_indices(const Properties& properties, Ex::iterator it)
      method iterator (line 72) | iterator begin() { return index_iterator::begin(properties, it); }
        method iterator (line 55) | iterator(index_iterator it) : it(it) {}
        method reference (line 59) | reference operator* () { return it; }
        method pointer (line 60) | pointer operator-> () { return &it; }
        method reference (line 61) | reference operator ++ () { return ++it; }
        method value_type (line 62) | value_type operator ++ (int) { return it++; }
      method iterator (line 73) | iterator begin(int offset) { return index_iterator::begin(properties...
        method iterator (line 55) | iterator(index_iterator it) : it(it) {}
        method reference (line 59) | reference operator* () { return it; }
        method pointer (line 60) | pointer operator-> () { return &it; }
        method reference (line 61) | reference operator ++ () { return ++it; }
        method value_type (line 62) | value_type operator ++ (int) { return it++; }
      method iterator (line 74) | iterator end() { return index_iterator::end(properties, it); }
        method iterator (line 55) | iterator(index_iterator it) : it(it) {}
        method reference (line 59) | reference operator* () { return it; }
        method pointer (line 60) | pointer operator-> () { return &it; }
        method reference (line 61) | reference operator ++ () { return ++it; }
        method value_type (line 62) | value_type operator ++ (int) { return it++; }
      method size (line 75) | size_t size() { return std::distance(begin(), end()); }

FILE: core/InstallPrefix.hh
  type cadabra (line 6) | namespace cadabra {

FILE: core/Kernel.hh
  type cadabra (line 13) | namespace cadabra {
    class Kernel (line 15) | class Kernel {
      method Kernel (line 18) | Kernel(const Kernel& other) = delete;
      type scalar_backend_t (line 32) | enum class scalar_backend_t { sympy, mathematica }
      type warn_t (line 41) | enum class warn_t {

FILE: core/Linear.hh
  type linear (line 12) | namespace linear {
    type Solver (line 19) | struct Solver

FILE: core/MMACdb.hh
  class MMA (line 11) | class MMA {

FILE: core/Media.hh
  class LaTeXString (line 5) | class LaTeXString {

FILE: core/MultiIndex.hh
  class MultiIndex (line 11) | class MultiIndex {
    method start (line 16) | void start()
    method end (line 22) | bool end() const
    method MultiIndex (line 27) | MultiIndex& operator++()
    method T (line 42) | const T& operator[](std::size_t i)

FILE: core/Multiplier.cc
  type cadabra (line 4) | namespace cadabra {
    function Multiplier (line 46) | Multiplier& Multiplier::operator=(const mpq_class& v)
    function Multiplier (line 52) | Multiplier& Multiplier::operator=(const double& v)
    function mpq_class (line 68) | const mpq_class& Multiplier::get_rational() const
    function Multiplier (line 100) | Multiplier Multiplier::operator+(const Multiplier& other) const
    function Multiplier (line 110) | Multiplier Multiplier::operator-(const Multiplier& other) const
    function Multiplier (line 120) | Multiplier Multiplier::operator*(const Multiplier& other) const
    function Multiplier (line 130) | Multiplier Multiplier::operator/(const Multiplier& other) const
    function Multiplier (line 140) | Multiplier& Multiplier::operator+=(const Multiplier& other)
    function Multiplier (line 146) | Multiplier& Multiplier::operator-=(const Multiplier& other)
    function Multiplier (line 152) | Multiplier& Multiplier::operator*=(const Multiplier& other)
    function Multiplier (line 158) | Multiplier& Multiplier::operator/=(const Multiplier& other)

FILE: core/Multiplier.hh
  type cadabra (line 7) | namespace cadabra {
    class Multiplier (line 9) | class Multiplier {
      method Multiplier (line 25) | Multiplier(const Multiplier& other) = default;
      method Multiplier (line 28) | Multiplier& operator=(const Multiplier& other) = default;

FILE: core/NDSolver.hh
  type cadabra (line 9) | namespace cadabra {
    class NDSolver (line 25) | class NDSolver {
      class EventException (line 61) | class EventException : public CadabraException {

FILE: core/NEvaluator.cc
  function NTensor (line 41) | NTensor NEvaluator::evaluate()

FILE: core/NEvaluator.hh
  type cadabra (line 9) | namespace cadabra {
    class NEvaluator (line 29) | class NEvaluator {
      class VariableValues (line 53) | class VariableValues {

FILE: core/NIntegrator.hh
  type cadabra (line 9) | namespace cadabra {
    class NIntegrator (line 15) | class NIntegrator {

FILE: core/NInterpolatingFunction.cc
  function variable_ranges_t (line 88) | variable_ranges_t cadabra::function_domain(const Ex& ex)

FILE: core/NInterpolatingFunction.hh
  type cadabra (line 8) | namespace cadabra {
    class NInterpolatingFunction (line 14) | class NInterpolatingFunction {

FILE: core/NTensor.cc
  function NTensor (line 86) | NTensor& NTensor::operator=(NTensor&& other) noexcept
  function NTensor (line 95) | NTensor& NTensor::operator=(const NTensor&& other) noexcept
  function NTensor (line 104) | NTensor NTensor::linspace(std::complex<double> from, std::complex<double...
  function NTensor (line 116) | NTensor& NTensor::operator=(const NTensor& other)
  function NTensor (line 219) | NTensor& NTensor::apply(std::complex<double> (*fun)(const std::complex<d...
  function NTensor (line 234) | NTensor& NTensor::operator+=(const NTensor& other)
  function NTensor (line 265) | NTensor& NTensor::operator*=(const NTensor& other)
  function NTensor (line 298) | NTensor& NTensor::operator*=(const std::complex<double>& m)
  function NTensor (line 305) | NTensor& NTensor::operator*=(double m)
  function NTensor (line 312) | NTensor& NTensor::pow(const NTensor& other)
  function NTensor (line 338) | NTensor NTensor::outer_product(const NTensor& a, const NTensor& b)
  function NTensor (line 375) | NTensor NTensor::broadcast(std::vector<size_t> new_shape, size_t pos) const

FILE: core/NTensor.hh
  type cadabra (line 13) | namespace cadabra {
    class NTensor (line 15) | class NTensor {

FILE: core/Parser.hh
  type cadabra (line 29) | namespace cadabra {
    class Parser (line 38) | class Parser {
      type mode_t (line 59) | enum mode_t { m_skipwhite=0, m_name=1, m_findchildren=2,

FILE: core/Permutations.hh
  class PermutationException (line 17) | class PermutationException : std::logic_error {
    method PermutationException (line 19) | PermutationException(const std::string& ex) : std::logic_error(ex) {}
  class Perm (line 22) | class Perm {
  class Images (line 37) | class Images {

FILE: core/PreClean.cc
  type cadabra (line 5) | namespace cadabra {
    function pre_clean_dispatch (line 7) | void pre_clean_dispatch(const Kernel& kernel, Ex& ex, Ex::iterator& it)
    function pre_clean_dispatch_deep (line 21) | void pre_clean_dispatch_deep(const Kernel& k, Ex& tr)
    function cleanup_updown (line 26) | void cleanup_updown(const Kernel&, Ex&, Ex::iterator& st)
    function cleanup_rational (line 42) | void cleanup_rational(const Kernel&, Ex&, Ex::iterator& st)
    function cleanup_double (line 51) | void cleanup_double(const Kernel&, Ex&, Ex::iterator& st)
    function cleanup_frac (line 59) | void cleanup_frac(const Kernel&, Ex& tr, Ex::iterator& st)
    function cleanup_sqrt (line 126) | void cleanup_sqrt(const Kernel&, Ex& tr, Ex::iterator& st)
    function cleanup_prod (line 132) | void cleanup_prod(const Kernel&, Ex& tr, Ex::iterator& st)
    function cleanup_sub (line 142) | void cleanup_sub(const Kernel&, Ex& tr, Ex::iterator& it)
    function cleanup_indexbracket (line 179) | void cleanup_indexbracket(const Kernel&, Ex& tr, Ex::iterator& it)
    function replace_all (line 219) | std::string replace_all(std::string const& original, std::string const...

FILE: core/PreClean.hh
  type cadabra (line 20) | namespace cadabra {

FILE: core/PreProcessor.hh
  class preprocessor (line 36) | class preprocessor {
    type order_labels (line 47) | enum order_labels { order_factorial=0,
    class accu_t (line 101) | class accu_t {

FILE: core/ProgressMonitor.hh
  class ProgressMonitor (line 17) | class ProgressMonitor {
    class Total (line 55) | class Total {
    class Block (line 83) | class Block {
  class ScopedProgressGroup (line 99) | class ScopedProgressGroup

FILE: core/Props.cc
  function Ex_comparator (line 653) | Ex_comparator *Properties::create_comparator() const

FILE: core/Props.hh
  type cadabra (line 31) | namespace cadabra {
    class Properties (line 33) | class Properties
      class registered_property_map_t (line 245) | class registered_property_map_t {
    class Kernel (line 34) | class Kernel
    class Accent (line 35) | class Accent
    class LaTeXForm (line 36) | class LaTeXForm
    class Ex_comparator (line 37) | class Ex_comparator
    class pattern (line 39) | class pattern {
    class keyval_t (line 68) | class keyval_t {
    class property (line 127) | class property {
      type match_t (line 175) | enum match_t { no_match, id_match, exact_match }
    class labelled_property (line 189) | class labelled_property : virtual public property {
    class list_property (line 198) | class list_property : public property {
    class Inherit (line 209) | class Inherit : virtual public property {
      method name (line 212) | virtual std::string name() const
    class PropertyInherit (line 224) | class PropertyInherit : virtual public property {
      method name (line 226) | virtual std::string name() const
    class Properties (line 242) | class Properties {
      class registered_property_map_t (line 245) | class registered_property_map_t {
    function T (line 340) | const T* Properties::get(Ex::iterator it, bool ignore_parent_rel) const
    function T (line 347) | const T* Properties::get(Ex::iterator it, int& serialnum, bool doseria...
    function T (line 447) | const T* Properties::get(Ex::iterator it, const std::string& label) const
    function T (line 454) | const T* Properties::get(Ex::iterator it, int& serialnum, const std::s...
    function T (line 461) | const T* Properties::get(Ex::iterator it1, Ex::iterator it2, bool igno...
    function T (line 468) | const T* Properties::get(Ex::iterator it1, Ex::iterator it2, int& seri...

FILE: core/PythonException.cc
  function parse_python_exception (line 6) | std::string parse_python_exception()

FILE: core/ReservedNode.hh
  type cadabra (line 6) | namespace cadabra {
    type visit (line 8) | namespace visit {
      class ReservedNode (line 10) | class ReservedNode : public ExManip {

FILE: core/Stopwatch.cc
  function Stopwatch (line 72) | Stopwatch& Stopwatch::operator/=(int num)

FILE: core/Stopwatch.hh
  class Stopwatch (line 107) | class Stopwatch {

FILE: core/Storage.cc
  type cadabra (line 40) | namespace cadabra {
    function to_long (line 48) | long to_long(multiplier_t mul)
    function to_double (line 56) | double to_double(multiplier_t mul)
    function to_string (line 64) | std::string to_string(long num)
    function Ex (line 99) | Ex& Ex::operator=(Ex other)
    function multiplier_t (line 193) | multiplier_t Ex::to_rational() const
    function hashval_t (line 494) | hashval_t Ex::calc_hash(iterator it) const
    function multiplier_t (line 532) | multiplier_t Ex::arg_to_num(sibling_iterator sib, unsigned int num) const
    function multiply (line 1164) | void multiply(rset_t::iterator& num, multiplier_t fac)
    function divide (line 1171) | void divide(rset_t::iterator& num, multiplier_t fac)
    function set (line 1179) | void set(rset_t::iterator& num, multiplier_t fac)
    function add (line 1185) | void add(rset_t::iterator& num, multiplier_t fac)
    function zero (line 1192) | void zero(rset_t::iterator& num)
    function one (line 1201) | void one(rset_t::iterator& num)
    function flip_sign (line 1210) | void flip_sign(rset_t::iterator& num)
    function half (line 1217) | void half(rset_t::iterator& num)

FILE: core/Storage.hh
  type cadabra (line 39) | namespace cadabra {
    class NTensor (line 41) | class NTensor
    class NInterpolatingFunction (line 42) | class NInterpolatingFunction
    class str_node (line 62) | class str_node { // size: 9 bytes (32 bit arch), can be reduced to 5 b...
      type bracket_t (line 64) | enum bracket_t     { b_round=0, b_square=1, b_curly=2, b_pointy=3, b...
      type parent_rel_t (line 68) | enum parent_rel_t  { p_sub=0, p_super=1, p_none=2, p_property=3, p_e...
      type flag_t (line 92) | struct flag_t {
      type flag_t (line 99) | struct flag_t { // kept inside 8 bits for speed and size
    class Ex (line 170) | class Ex : public std::enable_shared_from_this<Ex>, public cdb_tree {
      type result_t (line 200) | enum result_t {
    class nset_it_less (line 350) | class nset_it_less {
    function is_in (line 356) | bool is_in(const T& val, const std::initializer_list<T>& list)

FILE: core/Sum.hh
  type cadabra (line 7) | namespace cadabra {
    type visit (line 9) | namespace visit {
      class Sum (line 11) | class Sum : public cadabra::visit::ReservedNode {

FILE: core/Symbols.hh
  type cadabra (line 7) | namespace cadabra {
    type symbols (line 8) | namespace symbols {

FILE: core/SympyCdb.cc
  function Ex (line 466) | Ex sympy::fill_matrix(const Kernel& kernel, Ex& ex, Ex& rules)

FILE: core/SympyCdb.hh
  type sympy (line 14) | namespace sympy {
    class SympyBridge (line 19) | class SympyBridge : public cadabra::DisplaySympy {

FILE: core/TerminalStream.cc
  function TerminalStream (line 12) | TerminalStream& TerminalStream::operator<<(const Ex& ex)
  function TerminalStream (line 19) | TerminalStream& TerminalStream::operator<<(std::shared_ptr<Ex> ex)

FILE: core/TerminalStream.hh
  type cadabra (line 6) | namespace cadabra {
    class TerminalStream (line 8) | class TerminalStream {
      method TerminalStream (line 16) | TerminalStream& operator<<(const T& obj)
      method TerminalStream (line 22) | TerminalStream& operator <<(std::ostream& (*os)(std::ostream&))

FILE: core/YoungTab.cc
  type yngtab (line 24) | namespace yngtab {
    function yngint_t (line 57) | yngint_t tableau_base::dimension(unsigned int dim) const
    function yngint_t (line 92) | yngint_t tableau_base::hook_length_prod() const
    function tableau (line 136) | tableau& tableau::operator=(const tableau& other)
    function add_box (line 182) | void add_box(tableau& tab1, unsigned int row1,

FILE: core/YoungTab.hh
  type yngtab (line 42) | namespace yngtab {
    class tableau_base (line 47) | class tableau_base {
    class tableau (line 66) | class tableau : public tableau_base {
    class tableaux (line 84) | class tableaux
    class filled_tableau (line 87) | class filled_tableau : public tableau {
      class iterator_base (line 126) | class iterator_base {
      class const_iterator_base (line 136) | class const_iterator_base {
      class const_iterator (line 146) | class const_iterator
      class in_column_iterator (line 147) | class in_column_iterator
      class in_column_const_iterator (line 148) | class in_column_const_iterator
      class in_row_iterator (line 149) | class in_row_iterator
      class in_row_const_iterator (line 150) | class in_row_const_iterator
      class in_column_iterator (line 153) | class in_column_iterator : public iterator_base {
      class in_column_const_iterator (line 183) | class in_column_const_iterator : public const_iterator_base {
      class in_row_iterator (line 212) | class in_row_iterator : public iterator_base {
      class in_row_const_iterator (line 240) | class in_row_const_iterator : public const_iterator_base {
      class iterator (line 269) | class iterator : public iterator_base {
      class const_iterator (line 295) | class const_iterator : public const_iterator_base {
    class tableaux (line 350) | class tableaux {
    function T (line 563) | T& filled_tableau<T>::in_column_iterator::operator[](int n) const
    function T (line 569) | T& filled_tableau<T>::in_column_iterator::operator*() const
    function T (line 575) | T* filled_tableau<T>::in_column_iterator::operator->() const
    function T (line 704) | const T& filled_tableau<T>::in_column_const_iterator::operator*() const
    function T (line 710) | const T* filled_tableau<T>::in_column_const_iterator::operator->() const
    function T (line 834) | T& filled_tableau<T>::in_row_iterator::operator*() const
    function T (line 840) | T* filled_tableau<T>::in_row_iterator::operator->() const
    function T (line 970) | const T& filled_tableau<T>::in_row_const_iterator::operator*() const
    function T (line 976) | const T* filled_tableau<T>::in_row_const_iterator::operator->() const
    function T (line 1101) | T& filled_tableau<T>::iterator::operator*() const
    function T (line 1107) | T* filled_tableau<T>::iterator::operator->() const
    function T (line 1254) | const T& filled_tableau<T>::const_iterator::operator*() const
    function T (line 1260) | const T* filled_tableau<T>::const_iterator::operator->() const
    function OutputIterator (line 1505) | OutputIterator filled_tableau<T>::Garnir_set(OutputIterator it, unsign...
    function yngrat_t (line 1598) | yngrat_t filled_tableau<T>::projector_normalisation() const
    function yngint_t (line 1746) | yngint_t tableaux<T>::total_dimension(unsigned int dim)
    function LR_tensor (line 1758) | void LR_tensor(const tableaux<T>& tabs1, const T& tab2, unsigned int m...
    function add_box (line 1769) | void add_box(T1& tab1, unsigned int row1,
    function add_box (line 1776) | void add_box(T1& tab1, unsigned int row1,
    function LR_add_box (line 1785) | void LR_add_box(const Tab& tab2, Tab& newtab,
    function LR_tensor (line 1866) | void LR_tensor(const Tab& tab1, const Tab& tab2, unsigned int maxrows,
    function LR_tensor (line 1889) | void LR_tensor(const tableaux<T>&, bool, unsigned int, OutputIterator )
    function T (line 1918) | T& filled_tableau<T>::operator()(unsigned int row, unsigned int col)
    function T (line 1926) | const T& filled_tableau<T>::operator()(unsigned int row, unsigned int ...
    function T (line 1934) | const T& filled_tableau<T>::operator[](unsigned int boxnum) const

FILE: core/algorithms/canonicalise.hh
  type cadabra (line 7) | namespace cadabra {
    class canonicalise (line 13) | class canonicalise : public Algorithm {

FILE: core/algorithms/collect_components.hh
  type cadabra (line 6) | namespace cadabra {
    class collect_components (line 12) | class collect_components : public Algorithm {

FILE: core/algorithms/collect_factors.hh
  type cadabra (line 6) | namespace cadabra {
    class collect_factors (line 12) | class collect_factors : public Algorithm {

FILE: core/algorithms/collect_terms.hh
  type cadabra (line 6) | namespace cadabra {
    class collect_terms (line 12) | class collect_terms : public Algorithm {

FILE: core/algorithms/combine.hh
  type cadabra (line 6) | namespace cadabra {
    class combine (line 8) | class combine : public Algorithm {

FILE: core/algorithms/complete.hh
  type cadabra (line 6) | namespace cadabra {
    class complete (line 14) | class complete : public Algorithm {

FILE: core/algorithms/component.hh
  type cadabra (line 6) | namespace cadabra {
    class component (line 8) | class component : public Algorithm {

FILE: core/algorithms/decompose.hh
  type cadabra (line 6) | namespace cadabra {
    class decompose (line 8) | class decompose : public Algorithm {

FILE: core/algorithms/decompose_product.cc
  function Indices (line 15) | const Indices *decompose_product::indices_equivalent(iterator it) const

FILE: core/algorithms/decompose_product.hh
  type cadabra (line 8) | namespace cadabra {
    class decompose_product (line 14) | class decompose_product : public Algorithm {

FILE: core/algorithms/distribute.hh
  type cadabra (line 6) | namespace cadabra {
    class distribute (line 14) | class distribute : public Algorithm {

FILE: core/algorithms/drop_weight.hh
  type cadabra (line 9) | namespace cadabra {
    class drop_keep_weight (line 11) | class drop_keep_weight : public Algorithm {
    class drop_weight (line 26) | class drop_weight : public drop_keep_weight {
    class keep_weight (line 33) | class keep_weight : public drop_keep_weight {

FILE: core/algorithms/einsteinify.hh
  type cadabra (line 6) | namespace cadabra {
    class einsteinify (line 10) | class einsteinify : public Algorithm {

FILE: core/algorithms/eliminate_kronecker.hh
  type cadabra (line 6) | namespace cadabra {
    class eliminate_kronecker (line 8) | class eliminate_kronecker : public Algorithm {

FILE: core/algorithms/eliminate_metric.hh
  type cadabra (line 7) | namespace cadabra {
    class eliminate_converter (line 9) | class eliminate_converter : public Algorithm {
    class eliminate_metric (line 35) | class eliminate_metric : public eliminate_converter {

FILE: core/algorithms/eliminate_vielbein.hh
  type cadabra (line 6) | namespace cadabra {
    class eliminate_vielbein (line 8) | class eliminate_vielbein : public eliminate_converter {

FILE: core/algorithms/epsilon_to_delta.hh
  type cadabra (line 7) | namespace cadabra {
    class epsilon_to_delta (line 9) | class epsilon_to_delta : public Algorithm {

FILE: core/algorithms/evaluate.hh
  type cadabra (line 93) | namespace cadabra {
    class evaluate (line 95) | class evaluate : public Algorithm {

FILE: core/algorithms/expand.cc
  function index_iterator (line 15) | index_iterator expand::nth_implicit_index(Ex::iterator eform, Ex::iterat...

FILE: core/algorithms/expand.hh
  type cadabra (line 6) | namespace cadabra {
    class expand (line 8) | class expand : public Algorithm {

FILE: core/algorithms/expand_delta.hh
  type cadabra (line 6) | namespace cadabra {
    class expand_delta (line 8) | class expand_delta : public Algorithm {

FILE: core/algorithms/expand_diracbar.hh
  type cadabra (line 6) | namespace cadabra {
    class expand_diracbar (line 8) | class expand_diracbar : public Algorithm {

FILE: core/algorithms/expand_dummies.hh
  type cadabra (line 7) | namespace cadabra {
    class expand_dummies (line 9) | class expand_dummies : public Algorithm {

FILE: core/algorithms/expand_power.hh
  type cadabra (line 6) | namespace cadabra {
    class expand_power (line 8) | class expand_power : public Algorithm {

FILE: core/algorithms/explicit_indices.hh
  type cadabra (line 7) | namespace cadabra {
    class explicit_indices (line 9) | class explicit_indices : public Algorithm {

FILE: core/algorithms/factor_in.cc
  function hashval_t (line 31) | hashval_t factor_in::calc_restricted_hash(iterator it) const

FILE: core/algorithms/factor_in.hh
  type cadabra (line 6) | namespace cadabra {
    class factor_in (line 10) | class factor_in : public Algorithm {

FILE: core/algorithms/factor_out.hh
  type cadabra (line 6) | namespace cadabra {
    class factor_out (line 10) | class factor_out : public Algorithm {

FILE: core/algorithms/fierz.hh
  type cadabra (line 8) | namespace cadabra {
    class fierz (line 10) | class fierz : public Algorithm {

FILE: core/algorithms/first_order_form.hh
  type cadabra (line 6) | namespace cadabra {
    class first_order_form (line 13) | class first_order_form : public Algorithm {

FILE: core/algorithms/flatten_product.hh
  type cadabra (line 6) | namespace cadabra {
    class flatten_product (line 8) | class flatten_product : public Algorithm {

FILE: core/algorithms/flatten_sum.hh
  type cadabra (line 5) | namespace cadabra {
    class flatten_sum (line 7) | class flatten_sum : public Algorithm {

FILE: core/algorithms/indexsort.hh
  type cadabra (line 6) | namespace cadabra {
    class indexsort (line 8) | class indexsort : public Algorithm {
      class less_indexed_treenode (line 15) | class less_indexed_treenode {

FILE: core/algorithms/integrate_by_parts.cc
  function Ex (line 250) | Ex integrate_by_parts::wrap(iterator, sibling_iterator, sibling_iterator...

FILE: core/algorithms/integrate_by_parts.hh
  type cadabra (line 7) | namespace cadabra {
    class integrate_by_parts (line 14) | class integrate_by_parts : public Algorithm {

FILE: core/algorithms/join_gamma.hh
  type cadabra (line 6) | namespace cadabra {
    class join_gamma (line 8) | class join_gamma : public Algorithm {

FILE: core/algorithms/keep_terms.hh
  type cadabra (line 6) | namespace cadabra {
    class keep_terms (line 8) | class keep_terms : public Algorithm {

FILE: core/algorithms/lower_free_indices.hh
  type cadabra (line 6) | namespace cadabra {
    class lower_free_indices (line 8) | class lower_free_indices : public Algorithm {

FILE: core/algorithms/lr_tensor.hh
  type cadabra (line 6) | namespace cadabra {
    class lr_tensor (line 8) | class lr_tensor : public tab_basics {

FILE: core/algorithms/map_mma.hh
  type cadabra (line 6) | namespace cadabra {
    class map_mma (line 14) | class map_mma : public Algorithm {

FILE: core/algorithms/map_sympy.hh
  type cadabra (line 6) | namespace cadabra {
    class map_sympy (line 14) | class map_sympy : public Algorithm {

FILE: core/algorithms/meld.cc
  function it_is_scalar (line 467) | bool it_is_scalar(const Kernel& kernel, Ex::iterator it)
  type Ident (line 1147) | struct Ident {
    method Ident (line 1148) | Ident() : n_indices(0) {}
    method generate_commutation_matrix (line 1153) | std::vector<std::vector<int>> generate_commutation_matrix(const Kernel...
  type CycledTerm (line 1208) | struct CycledTerm
    method CycledTerm (line 1210) | CycledTerm(Ex::iterator it, IndexMap& index_map, const Kernel& kernel)
    method cycle (line 1256) | void cycle(const Kernel& kernel)
    method compare (line 1270) | bool compare(const Kernel& kernel, const CycledTerm& other)

FILE: core/algorithms/meld.hh
  type cadabra (line 9) | namespace cadabra {
    class meld (line 11) | class meld : public Algorithm
      type ProjectedTerm (line 23) | struct ProjectedTerm {
      type symmetrizer_t (line 35) | struct symmetrizer_t {
        method symmetrizer_t (line 36) | symmetrizer_t(bool antisymmetric, bool independent) : antisymmetri...

FILE: core/algorithms/nevaluate.hh
  type cadabra (line 9) | namespace cadabra {
    class nevaluate (line 11) | class nevaluate : public Algorithm {

FILE: core/algorithms/nval.hh
  type cadabra (line 9) | namespace cadabra {
    class nval (line 11) | class nval : public Algorithm {

FILE: core/algorithms/order.hh
  type cadabra (line 6) | namespace cadabra {
    class order (line 8) | class order : virtual public Algorithm {

FILE: core/algorithms/product_rule.hh
  type cadabra (line 5) | namespace cadabra {
    class product_rule (line 7) | class product_rule : public Algorithm {

FILE: core/algorithms/reduce_delta.hh
  type cadabra (line 6) | namespace cadabra {
    class reduce_delta (line 8) | class reduce_delta : public Algorithm {

FILE: core/algorithms/rename_dummies.hh
  type cadabra (line 6) | namespace cadabra {
    class rename_dummies (line 8) | class rename_dummies : public Algorithm {

FILE: core/algorithms/replace_match.hh
  type cadabra (line 6) | namespace cadabra {
    class replace_match (line 8) | class replace_match : public Algorithm {

FILE: core/algorithms/rewrite_indices.hh
  type cadabra (line 6) | namespace cadabra {
    class rewrite_indices (line 8) | class rewrite_indices : public Algorithm {

FILE: core/algorithms/simplify.hh
  type cadabra (line 6) | namespace cadabra {
    class simplify (line 15) | class simplify : public Algorithm {

FILE: core/algorithms/sort_product.hh
  type cadabra (line 6) | namespace cadabra {
    class sort_product (line 8) | class sort_product : public Algorithm {

FILE: core/algorithms/sort_spinors.hh
  type cadabra (line 6) | namespace cadabra {
    class sort_spinors (line 8) | class sort_spinors : public Algorithm {

FILE: core/algorithms/sort_sum.hh
  type cadabra (line 6) | namespace cadabra {
    class sort_sum (line 8) | class sort_sum : public Algorithm {

FILE: core/algorithms/split.hh
  type cadabra (line 6) | namespace cadabra {
    class split (line 13) | class split : public Algorithm {

FILE: core/algorithms/split_gamma.hh
  type cadabra (line 7) | namespace cadabra {
    class split_gamma (line 9) | class split_gamma : public Algorithm {

FILE: core/algorithms/split_index.hh
  type cadabra (line 8) | namespace cadabra {
    class split_index (line 10) | class split_index : public Algorithm {

FILE: core/algorithms/substitute.hh
  type cadabra (line 8) | namespace cadabra {
    class substitute (line 14) | class substitute : public Algorithm {
      class Rules (line 59) | class Rules {
        method Rules (line 62) | Rules(size_t max_size_=1000, size_t cleanup_threshold_=100)

FILE: core/algorithms/sym.hh
  type cadabra (line 7) | namespace cadabra {
    class sym (line 9) | class sym : virtual public Algorithm {

FILE: core/algorithms/tab_basics.hh
  type cadabra (line 6) | namespace cadabra {
    class tab_basics (line 8) | class tab_basics : public Algorithm {

FILE: core/algorithms/tab_dimension.hh
  type cadabra (line 8) | namespace cadabra {
    class tabdimension (line 10) | class tabdimension : public Algorithm {

FILE: core/algorithms/take_match.hh
  type cadabra (line 6) | namespace cadabra {
    class take_match (line 8) | class take_match : public Algorithm {

FILE: core/algorithms/untrace.hh
  type cadabra (line 6) | namespace cadabra {
    class untrace (line 8) | class untrace : public Algorithm {

FILE: core/algorithms/unwrap.hh
  type cadabra (line 5) | namespace cadabra {
    class unwrap (line 7) | class unwrap : public Algorithm {

FILE: core/algorithms/unzoom.hh
  type cadabra (line 6) | namespace cadabra {
    class unzoom (line 8) | class unzoom : public Algorithm {

FILE: core/algorithms/vary.hh
  type cadabra (line 7) | namespace cadabra {
    class vary (line 13) | class vary : public Algorithm {

FILE: core/algorithms/young_project.hh
  type cadabra (line 7) | namespace cadabra {
    class young_project (line 9) | class young_project : public Algorithm {

FILE: core/algorithms/young_project_product.hh
  type cadabra (line 6) | namespace cadabra {
    class young_project_product (line 8) | class young_project_product : public Algorithm {

FILE: core/algorithms/young_project_tensor.hh
  type cadabra (line 7) | namespace cadabra {
    class young_project_tensor (line 9) | class young_project_tensor : public Algorithm {

FILE: core/algorithms/zoom.hh
  type cadabra (line 6) | namespace cadabra {
    class zoom (line 8) | class zoom : public Algorithm {

FILE: core/cadabra2-cli.cc
  function replace_all (line 32) | std::string replace_all(std::string const& original, std::string const& ...
  function help (line 718) | void help()
  function version (line 741) | void version()
  function main (line 746) | int main(int argc, char* argv[])
  function PYBIND11_EMBEDDED_MODULE (line 879) | PYBIND11_EMBEDDED_MODULE(cadabra2_cli, m)

FILE: core/cadabra2-cli.hh
  class Shell (line 18) | class Shell : public pybind11::scoped_interpreter {
    type Flags (line 20) | enum class Flags : unsigned int {
    class CatchOutput (line 44) | class CatchOutput {
  class ExitRequest (line 99) | class ExitRequest : public std::exception {

FILE: core/cadabra2cadabra.cc
  function main (line 5) | int main(int argc, char **argv)

FILE: core/cadabra2ipynb.cc
  function main (line 11) | int main(int argc, char **argv)

FILE: core/cadabra2python.cc
  function main (line 11) | int main(int argc, char **argv)

FILE: core/cdb-nbtool.cc
  function strip_newline (line 25) | void strip_newline(std::string& s)
  function run_command (line 35) | std::string run_command(std::string command)
  function run_git_command (line 54) | std::string run_git_command(std::string command)
  function diff_substr (line 88) | std::string diff_substr(const std::string& s, size_t i1, size_t i2, diff...
  function compare_cell (line 108) | void compare_cell(const std::string& a_, const std::string& b_, const st...
  function Cells (line 209) | Cells cnb_to_cells(std::istream& stream)
  function cnb_diff (line 233) | void cnb_diff(std::istream& a, std::istream& b)
  function split_to_maxlength (line 260) | std::vector<std::string> split_to_maxlength(std::string s, int maxlength)
  function help (line 273) | void help()
  function view (line 303) | void view(const char* fname)
  function diff (line 419) | void diff(const char* a, const char* b)
  function gitdiff (line 435) | void gitdiff(const char* a, const char* b, const char* relpath)
  function clean (line 454) | void clean(const char* a)
  function run (line 504) | int run(int argc, char** argv)
  function main (line 564) | int main(int argc, char** argv)

FILE: core/echokernel.py
  class EchoKernel (line 3) | class EchoKernel(Kernel):
    method do_execute (line 11) | def do_execute(self, code, silent, store_history=True, user_expression...

FILE: core/lru_cache.hh
  class LRUcache (line 25) | class LRUcache {
    method LRUcache (line 34) | LRUcache(size_t capacity) : max_size(capacity) {}
    method touch (line 37) | void touch(iterator& it) {
    method Value (line 44) | Value& at(const Key& key, bool touching = true) {
    method insert (line 56) | void insert(const Key& key, const Value& value) {
    method Value (line 71) | Value& operator[](const Key& key) {
    method iterator (line 90) | iterator find(const Key& key, bool touching = true) {
    method contains (line 102) | bool contains(const Key& key, bool touching = true) {
    method erase (line 107) | size_t erase(const Key& key) {
    method iterator (line 118) | iterator erase(const_iterator& it) {
    method iterator (line 122) | iterator erase(iterator& it) {
    method clear (line 129) | void clear() {
    method empty (line 135) | bool empty() const {
    method size (line 140) | size_t size() const {
    method resize (line 146) | void resize(size_t new_size) {
    method iterator (line 154) | iterator begin() { return cache_list.begin(); }
    method iterator (line 155) | iterator end() { return cache_list.end(); }
    method evict (line 164) | void evict() {

FILE: core/modules/xperm_new.cc
  function print_perm (line 137) | void print_perm(int *p, int n, int nl)
  function print_array_perm (line 160) | void print_array_perm(int *perms, int m, int n, int nl)
  function print_list (line 180) | void print_list(int *list, int n, int nl)
  function print_array (line 198) | void print_array(int *array, int m, int n, int nl)
  function equal_list (line 236) | int equal_list(int *list1, int *list2, int n)
  function copy_list (line 258) | void copy_list(int *list1, int *list2, int n)
  function position (line 279) | int position(int i, int *list, int n)
  function position_list (line 296) | int position_list(int *matrix, int m, int *row, int n)
  function zeros (line 319) | void zeros(int *list, int n)
  function range (line 325) | void range(int *list, int n)
  function complement (line 341) | void complement(int *all, int al, int *part, int pl, int n,
  function sort (line 362) | void sort(int *list, int *slist, int l)
  function sortB (line 398) | void sortB(int *list, int *slist, int l, int *B, int Bl)
  function minim (line 439) | int minim(int *list, int n)
  function maxim (line 451) | int maxim(int *list, int n)
  function intersection (line 475) | void intersection(int *list1, int l1, int *list2, int l2, int *list,
  function isid (line 507) | int isid(int *p, int n )
  function product (line 527) | void product(int *p1, int *p2, int *p, int n)
  function F2 (line 555) | void F2(int *TAB1, int *g, int *TAB2, int *sgd, int n)
  function inverse (line 574) | void inverse(int *p, int *ip, int n)
  function onpoints (line 588) | int onpoints(int point, int *p, int n)
  function stable_points (line 607) | void stable_points(int *p, int n, int *list, int *m)
  function first_nonstable_point (line 628) | int first_nonstable_point(int *p, int n)
  function nonstable_points (line 651) | void nonstable_points(int *list1, int l1, int *GS, int m, int n,
  function stabilizer (line 689) | void stabilizer(int *points, int k, int *GS, int m, int n,
  function one_orbit (line 724) | void one_orbit(int point, int *GS, int m, int n, int *orbit, int *ol)
  function all_orbits (line 757) | void all_orbits(int *GS, int m, int n, int *orbits)
  function one_schreier_orbit (line 796) | void one_schreier_orbit(int point, int *GS, int m, int n,
  function schreier_vector (line 849) | void schreier_vector(int point, int *GS, int m, int n, int *nu, int *w)
  function trace_schreier (line 883) | void trace_schreier(int point, int *nu, int *w, int *perm, int n)
  function order_of_group (line 916) | long long int order_of_group(int *base, int bl, int *GS, int m, int n)
  function perm_member (line 943) | int perm_member(int *p, int *base, int bl, int *GS, int m, int n)
  function schreier_sims (line 996) | void schreier_sims(int *base, int bl, int *GS, int m, int n,
  function schreier_sims_step (line 1080) | void schreier_sims_step(int *base, int bl, int *GS, int m, int n,
  function coset_rep (line 1310) | void coset_rep(int *p, int n,
  function SGSofdummyset (line 1453) | void SGSofdummyset(int *dummies, int dl, int sym, int n,
  function SGSofrepeatedset (line 1535) | void SGSofrepeatedset(int *repes, int rl, int n,
  function movedummyset (line 1575) | void movedummyset(int firstd, int *dummies, int dl, int)
  function moverepeatedset (line 1625) | void moverepeatedset(int firstd, int *repes, int rl)
  function dropdummyset (line 1656) | void dropdummyset(int firstd,
  function droprepeatedset (line 1676) | void droprepeatedset(int firstd,
  function SGSD (line 1696) | void SGSD(int *vds, int vdsl, int *dummies, int dl, int *mQ,
  class alphastruct (line 1775) | class alphastruct {
  function TAB (line 1831) | void TAB(std::vector<alphastruct>& ALPHA, int *L, int Ll, int *s1, int *...
  function F1 (line 1844) | void F1(std::vector<alphastruct>& ALPHA, int *L, int Ll, int *g, int *li...
  function consistency (line 1894) | int consistency(int *array, int m, int n)
  function double_coset_rep (line 1940) | void double_coset_rep(int *g, int n, int *base, int bl, int *GS, int m,
  function canonical_perm (line 2345) | void canonical_perm(int *PERM,
  function canonical_perm_ext (line 2447) | void canonical_perm_ext(int *PERM, int n,

FILE: core/packages/cdb/core/_component.cc
  function get_free_indices (line 13) | std::vector<Ex> get_free_indices(const Kernel& kernel, Ex::iterator it)
  function Ex_ptr (line 59) | Ex_ptr get_component(Ex_ptr ex, Ex_ptr components)
  function PYBIND11_MODULE (line 144) | PYBIND11_MODULE(_component, m)

FILE: core/packages/cdb/remote/__init__.py
  class CadabraRemoteException (line 10) | class CadabraRemoteException(Exception):
    method __init__ (line 11) | def __init__(self, msg):
  class CadabraRemote (line 14) | class CadabraRemote:
    method __init__ (line 15) | def __init__(self):
    method start (line 27) | def start(self, extra_args=[]):
    method connect (line 46) | def connect(self):
    method ws_run (line 52) | def ws_run(self):
    method on_message (line 68) | def on_message(self, ws, message):
    method on_open (line 77) | def on_open(self, ws):
    method on_close (line 82) | def on_close(self, ws, v1, v2):
    method on_error (line 89) | def on_error(self, ws, message):
    method open (line 96) | def open(self, notebook, wait=True):
    method run_all_cells (line 108) | def run_all_cells(self, wait=True):
    method run_cell (line 122) | def run_cell(self, cell_id, wait=True):
    method add_cell (line 137) | def add_cell(self, content, cell_id=0, wait=True):
    method insert_text (line 153) | def insert_text(self, content, cell_id=0, wait=True):
    method wait (line 168) | def wait(self):

FILE: core/packages/cdb/remote/highlight.py
  class WidgetHighlighter (line 15) | class WidgetHighlighter:
    method __init__ (line 16) | def __init__(self, window_name):
    method create_highlight_window (line 29) | def create_highlight_window(self, x, y, width, height):
    method draw_highlight (line 46) | def draw_highlight(self, widget, cr):
    method remove_highlight (line 57) | def remove_highlight(self):
    method find_button_by_label (line 62) | def find_button_by_label(self, app_name, button_label):
    method _find_button_recursive (line 72) | def _find_button_recursive(self, obj, label):
    method highlight_button (line 83) | def highlight_button(self, button):
    method _run_loop (line 103) | def _run_loop(self):
    method find_window (line 106) | def find_window(self, name):
    method subtitle (line 117) | def subtitle(self, text, large=False):
    method startloop (line 171) | def startloop(self):
    method draw_subtitle (line 179) | def draw_subtitle(self, widget, cr):
    method draw_subtitle_background (line 200) | def draw_subtitle_background(self, widget, cr):
    method remove_subtitle (line 240) | def remove_subtitle(self):
    method remove_all (line 246) | def remove_all(self):
  function init_highlight (line 253) | def init_highlight(title="Cadabra"):
  function mark (line 259) | def mark(label=""):
  function subtitle (line 270) | def subtitle(txt="", large=False, bottom=20):

FILE: core/packages/cdb/remote/record.py
  function get_window_geometry (line 8) | def get_window_geometry(window_name):
  function setup_region_capture (line 47) | def setup_region_capture(window_name, password):
  function start_record (line 118) | def start_record():
  function stop_record (line 122) | def stop_record():

FILE: core/packages/cdb/remote/speech.py
  function init (line 18) | def init(url="http://localhost:8880/v1"):
  function warp (line 22) | def warp(w=True):
  function tts (line 26) | def tts(txt, fname):
  function say_async (line 36) | def say_async(fname, delay):
  function say (line 43) | def say(text, subtitle=True, subtext="", delay=0, block=False, bottom=20):

FILE: core/packages/cdb/utils/_algorithm.cc
  class PyAlgorithm (line 10) | class PyAlgorithm : public Algorithm
    method PyAlgorithm (line 13) | PyAlgorithm(Ex_ptr ex)
    method result_t (line 20) | result_t py_apply_generic(bool deep, bool repeat, unsigned int depth)
    method result_t (line 25) | result_t py_apply_pre_order(bool repeat)
    method can_apply (line 32) | bool can_apply(Ex::iterator it) override
    method apply (line 48) | Algorithm::result_t apply(Ex::iterator& it) override
  class PyAlgorithmTrampoline (line 70) | class PyAlgorithmTrampoline : public PyAlgorithm
    method py_can_apply (line 75) | bool py_can_apply(ExNode node) override {
    method py_apply (line 85) | Algorithm::result_t py_apply(ExNode node) override {
  function PYBIND11_MODULE (line 97) | PYBIND11_MODULE(_algorithm, m)

FILE: core/passing.cc
  function fun (line 6) | void fun(int * &p)
  function main (line 11) | int main()

FILE: core/properties/Accent.hh
  type cadabra (line 7) | namespace cadabra {
    class Accent (line 16) | class Accent : public PropertyInherit, public IndexInherit, public Num...

FILE: core/properties/AntiCommuting.hh
  type cadabra (line 6) | namespace cadabra {
    class AntiCommuting (line 8) | class AntiCommuting : virtual public CommutingBehaviour {
      method sign (line 12) | virtual int sign() const

FILE: core/properties/AntiSymmetric.hh
  type cadabra (line 8) | namespace cadabra {
    class AntiSymmetric (line 10) | class AntiSymmetric : public TableauBase, public Traceless, virtual pu...

FILE: core/properties/Commuting.hh
  type cadabra (line 6) | namespace cadabra {
    class Commuting (line 8) | class Commuting : virtual public CommutingBehaviour {
      method sign (line 12) | virtual int sign() const

FILE: core/properties/CommutingAsProduct.hh
  type cadabra (line 6) | namespace cadabra {
    class CommutingAsProduct (line 8) | class CommutingAsProduct : virtual public property {

FILE: core/properties/CommutingAsSum.hh
  type cadabra (line 6) | namespace cadabra {
    class CommutingAsSum (line 8) | class CommutingAsSum : virtual public property {

FILE: core/properties/CommutingBehaviour.hh
  type cadabra (line 6) | namespace cadabra {
    class CommutingBehaviour (line 8) | class CommutingBehaviour : virtual public list_property {

FILE: core/properties/Coordinate.hh
  type cadabra (line 6) | namespace cadabra {
    class Coordinate (line 8) | class Coordinate : public property {

FILE: core/properties/DAntiSymmetric.hh
  type cadabra (line 6) | namespace cadabra {
    class DAntiSymmetric (line 8) | class DAntiSymmetric : public TableauBase, virtual public property {

FILE: core/properties/Depends.cc
  function Ex (line 44) | Ex Depends::dependencies(const Kernel&, Ex::iterator) const

FILE: core/properties/Depends.hh
  type cadabra (line 5) | namespace cadabra {
    class Depends (line 7) | class Depends : public DependsBase, virtual public property {
      method unnamed_argument (line 12) | virtual std::string unnamed_argument() const override

FILE: core/properties/DependsBase.hh
  type cadabra (line 7) | namespace cadabra {
    class DependsBase (line 11) | class DependsBase : virtual public property {

FILE: core/properties/DependsInherit.cc
  function Ex (line 11) | Ex DependsInherit::dependencies(const Kernel& kernel, Ex::iterator it) c...

FILE: core/properties/DependsInherit.hh
  type cadabra (line 6) | namespace cadabra {
    class DependsInherit (line 10) | class DependsInherit : public DependsBase, virtual public property {

FILE: core/properties/Derivative.cc
  function multiplier_t (line 24) | multiplier_t Derivative::value(const Kernel& kernel, Ex::iterator it, co...

FILE: core/properties/Derivative.hh
  type cadabra (line 14) | namespace cadabra {
    class Derivative (line 16) | class Derivative :
      method unnamed_argument (line 35) | virtual std::string unnamed_argument() const override

FILE: core/properties/DerivativeOp.hh
  type cadabra (line 6) | namespace cadabra {
    class DerivativeOp (line 8) | class DerivativeOp : virtual public property {

FILE: core/properties/Determinant.hh
  type cadabra (line 7) | namespace cadabra {
    class Determinant (line 9) | class Determinant : virtual public property {

FILE: core/properties/Diagonal.hh
  type cadabra (line 7) | namespace cadabra {
    class Diagonal (line 9) | class Diagonal : public Symmetric {

FILE: core/properties/DifferentialForm.cc
  function Ex (line 25) | Ex DifferentialForm::degree(const Properties&, Ex::iterator) const

FILE: core/properties/DifferentialForm.hh
  type cadabra (line 9) | namespace cadabra {
    class DifferentialForm (line 11) | class DifferentialForm : public IndexInherit, public DifferentialFormB...

FILE: core/properties/DifferentialFormBase.hh
  type cadabra (line 8) | namespace cadabra {
    class DifferentialFormBase (line 10) | class DifferentialFormBase : virtual public property {

FILE: core/properties/DiracBar.hh
  type cadabra (line 7) | namespace cadabra {
    class DiracBar (line 9) | class DiracBar : public Accent, public Distributable, virtual public p...

FILE: core/properties/Distributable.hh
  type cadabra (line 6) | namespace cadabra {
    class Distributable (line 8) | class Distributable : virtual public  property {

FILE: core/properties/EpsilonTensor.hh
  type cadabra (line 6) | namespace cadabra {
    class EpsilonTensor (line 10) | class EpsilonTensor : public AntiSymmetric, virtual public property {

FILE: core/properties/ExteriorDerivative.cc
  function Ex (line 16) | Ex ExteriorDerivative::degree(const Properties& props, Ex::iterator it) ...

FILE: core/properties/ExteriorDerivative.hh
  type cadabra (line 8) | namespace cadabra {
    class ExteriorDerivative (line 10) | class ExteriorDerivative : public Derivative, public DifferentialFormB...

FILE: core/properties/FilledTableau.hh
  type cadabra (line 6) | namespace cadabra {
    class FilledTableau (line 8) | class FilledTableau : public ImplicitIndex, virtual public property {

FILE: core/properties/GammaMatrix.hh
  type cadabra (line 7) | namespace cadabra {
    class GammaMatrix (line 9) | class GammaMatrix : public AntiSymmetric, public Matrix, virtual publi...
      method unnamed_argument (line 15) | virtual std::string unnamed_argument() const override

FILE: core/properties/GammaTraceless.hh
  type cadabra (line 6) | namespace cadabra {
    class GammaTraceless (line 8) | class GammaTraceless : public property {

FILE: core/properties/ImaginaryI.hh
  type cadabra (line 6) | namespace cadabra {
    class ImaginaryI (line 8) | class ImaginaryI : public property {

FILE: core/properties/ImplicitIndex.hh
  type cadabra (line 6) | namespace cadabra {
    class ImplicitIndex (line 8) | class ImplicitIndex : virtual public property {
      method unnamed_argument (line 12) | virtual std::string unnamed_argument() const override

FILE: core/properties/IndexInherit.hh
  type cadabra (line 7) | namespace cadabra {
    class IndexInherit (line 9) | class IndexInherit : virtual public property {
      method name (line 11) | virtual std::string name() const

FILE: core/properties/Indices.hh
  type cadabra (line 6) | namespace cadabra {
    class Indices (line 8) | class Indices : public list_property {
      method unnamed_argument (line 13) | virtual std::string unnamed_argument() const override
      type position_t (line 24) | enum position_t { free=0, fixed=1, independent=2 }

FILE: core/properties/Integer.hh
  type cadabra (line 6) | namespace cadabra {
    class Integer (line 13) | class Integer : public property {
      method unnamed_argument (line 20) | virtual std::string unnamed_argument() const  override

FILE: core/properties/Integral.hh
  type cadabra (line 5) | namespace cadabra {
    class Integral (line 11) | class Integral : public property {

FILE: core/properties/InverseMetric.hh
  type cadabra (line 7) | namespace cadabra {
    class InverseMetric (line 9) | class InverseMetric : public TableauSymmetry, virtual public property {

FILE: core/properties/KroneckerDelta.hh
  type cadabra (line 6) | namespace cadabra {
    class KroneckerDelta (line 8) | class KroneckerDelta : public TableauBase, virtual public property {

FILE: core/properties/LaTeXForm.hh
  type cadabra (line 6) | namespace cadabra {
    class LaTeXForm (line 8) | class LaTeXForm : virtual public property {

FILE: core/properties/Matrix.hh
  type cadabra (line 6) | namespace cadabra {
    class Matrix (line 8) | class Matrix : public ImplicitIndex, virtual public property {

FILE: core/properties/Metric.hh
  type cadabra (line 7) | namespace cadabra {
    class Metric (line 9) | class Metric : public Symmetric, virtual public property {

FILE: core/properties/NonCommuting.hh
  type cadabra (line 6) | namespace cadabra {
    class NonCommuting (line 8) | class NonCommuting : virtual public CommutingBehaviour {
      method sign (line 12) | virtual int sign() const

FILE: core/properties/NumericalFlat.hh
  type cadabra (line 6) | namespace cadabra {
    class NumericalFlat (line 11) | class NumericalFlat : virtual public property {

FILE: core/properties/PartialDerivative.hh
  type cadabra (line 7) | namespace cadabra {
    class PartialDerivative (line 9) | class PartialDerivative : public Derivative, public Inherit<Spinor>, v...

FILE: core/properties/RiemannTensor.hh
  type cadabra (line 5) | namespace cadabra {
    class RiemannTensor (line 7) | class RiemannTensor : public TableauSymmetry, virtual public property {

FILE: core/properties/SatisfiesBianchi.hh
  type cadabra (line 6) | namespace cadabra {
    class SatisfiesBianchi (line 8) | class SatisfiesBianchi : public TableauBase, virtual public property {

FILE: core/properties/SelfAntiCommuting.hh
  type cadabra (line 6) | namespace cadabra {
    class SelfAntiCommuting (line 8) | class SelfAntiCommuting : virtual public SelfCommutingBehaviour {

FILE: core/properties/SelfCommuting.hh
  type cadabra (line 7) | namespace cadabra {
    class SelfCommuting (line 9) | class SelfCommuting : virtual public SelfCommutingBehaviour {

FILE: core/properties/SelfCommutingBehaviour.hh
  type cadabra (line 6) | namespace cadabra {
    class SelfCommutingBehaviour (line 8) | class SelfCommutingBehaviour : virtual public property {

FILE: core/properties/SelfNonCommuting.hh
  type cadabra (line 6) | namespace cadabra {
    class SelfNonCommuting (line 8) | class SelfNonCommuting : virtual public SelfCommutingBehaviour {

FILE: core/properties/SortOrder.hh
  type cadabra (line 6) | namespace cadabra {
    class SortOrder (line 8) | class SortOrder : public list_property {

FILE: core/properties/Spinor.hh
  type cadabra (line 6) | namespace cadabra {
    class Spinor (line 8) | class Spinor : public ImplicitIndex, virtual public property {
      type Chirality (line 18) | enum Chirality { positive, negative }

FILE: core/properties/Symbol.cc
  function Symbol (line 11) | const Symbol *Symbol::get(const Properties& properties, Ex::iterator it,...

FILE: core/properties/Symbol.hh
  type cadabra (line 6) | namespace cadabra {
    class Symbol (line 8) | class Symbol : public property {

FILE: core/properties/Symmetric.hh
  type cadabra (line 6) | namespace cadabra {
    class Symmetric (line 8) | class Symmetric : public TableauBase, virtual public property {

FILE: core/properties/Tableau.hh
  type cadabra (line 7) | namespace cadabra {
    class Tableau (line 14) | class Tableau : public ImplicitIndex, virtual public property {

FILE: core/properties/TableauBase.hh
  type cadabra (line 7) | namespace cadabra {
    class TableauBase (line 9) | class TableauBase : virtual public property {
      method only_column_exchange (line 19) | virtual bool         only_column_exchange() const

FILE: core/properties/TableauInherit.hh
  type cadabra (line 7) | namespace cadabra {
    class TableauInherit (line 14) | class TableauInherit : virtual public TableauBase, virtual public prop...
      method name (line 17) | virtual std::string name() const

FILE: core/properties/TableauSymmetry.hh
  type cadabra (line 7) | namespace cadabra {
    class TableauSymmetry (line 9) | class TableauSymmetry : public TableauBase, virtual public property {

FILE: core/properties/Trace.hh
  type cadabra (line 11) | namespace cadabra {
    class Trace (line 13) | class Trace :

FILE: core/properties/Traceless.hh
  type cadabra (line 6) | namespace cadabra {
    class Traceless (line 8) | class Traceless : virtual public property {
      method unnamed_argument (line 13) | virtual std::string unnamed_argument() const override

FILE: core/properties/Vielbein.hh
  type cadabra (line 6) | namespace cadabra {
    class Vielbein (line 8) | class Vielbein : virtual public property {
    class InverseVielbein (line 13) | class InverseVielbein : virtual public property {

FILE: core/properties/Weight.cc
  function multiplier_t (line 29) | multiplier_t Weight::value(const Kernel&, Ex::iterator, const std::strin...

FILE: core/properties/Weight.hh
  type cadabra (line 6) | namespace cadabra {
    class Weight (line 8) | class Weight : virtual public WeightBase {
      method unnamed_argument (line 13) | virtual std::string   unnamed_argument() const  override

FILE: core/properties/WeightBase.hh
  type cadabra (line 6) | namespace cadabra {
    class WeightBase (line 8) | class WeightBase : virtual public labelled_property {

FILE: core/properties/WeightInherit.cc
  function multiplier_t (line 46) | multiplier_t WeightInherit::value(const Kernel& kernel, Ex::iterator it,...

FILE: core/properties/WeightInherit.hh
  type cadabra (line 7) | namespace cadabra {
    class WeightInherit (line 9) | class WeightInherit : virtual public WeightBase {
      class WeightException (line 15) | class WeightException : public ConsistencyException {
      method unnamed_argument (line 22) | virtual std::string   unnamed_argument() const override
      type CombinationType (line 28) | enum CombinationType { multiplicative, additive, power }

FILE: core/properties/WeylTensor.hh
  type cadabra (line 7) | namespace cadabra {
    class WeylTensor (line 9) | class WeylTensor : public TableauSymmetry, public Traceless, virtual p...

FILE: core/pythoncdb/py_algorithms.cc
  type cadabra (line 81) | namespace cadabra {
    function init_algorithms (line 87) | void init_algorithms(py::module& m)
    function set_variables (line 284) | void set_variables(NEvaluator& ev, py::dict d)
    function extract_var_range (line 332) | std::tuple<Ex, NTensor, std::complex<double>, std::complex<double>> ex...

FILE: core/pythoncdb/py_algorithms.hh
  type cadabra (line 9) | namespace cadabra {
    function Ex_ptr (line 18) | Ex_ptr apply_algo_base(Algo& algo, Ex_ptr ex, bool deep, bool repeat, ...
    function Ex_ptr (line 35) | Ex_ptr apply_algo(Ex_ptr ex, bool deep, bool repeat, unsigned int depth)
    function Ex_ptr (line 42) | Ex_ptr apply_algo(Ex_ptr ex, Arg1 arg1, bool deep, bool repeat, unsign...
    function Ex_ptr (line 49) | Ex_ptr apply_algo(Ex_ptr ex, Arg1 arg1, Arg2 arg2, bool deep, bool rep...
    function Ex_ptr (line 56) | Ex_ptr apply_algo(Ex_ptr ex, Arg1 arg1, Arg2 arg2, Arg3 arg3, bool dee...
    function def_algo (line 72) | void def_algo(pybind11::module& m, const char* name, bool deep, bool r...
    function Ex_ptr (line 86) | Ex_ptr apply_algo_preorder(Ex_ptr ex, bool deep, bool repeat, unsigned...
    function Ex_ptr (line 93) | Ex_ptr apply_algo_preorder(Ex_ptr ex, Arg1 arg1, bool deep, bool repea...
    function Ex_ptr (line 100) | Ex_ptr apply_algo_preorder(Ex_ptr ex, Arg1 arg1, Arg2 arg2, bool deep,...
    function def_algo_preorder (line 114) | void def_algo_preorder(pybind11::module& m, const char* name, bool dee...

FILE: core/pythoncdb/py_ex.cc
  type cadabra (line 38) | namespace cadabra {
    function Ex_compare (line 42) | bool Ex_compare(Ex_ptr one, Ex_ptr other)
    function Ex_compare (line 47) | bool Ex_compare(Ex_ptr one, int other)
    function Ex_ptr (line 53) | Ex_ptr Ex_add(const Ex_ptr ex1, const ExNode ex2)
    function Ex_ptr (line 59) | Ex_ptr Ex_add(const Ex_ptr ex1, const Ex_ptr ex2)
    function Ex_ptr (line 64) | Ex_ptr Ex_add(const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2)
    function Ex_ptr (line 102) | Ex_ptr Ex_join(const Ex_ptr ex1, const Ex_ptr ex2)
    function Ex_ptr (line 139) | Ex_ptr Ex_join(const std::vector<Ex_ptr>& exs)
    function Ex_ptr (line 159) | Ex_ptr Ex_mul(const Ex_ptr ex1, const Ex_ptr ex2)
    function Ex_ptr (line 165) | Ex_ptr Ex_mul(const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2)
    function Ex_ptr (line 180) | Ex_ptr Ex_sub(const Ex_ptr ex1, const ExNode ex2)
    function Ex_ptr (line 186) | Ex_ptr Ex_sub(const Ex_ptr ex1, const Ex_ptr ex2)
    function Ex_ptr (line 191) | Ex_ptr Ex_sub(const Ex_ptr ex1, const Ex_ptr ex2, Ex::iterator top2)
    function Ex_ptr (line 218) | Ex_ptr fetch_from_python(const std::string& nm)
    function Ex_ptr (line 229) | Ex_ptr fetch_from_python(const std::string& nm, pybind11::object scope)
    function Ex_as_str (line 265) | std::string Ex_as_str(Ex_ptr ex)
    function Ex_as_repr (line 279) | std::string Ex_as_repr(Ex_ptr ex)
    function Ex_as_latex (line 290) | std::string Ex_as_latex(Ex_ptr ex)
    function Ex_as_sympy (line 299) | pybind11::object Ex_as_sympy(Ex_ptr ex)
    function ExNode_get_multiplier (line 314) | pybind11::object ExNode_get_multiplier(const ExNode& ex)
    function ExNode_set_multiplier (line 330) | void ExNode_set_multiplier(ExNode& ex, pybind11::object mult)
    function ExNode_as_sympy (line 340) | pybind11::object ExNode_as_sympy(const ExNode& exnode)
    function Ex_as_sympy_string (line 345) | std::string Ex_as_sympy_string(Ex_ptr ex)
    function Ex_as_input (line 362) | std::string Ex_as_input(Ex_ptr ex)
    function Ex_as_MMA (line 376) | std::string Ex_as_MMA(Ex_ptr ex, bool use_unicode)
    function ExNode_compare (line 393) | Ex_comparator::match_t ExNode_compare(const ExNode& lhs, const ExNode&...
    function print_tree (line 404) | std::string print_tree(Ex *ex)
    function Ex (line 411) | Ex lhs(Ex_ptr ex)
    function Ex (line 423) | Ex rhs(Ex_ptr ex)
    function Ex (line 437) | Ex Ex_getslice(Ex_ptr ex, pybind11::slice slice)
    function Ex (line 460) | Ex Ex_getitem(Ex &ex, int index)
    function Ex_setitem (line 477) | void Ex_setitem(Ex_ptr ex, int index, Ex val)
    function Ex_setitem_iterator (line 488) | void Ex_setitem_iterator(Ex_ptr ex, ExNode en, Ex_ptr val)
    function Ex_len (line 514) | size_t Ex_len(Ex_ptr ex)
    function Ex_int_cast (line 521) | long Ex_int_cast(Ex_ptr ex)
    function Ex_head (line 526) | std::string Ex_head(Ex_ptr ex)
    function Ex_get_mult (line 533) | pybind11::object Ex_get_mult(Ex_ptr ex)
    function terms (line 548) | pybind11::list terms(Ex_ptr ex)
    function SympyBridge_init (line 566) | std::shared_ptr<sympy::SympyBridge> SympyBridge_init(std::shared_ptr<E...
    function Ex_ptr (line 572) | Ex_ptr Ex_from_string(const std::string& ex_, bool, Kernel *kernel)
    function Ex_ptr (line 612) | Ex_ptr Ex_from_int(int num, bool)
    function Ex_ptr (line 618) | Ex_ptr Ex_from_float(double num, bool)
    function call_post_process (line 624) | void call_post_process(Kernel& kernel, Ex_ptr ex)
    function Ex_cleanup (line 652) | void Ex_cleanup(Ex_ptr ex)
    function Ex_ptr (line 661) | Ex_ptr map_sympy_wrapper(Ex_ptr ex, std::string head, pybind11::args a...
    function init_ex (line 669) | void init_ex(py::module& m)

FILE: core/pythoncdb/py_ex.hh
  type cadabra (line 8) | namespace cadabra {

FILE: core/pythoncdb/py_globals.cc
  type cadabra (line 3) | namespace cadabra {

FILE: core/pythoncdb/py_globals.hh
  type cadabra (line 3) | namespace cadabra {

FILE: core/pythoncdb/py_helpers.cc
  type cadabra (line 14) | namespace cadabra {
    function get_locals (line 16) | py::object get_locals()
    function get_globals (line 21) | py::object get_globals()
    function scope_has (line 26) | bool scope_has(const py::dict& dict, const std::string& obj)
    function install_prefix_of_module (line 44) | std::string install_prefix_of_module()
    function read_manual (line 67) | std::string read_manual(pybind11::module& m, const char* category, con...

FILE: core/pythoncdb/py_helpers.hh
  type cadabra (line 6) | namespace cadabra {

FILE: core/pythoncdb/py_kernel.cc
  type cadabra (line 21) | namespace cadabra {
    function Kernel (line 22) | Kernel *create_scope()
    function Kernel (line 28) | Kernel *create_scope_from_global()
    function Kernel (line 35) | Kernel *create_empty_scope()
    function Kernel (line 41) | Kernel *get_kernel_from_scope()
    function kernel_configure_warnings (line 65) | void kernel_configure_warnings(Kernel& kernel, pybind11::kwargs kwargs)
    function init_kernel (line 100) | void init_kernel(pybind11::module& m)

FILE: core/pythoncdb/py_kernel.hh
  type cadabra (line 7) | namespace cadabra {

FILE: core/pythoncdb/py_media.cc
  type cadabra (line 6) | namespace cadabra {
    function init_media (line 7) | void init_media(py::module& m)

FILE: core/pythoncdb/py_media.hh
  type cadabra (line 3) | namespace cadabra {

FILE: core/pythoncdb/py_module.cc
  type cadabra (line 18) | namespace cadabra {
    function init_ipython (line 21) | std::string init_ipython()
    function PYBIND11_MODULE (line 27) | PYBIND11_MODULE(cadabra2, m)

FILE: core/pythoncdb/py_ntensor.cc
  type cadabra (line 9) | namespace cadabra {
    function init_ntensor (line 10) | void init_ntensor(py::module& m) {

FILE: core/pythoncdb/py_ntensor.hh
  type cadabra (line 3) | namespace cadabra {

FILE: core/pythoncdb/py_packages.cc
  type cadabra (line 7) | namespace cadabra {
    function compile_package (line 10) | void compile_package(const std::string& in_name, const std::string& ou...
    function init_packages (line 35) | void init_packages(pybind11::module& m)

FILE: core/pythoncdb/py_packages.hh
  type cadabra (line 6) | namespace cadabra {

FILE: core/pythoncdb/py_progress.cc
  type cadabra (line 6) | namespace cadabra {
    function ProgressMonitor_totals_helper (line 9) | py::list ProgressMonitor_totals_helper(ProgressMonitor& self)
    function ProgressMonitor (line 18) | ProgressMonitor *get_progress_monitor()
    function init_progress_monitor (line 43) | void init_progress_monitor(py::module& m)

FILE: core/pythoncdb/py_progress.hh
  type cadabra (line 7) | namespace cadabra {

FILE: core/pythoncdb/py_properties.cc
  type cadabra (line 63) | namespace cadabra {
    function Kernel (line 131) | Kernel& BoundPropertyBase::get_kernel()
    function Properties (line 136) | Properties& BoundPropertyBase::get_props()
    function Ex (line 141) | Ex& BoundPropertyBase::get_ex() const
    function PropT (line 196) | const PropT* BoundProperty<PropT, ParentTs...>::get_prop() const
    function def_abstract_prop (line 232) | typename BoundPropT::py_type def_abstract_prop(pybind11::module& m, co...
    function def_prop (line 248) | typename BoundPropT::py_type def_prop(pybind11::module& m)
    function list_properties (line 268) | pybind11::list list_properties()
    function indices_get_all (line 331) | std::vector<Ex> indices_get_all(const Indices* indices, bool include_w...
    function Ex (line 346) | Ex indices_get_dummy(const Indices* indices, const Ex_ptr& ex)
    function init_properties (line 352) | void init_properties(py::module& m)

FILE: core/pythoncdb/py_properties.hh
  type cadabra (line 15) | namespace cadabra {
    class BoundPropertyBase (line 16) | class BoundPropertyBase
    class BoundProperty (line 50) | class BoundProperty

FILE: core/pythoncdb/py_stopwatch.cc
  type cadabra (line 6) | namespace cadabra {
    function init_stopwatch (line 9) | void init_stopwatch(py::module& m)

FILE: core/pythoncdb/py_stopwatch.hh
  type cadabra (line 5) | namespace cadabra {

FILE: core/pythoncdb/py_tableau.cc
  type cadabra (line 5) | namespace cadabra {
    function tab_str (line 10) | std::string tab_str(const tab_t& tab)
    function init_tableau (line 27) | void init_tableau(pybind11::module& m)

FILE: core/pythoncdb/py_tableau.hh
  type cadabra (line 5) | namespace cadabra {

FILE: core/test_benchmark.cc
  function main (line 7) | int main(int, char **)

FILE: core/test_multiindex.cc
  function main (line 7) | int main()

FILE: core/test_permutations.cc
  function main (line 5) | int main()

FILE: core/test_preprocessor.cc
  function testit (line 29) | bool testit(const std::string& input, const std::string& output)
  function main (line 66) | int main(int, char **)

FILE: core/test_wstp.cc
  function main (line 12) | int main(int argc, char **argv)

FILE: core/tree.hh
  class tree_node_ (line 40) | class tree_node_ { // size: 5*4=20 bytes (on 32 bit arch), can be reduce...
  class navigation_error (line 79) | class navigation_error : public std::logic_error {
    method navigation_error (line 81) | navigation_error(const std::string& s) : std::logic_error(s)
  class iterator_base (line 106) | class iterator_base
    class iterator_base (line 132) | class iterator_base {
    class pre_order_iterator (line 163) | class pre_order_iterator : public iterator_base {
    class post_order_iterator (line 183) | class post_order_iterator : public iterator_base {
    class breadth_first_queued_iterator (line 204) | class breadth_first_queued_iterator : public iterator_base {
    class fixed_depth_iterator (line 225) | class fixed_depth_iterator : public iterator_base {
    class sibling_iterator (line 249) | class sibling_iterator : public iterator_base {
    class leaf_iterator (line 276) | class leaf_iterator : public iterator_base {
    class iterator_base_less (line 501) | class iterator_base_less {
    class compare_nodes (line 517) | class compare_nodes {
      method compare_nodes (line 519) | compare_nodes(StrictWeakOrdering comp) : comp_(comp) {}
  class pre_order_iterator (line 107) | class pre_order_iterator
  class post_order_iterator (line 108) | class post_order_iterator
  class sibling_iterator (line 109) | class sibling_iterator
  class leaf_iterator (line 110) | class leaf_iterator
  class iterator_base (line 130) | class iterator_base : public stlport::bidirectional_iterator<T, ptrdiff_...
    class iterator_base (line 132) | class iterator_base {
    class pre_order_iterator (line 163) | class pre_order_iterator : public iterator_base {
    class post_order_iterator (line 183) | class post_order_iterator : public iterator_base {
    class breadth_first_queued_iterator (line 204) | class breadth_first_queued_iterator : public iterator_base {
    class fixed_depth_iterator (line 225) | class fixed_depth_iterator : public iterator_base {
    class sibling_iterator (line 249) | class sibling_iterator : public iterator_base {
    class leaf_iterator (line 276) | class leaf_iterator : public iterator_base {
    class iterator_base_less (line 501) | class iterator_base_less {
    class compare_nodes (line 517) | class compare_nodes {
      method compare_nodes (line 519) | compare_nodes(StrictWeakOrdering comp) : comp_(comp) {}
  function iter (line 836) | iter tree<T, tree_node_allocator>::erase(iter it)
  function iter (line 1053) | iter tree<T, tree_node_allocator>::parent(iter position)
  function iter (line 1066) | iter tree<T, tree_node_allocator>::previous_sibling(iter position)
  function iter (line 1076) | iter tree<T, tree_node_allocator>::next_sibling(iter position)
  function iter (line 1086) | iter tree<T, tree_node_allocator>::next_at_same_depth(iter position) const
  function iter (line 1131) | iter tree<T, tree_node_allocator>::append_child(iter position)
  function iter (line 1157) | iter tree<T, tree_node_allocator>::prepend_child(iter position)
  function iter (line 1183) | iter tree<T, tree_node_allocator>::append_child(iter position, const T& x)
  function iter (line 1213) | iter tree<T, tree_node_allocator>::append_child(iter position, T&& x)
  function iter (line 1242) | iter tree<T, tree_node_allocator>::prepend_child(iter position, const T& x)
  function iter (line 1268) | iter tree<T, tree_node_allocator>::prepend_child(iter position, T&& x)
  function iter (line 1296) | iter tree<T, tree_node_allocator>::append_child(iter position, iter other)
  function iter (line 1308) | iter tree<T, tree_node_allocator>::prepend_child(iter position, iter other)
  function iter (line 1320) | iter tree<T, tree_node_allocator>::append_children(iter position, siblin...
  function iter (line 1337) | iter tree<T, tree_node_allocator>::prepend_children(iter position, sibli...
  function iter (line 1371) | iter tree<T, tree_node_allocator>::insert(iter position, const T& x)
  function iter (line 1400) | iter tree<T, tree_node_allocator>::insert(iter position, T&& x)
  function iter (line 1488) | iter tree<T, tree_node_allocator>::insert_after(iter position, const T& x)
  function iter (line 1512) | iter tree<T, tree_node_allocator>::insert_after(iter position, T&& x)
  function iter (line 1537) | iter tree<T, tree_node_allocator>::insert_subtree(iter position, const i...
  function iter (line 1547) | iter tree<T, tree_node_allocator>::insert_subtree_after(iter position, c...
  function iter (line 1567) | iter tree<T, tree_node_allocator>::replace(iter position, const T& x)
  function iter (line 1579) | iter tree<T, tree_node_allocator>::replace(iter position, const iterator...
  function iter (line 1691) | iter tree<T, tree_node_allocator>::flatten(iter position)
  function iter (line 1719) | iter tree<T, tree_node_allocator>::reparent(iter position, sibling_itera...
  function iter (line 1767) | iter tree<T, tree_node_allocator>::reparent(iter position, iter from)
  function iter (line 1774) | iter tree<T, tree_node_allocator>::wrap(iter position, const T& x)
  function iter (line 1785) | iter tree<T, tree_node_allocator>::wrap(iter from, iter to, const T& x)
  function iter (line 1794) | iter tree<T, tree_node_allocator>::move_after(iter target, iter source)
  function iter (line 1823) | iter tree<T, tree_node_allocator>::move_before(iter target, iter source)
  function iter (line 1893) | iter tree<T, tree_node_allocator>::move_ontop(iter target, iter source)
  function iter (line 1987) | iter tree<T, tree_node_allocator>::move_in(iter loc, tree& other)
  function iter (line 2019) | iter tree<T, tree_node_allocator>::move_in_below(iter loc, tree& other)
  function iter (line 2028) | iter tree<T, tree_node_allocator>::move_in_as_nth_child(iter loc, size_t...
  function T (line 2659) | T& tree<T, tree_node_allocator>::iterator_base::operator*() const
  function T (line 2665) | T* tree<T, tree_node_allocator>::iterator_base::operator->() const

FILE: frontend/common/TeXEngine.cc
  function setenv (line 24) | int setenv(const char *name, const char *value, int overwrite)

FILE: frontend/common/TeXEngine.hh
  type cadabra (line 10) | namespace cadabra {
    class TeXEngine (line 23) | class TeXEngine {
      class TeXException (line 25) | class TeXException : public std::logic_error {
      class TeXRequest (line 30) | class TeXRequest {

FILE: frontend/common/lodepng.cc
  function lodepng_free (line 71) | static void lodepng_free(void* ptr)
  type uivector (line 128) | struct uivector {
  function uivector_cleanup (line 134) | static void uivector_cleanup(void* p)
  function uivector_resize (line 142) | static unsigned uivector_resize(uivector* p, size_t size)
  function uivector_resizev (line 159) | static unsigned uivector_resizev(uivector* p, size_t size, unsigned value)
  function uivector_init (line 167) | static void uivector_init(uivector* p)
  function uivector_push_back (line 175) | static unsigned uivector_push_back(uivector* p, unsigned c)
  function uivector_copy (line 183) | static unsigned uivector_copy(uivector* p, const uivector* q)
  type ucvector (line 196) | struct ucvector {
  function ucvector_resize (line 203) | static unsigned ucvector_resize(ucvector* p, size_t size)
  function ucvector_cleanup (line 221) | static void ucvector_cleanup(void* p)
  function ucvector_init (line 228) | static void ucvector_init(ucvector* p)
  function ucvector_resizev (line 236) | static unsigned ucvector_resizev(ucvector* p, size_t size, unsigned char...
  function ucvector_init_buffer (line 249) | static void ucvector_init_buffer(ucvector* p, unsigned char* buffer, siz...
  function ucvector_push_back (line 258) | static unsigned ucvector_push_back(ucvector* p, unsigned char c)
  function string_resize (line 272) | static unsigned string_resize(char** out, size_t size)
  function string_init (line 283) | static void string_init(char** out)
  function string_cleanup (line 290) | static void string_cleanup(char** out)
  function string_set (line 296) | static void string_set(char** out, const char* in)
  function lodepng_read32bitInt (line 310) | unsigned lodepng_read32bitInt(const unsigned char* buffer)
  function lodepng_set32bitInt (line 317) | static void lodepng_set32bitInt(unsigned char* buffer, unsigned value)
  function lodepng_add32bitInt (line 327) | static void lodepng_add32bitInt(ucvector* buffer, unsigned value)
  function lodepng_load_file (line 340) | unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const c...
  function lodepng_save_file (line 368) | unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersiz...
  function addBitsToStream (line 398) | static void addBitsToStream(size_t* bitpointer, ucvector* bitstream, uns...
  function addBitsToStreamReversed (line 404) | static void addBitsToStreamReversed(size_t* bitpointer, ucvector* bitstr...
  function readBitFromStream (line 415) | static unsigned char readBitFromStream(size_t* bitpointer, const unsigne...
  function readBitsFromStream (line 422) | static unsigned readBitsFromStream(size_t* bitpointer, const unsigned ch...
  type HuffmanTree (line 480) | struct HuffmanTree {
  function HuffmanTree_init (line 501) | static void HuffmanTree_init(HuffmanTree* tree)
  function HuffmanTree_cleanup (line 508) | static void HuffmanTree_cleanup(HuffmanTree* tree)
  function HuffmanTree_make2DTree (line 516) | static unsigned HuffmanTree_make2DTree(HuffmanTree* tree)
  function HuffmanTree_makeFromLengths2 (line 573) | static unsigned HuffmanTree_makeFromLengths2(HuffmanTree* tree)
  function HuffmanTree_makeFromLengths (line 614) | static unsigned HuffmanTree_makeFromLengths(HuffmanTree* tree, const uns...
  type Coin (line 633) | struct Coin {
  function coin_init (line 638) | static void coin_init(Coin* c)
  function coin_cleanup (line 644) | static void coin_cleanup(void* c)
  function coin_copy (line 649) | static void coin_copy(Coin* c1, const Coin* c2)
  function add_coins (line 655) | static void add_coins(Coin* c1, const Coin* c2)
  function init_coins (line 662) | static void init_coins(Coin* coins, size_t num)
  function cleanup_coins (line 668) | static void cleanup_coins(Coin* coins, size_t num)
  function coin_compare (line 674) | static int coin_compare(const void* a, const void* b)
  function append_symbol_coins (line 681) | static unsigned append_symbol_coins(Coin* coins, const unsigned* frequen...
  function lodepng_huffman_code_lengths (line 695) | unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned*...
  function HuffmanTree_makeFromFrequencies (line 805) | static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const...
  function HuffmanTree_getCode (line 822) | static unsigned HuffmanTree_getCode(const HuffmanTree* tree, unsigned in...
  function HuffmanTree_getLength (line 827) | static unsigned HuffmanTree_getLength(const HuffmanTree* tree, unsigned ...
  function generateFixedLitLenTree (line 834) | static unsigned generateFixedLitLenTree(HuffmanTree* tree)
  function generateFixedDistanceTree (line 853) | static unsigned generateFixedDistanceTree(HuffmanTree* tree)
  function huffmanDecodeSymbol (line 873) | static unsigned huffmanDecodeSymbol(const unsigned char* in, size_t* bp,
  function getTreeInflateFixed (line 900) | static void getTreeInflateFixed(HuffmanTree* tree_ll, HuffmanTree* tree_d)
  function getTreeInflateDynamic (line 908) | static unsigned getTreeInflateDynamic(HuffmanTree* tree_ll, HuffmanTree*...
  function inflateHuffmanBlock (line 1045) | static unsigned inflateHuffmanBlock(ucvector* out, const unsigned char* ...
  function inflateNoCompression (line 1136) | static unsigned inflateNoCompression(ucvector* out, const unsigned char*...
  function lodepng_inflatev (line 1167) | static unsigned lodepng_inflatev(ucvector* out,
  function lodepng_inflate (line 1200) | unsigned lodepng_inflate(unsigned char** out, size_t* outsize,
  function inflate (line 1213) | static unsigned inflate(unsigned char** out, size_t* outsize,
  function addHuffmanSymbol (line 1236) | static void addHuffmanSymbol(size_t* bp, ucvector* compressed, unsigned ...
  function searchCodeIndex (line 1243) | static size_t searchCodeIndex(const unsigned* array, size_t array_size, ...
  function addLengthDistance (line 1261) | static void addLengthDistance(uivector* values, size_t length, size_t di...
  type Hash (line 1298) | struct Hash {
  function hash_init (line 1306) | static unsigned hash_init(Hash* hash, unsigned windowsize)
  function hash_cleanup (line 1324) | static void hash_cleanup(Hash* hash)
  function getHash (line 1332) | static unsigned getHash(const unsigned char* data, size_t size, size_t pos)
  function countZeros (line 1350) | static unsigned countZeros(const unsigned char* data, size_t size, size_...
  function updateHashChain (line 1362) | static void updateHashChain(Hash* hash, size_t wpos, int hashval)
  function encodeLZ77 (line 1378) | static unsigned encodeLZ77(uivector* out, Hash* hash,
  function deflateNoCompression (line 1528) | static unsigned deflateNoCompression(ucvector* out, const unsigned char*...
  function writeLZ77data (line 1568) | static void writeLZ77data(size_t* bp, ucvector* out, const uivector* lz7...
  function deflateDynamic (line 1595) | static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
  function deflateFixed (line 1825) | static unsigned deflateFixed(ucvector* out, size_t* bp, Hash* hash,
  function lodepng_deflatev (line 1870) | static unsigned lodepng_deflatev(ucvector* out, const unsigned char* in,...
  function lodepng_deflate (line 1907) | unsigned lodepng_deflate(unsigned char** out, size_t* outsize,
  function deflate (line 1920) | static unsigned deflate(unsigned char** out, size_t* outsize,
  function update_adler32 (line 1938) | static unsigned update_adler32(unsigned adler, const unsigned char* data...
  function adler32 (line 1960) | static unsigned adler32(const unsigned char* data, unsigned len)
  function lodepng_zlib_decompress (line 1971) | unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, c...
  function zlib_decompress (line 2012) | static unsigned zlib_decompress(unsigned char** out, size_t* outsize, co...
  function lodepng_zlib_compress (line 2027) | unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, con...
  function zlib_compress (line 2069) | static unsigned zlib_compress(unsigned char** out, size_t* outsize, cons...
  function zlib_decompress (line 2085) | static unsigned zlib_decompress(unsigned char** out, size_t* outsize, co...
  function zlib_compress (line 2093) | static unsigned zlib_compress(unsigned char** out, size_t* outsize, cons...
  function lodepng_compress_settings_init (line 2110) | void lodepng_compress_settings_init(LodePNGCompressSettings* settings)
  function lodepng_decompress_settings_init (line 2132) | void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings)
  function lodepng_crc32 (line 2194) | unsigned lodepng_crc32(const unsigned char* buf, size_t len)
  function readBitFromReversedStream (line 2209) | static unsigned char readBitFromReversedStream(size_t* bitpointer, const...
  function readBitsFromReversedStream (line 2216) | static unsigned readBitsFromReversedStream(size_t* bitpointer, const uns...
  function setBitOfReversedStream0 (line 2227) | static void setBitOfReversedStream0(size_t* bitpointer, unsigned char* b...
  function setBitOfReversedStream (line 2238) | static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bi...
  function lodepng_chunk_length (line 2250) | unsigned lodepng_chunk_length(const unsigned char* chunk)
  function lodepng_chunk_type (line 2255) | void lodepng_chunk_type(char type[5], const unsigned char* chunk)
  function lodepng_chunk_type_equals (line 2262) | unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, cons...
  function lodepng_chunk_ancillary (line 2268) | unsigned char lodepng_chunk_ancillary(const unsigned char* chunk)
  function lodepng_chunk_private (line 2273) | unsigned char lodepng_chunk_private(const unsigned char* chunk)
  function lodepng_chunk_safetocopy (line 2278) | unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk)
  function lodepng_chunk_check_crc (line 2293) | unsigned lodepng_chunk_check_crc(const unsigned char* chunk)
  function lodepng_chunk_generate_crc (line 2303) | void lodepng_chunk_generate_crc(unsigned char* chunk)
  function lodepng_chunk_append (line 2322) | unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, co...
  function lodepng_chunk_create (line 2341) | unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, un...
  function checkColorValidity (line 2377) | static unsigned checkColorValidity(LodePNGColorType colortype, unsigned ...
  function getNumColorChannels (line 2401) | static unsigned getNumColorChannels(LodePNGColorType colortype)
  function lodepng_get_bpp_lct (line 2418) | static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned...
  function lodepng_color_mode_init (line 2426) | void lodepng_color_mode_init(LodePNGColorMode* info)
  function lodepng_color_mode_cleanup (line 2436) | void lodepng_color_mode_cleanup(LodePNGColorMode* info)
  function lodepng_color_mode_copy (line 2441) | unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGCo...
  function lodepng_color_mode_equal (line 2454) | static int lodepng_color_mode_equal(const LodePNGColorMode* a, const Lod...
  function lodepng_palette_clear (line 2472) | void lodepng_palette_clear(LodePNGColorMode* info)
  function lodepng_palette_add (line 2479) | unsigned lodepng_palette_add(LodePNGColorMode* info,
  function lodepng_get_bpp (line 2499) | unsigned lodepng_get_bpp(const LodePNGColorMode* info)
  function lodepng_get_channels (line 2505) | unsigned lodepng_get_channels(const LodePNGColorMode* info)
  function lodepng_is_greyscale_type (line 2510) | unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info)
  function lodepng_is_alpha_type (line 2515) | unsigned lodepng_is_alpha_type(const LodePNGColorMode* info)
  function lodepng_is_palette_type (line 2520) | unsigned lodepng_is_palette_type(const LodePNGColorMode* info)
  function lodepng_has_palette_alpha (line 2525) | unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info)
  function lodepng_can_have_alpha (line 2534) | unsigned lodepng_can_have_alpha(const LodePNGColorMode* info)
  function lodepng_get_raw_size (line 2541) | size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMo...
  function lodepng_get_raw_size_lct (line 2546) | size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType...
  function LodePNGUnknownChunks_init (line 2553) | static void LodePNGUnknownChunks_init(LodePNGInfo* info)
  function LodePNGUnknownChunks_cleanup (line 2560) | static void LodePNGUnknownChunks_cleanup(LodePNGInfo* info)
  function LodePNGUnknownChunks_copy (line 2566) | static unsigned LodePNGUnknownChunks_copy(LodePNGInfo* dest, const LodeP...
  function LodePNGText_init (line 2587) | static void LodePNGText_init(LodePNGInfo* info)
  function LodePNGText_cleanup (line 2594) | static void LodePNGText_cleanup(LodePNGInfo* info)
  function LodePNGText_copy (line 2605) | static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* s...
  function lodepng_clear_text (line 2617) | void lodepng_clear_text(LodePNGInfo* info)
  function lodepng_add_text (line 2622) | unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char...
  function LodePNGIText_init (line 2647) | static void LodePNGIText_init(LodePNGInfo* info)
  function LodePNGIText_cleanup (line 2656) | static void LodePNGIText_cleanup(LodePNGInfo* info)
  function LodePNGIText_copy (line 2671) | static unsigned LodePNGIText_copy(LodePNGInfo* dest, const LodePNGInfo* ...
  function lodepng_clear_itext (line 2686) | void lodepng_clear_itext(LodePNGInfo* info)
  function lodepng_add_itext (line 2691) | unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const cha...
  function lodepng_info_init (line 2728) | void lodepng_info_init(LodePNGInfo* info)
  function lodepng_info_cleanup (line 2748) | void lodepng_info_cleanup(LodePNGInfo* info)
  function lodepng_info_copy (line 2759) | unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source)
  function lodepng_info_swap (line 2776) | void lodepng_info_swap(LodePNGInfo* a, LodePNGInfo* b)
  function addColorBits (line 2786) | static void addColorBits(unsigned char* out, size_t index, unsigned bits...
  type ColorTree (line 2797) | struct ColorTree
  type ColorTree (line 2805) | struct ColorTree {
  function color_tree_init (line 2810) | static void color_tree_init(ColorTree* tree)
  function color_tree_cleanup (line 2817) | static void color_tree_cleanup(ColorTree* tree)
  function color_tree_get (line 2829) | static int color_tree_get(ColorTree* tree, unsigned char r, unsigned cha...
  function color_tree_has (line 2841) | static int color_tree_has(ColorTree* tree, unsigned char r, unsigned cha...
  function color_tree_add (line 2849) | static void color_tree_add(ColorTree* tree,
  function rgba8ToPixel (line 2865) | static unsigned rgba8ToPixel(unsigned char* out, size_t i,
  function rgba16ToPixel (line 2927) | static unsigned rgba16ToPixel(unsigned char* out, size_t i,
  function getPixelColorRGBA8 (line 2967) | static unsigned getPixelColorRGBA8(unsigned char* r, unsigned char* g,
  function getPixelColorsRGBA8 (line 3065) | static unsigned getPixelColorsRGBA8(unsigned char* buffer, size_t numpix...
  function getPixelColorRGBA16 (line 3176) | static unsigned getPixelColorRGBA16(unsigned short* r, unsigned short* g...
  function lodepng_convert (line 3215) | unsigned lodepng_convert(unsigned char* out, const unsigned char* in,
  type ColorProfile (line 3274) | struct ColorProfile {
  function color_profile_init (line 3300) | static void color_profile_init(ColorProfile* profile, const LodePNGColor...
  function color_profile_cleanup (line 3326) | static void color_profile_cleanup(ColorProfile* profile)
  function getValueRequiredBits (line 3353) | unsigned getValueRequiredBits(unsigned short value)
  function get_color_profile (line 3363) | static unsigned get_color_profile(ColorProfile* profile,
  function setColorKeyFrom16bit (line 3528) | static void setColorKeyFrom16bit(LodePNGColorMode* mode_out, unsigned r,...
  function lodepng_auto_choose_color (line 3539) | unsigned lodepng_auto_choose_color(LodePNGColorMode* mode_out,
  function paethPredictor (line 3646) | static unsigned char paethPredictor(short a, short b, short c)
  function Adam7_getpassvalues (line 3679) | static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7], si...
  function lodepng_inspect (line 3712) | unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state,
  function unfilterScanline (line 3763) | static unsigned unfilterScanline(unsigned char* recon, const unsigned ch...
  function unfilter (line 3827) | static unsigned unfilter(unsigned char* out, const unsigned char* in, un...
  function Adam7_deinterlace (line 3868) | static void Adam7_deinterlace(unsigned char* out, const unsigned char* i...
  function removePaddingBits (line 3910) | static void removePaddingBits(unsigned char* out, const unsigned char* in,
  function postProcessScanlines (line 3938) | static unsigned postProcessScanlines(unsigned char* out, unsigned char* in,
  function readChunk_PLTE (line 3984) | static unsigned readChunk_PLTE(LodePNGColorMode* color, const unsigned c...
  function readChunk_tRNS (line 4006) | static unsigned readChunk_tRNS(LodePNGColorMode* color, const unsigned c...
  function readChunk_bKGD (line 4039) | static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* d...
  function readChunk_tEXt (line 4070) | static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* d...
  function readChunk_zTXt (line 4112) | static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecompres...
  function readChunk_iTXt (line 4160) | static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecompres...
  function readChunk_tIME (line 4250) | static unsigned readChunk_tIME(LodePNGInfo* info, const unsigned char* d...
  function readChunk_pHYs (line 4265) | static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* d...
  function decodeGeneric (line 4279) | static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h,
  function lodepng_decode (line 4432) | unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h,
  function lodepng_decode_memory (line 4471) | unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigne...
  function lodepng_decode32 (line 4484) | unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h,...
  function lodepng_decode24 (line 4489) | unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h,...
  function lodepng_decode_file (line 4495) | unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned*...
  function lodepng_decode32_file (line 4507) | unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigne...
  function lodepng_decode24_file (line 4512) | unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigne...
  function lodepng_decoder_settings_init (line 4518) | void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings)
  function lodepng_state_init (line 4534) | void lodepng_state_init(LodePNGState* state)
  function lodepng_state_cleanup (line 4547) | void lodepng_state_cleanup(LodePNGState* state)
  function lodepng_state_copy (line 4553) | void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source)
  function addChunk (line 4574) | static unsigned addChunk(ucvector* out, const char* chunkName, const uns...
  function writeSignature (line 4581) | static void writeSignature(ucvector* out)
  function addChunk_IHDR (line 4594) | static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h,
  function addChunk_PLTE (line 4615) | static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info)
  function addChunk_tRNS (line 4631) | static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info)
  function addChunk_IDAT (line 4670) | static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, ...
  function addChunk_IEND (line 4685) | static unsigned addChunk_IEND(ucvector* out)
  function addChunk_tEXt (line 4694) | static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const ...
  function addChunk_zTXt (line 4710) | static unsigned addChunk_zTXt(ucvector* out, const char* keyword, const ...
  function addChunk_iTXt (line 4736) | static unsigned addChunk_iTXt(ucvector* out, unsigned compressed, const ...
  function addChunk_bKGD (line 4774) | static unsigned addChunk_bKGD(ucvector* out, const LodePNGInfo* info)
  function addChunk_tIME (line 4801) | static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time)
  function addChunk_pHYs (line 4818) | static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info)
  function filterScanline (line 4836) | static void filterScanline(unsigned char* out, const unsigned char* scan...
  function flog2 (line 4892) | static float flog2(float f)
  function filter (line 4906) | static unsigned filter(unsigned char* out, const unsigned char* in, unsi...
  function addPaddingBits (line 5102) | static void addPaddingBits(unsigned char* out, const unsigned char* in,
  function Adam7_interlace (line 5133) | static void Adam7_interlace(unsigned char* out, const unsigned char* in,...
  function preProcessScanlines (line 5176) | static unsigned preProcessScanlines(unsigned char** out, size_t* outsize...
  function getPaletteTranslucency (line 5259) | static unsigned getPaletteTranslucency(const unsigned char* palette, siz...
  function addUnknownChunks (line 5279) | static unsigned addUnknownChunks(ucvector* out, unsigned char* data, siz...
  function lodepng_encode (line 5291) | unsigned lodepng_encode(unsigned char** out, size_t* outsize,
  function lodepng_encode_memory (line 5459) | unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, con...
  function lodepng_encode32 (line 5475) | unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const un...
  function lodepng_encode24 (line 5480) | unsigned lodepng_encode24(unsigned char** out, size_t* outsize, const un...
  function lodepng_encode_file (line 5486) | unsigned lodepng_encode_file(const char* filename, const unsigned char* ...
  function lodepng_encode32_file (line 5497) | unsigned lodepng_encode32_file(const char* filename, const unsigned char...
  function lodepng_encode24_file (line 5502) | unsigned lodepng_encode24_file(const char* filename, const unsigned char...
  function lodepng_encoder_settings_init (line 5508) | void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings)
  type lodepng (line 5720) | namespace lodepng {
    function load_file (line 5723) | void load_file(std::vector<unsigned char>& buffer, const std::string& ...
    function save_file (line 5738) | void save_file(const std::vector<unsigned char>& buffer, const std::st...
    function decompress (line 5747) | unsigned decompress(std::vector<unsigned char>& out, const unsigned ch...
    function decompress (line 5760) | unsigned decompress(std::vector<unsigned char>& out, const std::vector...
    function compress (line 5768) | unsigned compress(std::vector<unsigned char>& out, const unsigned char...
    function compress (line 5781) | unsigned compress(std::vector<unsigned char>& out, const std::vector<u...
    function State (line 5808) | State& State::operator=(const State& other)
    function decode (line 5816) | unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned...
    function decode (line 5832) | unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned...
    function decode (line 5838) | unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned...
    function decode (line 5852) | unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned...
    function decode (line 5860) | unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned...
    function encode (line 5871) | unsigned encode(std::vector<unsigned char>& out, const unsigned char* ...
    function encode (line 5884) | unsigned encode(std::vector<unsigned char>& out,
    function encode (line 5892) | unsigned encode(std::vector<unsigned char>& out,
    function encode (line 5906) | unsigned encode(std::vector<unsigned char>& out,
    function encode (line 5915) | unsigned encode(const std::string& filename,
    function encode (line 5925) | unsigned encode(const std::string& filename,

FILE: frontend/common/lodepng.h
  type LodePNGColorType (line 87) | typedef enum LodePNGColorType
  function namespace (line 195) | namespace lodepng
  type LodePNGDecompressSettings (line 249) | typedef struct LodePNGDecompressSettings LodePNGDecompressSettings;
  type LodePNGDecompressSettings (line 250) | struct LodePNGDecompressSettings
  type LodePNGCompressSettings (line 277) | typedef struct LodePNGCompressSettings LodePNGCompressSettings;
  type LodePNGCompressSettings (line 278) | struct LodePNGCompressSettings /*deflate = compress*/
  type LodePNGColorMode (line 312) | typedef struct LodePNGColorMode
  type LodePNGTime (line 389) | typedef struct LodePNGTime
  type LodePNGInfo (line 401) | typedef struct LodePNGInfo
  type LodePNGDecoderSettings (line 512) | typedef struct LodePNGDecoderSettings
  type LodePNGFilterStrategy (line 541) | typedef enum LodePNGFilterStrategy
  type LodePNGAutoConvert (line 560) | typedef enum LodePNGAutoConvert
  type LodePNGEncoderSettings (line 594) | typedef struct LodePNGEncoderSettings
  type LodePNGState (line 631) | typedef struct LodePNGState
  function namespace (line 822) | namespace lodepng

FILE: frontend/common/test_tex.cc
  function main (line 6) | int main()

FILE: frontend/gtkmm/Cadabra.cc
  function signal_handler (line 19) | void signal_handler(int)
  function get_arg_value (line 83) | static bool get_arg_value(const Glib::RefPtr<Glib::VariantDict>& options...

FILE: frontend/gtkmm/Cadabra.hh
  class Cadabra (line 12) | class Cadabra : public Gtk::Application {

FILE: frontend/gtkmm/ChooseColoursDialog.cc
  type cadabra (line 8) | namespace cadabra {
    function capitalize_first (line 9) | std::string capitalize_first(std::string in)

FILE: frontend/gtkmm/ChooseColoursDialog.hh
  type cadabra (line 12) | namespace cadabra {
    class ChooseColoursDialog (line 13) | class ChooseColoursDialog : public Gtk::Dialog {
      type responses (line 15) | enum responses {

FILE: frontend/gtkmm/CodeInput.cc
  function trim (line 14) | std::string trim(const std::string& s)
  function gunichar (line 168) | gunichar deref(Gtk::TextBuffer::iterator it, size_t n)

FILE: frontend/gtkmm/CodeInput.hh
  type cadabra (line 10) | namespace cadabra {
    class CodeInput (line 17) | class CodeInput : public Gtk::Box {
      class exp_input_tv (line 41) | class exp_input_tv : public Gtk::TextView {

FILE: frontend/gtkmm/Console.cc
  function is_greedy (line 9) | bool is_greedy(const std::string& str)
  function is_empty (line 18) | bool is_empty(const std::string& str)

FILE: frontend/gtkmm/Console.hh
  type cadabra (line 10) | namespace cadabra {
    class Console (line 11) | class Console
      type Position (line 17) | enum class Position : int {
      class TextViewProxy (line 50) | class TextViewProxy : public Gtk::TextView {
    class Console (line 15) | class Console : public Gtk::Box {
      type Position (line 17) | enum class Position : int {
      class TextViewProxy (line 50) | class TextViewProxy : public Gtk::TextView {

FILE: frontend/gtkmm/DiffViewer.hh
  class DiffTextView (line 8) | class DiffTextView : public Gtk::TextView {
  class CellDiff (line 13) | class CellDiff : public Gtk::Frame {
  class DiffViewer (line 24) | class DiffViewer : public Gtk::Dialog {

FILE: frontend/gtkmm/ImageView.cc
  function readFile (line 164) | std::string readFile(const std::string& filename)

FILE: frontend/gtkmm/ImageView.hh
  class ImageView (line 14) | class ImageView
    class ImageView (line 53) | class ImageView : public Gtk::EventBox {
  class ImageArea (line 19) | class ImageArea : public Gtk::DrawingArea {
  class ImageView (line 51) | class ImageView : public Gtk::Box {
    class ImageView (line 53) | class ImageView : public Gtk::EventBox {

FILE: frontend/gtkmm/NotebookCanvas.hh
  type cadabra (line 27) | namespace cadabra {
    class NotebookWindow (line 29) | class NotebookWindow
    class SmoothScroller (line 31) | class SmoothScroller {
      method on_timeout (line 42) | bool on_timeout()
      method SmoothScroller (line 64) | SmoothScroller(Glib::RefPtr<Gtk::Adjustment> adj)
      method scroll_to (line 70) | void scroll_to(double target)
      method stop (line 88) | void stop() {
      method set_duration (line 92) | void set_duration(double ms) {
    class NotebookCanvas (line 97) | class NotebookCanvas : public Gtk::Paned {

FILE: frontend/gtkmm/NotebookWindow.cc
  function create_filter (line 2261) | Glib::RefPtr<Gtk::FileFilter> create_filter(const Glib::ustring& name, c...
  class GitChooseModelColumns (line 3146) | class GitChooseModelColumns : public Gtk::TreeModel::ColumnRecord {
    method GitChooseModelColumns (line 3148) | GitChooseModelColumns()
  function remove_recursive (line 3489) | bool remove_recursive(const gchar* path)

FILE: frontend/gtkmm/NotebookWindow.hh
  class Cadabra (line 32) | class Cadabra
  type cadabra (line 34) | namespace cadabra {
    class NotebookWindow (line 41) | class NotebookWindow : public Gtk::ApplicationWindow, public DocumentT...

FILE: frontend/gtkmm/Preferences.hh
  class PreferencesWindow (line 7) | class PreferencesWindow : public class Gtk::Window {

FILE: frontend/gtkmm/SelectFileDialog.hh
  class SelectFileDialog (line 5) | class SelectFileDialog : public Gtk::Dialog {

FILE: frontend/gtkmm/SliderView.cc
  function compute_scale_digits (line 11) | int compute_scale_digits(double step_increment) {

FILE: frontend/gtkmm/SliderView.hh
  class SliderView (line 24) | class SliderView : public Gtk::Box {
    class SliderView (line 26) | class SliderView : public Gtk::EventBox {

FILE: frontend/gtkmm/TeXView.cc
  function guint32 (line 323) | guint32 color_from_rgba(Gdk::RGBA color)

FILE: frontend/gtkmm/TeXView.hh
  type cadabra (line 22) | namespace cadabra {
    class TeXView (line 31) | class TeXView : public Gtk::EventBox {
      class TeXArea (line 51) | class TeXArea : public Gtk::DrawingArea {

FILE: frontend/gtkmm/VisualCell.hh
  type cadabra (line 14) | namespace cadabra {
    class VisualCell (line 21) | class VisualCell {

FILE: frontend/gtkmm/main.cc
  function main (line 23) | int main(int argc, char **argv)

FILE: frontend/osx/Cadabra/Cadabra/NotebookCanvas.hh
  type cadabra (line 12) | namespace cadabra {
    class NotebookCanvas (line 14) | class NotebookCanvas {

FILE: frontend/osx/Cadabra/Cadabra/NotebookWindow.hh
  type cadabra_osx (line 18) | namespace cadabra_osx {
    class NotebookWindow (line 25) | class NotebookWindow : public DocumentThread, public GUIBase {

FILE: frontend/osx/Cadabra/NotebookController.h
  function interface (line 12) | interface NotebookController : NSViewController {

FILE: frontend/osx/fake.cc
  function main (line 1) | int main(int, char **)

FILE: frontend/web/src/NotebookWindow.hh
  type cadabra (line 5) | namespace cadabra {
    class NotebookWindow (line 11) | class NotebookWindow : public DocumentThread, public GUIBase {

FILE: frontend/web/src/server.py
  class CadabraHub (line 8) | class CadabraHub(tornado.web.RequestHandler):
    method get (line 9) | def get(self):
  class CadabraProxy (line 13) | class CadabraProxy(tornado.websocket.WebSocketHandler):
    method open (line 14) | def open(self, *args, **kwargs):
    method on_message (line 29) | def on_message(self, message):
    method on_close (line 38) | def on_close(self):
    method on_cdb_connected (line 42) | def on_cdb_connected(self, fut):
    method on_cdb_message (line 59) | def on_cdb_message(self, msg):
    method start_cadabra_server (line 70) | def start_cadabra_server(self):

FILE: jupyterkernel/cadabra2_jupyter/completer.py
  class CodeCompleter (line 49) | class CodeCompleter:
    method __init__ (line 50) | def __init__(self, kernel):
    method triggers (line 55) | def triggers(self):
    method get_last_word (line 58) | def get_last_word(self):
    method cursor_on_property (line 61) | def cursor_on_property(self, last):
    method match (line 65) | def match(self, last, options):
    method match_member (line 70) | def match_member(self, last, klass):
    method get_class (line 76) | def get_class(self):
    method __call__ (line 80) | def __call__(self, code, cursor_pos, namespace):

FILE: jupyterkernel/cadabra2_jupyter/context.py
  class _StdCatch (line 9) | class _StdCatch:
    method __init__ (line 10) | def __init__(self, kernel):
    method __enter__ (line 13) | def __enter__(self):
    method __exit__ (line 17) | def __exit__(self, exc_type, exc_val, exc_traceback):
  class SandboxContext (line 32) | class SandboxContext:
    method __init__ (line 33) | def __init__(self, kernel):
    method __call__ (line 48) | def __call__(self, code):
    method namespace (line 55) | def namespace(self):

FILE: jupyterkernel/cadabra2_jupyter/kernel.py
  class CadabraJupyterKernel (line 14) | class CadabraJupyterKernel(ipykernel.kernelbase.Kernel):
    method banner (line 26) | def banner(self):
    method __init__ (line 29) | def __init__(self, **kwargs):
    method do_execute (line 42) | def do_execute(
    method do_complete (line 72) | def do_complete(self, code, cursor_pos):
    method _status_ok (line 92) | def _status_ok(self):
    method _default_complete (line 100) | def _default_complete(self, cursor_pos):
    method _execute_python (line 109) | def _execute_python(self, pycode):
    method _send_result (line 113) | def _send_result(self, res_str):
    method _send_image (line 120) | def _send_image(self, img, img_type):
    method _send_code (line 127) | def _send_code(self, res_str):
    method _send_error (line 134) | def _send_error(self, err_str):

FILE: jupyterkernel/cadabra2_jupyter/server.py
  function _latex_post_parser (line 3) | def _latex_post_parser(text):
  class Server (line 12) | class Server:
    method __init__ (line 13) | def __init__(self, kernel_instance):
    method send (line 16) | def send(self, data, typestr, parent_id, cell_id, last_in_sequence):
    method architecture (line 33) | def architecture(self):
    method test (line 36) | def test(self):
    method handles (line 39) | def handles(self, otype):
    method totals (line 44) | def totals(self):

FILE: jupyterkernel/lexer/cadabra.js
  function isWhitespace (line 21) | function isWhitespace(char) {
  function eatWord (line 25) | function eatWord(stream) {
  function cadabraToken (line 34) | function cadabraToken(stream, state) {

FILE: jupyterkernel/lexer/cadabra.py
  class CadabraLexer (line 14) | class CadabraLexer(PythonLexer):

FILE: libs/appdirs/cdb_appdirs.py
  function user_data_dir (line 45) | def user_data_dir(appname=None, appauthor=None, version=None, roaming=Fa...
  function site_data_dir (line 100) | def site_data_dir(appname=None, appauthor=None, version=None, multipath=...
  function user_config_dir (line 166) | def user_config_dir(appname=None, appauthor=None, version=None, roaming=...
  function site_config_dir (line 210) | def site_config_dir(appname=None, appauthor=None, version=None, multipat...
  function user_cache_dir (line 265) | def user_cache_dir(appname=None, appauthor=None, version=None, opinion=T...
  function user_state_dir (line 322) | def user_state_dir(appname=None, appauthor=None, version=None, roaming=F...
  function user_log_dir (line 364) | def user_log_dir(appname=None, appauthor=None, version=None, opinion=True):
  class AppDirs (line 415) | class AppDirs(object):
    method __init__ (line 417) | def __init__(self, appname=None, appauthor=None, version=None,
    method user_data_dir (line 426) | def user_data_dir(self):
    method site_data_dir (line 431) | def site_data_dir(self):
    method user_config_dir (line 436) | def user_config_dir(self):
    method site_config_dir (line 441) | def site_config_dir(self):
    method user_cache_dir (line 446) | def user_cache_dir(self):
    method user_state_dir (line 451) | def user_state_dir(self):
    method user_log_dir (line 456) | def user_log_dir(self):
  function _get_win_folder_from_registry (line 463) | def _get_win_folder_from_registry(csidl_name):
  function _get_win_folder_with_pywin32 (line 487) | def _get_win_folder_with_pywin32(csidl_name):
  function _get_win_folder_with_ctypes (line 514) | def _get_win_folder_with_ctypes(csidl_name):
  function _get_win_folder_with_jna (line 540) | def _get_win_folder_with_jna(csidl_name):

FILE: libs/base64/base64.cc
  function is_base64 (line 36) | static inline bool is_base64(unsigned char c) {
  function base64_encode (line 40) | std::string base64_encode(unsigned char const* bytes_to_encode, unsigned...
  function base64_decode (line 82) | std::string base64_decode(std::string const& encoded_string) {

FILE: libs/dbg/dbg.h
  function namespace (line 56) | namespace dbg_macro {
  function namespace (line 202) | namespace detail {
  function pretty_print (line 251) | void pretty_print(std::ostream& stream, const T& value, std::true_type) {
  function pretty_print (line 256) | void pretty_print(std::ostream&, const T&, std::false_type) {
  function pretty_print (line 273) | inline bool pretty_print(std::ostream& stream, const bool& value) {
  function pretty_print (line 278) | inline bool pretty_print(std::ostream& stream, const char& value) {
  function pretty_print (line 291) | bool pretty_print(std::ostream& stream, P* const& value) {
  function pretty_print (line 301) | bool pretty_print(std::ostream& stream,
  function pretty_print (line 308) | bool pretty_print(std::ostream& stream, std::shared_ptr<T>& value) {
  function pretty_print (line 316) | bool pretty_print(std::ostream& stream, const char (&value)[N]) {
  function pretty_print (line 322) | inline bool pretty_print(std::ostream& stream, const char* const& value) {
  function print (line 330) | void print(std::ostream& stream, const std::tuple<Ts...>& tuple) {
  type pretty_print_tuple (line 338) | struct pretty_print_tuple
  function print (line 340) | void print(std::ostream& stream, const std::tuple<Ts...>& tuple) {
  function pretty_print (line 346) | bool pretty_print(std::ostream& stream, const std::tuple<Ts...>& value) {
  function pretty_print (line 355) | inline bool pretty_print(std::ostream& stream, const std::tuple<>&) {
  function pretty_print (line 397) | inline bool pretty_print(std::ostream& stream, const std::string& value) {
  function pretty_print (line 405) | bool pretty_print(std::ostream& stream, const std::optional<T>& value) {
  function pretty_print (line 418) | bool pretty_print(std::ostream& stream,
  function class (line 429) | class DebugOutput {

FILE: libs/internal/include/internal/difflib.h
  function namespace (line 33) | namespace difflib
  function tag_t (line 67) | enum class tag_t

FILE: libs/internal/include/internal/string_tools.h
  function std (line 7) | inline std::string ltrim(std::string s)
  function std (line 15) | inline std::string rtrim(std::string s)
  function std (line 23) | inline std::string trim(std::string s)
  function std (line 27) | inline std::vector<std::string> string_to_vec(const std::string& s)
  function std (line 41) | inline std::string nth_line(const std::string& s, size_t n)
  function std (line 53) | inline std::string escape_backslashes(std::string s)
  function replace_all (line 63) | inline void replace_all(std::string& str, const std::string& from, const...

FILE: libs/internal/include/internal/uniconv.h
  function to_utf32 (line 7) | struct utf_converter
  function to_utf32 (line 27) | struct utf_converter

FILE: libs/internal/include/internal/uuid.h
  function namespace (line 7) | namespace cadabra

FILE: libs/linenoise/linenoise.hpp
  type linenoise (line 160) | namespace linenoise {
    type ansi (line 166) | namespace ansi {
      function is_digit (line 182) | inline bool is_digit(char c) { return '0' <= c && c <= '9'; }
      function FlushBuffer (line 310) | inline void FlushBuffer(void)
      function PushBuffer (line 323) | inline void PushBuffer(WCHAR c)
      function SendSequence (line 337) | inline void SendSequence(LPCWSTR seq)
      function InterpretEscSeq (line 372) | inline void InterpretEscSeq(void)
      function BOOL (line 818) | inline BOOL ParseAndPrintANSIString(HANDLE hDev, LPCVOID lpBuffer, D...
    function win32read (line 936) | inline int win32read(int *c) {
    function win32_write (line 1043) | inline int win32_write(int fd, const void *buffer, unsigned int count) {
    type termios (line 1074) | struct termios
    type linenoiseState (line 1085) | struct linenoiseState {
    type KEY_ACTION (line 1099) | enum KEY_ACTION {
    type linenoiseState (line 1124) | struct linenoiseState
    function unicodeIsWideChar (line 1142) | static int unicodeIsWideChar(unsigned long cp)
    function unicodeIsCombiningChar (line 1355) | inline int unicodeIsCombiningChar(unsigned long cp)
    function unicodePrevUTF8CharLen (line 1368) | inline int unicodePrevUTF8CharLen(char* buf, int pos)
    function unicodeUTF8CharLen (line 1379) | inline int unicodeUTF8CharLen(char* buf, int buf_len, int pos)
    function unicodeUTF8CharToCodePoint (line 1391) | inline int unicodeUTF8CharToCodePoint(
    function unicodeGraphemeLen (line 1429) | inline int unicodeGraphemeLen(char* buf, int buf_len, int pos)
    function unicodePrevGraphemeLen (line 1450) | inline int unicodePrevGraphemeLen(char* buf, int pos)
    function isAnsiEscape (line 1468) | inline int isAnsiEscape(const char* buf, int buf_len, int* len)
    function unicodeColumnPos (line 1488) | inline int unicodeColumnPos(const char* buf, int buf_len)
    function unicodeColumnPosForMultiLine (line 1515) | inline int unicodeColumnPosForMultiLine(char* buf, int buf_len, int po...
    function unicodeReadUTF8Char (line 1553) | inline int unicodeReadUTF8Char(int fd, char* buf, int* cp)
    function SetMultiLine (line 1582) | inline void SetMultiLine(bool ml) {
    function isUnsupportedTerm (line 1588) | inline bool isUnsupportedTerm(void) {
    function enableRawMode (line 1601) | inline bool enableRawMode(int fd) {
    function disableRawMode (line 1669) | inline void disableRawMode(int fd) {
    function getCursorPosition (line 1686) | inline int getCursorPosition(int ifd, int ofd) {
    function getColumns (line 1710) | inline int getColumns(int ifd, int ofd) {
    function linenoiseClearScreen (line 1751) | inline void linenoiseClearScreen(void) {
    function linenoiseBeep (line 1759) | inline void linenoiseBeep(void) {
    function completeLine (line 1772) | inline int completeLine(struct linenoiseState *ls, char *cbuf, int *c) {
    function SetCompletionCallback (line 1838) | inline void SetCompletionCallback(CompletionCallback fn) {
    function refreshSingleLine (line 1848) | inline void refreshSingleLine(struct linenoiseState *l) {
    function refreshMultiLine (line 1886) | inline void refreshMultiLine(struct linenoiseState *l) {
    function refreshLine (line 1963) | inline void refreshLine(struct linenoiseState *l) {
    function linenoiseEditInsert (line 1973) | inline int linenoiseEditInsert(struct linenoiseState *l, const char* c...
    function linenoiseEditMoveLeft (line 2000) | inline void linenoiseEditMoveLeft(struct linenoiseState *l) {
    function linenoiseEditMoveRight (line 2008) | inline void linenoiseEditMoveRight(struct linenoiseState *l) {
    function linenoiseEditMoveHome (line 2016) | inline void linenoiseEditMoveHome(struct linenoiseState *l) {
    function linenoiseEditMoveEnd (line 2024) | inline void linenoiseEditMoveEnd(struct linenoiseState *l) {
    function linenoiseEditHistoryNext (line 2035) | inline void linenoiseEditHistoryNext(struct linenoiseState *l, int dir) {
    function linenoiseEditDelete (line 2058) | inline void linenoiseEditDelete(struct linenoiseState *l) {
    function linenoiseEditBackspace (line 2069) | inline void linenoiseEditBackspace(struct linenoiseState *l) {
    function linenoiseEditDeletePrevWord (line 2082) | inline void linenoiseEditDeletePrevWord(struct linenoiseState *l) {
    function debug_key (line 2096) | void debug_key(int code) {
    function linenoiseEdit (line 2109) | inline int linenoiseEdit(int stdin_fd, int stdout_fd, char *buf, int b...
    function linenoiseRaw (line 2295) | inline bool linenoiseRaw(const char *prompt, std::string& line) {
    function Readline (line 2326) | inline bool Readline(const char *prompt, std::string& line) {
    function Readline (line 2337) | inline std::string Readline(const char *prompt, bool& quit) {
    function Readline (line 2343) | inline std::string Readline(const char *prompt) {
    function linenoiseAtExit (line 2351) | inline void linenoiseAtExit(void) {
    function AddHistory (line 2362) | inline bool AddHistory(const char* line) {
    function SetHistoryMaxLen (line 2381) | inline bool SetHistoryMaxLen(size_t len) {
    function SaveHistory (line 2392) | inline bool SaveHistory(const char* path) {
    function LoadHistory (line 2406) | inline bool LoadHistory(const char* path) {

FILE: libs/nlohmann/nlohmann/json.hpp
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 247) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_END (line 258) | NLOHMANN_JSON_NAMESPACE_END
  type would_call_std_ (line 2814) | struct would_call_std_
  type value_t (line 2872) | enum class value_t : std::uint8_t
  function NLOHMANN_JSON_NAMESPACE_END (line 2937) | NLOHMANN_JSON_NAMESPACE_END
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 3030) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 3076) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 3267) | NLOHMANN_JSON_NAMESPACE_BEGIN
  class json_pointer (line 3416) | class json_pointer
  type ordered_map (line 3427) | struct ordered_map
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 3438) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 4230) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_END (line 4358) | NLOHMANN_JSON_NAMESPACE_END
  function NLOHMANN_JSON_NAMESPACE_END (line 4590) | NLOHMANN_JSON_NAMESPACE_END
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 4636) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 4644) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 4659) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 5174) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_END (line 5356) | NLOHMANN_JSON_NAMESPACE_END
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 5404) | NLOHMANN_JSON_NAMESPACE_BEGIN
  type adl_serializer (line 5832) | struct adl_serializer
    method from_json (line 5837) | static auto from_json(BasicJsonType && j, TargetType& val) noexcept(
    method from_json (line 5847) | static auto from_json(BasicJsonType && j) noexcept(
    method to_json (line 5857) | static auto to_json(BasicJsonType& j, TargetType && val) noexcept(
  function set_subtype (line 5938) | void set_subtype(subtype_type subtype_) noexcept
  function subtype_type (line 5946) | constexpr subtype_type subtype() const noexcept
  function has_subtype (line 5953) | constexpr bool has_subtype() const noexcept
  function clear_subtype (line 5960) | void clear_subtype() noexcept
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 5999) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 6171) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function json_sax_dom_parser (line 6813) | explicit json_sax_dom_parser(BasicJsonType& r, const bool allow_exceptio...
  function json_sax_dom_parser (line 6818) | json_sax_dom_parser(const json_sax_dom_parser&) = delete;
  function json_sax_dom_parser (line 6819) | json_sax_dom_parser(json_sax_dom_parser&&) = default;
  function null (line 6824) | bool null()
  function boolean (line 6830) | bool boolean(bool val)
  function number_integer (line 6836) | bool number_integer(number_integer_t val)
  function number_unsigned (line 6842) | bool number_unsigned(number_unsigned_t val)
  function number_float (line 6848) | bool number_float(number_float_t val, const string_t& /*unused*/)
  function string (line 6854) | bool string(string_t& val)
  function binary (line 6860) | bool binary(binary_t& val)
  function start_object (line 6866) | bool start_object(std::size_t len)
  function key (line 6878) | bool key(string_t& val)
  function end_object (line 6888) | bool end_object()
  function start_array (line 6898) | bool start_array(std::size_t len)
  function end_array (line 6910) | bool end_array()
  function parse_error (line 6921) | bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/,
  function is_errored (line 6933) | constexpr bool is_errored() const
  class json_sax_dom_callback_parser (line 6982) | class json_sax_dom_callback_parser
    method json_sax_dom_callback_parser (line 6993) | json_sax_dom_callback_parser(BasicJsonType& r,
    method json_sax_dom_callback_parser (line 7002) | json_sax_dom_callback_parser(const json_sax_dom_callback_parser&) = de...
    method json_sax_dom_callback_parser (line 7003) | json_sax_dom_callback_parser(json_sax_dom_callback_parser&&) = default;
    method json_sax_dom_callback_parser (line 7004) | json_sax_dom_callback_parser& operator=(const json_sax_dom_callback_pa...
    method json_sax_dom_callback_parser (line 7005) | json_sax_dom_callback_parser& operator=(json_sax_dom_callback_parser&&...
    method null (line 7008) | bool null()
    method boolean (line 7014) | bool boolean(bool val)
    method number_integer (line 7020) | bool number_integer(number_integer_t val)
    method number_unsigned (line 7026) | bool number_unsigned(number_unsigned_t val)
    method number_float (line 7032) | bool number_float(number_float_t val, const string_t& /*unused*/)
    method string (line 7038) | bool string(string_t& val)
    method binary (line 7044) | bool binary(binary_t& val)
    method start_object (line 7050) | bool start_object(std::size_t len)
    method key (line 7068) | bool key(string_t& val)
    method end_object (line 7085) | bool end_object()
    method start_array (line 7121) | bool start_array(std::size_t len)
    method end_array (line 7138) | bool end_array()
    method parse_error (line 7171) | bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/,
    method is_errored (line 7183) | constexpr bool is_errored() const
    method handle_value (line 7205) | std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool ski...
  class json_sax_acceptor (line 7289) | class json_sax_acceptor
    method null (line 7298) | bool null()
    method boolean (line 7303) | bool boolean(bool /*unused*/)
    method number_integer (line 7308) | bool number_integer(number_integer_t /*unused*/)
    method number_unsigned (line 7313) | bool number_unsigned(number_unsigned_t /*unused*/)
    method number_float (line 7318) | bool number_float(number_float_t /*unused*/, const string_t& /*unused*/)
    method string (line 7323) | bool string(string_t& /*unused*/)
    method binary (line 7328) | bool binary(binary_t& /*unused*/)
    method start_object (line 7333) | bool start_object(std::size_t /*unused*/ = static_cast<std::size_t>(-1))
    method key (line 7338) | bool key(string_t& /*unused*/)
    method end_object (line 7343) | bool end_object()
    method start_array (line 7348) | bool start_array(std::size_t /*unused*/ = static_cast<std::size_t>(-1))
    method end_array (line 7353) | bool end_array()
    method parse_error (line 7358) | bool parse_error(std::size_t /*unused*/, const std::string& /*unused*/...
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 7397) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function reset (line 8692) | void reset() noexcept
  function char_int_type (line 8709) | char_int_type get()
  function unget (line 8746) | void unget()
  function add (line 8773) | void add(char_int_type c)
  function number_unsigned_t (line 8790) | constexpr number_unsigned_t get_number_unsigned() const noexcept
  function number_float_t (line 8796) | constexpr number_float_t get_number_float() const noexcept
  function string_t (line 8802) | string_t& get_string()
  function position_t (line 8812) | constexpr position_t get_position() const noexcept
  function get_token_string (line 8820) | std::string get_token_string() const
  function JSON_HEDLEY_RETURNS_NON_NULL (line 8844) | JSON_HEDLEY_RETURNS_NON_NULL
  function skip_bom (line 8858) | bool skip_bom()
  function skip_whitespace (line 8872) | void skip_whitespace()
  function token_type (line 8881) | token_type scan()
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 9030) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_END (line 9170) | NLOHMANN_JSON_NAMESPACE_END
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 12195) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 12719) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_END (line 12835) | NLOHMANN_JSON_NAMESPACE_END
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 12890) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function pointer (line 13192) | pointer operator->() const
  function iter_impl (line 13234) | iter_impl operator++(int)& // NOLINT(cert-dcl21-cpp)
  function iter_impl (line 13245) | iter_impl& operator++()
  function iter_impl (line 13285) | iter_impl operator--(int)& // NOLINT(cert-dcl21-cpp)
  function iter_impl (line 13296) | iter_impl& operator--()
  function iter_impl (line 13444) | iter_impl& operator+=(difference_type i)
  function iter_impl (line 13481) | iter_impl& operator-=(difference_type i)
  function iter_impl (line 13490) | iter_impl operator+(difference_type i) const
  function friend (line 13501) | friend iter_impl operator+(difference_type i, const iter_impl& it)
  function iter_impl (line 13512) | iter_impl operator-(difference_type i) const
  function difference_type (line 13523) | difference_type operator-(const iter_impl& other) const
  function reference (line 13552) | reference operator[](difference_type n) const
  function reference (line 13606) | reference value() const
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 13641) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 13774) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 13835) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_BASIC_JSON_TPL_DECLARATION (line 13855) | NLOHMANN_BASIC_JSON_TPL_DECLARATION
  function json_pointer (line 13867) | explicit json_pointer(const string_t& s = "")
  function string_t (line 13873) | string_t to_string() const
  function friend (line 13894) | friend std::ostream& operator<<(std::ostream& o, const json_pointer& ptr)
  function json_pointer (line 13903) | json_pointer& operator/=(const json_pointer& ptr)
  function json_pointer (line 13913) | json_pointer& operator/=(string_t token)
  function json_pointer (line 13921) | json_pointer& operator/=(std::size_t array_idx)
  function friend (line 13928) | friend json_pointer operator/(const json_pointer& lhs,
  function friend (line 13936) | friend json_pointer operator/(const json_pointer& lhs, string_t token) /...
  function friend (line 13943) | friend json_pointer operator/(const json_pointer& lhs, std::size_t array...
  function json_pointer (line 13950) | json_pointer parent_pointer() const
  function pop_back (line 13964) | void pop_back()
  function string_t (line 13976) | const string_t& back() const
  function push_back (line 13988) | void push_back(const string_t& token)
  function push_back (line 13995) | void push_back(string_t&& token)
  function empty (line 14002) | bool empty() const noexcept
  function BasicJsonType (line 14079) | BasicJsonType& get_and_create(BasicJsonType& j) const
  function BasicJsonType (line 14159) | BasicJsonType& get_unchecked(BasicJsonType* ptr) const
  function BasicJsonType (line 14227) | BasicJsonType& get_checked(BasicJsonType* ptr) const
  function BasicJsonType (line 14285) | const BasicJsonType& get_unchecked(const BasicJsonType* ptr) const
  function BasicJsonType (line 14334) | const BasicJsonType& get_checked(const BasicJsonType* ptr) const
  function contains (line 14383) | bool contains(const BasicJsonType* ptr) const
  function split (line 14471) | static std::vector<string_t> split(const string_t& reference_string)
  function BasicJsonType (line 14611) | static BasicJsonType
  function convert (line 14640) | json_pointer<string_t> convert() const&
  function convert (line 14647) | json_pointer<string_t> convert()&&
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 14814) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 14939) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_END (line 15061) | NLOHMANN_JSON_NAMESPACE_END
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 16928) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function NLOHMANN_JSON_NAMESPACE_END (line 18025) | NLOHMANN_JSON_NAMESPACE_END
  function hex_bytes (line 18685) | static std::string hex_bytes(std::uint8_t byte)
  function is_negative_number (line 18696) | bool is_negative_number(NumberType x)
  function is_negative_number (line 18702) | bool is_negative_number(NumberType /*unused*/)
  function dump_integer (line 18722) | void dump_integer(NumberType x)
  function dump_float (line 18807) | void dump_float(number_float_t x)
  function dump_float (line 18828) | void dump_float(number_float_t x, std::true_type /*is_ieee_single_or_dou...
  function dump_float (line 18836) | void dump_float(number_float_t x, std::false_type /*is_ieee_single_or_do...
  function decode (line 18908) | static std::uint8_t decode(std::uint8_t& state, std::uint32_t& codep, co...
  function number_unsigned_t (line 18948) | number_unsigned_t remove_sign(number_unsigned_t x)
  function number_unsigned_t (line 18963) | inline number_unsigned_t remove_sign(number_integer_t x) noexcept
  function ordered_map (line 19050) | ordered_map() noexcept(noexcept(Container())) : Container{} {}
  function ordered_map (line 19051) | explicit ordered_map(const Allocator& alloc) noexcept(noexcept(Container...
  function ordered_map (line 19053) | ordered_map(It first, It last, const Allocator& alloc = Allocator())
  function ordered_map (line 19055) | ordered_map(std::initializer_list<value_type> init, const Allocator& all...
  function emplace (line 19058) | std::pair<iterator, bool> emplace(const key_type& key, T&& t)
  function emplace (line 19073) | std::pair<iterator, bool> emplace(KeyType && key, T && t)
  function T (line 19086) | T& operator[](const key_type& key)
  function T (line 19093) | T & operator[](KeyType && key)
  function T (line 19098) | const T& operator[](const key_type& key) const
  function T (line 19105) | const T & operator[](KeyType && key) const
  function T (line 19110) | T& at(const key_type& key)
  function T (line 19125) | T & at(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward)
  function T (line 19138) | const T& at(const key_type& key) const
  function T (line 19153) | const T & at(KeyType && key) const // NOLINT(cppcoreguidelines-missing-s...
  function size_type (line 19166) | size_type erase(const key_type& key)
  function size_type (line 19187) | size_type erase(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-...
  function iterator (line 19206) | iterator erase(iterator pos)
  function iterator (line 19211) | iterator erase(iterator first, iterator last)
  function size_type (line 19264) | size_type count(const key_type& key) const
  function size_type (line 19278) | size_type count(KeyType && key) const // NOLINT(cppcoreguidelines-missin...
  function iterator (line 19290) | iterator find(const key_type& key)
  function iterator (line 19304) | iterator find(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-fo...
  function const_iterator (line 19316) | const_iterator find(const key_type& key) const
  function insert (line 19328) | std::pair<iterator, bool> insert( value_type&& value )
  function insert (line 19333) | std::pair<iterator, bool> insert( const value_type& value )
  function insert (line 19351) | void insert(InputIt first, InputIt last)
  function NLOHMANN_JSON_NAMESPACE_BEGIN (line 19378) | NLOHMANN_JSON_NAMESPACE_BEGIN
  function set_parents (line 20005) | void set_parents()
  function iterator (line 20042) | iterator set_parents(iterator it, typename iterator::difference_type cou...
  function reference (line 20055) | reference set_parent(reference j, std::size_t old_capacity = static_cast...
  function basic_json (line 20117) | basic_json(const value_t v)
  function basic_json (line 20125) | basic_json(std::nullptr_t = nullptr) noexcept // NOLINT(bugprone-excepti...
  function basic_json (line 20137) | basic_json(CompatibleType && val) noexcept(noexcept( // NOLINT(bugprone-...
  function basic_json (line 20151) | basic_json(const BasicJsonType& val)
  function basic_json (line 20204) | basic_json(initializer_list_t init,
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 20262) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 20273) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 20284) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 20295) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 20306) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 20314) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function basic_json (line 20322) | basic_json(size_type cnt, const basic_json& val):
  function basic_json (line 20334) | basic_json(InputIT first, InputIT last)
  function basic_json (line 20443) | basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
  function basic_json (line 20447) | basic_json(const basic_json& other)
  function basic_json (line 20516) | basic_json(basic_json&& other) noexcept
  function basic_json (line 20533) | basic_json& operator=(basic_json other) noexcept (
  function value_t (line 20596) | constexpr value_t type() const noexcept
  function is_primitive (line 20603) | constexpr bool is_primitive() const noexcept
  function is_structured (line 20610) | constexpr bool is_structured() const noexcept
  function is_null (line 20617) | constexpr bool is_null() const noexcept
  function is_boolean (line 20624) | constexpr bool is_boolean() const noexcept
  function is_number (line 20631) | constexpr bool is_number() const noexcept
  function is_number_integer (line 20638) | constexpr bool is_number_integer() const noexcept
  function is_number_unsigned (line 20645) | constexpr bool is_number_unsigned() const noexcept
  function is_number_float (line 20652) | constexpr bool is_number_float() const noexcept
  function is_object (line 20659) | constexpr bool is_object() const noexcept
  function is_array (line 20666) | constexpr bool is_array() const noexcept
  function is_string (line 20673) | constexpr bool is_string() const noexcept
  function is_binary (line 20680) | constexpr bool is_binary() const noexcept
  function is_discarded (line 20687) | constexpr bool is_discarded() const noexcept
  function object_t (line 20718) | object_t* get_impl_ptr(object_t* /*unused*/) noexcept
  function object_t (line 20724) | constexpr const object_t* get_impl_ptr(const object_t* /*unused*/) const...
  function array_t (line 20730) | array_t* get_impl_ptr(array_t* /*unused*/) noexcept
  function array_t (line 20736) | constexpr const array_t* get_impl_ptr(const array_t* /*unused*/) const n...
  function string_t (line 20742) | string_t* get_impl_ptr(string_t* /*unused*/) noexcept
  function string_t (line 20748) | constexpr const string_t* get_impl_ptr(const string_t* /*unused*/) const...
  function boolean_t (line 20754) | boolean_t* get_impl_ptr(boolean_t* /*unused*/) noexcept
  function boolean_t (line 20760) | constexpr const boolean_t* get_impl_ptr(const boolean_t* /*unused*/) con...
  function number_integer_t (line 20766) | number_integer_t* get_impl_ptr(number_integer_t* /*unused*/) noexcept
  function number_integer_t (line 20772) | constexpr const number_integer_t* get_impl_ptr(const number_integer_t* /...
  function number_unsigned_t (line 20778) | number_unsigned_t* get_impl_ptr(number_unsigned_t* /*unused*/) noexcept
  function number_unsigned_t (line 20784) | constexpr const number_unsigned_t* get_impl_ptr(const number_unsigned_t*...
  function number_float_t (line 20790) | number_float_t* get_impl_ptr(number_float_t* /*unused*/) noexcept
  function number_float_t (line 20796) | constexpr const number_float_t* get_impl_ptr(const number_float_t* /*unu...
  function binary_t (line 20802) | binary_t* get_impl_ptr(binary_t* /*unused*/) noexcept
  function binary_t (line 20808) | constexpr const binary_t* get_impl_ptr(const binary_t* /*unused*/) const...
  function ReferenceType (line 20825) | static ReferenceType get_ref_impl(ThisType& obj)
  function get_ptr (line 20858) | constexpr auto get_ptr() const noexcept -> decltype(std::declval<const b...
  function ValueType (line 20950) | ValueType get_impl(detail::priority_tag<1> /*unused*/) const noexcept(no...
  function BasicJsonType (line 20975) | BasicJsonType get_impl(detail::priority_tag<2> /*unused*/) const
  function basic_json (line 20998) | basic_json get_impl(detail::priority_tag<3> /*unused*/) const
  function get_impl (line 21011) | constexpr auto get_impl(detail::priority_tag<4> /*unused*/) const noexcept
  function get (line 21087) | auto get() noexcept -> decltype(std::declval<basic_json_t&>().template g...
  function ValueType (line 21100) | ValueType & get_to(ValueType& v) const noexcept(noexcept(
  function ValueType (line 21113) | ValueType & get_to(ValueType& v) const
  function Array (line 21124) | Array get_to(T (&v)[N]) const // NOLINT(cppcoreguidelines-avoid-c-arrays...
  function ReferenceType (line 21136) | ReferenceType get_ref()
  function ReferenceType (line 21147) | ReferenceType get_ref() const
  function binary_t (line 21206) | binary_t& get_binary()
  function binary_t (line 21218) | const binary_t& get_binary() const
  function reference (line 21240) | reference at(size_type idx)
  function const_reference (line 21263) | const_reference at(size_type idx) const
  function reference (line 21286) | reference at(const typename object_t::key_type& key)
  function reference (line 21306) | reference at(KeyType && key)
  function const_reference (line 21324) | const_reference at(const typename object_t::key_type& key) const
  function const_reference (line 21344) | const_reference at(KeyType && key) const
  function reference (line 21362) | reference operator[](size_type idx)
  function const_reference (line 21408) | const_reference operator[](size_type idx) const
  function reference (line 21421) | reference operator[](typename object_t::key_type key)
  function const_reference (line 21443) | const_reference operator[](const typename object_t::key_type& key) const
  function reference (line 21459) | reference operator[](T* key)
  function const_reference (line 21465) | const_reference operator[](T* key) const
  function reference (line 21474) | reference operator[](KeyType && key)
  function const_reference (line 21498) | const_reference operator[](KeyType && key) const
  class ValueType (line 21524) | class ValueType
  function ReturnType (line 21553) | ReturnType value(const typename object_t::key_type& key, ValueType && de...
  function ValueType (line 21579) | ValueType value(KeyType && key, const ValueType& default_value) const
  function ReturnType (line 21606) | ReturnType value(KeyType && key, ValueType && default_value) const
  function ValueType (line 21629) | ValueType value(const json_pointer& ptr, const ValueType& default_value)...
  function ReturnType (line 21654) | ReturnType value(const json_pointer& ptr, ValueType && default_value) const
  function ValueType (line 21678) | ValueType value(const ::nlohmann::json_pointer<BasicJsonType>& ptr, cons...
  function ReturnType (line 21689) | ReturnType value(const ::nlohmann::json_pointer<BasicJsonType>& ptr, Val...
  function reference (line 21696) | reference front()
  function const_reference (line 21703) | const_reference front() const
  function reference (line 21710) | reference back()
  function const_reference (line 21719) | const_reference back() const
  function IteratorType (line 21731) | IteratorType erase(IteratorType pos)
  function IteratorType (line 21801) | IteratorType erase(IteratorType first, IteratorType last)
  function erase_internal (line 21869) | private:
  function size_type (line 21885) | size_type erase_internal(KeyType && key)
  function size_type (line 21917) | size_type erase(KeyType && key)
  function erase (line 21924) | void erase(const size_type idx)
  function iterator (line 21953) | iterator find(const typename object_t::key_type& key)
  function const_iterator (line 21967) | const_iterator find(const typename object_t::key_type& key) const
  function iterator (line 21983) | iterator find(KeyType && key)
  function const_iterator (line 21999) | const_iterator find(KeyType && key) const
  function size_type (line 22013) | size_type count(const typename object_t::key_type& key) const
  function size_type (line 22023) | size_type count(KeyType && key) const
  function contains (line 22031) | bool contains(const typename object_t::key_type& key) const
  function contains (line 22040) | bool contains(KeyType && key) const
  function contains (line 22047) | bool contains(const json_pointer& ptr) const
  function contains (line 22054) | bool contains(const typename ::nlohmann::json_pointer<BasicJsonType>& pt...
  function iterator (line 22070) | iterator begin() noexcept
  function const_iterator (line 22079) | const_iterator begin() const noexcept
  function const_iterator (line 22086) | const_iterator cbegin() const noexcept
  function iterator (line 22095) | iterator end() noexcept
  function const_iterator (line 22104) | const_iterator end() const noexcept
  function const_iterator (line 22111) | const_iterator cend() const noexcept
  function reverse_iterator (line 22120) | reverse_iterator rbegin() noexcept
  function const_reverse_iterator (line 22127) | const_reverse_iterator rbegin() const noexcept
  function reverse_iterator (line 22134) | reverse_iterator rend() noexcept
  function const_reverse_iterator (line 22141) | const_reverse_iterator rend() const noexcept
  function const_reverse_iterator (line 22148) | const_reverse_iterator crbegin() const noexcept
  function const_reverse_iterator (line 22155) | const_reverse_iterator crend() const noexcept
  function iterator_wrapper (line 22167) | static iteration_proxy<iterator> iterator_wrapper(reference ref) noexcept
  function iterator_wrapper (line 22178) | static iteration_proxy<const_iterator> iterator_wrapper(const_reference ...
  function items (line 22185) | iteration_proxy<iterator> items() noexcept
  function items (line 22192) | iteration_proxy<const_iterator> items() const noexcept
  function empty (line 22208) | bool empty() const noexcept
  function size_type (line 22247) | size_type size() const noexcept
  function size_type (line 22286) | size_type max_size() const noexcept
  function clear (line 22329) | void clear() noexcept
  function push_back (line 22390) | void push_back(basic_json&& val)
  function reference (line 22415) | reference operator+=(basic_json&& val)
  function push_back (line 22423) | void push_back(const basic_json& val)
  function reference (line 22447) | reference operator+=(const basic_json& val)
  function push_back (line 22455) | void push_back(const typename object_t::value_type& val)
  function reference (line 22478) | reference operator+=(const typename object_t::value_type& val)
  function push_back (line 22486) | void push_back(initializer_list_t init)
  function reference (line 22502) | reference operator+=(initializer_list_t init)
  function reference (line 22511) | reference emplace_back(Args&& ... args)
  function emplace (line 22536) | std::pair<iterator, bool> emplace(Args&& ... args)
  function iterator (line 22568) | iterator insert_iterator(const_iterator pos, Args&& ... args)
  function iterator (line 22587) | iterator insert(const_iterator pos, const basic_json& val)
  function iterator (line 22607) | iterator insert(const_iterator pos, basic_json&& val)
  function iterator (line 22614) | iterator insert(const_iterator pos, size_type cnt, const basic_json& val)
  function iterator (line 22634) | iterator insert(const_iterator pos, const_iterator first, const_iterator...
  function iterator (line 22665) | iterator insert(const_iterator pos, initializer_list_t ilist)
  function insert (line 22685) | void insert(const_iterator first, const_iterator last)
  function update (line 22710) | void update(const_reference j, bool merge_objects = false)
  function update (line 22717) | void update(const_iterator first, const_iterator last, bool merge_object...
  function swap (line 22764) | void swap(reference other) noexcept (
  function friend (line 22781) | friend void swap(reference left, reference right) noexcept (
  function swap (line 22793) | void swap(array_t& other) // NOLINT(bugprone-exception-escape,cppcoregui...
  function swap (line 22809) | void swap(object_t& other) // NOLINT(bugprone-exception-escape,cppcoregu...
  function swap (line 22825) | void swap(string_t& other) // NOLINT(bugprone-exception-escape,cppcoregu...
  function swap (line 22841) | void swap(binary_t& other) // NOLINT(bugprone-exception-escape,cppcoregu...
  function swap (line 22857) | void swap(typename binary_t::container_type& other) // NOLINT(bugprone-e...
  function else (line 22946) | else if(compares_unordered(lhs, rhs))\
  function compares_unordered (line 22975) | bool compares_unordered(const_reference rhs, bool inverse = false) const...
  function friend (line 23088) | friend bool operator==(const_reference lhs, const_reference rhs) noexcept
  function friend (line 23120) | friend bool operator!=(const_reference lhs, const_reference rhs) noexcept
  function friend (line 23177) | friend bool operator<=(const_reference lhs, const_reference rhs) noexcept
  function friend (line 23206) | friend bool operator>(const_reference lhs, const_reference rhs) noexcept
  function friend (line 23236) | friend bool operator>=(const_reference lhs, const_reference rhs) noexcept
  function friend (line 23277) | friend std::ostream& operator<<(std::ostream& o, const basic_json& j)
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23316) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23330) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function basic_json (line 23344) | static basic_json parse(detail::span_input_adapter&& i,
  function accept (line 23357) | static bool accept(InputType&& i,
  function accept (line 23366) | static bool accept(IteratorType first, IteratorType last,
  function accept (line 23374) | static bool accept(detail::span_input_adapter&& i,
  function sax_parse (line 23384) | static bool sax_parse(InputType&& i, SAX* sax,
  function sax_parse (line 23399) | static bool sax_parse(IteratorType first, IteratorType last, SAX* sax,
  function sax_parse (line 23418) | static bool sax_parse(detail::span_input_adapter&& i, SAX* sax,
  function JSON_HEDLEY_RETURNS_NON_NULL (line 23459) | JSON_HEDLEY_RETURNS_NON_NULL
  type data (line 23491) | struct data
    method data (line 23499) | data(const value_t v)
    method data (line 23504) | data(size_type cnt, const basic_json& val)
    method data (line 23510) | data() noexcept = default;
    method data (line 23511) | data(data&&) noexcept = default;
    method data (line 23512) | data(const data&) noexcept = delete;
    method data (line 23513) | data& operator=(data&&) noexcept = delete;
    method data (line 23514) | data& operator=(const data&) noexcept = delete;
  function to_cbor (line 23548) | static void to_cbor(const basic_json& j, detail::output_adapter<std::uin...
  function to_cbor (line 23555) | static void to_cbor(const basic_json& j, detail::output_adapter<char> o)
  function to_msgpack (line 23562) | static std::vector<std::uint8_t> to_msgpack(const basic_json& j)
  function to_msgpack (line 23571) | static void to_msgpack(const basic_json& j, detail::output_adapter<std::...
  function to_msgpack (line 23578) | static void to_msgpack(const basic_json& j, detail::output_adapter<char> o)
  function to_ubjson (line 23585) | static std::vector<std::uint8_t> to_ubjson(const basic_json& j,
  function to_ubjson (line 23596) | static void to_ubjson(const basic_json& j, detail::output_adapter<std::u...
  function to_ubjson (line 23604) | static void to_ubjson(const basic_json& j, detail::output_adapter<char> o,
  function to_bjdata (line 23612) | static std::vector<std::uint8_t> to_bjdata(const basic_json& j,
  function to_bjdata (line 23623) | static void to_bjdata(const basic_json& j, detail::output_adapter<std::u...
  function to_bjdata (line 23631) | static void to_bjdata(const basic_json& j, detail::output_adapter<char> o,
  function to_bson (line 23639) | static std::vector<std::uint8_t> to_bson(const basic_json& j)
  function to_bson (line 23648) | static void to_bson(const basic_json& j, detail::output_adapter<std::uin...
  function to_bson (line 23655) | static void to_bson(const basic_json& j, detail::output_adapter<char> o)
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23663) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23679) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function basic_json (line 23695) | static basic_json from_cbor(const T* ptr, std::size_t len,
  function basic_json (line 23705) | static basic_json from_cbor(detail::span_input_adapter&& i,
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23721) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23736) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function basic_json (line 23751) | static basic_json from_msgpack(const T* ptr, std::size_t len,
  function basic_json (line 23760) | static basic_json from_msgpack(detail::span_input_adapter&& i,
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23775) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23790) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function basic_json (line 23805) | static basic_json from_ubjson(const T* ptr, std::size_t len,
  function basic_json (line 23814) | static basic_json from_ubjson(detail::span_input_adapter&& i,
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23829) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23844) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23859) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 23874) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function basic_json (line 23889) | static basic_json from_bson(const T* ptr, std::size_t len,
  function basic_json (line 23898) | static basic_json from_bson(detail::span_input_adapter&& i,
  function reference (line 23920) | reference operator[](const json_pointer& ptr)
  function reference (line 23927) | reference operator[](const ::nlohmann::json_pointer<BasicJsonType>& ptr)
  function const_reference (line 23934) | const_reference operator[](const json_pointer& ptr) const
  function const_reference (line 23941) | const_reference operator[](const ::nlohmann::json_pointer<BasicJsonType>...
  function reference (line 23948) | reference at(const json_pointer& ptr)
  function reference (line 23955) | reference at(const ::nlohmann::json_pointer<BasicJsonType>& ptr)
  function const_reference (line 23962) | const_reference at(const json_pointer& ptr) const
  function const_reference (line 23969) | const_reference at(const ::nlohmann::json_pointer<BasicJsonType>& ptr) c...
  function basic_json (line 23976) | basic_json flatten() const
  function basic_json (line 23985) | basic_json unflatten() const
  function patch_inplace (line 24001) | void patch_inplace(const basic_json& json_patch)
  function basic_json (line 24272) | basic_json patch(const basic_json& json_patch) const
  function JSON_HEDLEY_WARN_UNUSED_RESULT (line 24281) | JSON_HEDLEY_WARN_UNUSED_RESULT
  function merge_patch (line 24424) | void merge_patch(const basic_json& apply_patch)
  function NLOHMANN_BASIC_JSON_TPL_DECLARATION (line 24455) | NLOHMANN_BASIC_JSON_TPL_DECLARATION
  function NLOHMANN_JSON_NAMESPACE_END (line 24492) | NLOHMANN_JSON_NAMESPACE_END

FILE: libs/pybind11/include/pybind11/attr.h
  function is_method (line 18) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
  type is_setter (line 30) | struct is_setter {}
  type is_operator (line 33) | struct is_operator {}
  type is_final (line 36) | struct is_final {}
  type name (line 51) | struct name {
  type op_type (line 171) | enum op_type : int
  type undefined_t (line 172) | struct undefined_t
  type function_record (line 191) | struct function_record {
  type type_record (line 272) | struct type_record {
  function function_call (line 366) | inline function_call::function_call(const function_record &f, handle p) ...
  type is_new_style_constructor (line 372) | struct is_new_style_constructor {}
  function init (line 386) | static void init(const T &, function_record *) {}
  function init (line 387) | static void init(const T &, type_record *) {}
  function precall (line 388) | static void precall(function_call &) {}
  function postcall (line 389) | static void postcall(function_call &, handle) {}
  function name (line 394) | struct process_attribute<name> : process_attribute_default<name> {
  function doc (line 400) | struct process_attribute<doc> : process_attribute_default<doc> {
  type process_attribute (line 406) | struct process_attribute
  function init (line 407) | static void init(const char *d, function_record *r) { r->doc = const_cas...
  function init (line 408) | static void init(const char *d, type_record *r) { r->doc = d; }
  type process_attribute (line 411) | struct process_attribute
  function return_value_policy (line 415) | struct process_attribute<return_value_policy> : process_attribute_defaul...
  function sibling (line 422) | struct process_attribute<sibling> : process_attribute_default<sibling> {
  function is_method (line 428) | struct process_attribute<is_method> : process_attribute_default<is_metho...
  function is_setter (line 437) | struct process_attribute<is_setter> : process_attribute_default<is_sette...
  function scope (line 443) | struct process_attribute<scope> : process_attribute_default<scope> {
  function is_operator (line 449) | struct process_attribute<is_operator> : process_attribute_default<is_ope...
  function is_new_style_constructor (line 454) | struct process_attribute<is_new_style_constructor>
  function check_kw_only_arg (line 461) | inline void check_kw_only_arg(const arg &a, function_record *r) {
  function append_self_arg_if_needed (line 468) | inline void append_self_arg_if_needed(function_record *r) {
  function arg (line 476) | struct process_attribute<arg> : process_attribute_default<arg> {
  function arg_v (line 487) | struct process_attribute<arg_v> : process_attribute_default<arg_v> {
  function kw_only (line 528) | struct process_attribute<kw_only> : process_attribute_default<kw_only> {
  function pos_only (line 541) | struct process_attribute<pos_only> : process_attribute_default<pos_only> {
  function init (line 557) | static void init(const handle &h, type_record *r) { r->bases.append(h); }
  function init (line 563) | static void init(const base<T> &, type_record *r) { r->add_base(typeid(T...
  function multiple_inheritance (line 568) | struct process_attribute<multiple_inheritance> : process_attribute_defau...
  function dynamic_attr (line 575) | struct process_attribute<dynamic_attr> : process_attribute_default<dynam...
  function custom_type_setup (line 580) | struct process_attribute<custom_type_setup> {
  function is_final (line 587) | struct process_attribute<is_final> : process_attribute_default<is_final> {
  function buffer_protocol (line 592) | struct process_attribute<buffer_protocol> : process_attribute_default<bu...
  function metaclass (line 597) | struct process_attribute<metaclass> : process_attribute_default<metaclas...
  function module_local (line 602) | struct process_attribute<module_local> : process_attribute_default<modul...
  function prepend (line 608) | struct process_attribute<prepend> : process_attribute_default<prepend> {
  function arithmetic (line 614) | struct process_attribute<arithmetic> : process_attribute_default<arithme...
  function init (line 644) | static void init(const Args &...args, function_record *r) {
  function init (line 651) | static void init(const Args &...args, type_record *r) {
  function precall (line 658) | static void precall(function_call &call) {
  function postcall (line 664) | static void postcall(function_call &call, handle fn_ret) {

FILE: libs/pybind11/include/pybind11/buffer_info.h
  function PYBIND11_NAMESPACE_BEGIN (line 14) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
  function std (line 31) | inline std::vector<ssize_t> f_strides(const std::vector<ssize_t> &shape,...
  function Py_buffer (line 153) | Py_buffer *view() const { return m_view; }
  type private_ctr_tag (line 168) | struct private_ctr_tag {}
  type compare_buffer_info (line 188) | struct compare_buffer_info {
  function compare (line 197) | static bool compare(const buffer_info &b) {

FILE: libs/pybind11/include/pybind11/cast.h
  function handle (line 73) | static handle
  function index_check (line 142) | auto index_check = [](PyObject *o) { return PyIndex_Check(o); }
  function index_check (line 146) | auto index_check = [](PyObject *o) { return hasattr(o, "__index__"); }
  function handle (line 256) | static handle cast(T, return_value_policy /* policy */, handle /* parent...
  function load (line 270) | bool load(handle h, bool) {
  function handle (line 296) | static handle cast(const void *ptr, return_value_policy /* policy */, ha...
  function else (line 340) | else if (hasattr(src, PYBIND11_BOOL_ATTR)) {
  function handle (line 360) | static handle cast(bool src, return_value_policy /* policy */, handle /*...
  function load (line 397) | bool load(handle src, bool) {
  function handle (line 449) | static handle
  function handle (line 554) | static handle cast(const CharT *src, return_value_policy policy, handle ...
  function handle (line 561) | static handle cast(CharT src, return_value_policy policy, handle parent) {
  function handle (line 663) | handle cast(T *src, return_value_policy policy, handle parent) {
  function load (line 773) | bool load(handle src, bool convert) {
  function handle (line 850) | static handle cast(holder_type &&src, return_value_policy, handle) {
  function object (line 908) | struct handle_type_name<object> {
  function list (line 912) | struct handle_type_name<list> {
  function dict (line 916) | struct handle_type_name<dict> {
  function anyset (line 920) | struct handle_type_name<anyset> {
  function set (line 924) | struct handle_type_name<set> {
  function frozenset (line 928) | struct handle_type_name<frozenset> {
  function str (line 932) | struct handle_type_name<str> {
  function tuple (line 936) | struct handle_type_name<tuple> {
  function bool_ (line 940) | struct handle_type_name<bool_> {
  function bytes (line 944) | struct handle_type_name<bytes> {
  function buffer (line 948) | struct handle_type_name<buffer> {
  function int_ (line 952) | struct handle_type_name<int_> {
  function iterable (line 956) | struct handle_type_name<iterable> {
  function iterator (line 960) | struct handle_type_name<iterator> {
  function float_ (line 964) | struct handle_type_name<float_> {
  function function (line 968) | struct handle_type_name<function> {
  function handle (line 972) | struct handle_type_name<handle> {
  function none (line 976) | struct handle_type_name<none> {
  function sequence (line 980) | struct handle_type_name<sequence> {
  function bytearray (line 984) | struct handle_type_name<bytearray> {
  function memoryview (line 988) | struct handle_type_name<memoryview> {
  function slice (line 992) | struct handle_type_name<slice> {
  function type (line 996) | struct handle_type_name<type> {
  function capsule (line 1000) | struct handle_type_name<capsule> {
  function ellipsis (line 1004) | struct handle_type_name<ellipsis> {
  function weakref (line 1008) | struct handle_type_name<weakref> {
  function args (line 1012) | struct handle_type_name<args> {
  function kwargs (line 1016) | struct handle_type_name<kwargs> {
  function obj_attr_accessor (line 1020) | struct handle_type_name<obj_attr_accessor> {
  function str_attr_accessor (line 1024) | struct handle_type_name<str_attr_accessor> {
  function item_accessor (line 1028) | struct handle_type_name<item_accessor> {
  function sequence_accessor (line 1032) | struct handle_type_name<sequence_accessor> {
  function list_accessor (line 1036) | struct handle_type_name<list_accessor> {
  function tuple_accessor (line 1040) | struct handle_type_name<tuple_accessor> {

FILE: libs/pybind11/include/pybind11/chrono.h
  function PYBIND11_NAMESPACE_BEGIN (line 21) | PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
  function handle (line 74) | static handle cast(const type &src, return_value_policy /* policy */, ha...
  function std (line 102) | inline std::tm *localtime_thread_safe(const std::time_t *time, std::tm *...
  function load (line 123) | bool load(handle src, bool) {
  function handle (line 173) | static handle cast(const std::chrono::time_point<std::chrono::system_clo...

FILE: libs/pybind11/include/pybind11/complex.h
  function std (line 27) | static std::string format() { return std::string(value); }
  function handle (line 66) | static handle

FILE: libs/pybind11/include/pybind11/detail/class.h
  function std (line 30) | inline std::string get_fully_qualified_tp_name(PyTypeObject *type) {
  function PyTypeObject (line 42) | inline PyTypeObject *type_incref(PyTypeObject *type) {
  function PyObject (line 50) | inline PyObject *pybind11_static_get(PyObject *self, PyObject * /*ob*/, ...
  function pybind11_static_set (line 55) | inline int pybind11_static_set(PyObject *self, PyObject *obj, PyObject *...
  function PyTypeObject (line 66) | inline PyTypeObject *make_static_property_type() {
  function PyTypeObject (line 112) | inline PyTypeObject *make_static_property_type() {
  function pybind11_meta_setattro (line 138) | inline int pybind11_meta_setattro(PyObject *obj, PyObject *name, PyObjec...
  function PyObject (line 175) | inline PyObject *pybind11_meta_getattro(PyObject *obj, PyObject *name) {
  function PyObject (line 185) | inline PyObject *pybind11_meta_call(PyObject *type, PyObject *args, PyOb...
  function PyTypeObject (line 251) | inline PyTypeObject *make_default_metaclass() {
  function PyObject (line 369) | inline PyObject *pybind11_object_new(PyTypeObject *type, PyObject *, PyO...
  function pybind11_object_init (line 376) | inline int pybind11_object_init(PyObject *self, PyObject *, PyObject *) {
  function add_patient (line 383) | inline void add_patient(PyObject *nurse, PyObject *patient) {
  function clear_patients (line 391) | inline void clear_patients(PyObject *self) {
  function clear_instance (line 418) | inline void clear_instance(PyObject *self) {
  function pybind11_object_dealloc (line 457) | inline void pybind11_object_dealloc(PyObject *self) {
  function PyObject (line 491) | inline PyObject *make_object_base_type(PyTypeObject *metaclass) {
  function pybind11_traverse (line 534) | inline int pybind11_traverse(PyObject *self, visitproc visit, void *arg) {
  function pybind11_clear (line 549) | inline int pybind11_clear(PyObject *self) {
  function enable_dynamic_attributes (line 560) | inline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) {
  function pybind11_getbuffer (line 579) | inline int pybind11_getbuffer(PyObject *obj, Py_buffer *view, int flags) {
  function pybind11_releasebuffer (line 637) | inline void pybind11_releasebuffer(PyObject *, Py_buffer *view) {
  function enable_buffer_protocol (line 642) | inline void enable_buffer_protocol(PyHeapTypeObject *heap_type) {
  function PyObject (line 651) | inline PyObject *make_new_python_type(const type_record &rec) {

FILE: libs/pybind11/include/pybind11/detail/common.h
  function return_value_policy (line 518) | enum class return_value_policy : uint8_t {
  function size_in_ptrs (line 576) | inline static constexpr size_t size_in_ptrs(size_t s) {
  function instance_simple_holder_in_ptrs (line 586) | constexpr size_t instance_simple_holder_in_ptrs() {
  type type_info (line 593) | struct type_info
  type value_and_holder (line 594) | struct value_and_holder
  type nonsimple_values_and_holders (line 596) | struct nonsimple_values_and_holders {
  type instance (line 602) | struct instance {
  type select_indices_impl (line 721) | struct select_indices_impl
  type void_type (line 834) | struct void_type {}
  function constexpr_sum (line 843) | size_t constexpr_sum(Ts... ns) {
  function constexpr_sum (line 847) | constexpr size_t constexpr_sum() { return 0; }
  function constexpr_sum (line 849) | size_t constexpr_sum(T n, Ts... ns) {
  function first (line 854) | PYBIND11_NAMESPACE_BEGIN(constexpr_impl)
  function last (line 862) | constexpr int last(int /*i*/, int result) { return result; }
  function PYBIND11_EXPORT_EXCEPTION (line 1017) | PYBIND11_EXPORT_EXCEPTION builtin_exception : public std::runtime_error {
  function pybind11_fail (line 1045) | void pybind11_fail(const char *reason) {
  function PYBIND11_NOINLINE (line 1049) | [[noreturn]] PYBIND11_NOINLINE void pybind11_fail(const std::string &rea...
  function std (line 1096) | static std::string format() { return std::st
Copy disabled (too large) Download .json
Condensed preview — 1369 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (24,094K chars).
[
  {
    "path": ".editorconfig",
    "chars": 214,
    "preview": "root = true\n\n[*]\nend_of_line = lf\ninsert_final_newline = true\n\n# Matches multiple files with brace expansion notation\n[*"
  },
  {
    "path": ".gitattributes",
    "chars": 85,
    "preview": "*.hh    linguist-language=C++\n*.cc    linguist-language=C++\nlibs/** linguist-vendored"
  },
  {
    "path": ".github/workflows/appimage-modern.yml",
    "chars": 9356,
    "preview": "# Modern AppImage build using AppImageBuilder\n# Supports both x86_64 and arm64 architectures on current GitHub runners\n#"
  },
  {
    "path": ".github/workflows/c++lib.yml",
    "chars": 711,
    "preview": "# This is a build which gets triggered on every commit push, to\n# ensure that Cadabra builds as c++lib. Does not yet con"
  },
  {
    "path": ".github/workflows/docker.yml",
    "chars": 1758,
    "preview": "\n# Build docker images with a Jupyter server with Cadabra\n# kernel whenever a commit is pushed to github.\n#\n# Lint this "
  },
  {
    "path": ".github/workflows/fedora-40-package.yml",
    "chars": 3445,
    "preview": "# Create a Fedora 40 package on a github release event.\n# This assumes that the cadabra version is the same as the\n# rel"
  },
  {
    "path": ".github/workflows/fedora-41-package.yml",
    "chars": 3445,
    "preview": "# Create a Fedora 41 package on a github release event.\n# This assumes that the cadabra version is the same as the\n# rel"
  },
  {
    "path": ".github/workflows/fedora-42-package.yml",
    "chars": 3828,
    "preview": "# Create a Fedora 41 package on a github release event.\n# This assumes that the cadabra version is the same as the\n# rel"
  },
  {
    "path": ".github/workflows/freebsd.yml",
    "chars": 949,
    "preview": "# This is a build which gets triggered on every commit push, to\n# ensure that we get some warnings when we push code tha"
  },
  {
    "path": ".github/workflows/homebrew-devel.yml",
    "chars": 3434,
    "preview": "# This is a build which gets triggered on every push to the\n# 'devel' branch, to update the homebrew-repo the cadabra2-d"
  },
  {
    "path": ".github/workflows/homebrew.yml",
    "chars": 2856,
    "preview": "# This is a build which gets triggered on every release, to\n# update the homebrew-repo.\n\nname: Homebrew\n\non:\n  release:\n"
  },
  {
    "path": ".github/workflows/linux.yml",
    "chars": 1222,
    "preview": "# This is a build which gets triggered on every commit push, to\n# ensure that we get some warnings when we push code tha"
  },
  {
    "path": ".github/workflows/macos.yml",
    "chars": 989,
    "preview": "# This is a build which gets triggered on every commit push, to\n# ensure that we get some warnings when we push code tha"
  },
  {
    "path": ".github/workflows/opensuse-tumbleweed-package.yml",
    "chars": 3736,
    "preview": "# Create a OpenSUSE Tumbleweed package on a github release event.\n# This assumes that the cadabra version is the same as"
  },
  {
    "path": ".github/workflows/tarball.yml",
    "chars": 1580,
    "preview": "# This is a build which gets triggered on every release, to\n# generate a tarball which includes all submodules.\n\nname: T"
  },
  {
    "path": ".github/workflows/ubuntu-22.04-package.yml",
    "chars": 3154,
    "preview": "# Create an Ubuntu 22.04 package on a github release event.\n# This assumes that the cadabra version is the same as the\n#"
  },
  {
    "path": ".github/workflows/ubuntu-24.04-package.yml",
    "chars": 4365,
    "preview": "# Create an Ubuntu 24.04 package on a github release event.\n# This assumes that the cadabra version is the same as the\n#"
  },
  {
    "path": ".github/workflows/windows-installer.yml",
    "chars": 3242,
    "preview": "# Create Windows installer on a github release event.  This assumes\n# that the cadabra version is the same as the releas"
  },
  {
    "path": ".github/workflows/windows.yml",
    "chars": 7170,
    "preview": "# Create Windows installer on a github push or release event\n# (upload to the release assets in the latter case).\n\nname:"
  },
  {
    "path": ".gitignore",
    "chars": 282,
    "preview": ".cache\nweb2/cadabra2/source/book\n*.orig\n*.bak\ndoxygen\n.DS_Store\n*~\n*.o\nbuild\nbuild-lib\njbuild\ninstall\n.ipynb_checkpoints"
  },
  {
    "path": ".gitmodules",
    "chars": 133,
    "preview": "[submodule \"submodules/microtex\"]\n\tpath = submodules/microtex\n\turl = https://github.com/kpeeters/MicroTeX\n\tbranch = kpee"
  },
  {
    "path": ".travis.yml",
    "chars": 2462,
    "preview": "branches:\n  only:\n  - master\n  - feature/pybind\n  \nos:\n   - linux\n     addons:\n        apt:\n          sources:\n         "
  },
  {
    "path": "CITATION.cff",
    "chars": 734,
    "preview": "cff-version: 1.2.0\nmessage: \"If you use this software, please cite it as below.\"\nauthors:\n- family-names: \"Peeters\"\n  gi"
  },
  {
    "path": "CMakeLists.txt",
    "chars": 25963,
    "preview": "set(CMAKE_LEGACY_CYGWIN_WIN32 0)\nif(WIN32)\n  # We want to use WiX 4.x but cpack only supports that from 3.30.\n  set(CADA"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3223,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 3409,
    "preview": "How to contribute\n=================\n\nIf you want to help out with Cadabra, or think you can contribute a\nuseful add-on p"
  },
  {
    "path": "JUPYTER.rst",
    "chars": 7286,
    "preview": "Building the Cadabra Jupyter kernel\n===================================\n\nThe Cadabra build scripts can now build a Jupyt"
  },
  {
    "path": "LICENSE",
    "chars": 35141,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "Makefile",
    "chars": 2631,
    "preview": "\nall:\n\t@echo -n \"\\nTo build Cadabra, \\n\\n   mkdir build\\n   cd build\\n   cmake ..\\n   make\\n\\nThe other targets here are"
  },
  {
    "path": "README.rst",
    "chars": 18069,
    "preview": "Cadabra\n=======\n\n.. image:: https://joss.theoj.org/papers/10.21105/joss.01118/status.svg\n   :target: https://doi.org/10."
  },
  {
    "path": "c++lib/.gitignore",
    "chars": 21,
    "preview": "Makefile\ntreetracker\n"
  },
  {
    "path": "c++lib/CMakeLists.txt",
    "chars": 19025,
    "preview": "cmake_minimum_required(VERSION 3.12)\n\nset(CMAKE_CXX_STANDARD 17)\nproject(Cadabra)\n\n#------------------------------------"
  },
  {
    "path": "c++lib/README.txt",
    "chars": 88,
    "preview": "This directory contains code to illustrate the use of Cadabra from\nwithin C++ programs.\n"
  },
  {
    "path": "c++lib/SympyDummy.cc",
    "chars": 1958,
    "preview": "\n#include \"Parser.hh\"\n#include \"Cleanup.hh\"\n#include \"PreClean.hh\"\n#include \"SympyCdb.hh\"\n#include \"DisplaySympy.hh\"\n#if"
  },
  {
    "path": "c++lib/adjform.cc",
    "chars": 676,
    "preview": "#include \"cadabra2++.hh\"\n#include <iostream>\n\nusing namespace cadabra;\nusing namespace cadabra::cpplib;\n\nint main(int, c"
  },
  {
    "path": "c++lib/cpplib.hh.in",
    "chars": 3398,
    "preview": "#ifdef _MSC_VER\n#define WIN32_LEAN_AND_MEAN\n#include <Windows.h>\n#endif\n\nnamespace cadabra {\n\tnamespace cpplib {\n\n\t\tusin"
  },
  {
    "path": "c++lib/nevaluate.cc",
    "chars": 2918,
    "preview": "#include \"cadabra2++.hh\"\n#include <iostream>\n\nusing namespace cadabra;\nusing namespace cadabra::cpplib;\n\nint main(int, c"
  },
  {
    "path": "c++lib/nevaluate.py",
    "chars": 832,
    "preview": "#!/usr/bin/python3\n#\n# Test program to determine the speed of sympy/numpy numerical\n# evaluation of functions, to compar"
  },
  {
    "path": "c++lib/simple.cc",
    "chars": 2449,
    "preview": "#include \"cadabra2++/Parser.hh\"\n#include \"cadabra2++/Storage.hh\"\n#include \"cadabra2++/DisplayTerminal.hh\"\n#include \"cada"
  },
  {
    "path": "c++lib/trivial.cc",
    "chars": 364,
    "preview": "#include \"cadabra2++.hh\"\n#include <iostream>\n\nusing namespace cadabra;\nusing namespace cadabra::cpplib;\n\nint main() {\n  "
  },
  {
    "path": "client_server/Actions.cc",
    "chars": 12463,
    "preview": "\n\n#include \"Actions.hh\"\n#include \"DataCell.hh\"\n#include \"DocumentThread.hh\"\n#include \"GUIBase.hh\"\n\n#include <boost/core/"
  },
  {
    "path": "client_server/Actions.hh",
    "chars": 9369,
    "preview": "\n#pragma once\n\n#include \"DataCell.hh\"\n#include \"DocumentThread.hh\"\n\n#include <memory>\n\nnamespace cadabra {\n\n\tclass Docum"
  },
  {
    "path": "client_server/CMakeLists.txt",
    "chars": 8743,
    "preview": "# cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})\nproject(Cadabra)\n\nif(POLICY CMP0167)\n  cmake_policy(SET CMP01"
  },
  {
    "path": "client_server/ComputeThread.cc",
    "chars": 23530,
    "preview": "\n#include <string>\n#include <iostream>\n#include <sstream>\n#include \"ComputeThread.hh\"\n#include \"DocumentThread.hh\"\n#incl"
  },
  {
    "path": "client_server/ComputeThread.hh",
    "chars": 5128,
    "preview": "\n#pragma once\n\n#include <signal.h>\n#include <thread>\n#include <set>\n#include <glibmm/spawn.h>\n#include \"websocket_client"
  },
  {
    "path": "client_server/DocumentThread.cc",
    "chars": 14985,
    "preview": "\n#include \"Actions.hh\"\n#include \"DocumentThread.hh\"\n#include \"GUIBase.hh\"\n#include \"ComputeThread.hh\"\n#include \"CdbPytho"
  },
  {
    "path": "client_server/DocumentThread.hh",
    "chars": 6714,
    "preview": "\n#pragma once\n\n#include <queue>\n#include <mutex>\n#include <stack>\n#include <map>\n#include <thread>\n\n#include \"DataCell.h"
  },
  {
    "path": "client_server/GUIBase.hh",
    "chars": 3175,
    "preview": "\n#pragma once\n\n#include <deque>\n\n#include \"DataCell.hh\"\n\nnamespace cadabra {\n\n\t/// \\ingroup clientserver\n\t///\n\t/// Abstr"
  },
  {
    "path": "client_server/ScriptThread.cc",
    "chars": 5811,
    "preview": "\n#include \"ScriptThread.hh\"\n#include \"DocumentThread.hh\"\n#include \"GUIBase.hh\"\n#include \"Actions.hh\"\n\n#include <boost/uu"
  },
  {
    "path": "client_server/ScriptThread.hh",
    "chars": 1378,
    "preview": "\n#pragma once\n\n#include \"websocket_server.hh\"\n\n\nnamespace cadabra {\n\n\t/// \\ingroup scripting\n\t///\n   /// Class containin"
  },
  {
    "path": "client_server/Server.cc",
    "chars": 22904,
    "preview": "\n#include <signal.h>\n#include \"Server.hh\"\n#include \"InstallPrefix.hh\"\n\n#include <iostream>\n#include <fstream>\n#include <"
  },
  {
    "path": "client_server/Server.hh",
    "chars": 8141,
    "preview": "\n#pragma once\n\n#include <string>\n#include <set>\n#include <deque>\n#include <signal.h>\n#include <boost/uuid/uuid.hpp>\n#inc"
  },
  {
    "path": "client_server/Snoop.cc",
    "chars": 68178,
    "preview": "\n#include \"Snoop.hh\"\n\n#include <iostream>\n#include <string.h>\n#include <regex>\n#include <iostream>\n#include <chrono>\n#in"
  },
  {
    "path": "client_server/Snoop.hh",
    "chars": 12082,
    "preview": "\n/*\n\n   Snoop\n   Copyright (C) 2015-2024  Kasper Peeters\n   Available under the terms of the GPL v3.\n\n   Snoop is a ligh"
  },
  {
    "path": "client_server/TODO",
    "chars": 1827,
    "preview": "\nCan it ever happen that e.g. the user selects a cell, clicks delete, but before\nthe Action can be 'perform'ed, the clie"
  },
  {
    "path": "client_server/cadabra-jupyter-kernel.cc",
    "chars": 5064,
    "preview": "\n#include \"Config.hh\"\n#include <iostream>\n#include \"cadabra-jupyter-kernel.hh\"\n#include \"xeus/xguid.hpp\"\n#include <boost"
  },
  {
    "path": "client_server/cadabra-jupyter-kernel.hh",
    "chars": 1521,
    "preview": "\n#pragma once\n\n#include \"xeus/xinterpreter.hpp\"\n#include \"xeus/xjson.hpp\"\n#include \"Server.hh\"\n\nusing xeus::xinterpreter"
  },
  {
    "path": "client_server/cadabra-jupyter-main.cc",
    "chars": 611,
    "preview": "#include <iostream>\n#include <memory>\n\n#include \"cadabra-jupyter-kernel.hh\"\n#include \"xeus/xkernel.hpp\"\n#include \"xeus/x"
  },
  {
    "path": "client_server/cadabra-server.cc",
    "chars": 1698,
    "preview": "\n#include \"Config.hh\"\n#include \"Snoop.hh\"\n#include \"Server.hh\"\n#include <glibmm/miscutils.h>\n\n#define NDEBUG 1\n\n#ifdef _"
  },
  {
    "path": "client_server/cadabra2html.cc",
    "chars": 1898,
    "preview": "#include <fstream>\n#include <iostream>\n#include \"DataCell.hh\"\n\nint main(int argc, char **argv)\n\t{\n\tif(argc<2) {\n\t\tstd::c"
  },
  {
    "path": "client_server/cadabra2latex.cc",
    "chars": 1277,
    "preview": "#include <fstream>\n#include <iostream>\n#include <regex>\n#include \"DataCell.hh\"\n\nint main(int argc, char **argv)\n\t{\n\tif(a"
  },
  {
    "path": "client_server/connection.json",
    "chars": 264,
    "preview": "{\n    \"transport\": \"tcp\",\n    \"ip\": \"127.0.0.1\",\n    \"control_port\": 50160,\n    \"shell_port\": 57503,\n    \"stdin_port\": 5"
  },
  {
    "path": "client_server/kernel.json",
    "chars": 158,
    "preview": "{\n    \"display_name\": \"Cadabra\",\n    \"language\" : \"python\",\n    \"argv\": [\n        \"cadabra-jupyter-kernel\",\n        \"-f\""
  },
  {
    "path": "client_server/notebook.html",
    "chars": 2052,
    "preview": "<!doctype html>\n<html>\n  <head>\n    <meta name=\"generator\"     content=\"Cadabra 2.5.11\">\n    <meta name=\"generator-url\" "
  },
  {
    "path": "client_server/notebook.tex",
    "chars": 5702,
    "preview": "% This is the bit of LaTeX style information that DataCell.cc needs in\n% order to write notebooks out in standalone LaTe"
  },
  {
    "path": "client_server/popen2.cc",
    "chars": 1376,
    "preview": "\n// http://stackoverflow.com/questions/26852198/getting-the-pid-from-popen\n\n#include \"popen2.hh\"\n#include <sys/wait.h>\n#"
  },
  {
    "path": "client_server/popen2.hh",
    "chars": 247,
    "preview": "\n#pragma once\n\n#include <internal/unistd.h>\n#include <errno.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <sys/type"
  },
  {
    "path": "client_server/regexp_tester.cc",
    "chars": 589,
    "preview": "\n#include <iostream>\n#include <string>\n#include <regex>\n\nint main(int argc, char **argv)\n\t{\n\tif(argc<3) {\n\t\tstd::cerr <<"
  },
  {
    "path": "client_server/test_client.cc",
    "chars": 1822,
    "preview": "\n// A test client to do some basic manipulation of a notebook and\n// some I/O with a cadabra server.\n\n#include \"Client.h"
  },
  {
    "path": "client_server/test_talk_to_server.cc",
    "chars": 2098,
    "preview": "\n#include <websocketpp/client.hpp>\n#include <websocketpp/config/asio_no_tls_client.hpp>\n#include <websocketpp/common/fun"
  },
  {
    "path": "client_server/tree.hh",
    "chars": 87841,
    "preview": "\n//\tSTL-like templated tree class.\n//\n// Copyright (C) 2001-2014 Kasper Peeters <kasper@phi-sci.com>\n// Distributed unde"
  },
  {
    "path": "client_server/websocket_client.cc",
    "chars": 9212,
    "preview": "#include \"websocket_client.hh\"\n#include <iostream>\n\nwebsocket_client::websocket_client()\n\t: ssl_ctx_(boost::asio::ssl::c"
  },
  {
    "path": "client_server/websocket_client.hh",
    "chars": 2781,
    "preview": "#pragma once\n\n#include <boost/beast/core.hpp>\n#include <boost/beast/websocket.hpp>\n#include <boost/beast/ssl.hpp>\n#inclu"
  },
  {
    "path": "client_server/websocket_server.cc",
    "chars": 7528,
    "preview": "#include \"websocket_server.hh\"\n#include <iostream>\n\nwebsocket_server::connection::connection(boost::asio::io_context& io"
  },
  {
    "path": "client_server/websocket_server.hh",
    "chars": 4117,
    "preview": "#pragma once\n\n#include <boost/beast/core.hpp>\n#include <boost/beast/websocket.hpp>\n#include <boost/beast/http.hpp>\n#incl"
  },
  {
    "path": "cmake/cmake_uninstall.cmake.in",
    "chars": 828,
    "preview": "if(NOT EXISTS \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\")\n  message(FATAL_ERROR \"Cannot find install manifest: @C"
  },
  {
    "path": "cmake/functions.cmake",
    "chars": 924,
    "preview": "# Prints section headers\nmacro(print_header TEXT)\n  message(\"\")\n  message(\"-------------------------------------------\")"
  },
  {
    "path": "cmake/modules/FindGLIBMM3.cmake",
    "chars": 1281,
    "preview": "if(WIN33)\n  windows_find_library(GLIBMM3_LIBRARIES REQUIRED glibmm sigc glib gobject)\n  if (GLIBMM3_LIBRARIES)\n    set(G"
  },
  {
    "path": "cmake/modules/FindGLIBMM4.cmake",
    "chars": 1282,
    "preview": "if(WIN33)\n  windows_find_library(GLIBMM4_LIBRARIES REQUIRED glibmm sigc glib gobject)\n  if (GLIBMM4_LIBRARIES)\n    set(G"
  },
  {
    "path": "cmake/modules/FindGMPXX.cmake",
    "chars": 945,
    "preview": "\n# Find the GMPXX library and its GMP dependency.\n# Simply looks for the shared libraries on Linux/OSX.\n# On Windows, fi"
  },
  {
    "path": "cmake/modules/FindGTKMM3.cmake",
    "chars": 920,
    "preview": "if(MSVC)\n  windows_find_library(GTKMM_LIBRARIES\n\tgtk gdk gdk_pixbuf pangocairo pango atk gio gobject\n\tgmodule glib cairo"
  },
  {
    "path": "cmake/modules/FindGTKMM4.cmake",
    "chars": 810,
    "preview": "if(MSVC)\n  windows_find_library(GTKMM_LIBRARIES\n\tgtk gdk gdk_pixbuf pangocairo pango atk gio gobject\n\tgmodule glib cairo"
  },
  {
    "path": "cmake/modules/FindJSONCPP.cmake",
    "chars": 147,
    "preview": "find_package(PkgConfig REQUIRED)\npkg_check_modules(JSONCPP jsoncpp)\n#message(\"**** ${JSONCPP_INCLUDE_DIRS}\")\n#message(\"*"
  },
  {
    "path": "cmake/modules/FindLibPythonOSX.py",
    "chars": 1120,
    "preview": "# Note by Nikolaus Demmel 28.03.2014: My contributions are licensend under the\n# same as CMake (BSD). My adaptations are"
  },
  {
    "path": "cmake/modules/FindMathematica.cmake",
    "chars": 185538,
    "preview": "# - Try to find Mathematica installation and provide CMake functions for its C/C++ interface\n#\n# See the FindMathematica"
  },
  {
    "path": "cmake/modules/FindMathematicaDocumentationBuild.cmake.in",
    "chars": 5655,
    "preview": "# FindMathematica @Mathematica_CMAKE_MODULE_VERSION@ documentation build script\n\n# JAVACMD is an environment variable th"
  },
  {
    "path": "cmake/modules/FindMathematicaTestDriver.cmd",
    "chars": 897,
    "preview": "@echo off\r\nrem FindMathematica test driver script for Windows\r\n\r\nsetlocal enabledelayedexpansion\r\n\r\nrem echo !CMDCMDLINE"
  },
  {
    "path": "cmake/modules/FindMathematicaTestDriver.sh",
    "chars": 956,
    "preview": "#!/bin/bash\n# FindMathematica test driver script for UNIX systems\n\n#logger -- $# \"$@\"\n#logger -- LD_LIBRARY_PATH=$LD_LIB"
  },
  {
    "path": "cmake/modules/FindPythonLibsOSX.cmake",
    "chars": 15136,
    "preview": "# - Find python libraries\n# This module finds if Python is installed and determines where the\n# include files and librar"
  },
  {
    "path": "cmake/modules/FindSQLITE3.cmake",
    "chars": 1813,
    "preview": "# Copyright (C) 2007-2009 LuaDist.\n# Created by Peter Kapec <kapecp@gmail.com>\n# Redistribution and use of this file is "
  },
  {
    "path": "cmake/modules/FindZeroMQ.cmake",
    "chars": 1676,
    "preview": "# - Find zeromq libraries\r\n# This module finds zeromq if it is installed and determines where the\r\n# include files and l"
  },
  {
    "path": "cmake/modules/cotire.cmake",
    "chars": 153025,
    "preview": "# - cotire (compile time reducer)\n#\n# See the cotire manual for usage hints.\n#\n#========================================"
  },
  {
    "path": "cmake/packaging.cmake",
    "chars": 11958,
    "preview": "# Logic to build packages (RPM/DEB) using CPack; see https://cmake.org/Wiki/CMake:Packaging_With_CPack\n# \n\nset(LINUX_NAM"
  },
  {
    "path": "cmake/policies.cmake",
    "chars": 233,
    "preview": "\n# Policy settings for CMake to resolve ambiguities.\n\nif (POLICY CMP0042)\n  cmake_policy(SET CMP0042 NEW)\nendif()\nif (PO"
  },
  {
    "path": "cmake/version.cmake",
    "chars": 1662,
    "preview": "set(CADABRA_VERSION_MAJOR 2)\nset(CADABRA_VERSION_MINOR 5)\nset(CADABRA_VERSION_PATCH 15)\nset(CADABRA_VERSION_RC    \"\")  #"
  },
  {
    "path": "cmake/windows.cmake",
    "chars": 7532,
    "preview": "# Collection of utilities for using\n# vcpkg to find libraries in CMake\n\nlist(LENGTH CMAKE_CONFIGURATION_TYPES N_CONFIGUR"
  },
  {
    "path": "codemeta.json",
    "chars": 561,
    "preview": "{\n  \"@context\": \"https://raw.githubusercontent.com/codemeta/codemeta/master/codemeta.jsonld\",\n  \"@type\": \"Code\",\n  \"auth"
  },
  {
    "path": "conda/build.sh",
    "chars": 848,
    "preview": "#!/bin/bash\n\nREL_SP_DIR=$(python -c \"import os;print(os.path.relpath(os.getenv('SP_DIR'), os.getenv('PREFIX')))\")\nsed -i"
  },
  {
    "path": "conda/meta.yaml",
    "chars": 2106,
    "preview": "{% set name = \"cadabra2\" %}\n{% set version = \"2.2.9\" %}\n\npackage:\n  name: {{ name|lower }}\n  version: {{ version }}\n\nsou"
  },
  {
    "path": "config/AppRun",
    "chars": 491,
    "preview": "#!/bin/bash\n#\n# Set the PYTHONHOME and PYTHONPATH variables to ensure that Cadabra\n# inside the AppImage can find the Py"
  },
  {
    "path": "config/Doxyfile",
    "chars": 106405,
    "preview": "# Doxyfile 1.8.11\n\n# This file describes the settings to be used by the documentation system\n# doxygen (www.doxygen.org)"
  },
  {
    "path": "config/DoxygenLayout.xml",
    "chars": 6117,
    "preview": "<doxygenlayout version=\"1.0\">\n  <!-- Generated by doxygen 1.8.6 -->\n  <!-- Navigation index tabs for HTML output -->\n  <"
  },
  {
    "path": "config/DoxygenStyle.css",
    "chars": 141,
    "preview": "div.contents p {\n\t font-size: 16px;\n\t margin-left: 15px;\n    width: 80%;\n    background-color: white;\n}\ndiv.fragment {\n\t"
  },
  {
    "path": "config/README.txt",
    "chars": 117,
    "preview": "Building a Windows binary requires the 'rcedit.exe' tool available\nfrom https://github.com/electron/rcedit/releases.\n"
  },
  {
    "path": "config/buildbot.sh",
    "chars": 3831,
    "preview": "#!/bin/bash\n# set -e\n\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nexport CDB_TAG=$1\nexport CDB_PLATFORM=$2\n"
  },
  {
    "path": "config/buildpkg.sh",
    "chars": 1267,
    "preview": "#!/bin/bash\n\n#sudo rm -Rf ${HOME}/cadabra2\n#git clone https://github.com/kpeeters/cadabra2\n# if [ -f /etc/redhat-release"
  },
  {
    "path": "config/doxyrest-config.lua",
    "chars": 12695,
    "preview": "--------------------------------------------------------------------------------\n--\n--  This file is part of the Doxyres"
  },
  {
    "path": "config/generate_keywords.py",
    "chars": 2969,
    "preview": "import inspect\nimport importlib\nimport keyword\n\ndef get_functions(module):\n\tisfunc = lambda x: inspect.isfunction(x) or "
  },
  {
    "path": "config/init-cadabra2.scm",
    "chars": 1016,
    "preview": "\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n;;\n;; MODULE      : cadabra2.scm\n;; DES"
  },
  {
    "path": "config/install_python_windows.cmake.in",
    "chars": 326,
    "preview": "execute_process(COMMAND cygpath -m @PYLIBDIR@ OUTPUT_VARIABLE WINPYTHON OUTPUT_STRIP_TRAILING_WHITESPACE)\nmessage(STATUS"
  },
  {
    "path": "config/install_script.iss.in",
    "chars": 3244,
    "preview": "; Script generated by the Inno Setup Script Wizard.\r\n; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT F"
  },
  {
    "path": "config/make.bat",
    "chars": 135,
    "preview": "rcedit.exe C:\\Cadabra\\bin\\cadabra2-gtk.exe --set-icon cadabra2.ico\r\n\"C:\\Program Files (x86)\\Inno Setup 6\\ISCC.exe\" insta"
  },
  {
    "path": "config/post_install.rtf",
    "chars": 132,
    "preview": "If you are a new user of Cadabra, then you may wish to read the tutorials and documentation at http://cadabra.science/tu"
  },
  {
    "path": "config/postinst.in",
    "chars": 392,
    "preview": "#!/bin/sh\n#\n# Script to be included in the cadabra2 packages (deb/rpm) and to be\n# run after installation, to make TeX p"
  },
  {
    "path": "config/pre_install.rtf.in",
    "chars": 18,
    "preview": "No requirements.\r\n"
  },
  {
    "path": "config/publish-doxygen",
    "chars": 861,
    "preview": "#!/bin/bash -e\n#\n# Courtesy of http://blog.gockelhut.com/2014/09/automatic-documentation-publishing-with.html\n\n# Setting"
  },
  {
    "path": "config/science.cadabra.cadabra2-gtk.desktop.in",
    "chars": 412,
    "preview": "[Desktop Entry]\nVersion=1.0\nType=Application\nName=Cadabra 2\nGenericName=Computer algebra system\nComment=Computer algebra"
  },
  {
    "path": "config/shortcuts.wxs",
    "chars": 689,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Wix xmlns=\"http://schemas.microsoft.com/wix/2006/wi\">\n  <Fragment>\n    <Director"
  },
  {
    "path": "config/travisci_rsa.pub",
    "chars": 408,
    "preview": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6TwMFIylqHAK5LHUzFQou6SvzLlMt4QriGh6NCbsdSydaiH4NRAoaWXi7lVH3DJgp+w4TKeGvAzLsIoRA"
  },
  {
    "path": "contrib/einstein_equations.cnb",
    "chars": 41251,
    "preview": "{\n\t\"cells\" : \n\t[\n\t\t{\n\t\t\t\"cell_origin\" : \"client\",\n\t\t\t\"cell_type\" : \"latex\",\n\t\t\t\"cells\" : \n\t\t\t[\n\t\t\t\t{\n\t\t\t\t\t\"cell_origin\" "
  },
  {
    "path": "contrib/structure_equations_and_bianchi.cnb",
    "chars": 17012,
    "preview": "{\n\t\"cell_id\" : 2082837756733559988,\n\t\"cells\" : \n\t[\n\t\t{\n\t\t\t\"cell_id\" : 1525272859004475730,\n\t\t\t\"cell_origin\" : \"client\",\n"
  },
  {
    "path": "core/.gitignore",
    "chars": 49,
    "preview": "cadabra2_defaults.py\nConfig.hh\ncadabra2\nConfig.hh"
  },
  {
    "path": "core/Adjform.cc",
    "chars": 14799,
    "preview": "#include <algorithm>\n#include <iostream>\n#include <limits>\n#include <numeric>\n#include \"Adjform.hh\"\n#include \"Cleanup.hh"
  },
  {
    "path": "core/Adjform.hh",
    "chars": 8323,
    "preview": "#pragma once\n\n#include <vector>\n#include <map>\n#include <iosfwd>\n#include <cstdint>\n#include <string>\n#include \"Compare."
  },
  {
    "path": "core/Algorithm.cc",
    "chars": 33558,
    "preview": "/*\n\nCadabra: a field-theory motivated computer algebra system.\nCopyright (C) 2001-2015  Kasper Peeters <kasper.peeters@p"
  },
  {
    "path": "core/Algorithm.hh",
    "chars": 10738,
    "preview": "/*\n\nCadabra: a field-theory motivated computer algebra system.\nCopyright (C) 2001-2014  Kasper Peeters <kasper.peeters@p"
  },
  {
    "path": "core/Bridge.cc",
    "chars": 3594,
    "preview": "\n#include \"pythoncdb/py_ex.hh\"\n#include \"pythoncdb/py_helpers.hh\"\n#include \"Bridge.hh\"\n#include \"algorithms/collect_term"
  },
  {
    "path": "core/Bridge.hh",
    "chars": 506,
    "preview": "\n#pragma once\n\n#include \"Storage.hh\"\n#include \"Kernel.hh\"\n\n/// \\ingroup pythoncore\n///\n/// Replace any objects of the fo"
  },
  {
    "path": "core/CMakeLists.txt",
    "chars": 18015,
    "preview": "# cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION}) # Required for various macros\nproject(Cadabra)\nif(POLICY CMP0"
  },
  {
    "path": "core/CdbPython.cc",
    "chars": 24600,
    "preview": "\n#include <regex>\n#include <sstream>\n#include <sys/stat.h>\n#include <fstream>\n#include <iomanip>\n#include <iostream>\n#in"
  },
  {
    "path": "core/CdbPython.hh",
    "chars": 4071,
    "preview": "\n#pragma once\n\n#include <string>\n#include <set>\n#include <pybind11/pybind11.h>\n\nnamespace cadabra {\n\n\tstd::string escape"
  },
  {
    "path": "core/Cleanup.cc",
    "chars": 27303,
    "preview": "\n#include \"Cleanup.hh\"\n#include \"Functional.hh\"\n#include \"Exceptions.hh\"\n#include \"Algorithm.hh\"\n#include \"algorithms/co"
  },
  {
    "path": "core/Cleanup.hh",
    "chars": 4194,
    "preview": "/*\n\n\tCadabra: a field-theory motivated computer algebra system.\n\tCopyright (C) 2001-2014  Kasper Peeters <kasper.peeters"
  },
  {
    "path": "core/Combinatorics.cc",
    "chars": 2446,
    "preview": "/*\n\n\tCadabra: a field-theory motivated computer algebra system.\n\tCopyright (C) 2001-2014  Kasper Peeters <kasper.peeters"
  },
  {
    "path": "core/Combinatorics.hh",
    "chars": 31464,
    "preview": "/*\n\n\tCadabra: a field-theory motivated computer algebra system.\n\tCopyright (C) 2001-2014  Kasper Peeters <kasper.peeters"
  },
  {
    "path": "core/Compare.cc",
    "chars": 64565,
    "preview": "\n#include <typeinfo>\n\n#include \"Compare.hh\"\n#include \"Algorithm.hh\" // FIXME: only needed because index_iterator is in t"
  },
  {
    "path": "core/Compare.hh",
    "chars": 16565,
    "preview": "\n#pragma once\n\n#include \"Storage.hh\"\n#include \"Props.hh\"\n#include \"properties/Indices.hh\"\n\nnamespace cadabra {\n\n\t/// \\in"
  },
  {
    "path": "core/Config.hh.in",
    "chars": 1001,
    "preview": "\n#pragma once\n\n/// This file contains settings which are imported from the CMake\n/// configuration (installation path an"
  },
  {
    "path": "core/DataCell.cc",
    "chars": 28207,
    "preview": "\n#include \"InstallPrefix.hh\"\n#include \"Config.hh\"\n#include \"DataCell.hh\"\n#include \"Exceptions.hh\"\n#include <sstream>\n#in"
  },
  {
    "path": "core/DataCell.hh",
    "chars": 6672,
    "preview": "\n#pragma once\n\n#include <string>\n#include <mutex>\n\n#include \"tree.hh\"\n#include \"nlohmann/json.hpp\"\n\nnamespace cadabra {\n"
  },
  {
    "path": "core/Debug.hh",
    "chars": 422,
    "preview": "\n// Include this *only* in .cc files. Then define DEBUG in such .cc file\n// to enable debugging. Use DEBUGLN to wrap aro"
  },
  {
    "path": "core/DisplayBase.cc",
    "chars": 355,
    "preview": "\n#include \"DisplayBase.hh\"\n\nusing namespace cadabra;\n\nDisplayBase::DisplayBase(const Kernel& k, const Ex& e)\n\t: tree(e),"
  },
  {
    "path": "core/DisplayBase.hh",
    "chars": 1569,
    "preview": "#pragma once\n\n#include <string>\n#include <sstream>\n#include \"Props.hh\"\n#include \"Storage.hh\"\n\nnamespace cadabra {\n\n\t/// "
  },
  {
    "path": "core/DisplayMMA.cc",
    "chars": 17863,
    "preview": "\n#include \"Storage.hh\"\n#include \"Exceptions.hh\"\n#include \"Functional.hh\"\n#include \"DisplayMMA.hh\"\n#include \"PreClean.hh\""
  },
  {
    "path": "core/DisplayMMA.hh",
    "chars": 3725,
    "preview": "\n#pragma once\n\n#include \"DisplayBase.hh\"\n#include <ostream>\n#include <map>\n#include <set>\n\ntypedef uint32_t kunichar;\n\nn"
  },
  {
    "path": "core/DisplaySympy.cc",
    "chars": 18915,
    "preview": "\n#include \"Algorithm.hh\"\n#include \"Functional.hh\"\n#include \"DisplaySympy.hh\"\n#include \"properties/Depends.hh\"\n#include \""
  },
  {
    "path": "core/DisplaySympy.hh",
    "chars": 3501,
    "preview": "\n#pragma once\n\n#include \"DisplayBase.hh\"\n#include <ostream>\n#include <map>\n#include <set>\n\ntypedef uint32_t kunichar;\n\nn"
  },
  {
    "path": "core/DisplayTeX.cc",
    "chars": 30859,
    "preview": "\n#include \"Config.hh\"\n#include \"Exceptions.hh\"\n#include \"Symbols.hh\"\n#include \"Grouping.hh\"\n#include \"DisplayTeX.hh\"\n#in"
  },
  {
    "path": "core/DisplayTeX.hh",
    "chars": 4431,
    "preview": "\n#pragma once\n\n#include \"Props.hh\"\n#include \"Storage.hh\"\n#include \"DisplayBase.hh\"\n#include <ostream>\n\ntypedef uint32_t "
  },
  {
    "path": "core/DisplayTerminal.cc",
    "chars": 16248,
    "preview": "\n#include \"Algorithm.hh\"\n#include \"DisplayTerminal.hh\"\n#include \"Symbols.hh\"\n#include \"Exceptions.hh\"\n#include \"properti"
  },
  {
    "path": "core/DisplayTerminal.hh",
    "chars": 2982,
    "preview": "\n#pragma once\n\n#include \"Props.hh\"\n#include \"Storage.hh\"\n#include \"DisplayBase.hh\"\n#include <ostream>\n#include <map>\n#in"
  },
  {
    "path": "core/Dummies.hh",
    "chars": 1011,
    "preview": "/*\n\nCadabra: a field-theory motivated computer algebra system.\nCopyright (C) 2001-2011  Kasper Peeters <kasper.peeters@a"
  },
  {
    "path": "core/Equals.cc",
    "chars": 922,
    "preview": "\n#include \"Equals.hh\"\n#include \"Exceptions.hh\"\n\nusing namespace cadabra;\n\nvisit::Equals::Equals(const Kernel &k, Ex &e, "
  },
  {
    "path": "core/Equals.hh",
    "chars": 443,
    "preview": "#pragma once\n\n#include \"Storage.hh\"\n#include \"Kernel.hh\"\n#include \"ReservedNode.hh\"\n\nnamespace cadabra {\n\n\tnamespace vis"
  },
  {
    "path": "core/ExManip.cc",
    "chars": 2638,
    "preview": "\n#include \"ExManip.hh\"\n#include \"Kernel.hh\"\n#include \"properties/Accent.hh\"\n\nusing namespace cadabra;\n\nExManip::ExManip("
  },
  {
    "path": "core/ExManip.hh",
    "chars": 1437,
    "preview": "#pragma once\n\n#include \"Storage.hh\"\n\nnamespace cadabra {\n\n\tclass Kernel;\n\n\tclass ExManip {\n\t\tpublic:\n\t\t\ttypedef Ex::iter"
  },
  {
    "path": "core/ExNode.cc",
    "chars": 13090,
    "preview": "\n#include \"ExNode.hh\"\n#include \"Cleanup.hh\"\n#include \"Exceptions.hh\"\n#include \"Algorithm.hh\"\n#include \"pythoncdb/py_kern"
  },
  {
    "path": "core/ExNode.hh",
    "chars": 5419,
    "preview": "\n#pragma once\n\n#include \"Kernel.hh\"\n#include \"Storage.hh\"\n#include \"IndexIterator.hh\"\n#include \"IndexClassifier.hh\"\n#inc"
  },
  {
    "path": "core/Exceptions.cc",
    "chars": 1299,
    "preview": "\n#include \"Exceptions.hh\"\n#include <iostream>\n\nCadabraException::CadabraException(std::string s)\n\t: std::logic_error(s)\n"
  },
  {
    "path": "core/Exceptions.hh",
    "chars": 2096,
    "preview": "\n#pragma once\n\n#include <stdexcept>\n#include <string>\n\nclass CadabraException : public std::logic_error {\n\tpublic:\n\t\tCad"
  },
  {
    "path": "core/Exchange.cc",
    "chars": 8946,
    "preview": "/*\n\nCadabra: a field-theory motivated computer algebra system.\nCopyright (C) 2001-2011  Kasper Peeters <kasper.peeters@a"
  },
  {
    "path": "core/Exchange.hh",
    "chars": 2585,
    "preview": "/*\n\nCadabra: a field-theory motivated computer algebra system.\nCopyright (C) 2001-2014  Kasper Peeters <kasper.peeters@p"
  },
  {
    "path": "core/Functional.cc",
    "chars": 1783,
    "preview": "\n#include \"Functional.hh\"\n\nnamespace cadabra {\n\n\tvoid do_list(const Ex& tr, Ex::iterator it, std::function<bool(Ex::iter"
  },
  {
    "path": "core/Functional.hh",
    "chars": 3629,
    "preview": "\n#pragma once\n\n#include <functional>\n#include \"Storage.hh\"\n\nnamespace cadabra {\n\n\t/// \\ingroup core\n\t///\n\t/// Apply a fu"
  },
  {
    "path": "core/Grouping.cc",
    "chars": 1497,
    "preview": "#include \"Grouping.hh\"\n#include \"Exceptions.hh\"\n#include \"Compare.hh\"\n#include <map>\n\ncadabra::equiv_map_t cadabra::grou"
  },
  {
    "path": "core/Grouping.hh",
    "chars": 863,
    "preview": "\n#pragma once\n\n#include \"Storage.hh\"\n#include <functional>\n\nnamespace cadabra {\n\n\t/// \\ingroup algorithms\n\t///\n\t/// Give"
  },
  {
    "path": "core/Hash.cc",
    "chars": 3793,
    "preview": "#include \"Hash.hh\"\n\n// Based on boost's implementation of hash_combine\n// <https://www.boost.org/doc/libs/1_54_0/doc/htm"
  },
  {
    "path": "core/Hash.hh",
    "chars": 1377,
    "preview": "#pragma once\n\n#include \"Storage.hh\"\n\nnamespace cadabra\n{\n\tenum HashFlags : unsigned int\n\t{\n\t\tHASH_DEFAULT = 0x0,\n\t\tHASH_"
  },
  {
    "path": "core/IndexClassifier.cc",
    "chars": 23203,
    "preview": "\n#include \"IndexClassifier.hh\"\n#include \"IndexIterator.hh\"\n#include \"Exceptions.hh\"\n#include \"Kernel.hh\"\n#include \"prope"
  },
  {
    "path": "core/IndexClassifier.hh",
    "chars": 3729,
    "preview": "\n#pragma once\n\n#include \"Kernel.hh\"\n#include \"Storage.hh\"\n#include \"Props.hh\"\n#include \"Compare.hh\"\n\n/// Class to deal w"
  },
  {
    "path": "core/IndexIterator.cc",
    "chars": 3597,
    "preview": "\n#include \"IndexIterator.hh\"\n#include \"properties/IndexInherit.hh\"\n\nusing namespace cadabra;\n\nindex_iterator::index_iter"
  },
  {
    "path": "core/IndexIterator.hh",
    "chars": 2407,
    "preview": "\n#pragma once\n\n#include \"Storage.hh\"\n#include \"Props.hh\"\n\nnamespace cadabra {\n\n\t/// \\ingroup core\n\t///\n\t/// An iterator "
  },
  {
    "path": "core/InstallPrefix.cc",
    "chars": 755,
    "preview": "\n#include \"Config.hh\"\n#include \"InstallPrefix.hh\"\n#include \"whereami.h\"\n#include <stdexcept>\n\nstd::string cadabra::insta"
  },
  {
    "path": "core/InstallPrefix.hh",
    "chars": 569,
    "preview": "\n#pragma once\n\n#include <string>\n\nnamespace cadabra {\n\n\t/// Return an absolute path to the installation path. This is\n\t/"
  },
  {
    "path": "core/Kernel.cc",
    "chars": 5758,
    "preview": "#include \"Kernel.hh\"\n#include \"PreClean.hh\"\n#include \"Cleanup.hh\"\n#include \"Parser.hh\"\n#include \"Config.hh\"\n\n// Default "
  },
  {
    "path": "core/Kernel.hh",
    "chars": 1448,
    "preview": "\n#pragma once\n\n#include <functional>\n#include \"Props.hh\"\n\n/// \\ingroup core\n///\n/// Cadabra kernel that keeps all state "
  },
  {
    "path": "core/Linear.cc",
    "chars": 1963,
    "preview": "\n#include \"Linear.hh\"\n\ntypedef cadabra::multiplier_t multiplier_t;\n\nbool linear::gaussian_elimination_inplace(std::vecto"
  },
  {
    "path": "core/Linear.hh",
    "chars": 2309,
    "preview": "\n#pragma once\n\n#include <numeric>\n#include <vector>\n#include <boost/numeric/ublas/matrix.hpp> \n#include <boost/numeric/u"
  },
  {
    "path": "core/MMACdb.cc",
    "chars": 4194,
    "preview": "\n\n#include \"Config.hh\"\n#include <boost/python.hpp>\n#include \"Functional.hh\"\n#include \"MMACdb.hh\"\n#include \"PreClean.hh\"\n"
  },
  {
    "path": "core/MMACdb.hh",
    "chars": 887,
    "preview": "\n#pragma once\n\n#include \"Props.hh\"\n#include \"Storage.hh\"\n#include \"Kernel.hh\"\n#include \"Stopwatch.hh\"\n\n#include \"wstp.h\""
  },
  {
    "path": "core/Media.cc",
    "chars": 154,
    "preview": "\n#include \"Media.hh\"\n\nLaTeXString::LaTeXString(const std::string& s)\n   : content(s)\n\t{\n\t}\n\nstd::string LaTeXString::lat"
  },
  {
    "path": "core/Media.hh",
    "chars": 166,
    "preview": "#pragma once\n\n#include <string>\n\nclass LaTeXString {\n\tpublic:\n\t\tLaTeXString(const std::string& );\n\t\t\n\t\tstd::string latex"
  },
  {
    "path": "core/MultiIndex.hh",
    "chars": 892,
    "preview": "\n#pragma once\n\n#include <vector>\n\n/// A class to help iterating over all values of multiple objects.\n/// Templated over "
  },
  {
    "path": "core/Multiplier.cc",
    "chars": 4328,
    "preview": "#include \"Multiplier.hh\"\n#include <exception>\n\nnamespace cadabra {\n\n\tMultiplier::Multiplier()\n\t\t: value(mpq_class(0))\n\t\t"
  },
  {
    "path": "core/Multiplier.hh",
    "chars": 2010,
    "preview": "#pragma once\n\n#include <iostream>\n#include <variant>\n#include <gmpxx.h>\n\nnamespace cadabra {\n\n\tclass Multiplier {\n\t\tpriv"
  },
  {
    "path": "core/NDSolver.cc",
    "chars": 5243,
    "preview": "\n#include \"NDSolver.hh\"\n#include \"Exceptions.hh\"\n#include \"Functional.hh\"\n#include \"NEvaluator.hh\"\n#include <boost/numer"
  },
  {
    "path": "core/NDSolver.hh",
    "chars": 2695,
    "preview": "#pragma once\n\n#include \"Storage.hh\"\n#include \"Compare.hh\"\n#include \"Exceptions.hh\"\n#include \"NTensor.hh\"\n#include \"NEval"
  },
  {
    "path": "core/NEvaluator.cc",
    "chars": 13185,
    "preview": "\n#include \"Compare.hh\"\n#include \"NEvaluator.hh\"\n#include \"NInterpolatingFunction.hh\"\n#include \"Exceptions.hh\"\n#include <"
  },
  {
    "path": "core/NEvaluator.hh",
    "chars": 3301,
    "preview": "\n#pragma once\n\n#include \"Storage.hh\"\n#include \"NTensor.hh\"\n#include \"Compare.hh\"\n#include <functional>\n\nnamespace cadabr"
  },
  {
    "path": "core/NIntegrator.cc",
    "chars": 825,
    "preview": "\n#include \"NIntegrator.hh\"\n#include <boost/math/quadrature/gauss_kronrod.hpp>\n\nusing namespace cadabra;\n\nNIntegrator::NI"
  },
  {
    "path": "core/NIntegrator.hh",
    "chars": 774,
    "preview": "#pragma once\n\n#include \"Storage.hh\"\n#include \"Compare.hh\"\n#include \"Exceptions.hh\"\n#include \"NTensor.hh\"\n#include \"NEval"
  },
  {
    "path": "core/NInterpolatingFunction.cc",
    "chars": 3642,
    "preview": "\n#include \"NInterpolatingFunction.hh\"\n#include \"Exceptions.hh\"\n\n// #define DEBUG 1\n\n#ifdef DEBUG\n#warning \"DEBUG enabled"
  },
  {
    "path": "core/NInterpolatingFunction.hh",
    "chars": 1188,
    "preview": "#pragma once\n\n#include \"NTensor.hh\"\n#include \"Storage.hh\"\n#include \"Compare.hh\"\n#include <vector>\n\nnamespace cadabra {\n\n"
  },
  {
    "path": "core/NTensor.cc",
    "chars": 10405,
    "preview": "#include \"NTensor.hh\"\n#include <stdexcept>\n#include \"Stopwatch.hh\"\n#include <cassert>\n#include <cmath>\n#include <string>"
  },
  {
    "path": "core/NTensor.hh",
    "chars": 3994,
    "preview": "\n#pragma once\n\n#include <vector>\n#include <iostream>\n#include <complex>\n\n/// \\ingroup numerical\n///\n/// Class to hold nu"
  },
  {
    "path": "core/Parser.cc",
    "chars": 12886,
    "preview": "/*\n\nCadabra: a field-theory motivated computer algebra system.\nCopyright (C) 2001-2014  Kasper Peeters <kasper.peeters@p"
  },
  {
    "path": "core/Parser.hh",
    "chars": 2526,
    "preview": "/*\n\nCadabra: a field-theory motivated computer algebra system.\nCopyright (C) 2001-2014  Kasper Peeters <kasper.peeters@p"
  },
  {
    "path": "core/Permutations.hh",
    "chars": 2480,
    "preview": "\n#pragma once\n\n#include <stdexcept>\n#include <vector>\n\n/// \\ingroup core\n///\n/// Generic permutation group material. Lar"
  },
  {
    "path": "core/PreClean.cc",
    "chars": 6805,
    "preview": "\n#include \"PreClean.hh\"\n#include \"Cleanup.hh\"\n\nnamespace cadabra {\n\n\tvoid pre_clean_dispatch(const Kernel& kernel, Ex& e"
  },
  {
    "path": "core/PreClean.hh",
    "chars": 1686,
    "preview": "\n#pragma once\n\n#include \"Algorithm.hh\"\n\n/// \\ingroup core\n///\n/// Handle the entire preclean stage, which turns a parsed"
  }
]

// ... and 1169 more files (download for full content)

About this extraction

This page contains the full source code of the kpeeters/cadabra2 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1369 files (21.6 MB), approximately 5.7M tokens, and a symbol index with 7407 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!