Boost logo

Ublas :

Subject: [ublas] Question/request for matrix powers and other stuff
From: Daryle Walker (darylew_at_[hidden])
Date: 2008-09-26 03:22:38


1. I looked around at the Boost uBLAS documentation for this but I
couldn't find it. Is there a "pow" function or similar that can
return a given integer power of a square matrix? (It could use
binary exponentiation to do its work. The exponent could be a type
given as a type-based template parameter and checked with traits. If
the exponent value is negative, then find the inverse of the matrix
and work from there, generating an error of non-invertible matrices.)

2. Is there a matrix type with Boolean elements? I worked around
that my making my own GF(2) representation type and using it with the
uBLAS class templates. Is using a type that doesn't represent real
or complex numbers supported? I wonder if there could be such GF(2)
vector and matrix types, maybe the elements can be compacted into
single bits.

(I'm developing a type that implement linear transformations of
binary objects as matrices, so repeated applications of a particular
transformation would be implemented as a power. I originally tried
to develop my own compact-bit vector and matrix class templates, but
thought it was too much to test it and my main code, so I made a [non-
compact] GF(2) class and wrapped uBLAS around that.)

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com