Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
DifferentialGeometry:-Tools[CalculationHistory]
Calling Sequence
CalculationHistory:-Update(S, exp)
CalculationHistory:-Get(S)
CalculationHistory:-Clear()
Parameters
S
-
an unassigned name or string
exp
any Maple expression
Description
The CalculationHistory module is a collection of three simple commands for storing and retrieving the results of intermediate calculations. The command Update(S, exp) stores the Maple expression exp in a table (called the HistoryTable) with table index S. Only the 10 most current values of exp are retained in the HistoryTable. The command Get(S) retrieves these values. The command Clear() clears all stored values in the HistoryTable.
At present, the commands Query/Indecomposable, Decompose and Nilradical use the CalculationHistory module and store intermediate results which can be recalled.
The number of calculations stored in the HistoryTable can be specified by the DifferentialGeometry:-Preferences command.
This command is part of the DifferentialGeometry:-Tools package, and so can be used in the form CalculationHistory:-Update(...) only after executing the commands with(DifferentialGeometry) and with(Tools) in that order. It can always be used in the long form DifferentialGeometry:-Tools:-CalculationHistory:-Update. The commands Get and Clear work the same way.
Examples
Example 1.
We begin with a simple example to illustrate the use of the three exports of the CalculationHistory module. The program Test computes the sum of squares of the first n integers. The Update command stores the individual terms in the sum.
Test := proc(n) local i, s, t; s := 0; for i to n do t := i^2; Tools:-CalculationHistory:-Update("Test", [i, t]); s := s + t; od; s end:
Run the program test.
Retrieve the calculated values from the HistoryTable -- only 10 values are stored.
Clear all calculated values.
Example 2.
The following example is taken from the help file for the LieAlgebras command Decompose. A critical step in the algorithm involves factoring a certain polynomial. This polynomial is stored in the HistoryTable under the index "Decompose."
Warning, the Lie algebra "Alg3:2" is decomposable but an explicit decomposition could not be constructed. See CalculationHistory and rerun Decompose with optional argument hint.
To perform the decomposition of the algebra, a factorization of the polynomial -1/2 + _z1^2 is required. We perform this factorization by hand and rerun the DecomposeLieAlgebra program using the hint option to pass the program the information it needs.
See Also
DifferentialGeometry, LieAlgebras, Decompose, Preferences
Download Help Document