Mir vs. Numpy: Reworked!

Igor Shirkalin isemsoft at gmail.com
Thu Dec 10 11:39:30 UTC 2020


On Monday, 7 December 2020 at 13:54:26 UTC, Ola Fosheim Grostad 
wrote:
> On Monday, 7 December 2020 at 13:48:51 UTC, jmh530 wrote:
>> On Monday, 7 December 2020 at 13:41:17 UTC, Ola Fosheim 
>> Grostad wrote:
>>> On Monday, 7 December 2020 at 13:17:47 UTC, jmh530 wrote:
>>>> [snip]
>>>>
>>>> "no need to calculate inverse matrix" What? Since when?
>>>
>>> I dont know what he meant in this context, but a common 
>>> technique in computer graphics is to build the inverse as as 
>>> you apply computations.
>>
>> Ah, well if you have a small matrix, then it's not so hard to 
>> calculate the inverse anyway.
>
> It is an optimization, maybe also for accuracy, dunno.
> So, instead of ending up with a transform from coordinate 
> system A to B, you also get the transform from B to A for 
> cheap. This may matter when the next step is to go from B to 
> C... And so on...

A good example is a Simplex method for linear programming. It can 
be done such as you have to calculate inverse [m x m] matrix 
every step. Better, make a transform from one inverse matrix to 
another, that speeds up algorithm from O(3) to O(2) and even 
more. You don't even need to calculate the first inverse matrix 
if the algorithm is built in such a way that it is trivial. It is 
just one example.


More information about the Digitalmars-d-announce mailing list