Boost logo

Ublas :

Subject: Re: [ublas] Question/request for matrix powers and other stuff
From: Daryle Walker (darylew_at_[hidden])
Date: 2008-10-21 16:18:52

On Oct 21, 2008, at 3:25 PM, Gunter Winkler wrote:

> In general you can use the following procedure:
> given: square matrix A
> compute a the jacobi matrix A = X^T J X
> compute J^n
> compute A^n = X^T J^n X
> The main problem is the first step which requires the solution of a
> generalized eigenvalue problem ...

So, does uBLAS supply a jacobi-matrix function?

> BTW: Why do you want to compute A^n ? Maybe there is a chance to
> avoid this.

The code I'm adapting sometimes enters a LOT of zero-values in a
row. The original author realized that, since inserting a zero can
be expressed as a linear transformation, using the matrix form and
raising it to a power can _save_ time over inserting each zero
manually. (The original author used a bit-packing scheme for the GF
(2) matrices involved, which I'll add later.) The manual method is
by definition linear on the number of zeros added. Using matrices
and powers, especially with square-and-multiply, should represent a
savings when the length gets long enough.

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