Re: [eigen] [PATCH] Toeplitz matrix specialization

[ Thread Index | Date Index | More Archives ]

2009/1/29 Keir Mierle <mierle@xxxxxxxxx>:
> On Thu, Jan 29, 2009 at 11:36 AM, Gael Guennebaud
> <gael.guennebaud@xxxxxxxxx> wrote:
>> On Thu, Jan 29, 2009 at 7:55 PM, Keir Mierle <mierle@xxxxxxxxx> wrote:
>>> On Thu, Jan 29, 2009 at 6:40 AM, Gael Guennebaud
>>> <gael.guennebaud@xxxxxxxxx> wrote:
>>>> Hi,
>>>> to start the debate I put some thougths on the wiki:
>>> The idea of making solveTriangular into Part::solve() sounds good to
>>> me. Right now the hetergeneous API for solving triangular systems is
>>> unfortunate. I vote to have solve() work as expected for triangular
>>> matrices with the same API as LU::solve, SVD::solve, QR::solve, etc
>>> (i.e. MyVec x; bool succeeded = my_triangular_mat.solve(b, &x);).
>>> Perhaps mymat.upperTriangular().solve(...)?
>> yes, exactly.
>>> Is there an excessive runtime cost to detecting a singular matrix in
>>> the triangular solver?
>> N comparisons, just like for Cholesky.
> Is it possible to have a bit to mark the martix as invertible by the
> user, to avoid the runtime cost? I.e. so that the check is optimized
> away when the bit is set. However, we should benchmark the cost of
> having the check to make sure it's high enough to want to remove.


We already have bits (which we control by calling
matrix.marked<someBit>()) for triangularness, unit-diagonal,
zero-diagonal, so why not one more bit, and I know I have a use case
in the LU solver where I can guarantee that my triangular expression
is invertible.


Mail converted by MHonArc 2.6.19+