Re: [eigen] Design for integrating different decomposition approaches |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Design for integrating different decomposition approaches
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Tue, 12 May 2009 22:10:59 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=4lSX1jUKgHbArS+3SKQ3umyIVJWZg33K4CVd6laYEdU=; b=GYt2umxKgPJB1a6E+HJBxll7y2R1M6llroiPzXdGhLsyDcarYmI+oiKA5u/rH8uhLm JjWGcg3PIlj6S1UK9EADwqoJnfWI9RUgpfExahFK6gEU2fhHV6XRR80iARSB2e6kVoQt gqKqSVfDmm12pUEB1IER1hOiA3U9QCNzWd2Ss=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=UAhXzyCm5Ec5/CCAVjTgH6B9jRlacchXVjsX29PmHxnfkqGoHy+kleHLxb2sL6992k WDroh5yAnxHFjQ9VZ/dVKAZMBnBuSoMoUPRuH96kOGjYPYQyyM/I+TkDF578doPZ9VPd I/gLtg2IatB7ArPjyInFwZ9MtM0uFL1r51g3M=
Just wanted to add that I don't want to sound too negative, we might
well end up doing as you propose, I just want to throw the other side
of the argument into the balance!
Benoit
2009/5/12, Benoit Jacob <jacob.benoit.1@xxxxxxxxx>:
> Hi,
>
> Thanks for your ideas,
>
> 2009/5/12, Hauke Heibel <hauke.heibel@xxxxxxxxxxxxxx>:
>> You could simply add a method in which you chose the type of
>> pivoting. This is probably not the best way to do it since the LU
>> interface might change or become invalid depending on the underlying
>> algorithm. What do you want for instance with two permutation
>> matrices, when only partial pivoting is performed?
>
> Yep, so indeed, at least at the level of implementation, LU and
> partial-pivoting-LU are two separate classes.
>
>> What if you could write
>>
>> LU<MatrixXf> lu_full;
>>
>> and have the well known Eigen interface of the LU decomposition
>> available but on top you could write as well
>>
>> LU<MatrixXf, Algorithms::PartialPivoting> lu_partial;
>
> This isn't more concise than:
> PartialPivotingLU<MatrixXf> lu_partial;
>
> and we haven't even considered the case where we're outside of
> namespace Eigen and thus you'd need Eigen:: twice.
>
> Actually I was considering naming the partial pivoting LU just
> "FastLU", what's your opinion? The idea is that it's faster but
> assumes you know what you are doing (it's only valid, basically, for
> invertible square matrices, as I wasn't going to bother about the
> rectangular case here which will only work either for m>=n or m<=n but
> not both).
>
> I'm also a bit reluctant about us taking the habit of exposing
> algorithm names as part of the API. Here it makes sense because they
> are really different decompositions with different APIs but in other
> cases, if the APIs are identical, better keep the choice of algorithm
> a private thing so we're free to switch to a better algorithm in the
> future.
>
>> Both cases were using the same concise naming and it were clear to the
>> user that both times she/he were dealing with an LU decomposition
>> while offering the correct interface.
>
> I'm not sure about this one: to me, it kind of suggests that LU<> is
> the same class in both cases, hence in particular offers the same API,
> which isn't going to be the case (partialpivoting won't have rank()
> for example).
>
> Cheers,
> Benoit
>