Tutorial Ginac
124 pages
English

Tutorial Ginac

Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
124 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

GiNaC 1.6.1An open framework for symbolic computation within the C++ programming language18 July 2011http://www.ginac.deCopyrightc 1999-2011 Johannes Gutenberg University Mainz, GermanyPermission is granted to make and distribute verbatim copies of this manual provided the copy-right notice and this permission notice are preserved on all copies.Permission is granted to copy and distribute modified versions of this manual under the condi-tions for verbatim copying, provided that the entire resulting derived work is distributed underthe terms of a permission notice identical to this one.iTable of ContentsGiNaC: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 11 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 21.1 License:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 22 A Tour of GiNaC : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 32.1 How to use it from within C++:::::::::::::::::::::::::::::::::::::::::::::::::::: 32.2 What it can do for you:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 43 Installation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 73.1 Prerequisites:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 73.2 Configuration::::::::::::: ...

Informations

Publié par
Nombre de lectures 22
Langue English

Extrait

GiNaC 1.6.1
An open framework for symbolic computation within the C++ programming language
18 July 2011
http://www.ginac.deCopyrightc 1999-2011 Johannes Gutenberg University Mainz, Germany
Permission is granted to make and distribute verbatim copies of this manual provided the copy-
right notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the condi-
tions for verbatim copying, provided that the entire resulting derived work is distributed under
the terms of a permission notice identical to this one.i
Table of Contents
GiNaC: : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 1
1 Introduction : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2
1.1 License:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 2
2 A Tour of GiNaC : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 3
2.1 How to use it from within C++:::::::::::::::::::::::::::::::::::::::::::::::::::: 3
2.2 What it can do for you:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4
3 Installation : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 7
3.1 Prerequisites:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7
3.2 Configuration::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 7
3.3 Building GiNaC::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 8
3.4 Installing:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 9
4 Basic concepts : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 10
4.1 Expressions:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10
4.1.1 Note: Expressions and STL containers::::::::::::::::::::::::::::::::::::::: 10
4.2 Automatic evaluation and canonicalization of expressions::::::::::::::::::::::::: 10
4.3 Error handling::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 11
4.4 The class hierarchy::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 12
4.5 Symbols:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 13
4.6 Numbers::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 16
4.6.1 Tests on numbers:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 17
4.6.2 Numeric functions::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 19
4.6.3 Converting numbers::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 21
4.7 Constants:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 21
4.8 Sums, products and powers::::::::::::::::::::::::::::::::::::::::::::::::::::::: 21
4.9 Lists of expressions::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 22
4.10 Mathematical functions::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 24
4.11 Relations:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 24
4.12 Integrals:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25
4.13 Matrices:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 25
4.14 Indexed objects::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 29
4.14.1 Indexed quantities and their indices::::::::::::::::::::::::::::::::::::::::: 29
4.14.2 Substituting indices:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 32
4.14.3 Symmetries:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 32
4.14.4 Dummy indices::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 34
4.14.5 Simplifying indexed expressions::::::::::::::::::::::::::::::::::::::::::::: 35
4.14.6 Predefined tensors:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 36
4.14.6.1 Delta tensor::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 36
4.14.6.2 General metric tensor:::::::::::::::::::::::::::::::::::::::::::::::::: 36
4.14.6.3 Minkowski metric tensor::::::::::::::::::::::::::::::::::::::::::::::: 37
4.14.6.4 Spinor metric tensor::::::::::::::::::::::::::::::::::::::::::::::::::: 37
4.14.6.5 Epsilon tensor::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 38
4.14.7 Linear algebra:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 38
4.15 Non-commutative objects:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 39ii
4.15.1 Clifford algebra::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 41
4.15.1.1 Dirac gamma matrices::::::::::::::::::::::::::::::::::::::::::::::::: 41
4.15.1.2 A generic Clifford algebra:::::::::::::::::::::::::::::::::::::::::::::: 43
4.15.2 Color algebra::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 45
4.16 Hash Maps:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 47
5 Methods and functions : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 48
5.1 Getting information about expressions:::::::::::::::::::::::::::::::::::::::::::: 48
5.1.1 Checking expression types::::::::::::::::::::::::::::::::::::::::::::::::::: 48
5.1.2 Accessing subexpressions:::::::::::::::::::::::::::::::::::::::::::::::::::: 50
5.1.3 Comparing:::::::::::::::::::::::::::::::::::::::::::::::::::::: 51
5.1.4 Ordering expressions::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 51
5.2 Numerical evaluation::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 52
5.3 Substituting expressions:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 53
5.4 Pattern matching and advanced substitutions::::::::::::::::::::::::::::::::::::: 54
5.4.1 Matching expressions:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 55
5.4.2 Matching parts of expressions:::::::::::::::::::::::::::::::::::::::::::::::: 57
5.4.3 Substituting expressions::::::::::::::::::::::::::::::::::::::::::::::::::::: 58
5.4.4 The option algebraic::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 58
5.5 Applying a function on subexpressions:::::::::::::::::::::::::::::::::::::::::::: 58
5.6 Visitors and tree traversal:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 61
5.7 Polynomial arithmetic:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 64
5.7.1 Testing whether an expression is a polynomial::::::::::::::::::::::::::::::: 64
5.7.2 Expanding and collecting:::::::::::::::::::::::::::::::::::::::::::::::::::: 64
5.7.3 Degree and coefficients::::::::::::::::::::::::::::::::::::::::::::::::::::::: 65
5.7.4 Polynomial division:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 66
5.7.5 Unit, content and primitive part::::::::::::::::::::::::::::::::::::::::::::: 66
5.7.6 GCD, LCM and resultant:::::::::::::::::::::::::::::::::::::::::::::::::::: 67
5.7.7 Square-free decomposition::::::::::::::::::::::::::::::::::::::::::::::::::: 67
5.7.8 Polynomial factorization::::::::::::::::::::::::::::::::::::::::::::::::::::: 68
5.8 Rational expressions:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 69
5.8.1 The normal method::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 69
5.8.2 Numerator and denominator::::::::::::::::::::::::::::::::::::::::::::::::: 69
5.8.3 Converting to a polynomial or rational expression:::::::::::::::::::::::::::: 69
5.9 Symbolic differentiation:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 70
5.10 Series expansion::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 71
5.11 Symmetrization::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 72
5.12 Predefined mathematical functions:::::::::::::::::::::::::::::::::::::::::::::: 74
5.12.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 74
5.12.2 Multiple polylogarithms:::::::::::::::::::::::::::::::::::::::::::::::::::: 75
5.13 Complex expressions:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 76
5.14 Solving linear systems of equations:::::::::::::::::::::::::::::::::::::::::::::: 77
5.15 Input and output of expressions::::::::::::::::::::::::::::::::::::::::::::::::: 77
5.15.1 Expression output:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 77
5.15.2 input::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 80
5.15.3 Compiling expressions to C function pointers::::::::::::::::::::::::::::::: 82
5.15.4 Archiving:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 83iii
6 Extending GiNaC : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 87
6.1 What doesn’t belong into GiNaC::::::::::::::::::::::::::::::::::::::::::::::::: 87
6.2 Symbolic functions::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 87
6.2.1 A minimal example:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 87
6.2.2 The cosine function:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 88
6.2.3 Function options:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 90
6.2.4 Fs with a variable number of arguments:::::::::::::::::::::::::::::: 91
6.3 GiNaC’s expression output system:::::::::::::::::::::::::::::::::::::::::::::::: 91
6.3.1 Print methods for classes:::::::::::::::::::::::::::::::::::::::::::::::::::: 92
6.3.2 Printds for functions:::::::::::::::::::::::::::::::::::::::::::::::::: 94
6.3.3 Adding new output form

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents