From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8c8550b9f2cf7d40 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-07 23:53:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.airnews.net!cabal12.airnews.net!usenet From: "John R. Strohm" Newsgroups: comp.lang.ada Subject: Re: Is ther any sense in *= and matrices? Date: Sun, 8 Jun 2003 01:46:22 -0500 Organization: Airnews.net! at Internet America Message-ID: References: Abuse-Reports-To: abuse at airmail.net to report improper postings NNTP-Proxy-Relay: library2.airnews.net NNTP-Posting-Time: Sun, 08 Jun 2003 01:52:00 -0500 (CDT) NNTP-Posting-Host: !^?H+1k-WkreJYi (Encoded at Airnews!) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Xref: archiver1.google.com comp.lang.ada:38824 Date: 2003-06-08T01:46:22-05:00 List-Id: "Russ" <18k11tm001@sneakemail.com> wrote in message news:bebbba07.0306071138.6bf9784f@posting.google.com... > Preben Randhol wrote in message news:... > > Vinzent Hoefler wrote: > > > Preben Randhol wrote: > > > > > >>Vinzent Hoefler wrote: > > >>> Of course it is. But because you have to write the Multiply function > > >>> yourself anyway and such can take care of that issue, I don't see why > > >>> this should be a problem. > > >> > > >>Because it doesn't make sense mathematically. > > > > > > Dividing by zero doesn't make sense either. So IMO that's what the > > > Constraint_Error is for. > > > > The Contraint_Error here is for that *= would return a C (m x n) which > > differes from the A (n x n). So *= is only usefule (/= too) in special > > cases such as square matrix. Therefore you must make a function Prod > > (A,B) at any rate and the *= will be of no use as Prod (A,B) is > > general. > > "*=" is not so useful for multipying non-square matrices. However, it > is very useful for multiplying a matrix (or a vector) by a scalar. For > example, > > A *= 2.0 > > can be used to multiply matrix A by two in place. This is potentially > more efficient than A := A * 2 for all the same reasons discussed with > respect to "+=". With all due respect, ladies and gentlemen, it has been known for a very long time that the difference in "efficiency" between A := A + B and A += B is lost in the noise floor compared to the improvements that can be gotten by improving the algorithms involved. And I'd be REALLY interested to know what you are doing with matrix multiplication such that the product of a matrix and a scalar is the slightest bit interesting. (Usually, when I'm multiplying matrices, I'm playing with direction cosine matrices, and I don't recall ever hearing about any use for multiplying a DCM by a scalar.)