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
tensor[compare] - compare two objects each of which can be a tensor_type, spin coefficient table or a curvature component table.
Calling Sequence
compare( U, V)
Parameters
U, V
-
U and V can be any of tensor_type, spin coefficient table or curvature component table. See the help file for the tensor package for the explanation of the structures of the three types of objects mentioned above.
Description
This function compares the input parameters U and V with the restriction that both of them must be one of the three recognized structures.
If they are not of the same structure, then this routine reports the structure each has.
If they are both spin coefficient tables or both curvature component table, then the routine compares each pair of corresponding elements of U and V, and returns the sequence of indices of unmatching elements.
If U and V are both tensor_types, then this routine first compares their ranks, dimensions, then characters and returns an appropriate flag if detects any distinction. If U and V share the same rank, dimension, and character then compare() goes on to compare each "independently defined" corresponding pair of components of the two tensor_types as well as the indexing functions of the component arrays. compare() then returns the sequence of the indices of the unmatching components, and the name 'indexfunc' if the two component arrays have different indexing functions.
The name 'Identical' is returned if U and V are found identical in each aspect checked.
Simplification :
compare() has one simplifier, `tensor/compare/simp`, used to simplify the difference of each pair of corresponding components/elements of the two objects being compared. The simplified difference is then checked if vanishing or not.
`tensor/compare/simp` is initialized to `tensor/simp`, but it is recommended that it be customized to suit the needs of a particular comparison.
Caution : When compare() reports that two objects differ in a set of their components/elements, what it really means is that the employed simplifier fails to simplify the pairwise differences of those reported components. The user is hence advised to double check with another simplifier (more powerful presumably) or by inspecting each pair of the reported components.
This function is part of the tensor package, and can be used in the form compare(..) only after performing the command with(tensor), or with(tensor, compare). The function can always be accessed in the long form tensor[compare].
Examples
Note here that neither V nor Z has independently defined components. The various 0's and 1's in the two tensor_types come from the respective indexing functions in the component arrays and that is why compare() only returns indexfunc. See the following example for more details.
See Also
tensor
Download Help Document