Have you tried to invert it? Maybe it works already. There is a generic inv
in base/linalg/generic.jl. You'll have to define a one method for you type
and maybe also a zero method.


2014-03-25 15:14 GMT+01:00 James Crist <[email protected]>:

> I have a type I've defined. It's not a number, but it has all arithmetic
> operations defined for it. Is there a way to calculate the inverse of a
> matrix of a user defined type? For example, if I was to define:
>
> a = [mytype(1) mytype(2); mytype(3) mytype(4)]
> b = inv(a)
>
> Looking through base, there doesn't seem to be a way to find inverses of
> non-numeric matrices (although I may be missing it). For my case, even a
> simple algorithm that only works well for small matrices (<10x10) would be
> more than sufficient. If a way for doing this doesn't currently exist, I'll
> probably try to roll my own.
>



-- 
Med venlig hilsen

Andreas Noack Jensen

Reply via email to