next | previous | forward | backward | up | top | index | toc | home

inverse(Matrix) -- compute the inverse

Synopsis

Code

-- ../../../../../Macaulay2/m2/methods.m2:498-507
cacheValue = key -> f -> new CacheFunction from (x -> (
          c := try x.cache else x.cache = new CacheTable;
          if c#?key then (
               val := c#key;
               if class val === CacheFunction then (
                    remove(c,key);
                    c#key = val x)
               else val
               )
          else c#key = f x))
| symbol   class              value                                                   location of symbol
| ------   -----              -----                                                   ------------------                                  
| f      : FunctionClosure -- {*Function[../../../../../Macaulay2/m2/matrix1.m2:642:. ../../../../../Macaulay2/m2/methods.m2:498:20-498:20
| key    : Symbol          -- inverse                                                 ../../../../../Macaulay2/m2/methods.m2:498:13-498:13
| -- function f:
| -- ../../../../../Macaulay2/m2/matrix1.m2:642
| inverse Matrix := (cacheValue symbol inverse) ( m -> id_(target m) // m )