Asymptotic theory (statistics): Difference between revisions
en>Jncraton →Estimators: replacing html list with wiki list using AWB |
|||
Line 1: | Line 1: | ||
{{Infobox Software | |||
| name = SymbolicC++ | |||
| logo = | |||
| screenshot = | |||
| caption = | |||
| developer = Yorick Hardy, Willi-Hans Steeb and Tan Kiat Shi | |||
| latest_release_version = 3.35 | |||
| latest_release_date = {{release date and age|2010|09|15}} | |||
| programming language = [[C++]] | |||
| operating_system = [[Cross-platform]] | |||
| genre = [[Mathematical software]] | |||
| license = [[GNU General Public License|GPL]] | |||
| website = http://issc.uj.ac.za/symbolic/symbolic.html | |||
}} | |||
'''SymbolicC++''' is a general purpose [[computer algebra system]] embedded in the programming language [[C++]]. It is [[free software]] released under the terms of the [[GNU General Public License]]. SymbolicC++ is used by including a C++ header file or by linking against a library. | |||
== Examples == | |||
<source lang="cpp"> | |||
#include <iostream> | |||
#include "symbolicc++.h" | |||
using namespace std; | |||
int main(void) | |||
{ | |||
Symbolic x("x"); | |||
cout << integrate(x+1, x); // => 1/2*x^(2)+x | |||
Symbolic y("y"); | |||
cout << df(y, x); // => 0 | |||
cout << df(y[x], x); // => df(y[x],x) | |||
cout << df(exp(cos(y[x])), x); // => -sin(y[x])*df(y[x],x)*e^cos(y[x]) | |||
return 0; | |||
} | |||
</source> | |||
The following program fragment inverts the matrix | |||
<math> | |||
\begin{pmatrix} | |||
\cos\theta & \sin\theta\\ | |||
-\sin\theta & \cos\theta | |||
\end{pmatrix} | |||
</math> | |||
symbolically. | |||
<source lang="cpp"> | |||
Symbolic theta("theta"); | |||
Symbolic R = ( ( cos(theta), sin(theta) ), | |||
( -sin(theta), cos(theta) ) ); | |||
cout << R(0,1); // sin(theta) | |||
Symbolic RI = R.inverse(); | |||
cout << RI[ (cos(theta)^2) == 1 - (sin(theta)^2) ]; | |||
</source> | |||
The output is | |||
<pre> | |||
[ cos(theta) −sin(theta) ] | |||
[ sin(theta) cos(theta) ] | |||
</pre> | |||
The next program illustrates non-commutative symbols in SymbolicC++. Here <code>b</code> is a Bose [[annihilation operator]] and <code>bd</code> is a Bose [[creation operator]]. The variable <code>vs</code> denotes the [[vacuum state]] <math>|0\rangle</math>. The <code>~</code> operator toggles the commutativity of a variable, i.e. if <code>b</code> is commutative that <code>~b</code> is non-commutative and if <code>b</code> is non-commutative <code>~b</code> is commutative. | |||
<source lang="cpp"> | |||
#include <iostream> | |||
#include "symbolicc++.h" | |||
using namespace std; | |||
int main(void) | |||
{ | |||
// The operator b is the annihilation operator and bd is the creation operator | |||
Symbolic b("b"), bd("bd"), vs("vs"); | |||
b = ~b; bd = ~bd; vs = ~vs; | |||
Equations rules = (b*bd == bd*b + 1, b*vs == 0); | |||
// Example 1 | |||
Symbolic result1 = b*bd*b*bd; | |||
cout << "result1 = " << result1.subst_all(rules) << endl; | |||
cout << "result1*vs = " << (result1*vs).subst_all(rules) << endl; | |||
// Example 2 | |||
Symbolic result2 = (b+bd)^4; | |||
cout << "result2 = " << result2.subst_all(rules) << endl; | |||
cout << "result2*vs = " << (result2*vs).subst_all(rules) << endl; | |||
return 0; | |||
} | |||
</source> | |||
Further examples can be found in the books listed below.<ref> | |||
Steeb, W.-H. (2010). | |||
''Quantum Mechanics Using Computer Algebra, second edition,'' | |||
World Scientific Publishing, Singapore. | |||
</ref><ref> | |||
Steeb, W.-H. (2008). | |||
''The Nonlinear Workbook: Chaos, Fractals, Cellular Automata, Neural Networks, Genetic Algorithm, Gene Expression Programming, Wavelets, Fuzzy Logic with C++, Java and SymbolicC++ Programs, fourth edition,'' | |||
World Scientific Publishing, Singapore. | |||
</ref><ref> | |||
Steeb, W.-H. (2007). | |||
''Continuous Symmetries, Lie Algebras, Differential Equations and Computer Algebra, second edition,'' | |||
World Scientific Publishing, Singapore. | |||
</ref><ref name="symcpp3"/> | |||
== History == | |||
SymbolicC++ is described in a series of books on [[computer algebra]]. The first book<ref>Tan Kiat Shi and Steeb, W.-H. (1997). ''SymbolicC++: An introduction to Computer Algebra Using Object-Oriented Programming'' Springer-Verlag, Singapore.</ref> described the first version of SymbolicC++. In this version the main data type for symbolic computation was the <code>Sum</code> class. The list of available classes included | |||
* <code>Verylong</code> : An unbounded [[integer]] implementation | |||
* <code>Rational</code> : A template class for [[rational number]]s | |||
* <code>Quaternion</code> : A template class for [[quaternion]]s | |||
* <code>Derive</code> : A template class for [[automatic differentiation]] | |||
* <code>Vector</code> : A template class for vectors (see [[vector space]]) | |||
* <code>Matrix</code> : A template class for matrices (see [[matrix (mathematics)]]) | |||
* <code>Sum</code> : A template class for symbolic expressions | |||
Example: | |||
<source lang="cpp"> | |||
#include <iostream> | |||
#include "rational.h" | |||
#include "msymbol.h" | |||
using namespace std; | |||
int main(void) | |||
{ | |||
Sum<int> x("x",1); | |||
Sum<Rational<int> > y("y",1); | |||
cout << Int(y, y); // => 1/2 yˆ2 | |||
y.depend(x); | |||
cout << df(y, x); // => df(y,x) | |||
return 0; | |||
} | |||
</source> | |||
The second version<ref>Tan Kiat Shi, Steeb, W.-H. and Hardy, Y (2000). ''SymbolicC++: An Introduction to Computer Algebra using Object-Oriented Programming, 2nd extended and revised edition,'' Springer-Verlag, London.</ref> of SymbolicC++ featured new classes such as the <code>Polynomial</code> class and initial support for simple integration. Support for the algebraic computation of [[Clifford algebras]] was described in using SymbolicC++ in 2002.<ref>Fletcher, J.P. (2002). Symbolic Processing of Clifford Numbers in C++ <br>in Doran C., Dorst L. and Lasenby J. (eds.) ''Applied Geometrical Algebras in computer Science and Engineering AGACSE 2001'', Birkhauser, Basel. | |||
<br>http://www.ceac.aston.ac.uk/research/staff/jpf/papers/paper25/index.php</ref> Subsequently support for Gröbner bases was added.<ref>Kruger, P.J.M (2003). ''Gröbner bases with Symbolic C++'', M. Sc. Dissertation, Rand Afrikaans University.</ref> | |||
The third version<ref name="symcpp3">Hardy, Y, Tan Kiat Shi and Steeb, W.-H. (2008). ''Computer Algebra with SymbolicC++'', World Scientific Publishing, Singapore.</ref> features a complete rewrite of SymbolicC++ and was released in 2008. This version encapsulates all symbolic expressions in the <code>Symbolic</code> class. | |||
Newer versions are available from the SymbolicC++ [http://issc.uj.ac.za/symbolic/symbolic.html website]. | |||
==See also== | |||
*[[Comparison of computer algebra systems]] | |||
*[[GiNaC]] | |||
== References == | |||
<!--- See [[Wikipedia:Footnotes]] on how to create references using <ref></ref> tags which will then appear here automatically --> | |||
{{Reflist}} | |||
== External links == | |||
* {{Official website|http://issc.uj.ac.za/symbolic/symbolic.html}} | |||
* [http://issc.uj.ac.za/downloads/problems/advancedP.pdf Programming exercises in SymbolicC++] | |||
{{Computer algebra systems}} | |||
{{DEFAULTSORT:Symbolicc}} | |||
[[Category:Free computer algebra systems]] | |||
[[Category:Free software programmed in C++]] | |||
[[Category:C++ libraries]] |
Revision as of 17:59, 12 November 2013
SymbolicC++ is a general purpose computer algebra system embedded in the programming language C++. It is free software released under the terms of the GNU General Public License. SymbolicC++ is used by including a C++ header file or by linking against a library.
Examples
#include <iostream>
#include "symbolicc++.h"
using namespace std;
int main(void)
{
Symbolic x("x");
cout << integrate(x+1, x); // => 1/2*x^(2)+x
Symbolic y("y");
cout << df(y, x); // => 0
cout << df(y[x], x); // => df(y[x],x)
cout << df(exp(cos(y[x])), x); // => -sin(y[x])*df(y[x],x)*e^cos(y[x])
return 0;
}
The following program fragment inverts the matrix symbolically.
Symbolic theta("theta");
Symbolic R = ( ( cos(theta), sin(theta) ),
( -sin(theta), cos(theta) ) );
cout << R(0,1); // sin(theta)
Symbolic RI = R.inverse();
cout << RI[ (cos(theta)^2) == 1 - (sin(theta)^2) ];
The output is
[ cos(theta) −sin(theta) ] [ sin(theta) cos(theta) ]
The next program illustrates non-commutative symbols in SymbolicC++. Here b
is a Bose annihilation operator and bd
is a Bose creation operator. The variable vs
denotes the vacuum state . The ~
operator toggles the commutativity of a variable, i.e. if b
is commutative that ~b
is non-commutative and if b
is non-commutative ~b
is commutative.
#include <iostream>
#include "symbolicc++.h"
using namespace std;
int main(void)
{
// The operator b is the annihilation operator and bd is the creation operator
Symbolic b("b"), bd("bd"), vs("vs");
b = ~b; bd = ~bd; vs = ~vs;
Equations rules = (b*bd == bd*b + 1, b*vs == 0);
// Example 1
Symbolic result1 = b*bd*b*bd;
cout << "result1 = " << result1.subst_all(rules) << endl;
cout << "result1*vs = " << (result1*vs).subst_all(rules) << endl;
// Example 2
Symbolic result2 = (b+bd)^4;
cout << "result2 = " << result2.subst_all(rules) << endl;
cout << "result2*vs = " << (result2*vs).subst_all(rules) << endl;
return 0;
}
Further examples can be found in the books listed below.[1][2][3][4]
History
SymbolicC++ is described in a series of books on computer algebra. The first book[5] described the first version of SymbolicC++. In this version the main data type for symbolic computation was the Sum
class. The list of available classes included
Verylong
: An unbounded integer implementationRational
: A template class for rational numbersQuaternion
: A template class for quaternionsDerive
: A template class for automatic differentiationVector
: A template class for vectors (see vector space)Matrix
: A template class for matrices (see matrix (mathematics))Sum
: A template class for symbolic expressions
Example:
#include <iostream>
#include "rational.h"
#include "msymbol.h"
using namespace std;
int main(void)
{
Sum<int> x("x",1);
Sum<Rational<int> > y("y",1);
cout << Int(y, y); // => 1/2 yˆ2
y.depend(x);
cout << df(y, x); // => df(y,x)
return 0;
}
The second version[6] of SymbolicC++ featured new classes such as the Polynomial
class and initial support for simple integration. Support for the algebraic computation of Clifford algebras was described in using SymbolicC++ in 2002.[7] Subsequently support for Gröbner bases was added.[8]
The third version[4] features a complete rewrite of SymbolicC++ and was released in 2008. This version encapsulates all symbolic expressions in the Symbolic
class.
Newer versions are available from the SymbolicC++ website.
See also
References
43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.
External links
Template:Computer algebra systems
- ↑ Steeb, W.-H. (2010). Quantum Mechanics Using Computer Algebra, second edition, World Scientific Publishing, Singapore.
- ↑ Steeb, W.-H. (2008). The Nonlinear Workbook: Chaos, Fractals, Cellular Automata, Neural Networks, Genetic Algorithm, Gene Expression Programming, Wavelets, Fuzzy Logic with C++, Java and SymbolicC++ Programs, fourth edition, World Scientific Publishing, Singapore.
- ↑ Steeb, W.-H. (2007). Continuous Symmetries, Lie Algebras, Differential Equations and Computer Algebra, second edition, World Scientific Publishing, Singapore.
- ↑ 4.0 4.1 Hardy, Y, Tan Kiat Shi and Steeb, W.-H. (2008). Computer Algebra with SymbolicC++, World Scientific Publishing, Singapore.
- ↑ Tan Kiat Shi and Steeb, W.-H. (1997). SymbolicC++: An introduction to Computer Algebra Using Object-Oriented Programming Springer-Verlag, Singapore.
- ↑ Tan Kiat Shi, Steeb, W.-H. and Hardy, Y (2000). SymbolicC++: An Introduction to Computer Algebra using Object-Oriented Programming, 2nd extended and revised edition, Springer-Verlag, London.
- ↑ Fletcher, J.P. (2002). Symbolic Processing of Clifford Numbers in C++
in Doran C., Dorst L. and Lasenby J. (eds.) Applied Geometrical Algebras in computer Science and Engineering AGACSE 2001, Birkhauser, Basel.
http://www.ceac.aston.ac.uk/research/staff/jpf/papers/paper25/index.php - ↑ Kruger, P.J.M (2003). Gröbner bases with Symbolic C++, M. Sc. Dissertation, Rand Afrikaans University.