Maple für Professional
Maple für Akademiker
Maple für Studenten
Maple Personal Edition
Maple Player
Maple Player für iPad
MapleSim für Professional
MapleSim für Akademiker
Maple T.A. - Testen & beurteilen
Maple T.A. MAA Placement Test Suite
Möbius - Online-Courseware
Machine Design / Industrial Automation
Luft- und Raumfahrt
Fahrzeugtechnik
Robotics
Energiebranche
System Simulation and Analysis
Model development for HIL
Anlagenmodelle für den Regelungsentwurf
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematikausbildung
Technik
Allgemein- und berufsbildende Schulen
Testen und beurteilen
Studierende
Finanzmodelle
Betriebsforschung
Hochleistungsrechnen
Physik
Live-Webinare
Aufgezeichnete Webinare
Geplante Veranstaltungen
MaplePrimes
Maplesoft-Blog
Maplesoft-Mitgliedschaft
Maple Ambassador Program
MapleCloud
Technische Whitepapers
E-Mail Newsletters
Maple-Bücher
Math Matters
Anwendungs-Center
MapleSim Modell-Galerie
Anwenderberichte
Exploring Engineering Fundamentals
Lehrkonzepte mit Maple
Maplesoft Welcome-Center
Resource-Center für Lehrer
Help-Center für Studierende
LinearAlgebra[Modular][AddMultiple] - add multiple of a mod m Matrix or Vector to another
Calling Sequence
AddMultiple(m, mult, A, B, order, 'sparse')
AddMultiple(m, mult, A, B, C, 'sparse')
Parameters
m
-
modulus
A
Matrix or Vector, including subspec
B
order
ordering of output object
sparse
(optional) controls behavior of operation
mult
(optional) multiplier, default is 1
C
output Matrix or Vector, including subspec
Description
The AddMultiple function performs the operation placing the output in a new object, or in C, depending on calling sequence. All of A, B, and C must be mod m Matrices or Vectors, and mult must be a scalar.
The first calling sequence returns a new mod m Matrix or Vector for the result with the specified ordering, order, or the ordering of the input objects A and B.
Note: If A and B have different ordering, order must be specified.
The second calling sequence places the output of the computation into C, returning NULL.
Note: The parameter C can be the same Matrix or Vector as A or B as long as the operation is performed with direct overlap. For example, if A and C are the same Matrix, the operation involving the entry must have the result going to .
The multiplier, mult, is an optional parameter. However, if it is not specified, it is assumed to be 1. The multiplier must be in the range . This function can be used to perform Matrix or Vector subtraction by the selection of . This is coded efficiently, that is, without multiplication.
If specified, the optional keyword 'sparse', is only applicable if the multiplier is not or and the datatype is a hardware datatype. It indicates that the algorithm checks for zero entries before performing multiplications. This typically provides an efficiency gain if matrices have 10% or more entries in B equal to zero. This is not implemented for the integer datatype, as it typically provides very little gain.
Note: In cases for which sparse does not apply but has been specified, the option is ignored.
The AddMultiple function allows the use of sub-Matrix and sub-Vector specifications for both input and output Matrices or Vectors. For example, the function can be used to add a row of a Matrix to a row Vector, placing the result in the column of another Matrix.
Note: If the used portion of A or B, and C overlap, but not directly, the behavior of AddMultiple is undefined.
This command is part of the LinearAlgebra[Modular] package, so it can be used in the form AddMultiple(..) only after executing the command with(LinearAlgebra[Modular]). However, it can always be used in the form LinearAlgebra[Modular][AddMultiple](..).
Examples
Default multiplier and new output Matrix (A+B).
Chosen multiplier of 2 (A+2*B).
Replace A with the result.
Add row 3 of A to row 2 of A, with output in column 1 of B.
Construct a larger Matrix and identity Matrix, using larger modulus.
Time addition of 327*B to A 2000 times.
Time addition of 327*B to A 2000 times using sparse.
See Also
LinearAlgebra/Details, LinearAlgebra[Modular], LinearAlgebra[Modular][Mod], LinearAlgebra[Modular][subspec]
Download Help Document