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
LinearAlgebra[Modular][Swap] - swap data between two mod m Matrices or Vectors of the same datatype
Calling Sequence
Swap(m, ctype, A, B)
Parameters
m
-
modulus
A
mod m Matrix or Vector, including subspec
B
ctype
(optional) swap type
Description
The Swap function exchanges data between two mod m Matrices or Vectors.
Note that the dimensions of the object specified by A must match those specified for B.
In all cases, the datatype of the output object must match the datatype of the input object.
The ctype parameter is used to specify the type of swap to be performed. Valid options are upper for the upper triangular part of a Matrix, lower for the lower triangular part of a Matrix, and and for the corresponding copy operation without the diagonal.
Note: These swap types are only valid for square Matrices.
The Swap function allows the use of sub-Matrix and sub-Vector specifications for both input and output. For example, the function can be used to exchange a row of a Matrix with a row of another Matrix (or the same Matrix), or exchange data between a column in a Matrix and a row Vector.
Note: If A and B overlap, the behavior of Swap is undefined.
This command is part of the LinearAlgebra[Modular] package, so it can be used in the form Swap(..) only after executing the command with(LinearAlgebra[Modular]). However, it can always be used in the form LinearAlgebra[Modular][Swap](..).
Examples
Swap entire Matrices.
Exchange rows 1 and 4 in A.
Swap row vector and third column of A.
Swap transposed upper triangular part of A with self (in-place transpose).
See Also
LinearAlgebra/Details, LinearAlgebra[Modular], LinearAlgebra[Modular][Copy], LinearAlgebra[Modular][Create], LinearAlgebra[Modular][Fill], LinearAlgebra[Modular][subspec]
Download Help Document