[Lazarus] Generic Matrix "Class" for nice matrix formulas
paco at fe.up.pt
paco at fe.up.pt
Wed Mar 11 14:48:26 CET 2009
Quoting Paul Ishenin
> I see your matrix store double type value. Is it possible to write a
> generic matrix class using FPC class templates (although I never used
> FPC templates)?
While I think it is possible it doesn't seem a good idea in terms of
extra work versus the extra functionality:
I felt for that temptation with my C++ version and the code was ugly,
the declarations were ugly and the errors also become ugly. Worse, it
doesn't make sense for most types, integer times are not suited to
matrix operations like inversion and for the real types, extended is
becoming deprecated and the only contenders are doubles and floats.
I did a version using defines to create a float and a double version
but found out that I ended only using the double version...
Best regards,
Paulo Costa
More information about the Lazarus
mailing list