gmath  0.3 About: Gnome-Python mathematical environment  Fossies Dox: gmath-0.3.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)
GMath_global_dict.py
Go to the documentation of this file.
1 ## GMatH, a Gnome Mathematical Interface
2 ## Copyright (C) 1999-2000 Hassan Aurag
3
4 ## This program is free software; you can redistribute it and/or modify
6 ## the Free Software Foundation; either version 2 of the License, or
7 ## (at your option) any later version.
8
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
13
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
18 #This is the tree of help
19 #I hope it will expand, as soon as I clean the code a bit.
20
21 ARRAY_DICT={
22  "Construction": "Arrays can be constructed from lists or tuples.<br>A list is an element of the form [1,3,4], and a tuple is an element of the form (1,2,3).<br>Example: vector = array((1,2,3,4)),<br> matrix = array(([0,1],[1,3]))",
23  "Shape": "The function somearray.shape returns the shape of an array which is the number of dimensions and extent of each dimension.<b> Example: matrix = array(([0,1],[2,3]))<br>\tmatrix.shape returns (2,2).",
24  "Operations": "Usual operations on arrays can be made.<br>Note however that multiplying two arrays is not like doing the dot product.<br>The result will be the matrix obtained by element multiplication."
25  }
26
27 UNIV_FUNS = {
28  "Overview": "Universal functions (ufuncs) are functions which operate on arrays and other sequences.",
29  "Example": "Issue:<br>print greater([1,2,4,5],[5,4,3,2]).<br>You will obtain:<br>\t[0,0,1,1]"
30  }
31
32 RAND_ARRAY = {
33  "Random Matrix": "One can create for example a random 5x5 matrix using:<br>\trandom((5,5)).",
34  "Uniform distribution": "Example:<br>\tuniform(-1.0,1.0,(5,))<br> will create a random 5-vector with uniform distribution",
35  "Other Examples": "To create a random integer 4x2 matrix:<br>\trandint(10,20,(4,2))."
36  }
37
38 LINEAR_ALG = {
39  "Overview": "The usual function like inverse, eigenvalues, eigenvectors are defined and more."
40  }
41
42 FFT = {
43  "Overview": "Fourier transforms are implemented too. Use fft(data) and inverse_fft(data) to perform these operations."
44  }
45
46 OVERVIEW= {
47  "TensorProduct": "TensorProduct is a funcion that allows you to compute the tensor product of any number of matrices.<br>Usage is:<br>TensorProduct(a,b,c,...)!",
48  "Matrix": "<p>One create matrices by issuing the array command.</p><br><p>The array command takes a list as argument eg:<br>array([[1,2],[3,1]]).</p>",
49  "Numbers": "<p>It is worth noting that numbers here act like C or Python numbers. So 1 is the integer 1 and 1/2 will give 0.</p><br><p>To avoid that, you should always use floats.</p>",
50  "Complex Numbers": "<p>Complex numbers are simple to use, eg:<br>To write 1.0 + 2.1*I where I*I = -1,<br>you would write: 1.0 + 2.1j.<br></p><br><p>However you should note that no space is allowed between the imaginary part and j.</p>",
51  "Definitions": "<p>You can call your numbers or expressions anything you like, eg:<br>a = 2.0, then b = 0.1j then do a*b/2 or something!</p>",
52  "Definitions of functions": "One usually defines functions in a natural way, except for indentation.</p><br><p>On one line it would look like 'def f(x): return x**2.</p><br><p>However most of the time, we wish to make intermediate computations each on one line then return result. The only rule in Python is that you MUST indent. The following example will hopefully make it clear.</p><br><code>"+"""def my_abs(x):\n\tif x > 0:\n\t\treturn x\n\telse:\n\t\treturn -x\n"""+"</code>"
53  }
54
55 PLOT = {
56  "Overview":"Basic plotting of functions have been implemented",
57  "Plot2D":"<h5>Plot2D(function, startx, starty, color='blue', legend= \"\", axis_labels = ['x', 'y'], linestyle=PLOT_LINE_SOLID, plotrange=None):</h5><br>The function argument can either be one defined function symbol like sin, or a list of those functions like [sin, cos, f,...] where f has of course already been defined.<br><br>color option can be one of the colors present in /usr/X11R6/lib/X11/rgb.txt.<br><br>axis_labels is clear.<br><br>linestyle is one of the line styles present in the beginning of gtkextra.py file.<br><br>plotrange is an optional argument like [y1, y2]. If not present, Plot2D will try its best to have a nice one.",
58  "Plot Window Interaction":"<ul><li>For now, by clicking in some part of your Plot Window, you will obtain in the status box at the bottom the exact coordinates!</li><li>The Zoom In Button allows you to zoom in.</li><li>The Zoom Out does the reverse.</li><li>There are however limits on how much you can zoom in or out!</li><li>The Window Manager's close button will only hide all the plot window!</li><li>Any plot page supports drag and drop, resizing of plots moving labels... Test it, it's nifty!</li></ul>"
59  }
60
61
62 NUMPY_REF = {"Numerical Python":"_H_T_M_L_"}