octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: improved QR & Cholesky updating


From: Jaroslav Hajek
Subject: Re: improved QR & Cholesky updating
Date: Wed, 21 Jan 2009 20:33:31 +0100

On Wed, Jan 21, 2009 at 7:35 PM, John W. Eaton <address@hidden> wrote:
> On 21-Jan-2009, Jaroslav Hajek wrote:
>
> | I'm not really sure. The point is that in this way, you have, in an
> | m-file, a clear indication that the qrupdate funcs are unavailable.
>
> I'd rather not scatter a lot of these checks all around the sources
> if we don't have to.  So what if it is suboptimal if the calculation
> can be done and the code in the .m files is cleaner?  If you want the
> better performance, then install the library that provides it.
>
> | Sometimes there may be better workarounds. For instance, the fix I
> | committed to fsolve is really simplistic; in fact, if qrupdate is not
> | available, it is better to not form the qr factorization explicitly at
> | all and simply pass the original jacobian to __dogleg__. This is
> | something I want to do eventually.
>
> Is it ever better to do that if qrupdate is available?  If so, then
> I think this feature should be selected via an option, and not because
> qrupdate is or is not available.
>
> | I think this rule applies in general - IMHO, if a functionality is not
> | available, it's better to disable a function than to provide a version
> | that always fails, because the former condition can be checked
> | gracefully and allows for possible workarounds.
>
> Doesn't try/catch also allow you to perform a check for functionality
> if you really must do it?

True, but it doesn't catch a warning, does it?

>
> Maybe we should improve the error messages for the missing functions
> as well.  Instead of just saying "foo: not available in this version
> of Octave" we should say "foo: not available because libfoo was not
> present when Octave was compiled".  Then maybe having the error makes
> more sense, because it tells users why the function is missing.
> Otherwise, they just think Octave sucks because it doesn't have the
> function they are trying to use.
>

OK, so where should the replacements go?
Putting them in the QR & Cholesky classes means writing replacement
code for 4 * 8 + 4 * 5 = 52 methods (OK, In fact only quarter and then
copy-paste-search-replace-adjust). I suppose writing generic
replacements directly in the DLD funcs would be simpler. Also, I'm
thinking of issuing a warning the first time any of the updating
function is run, only once.

What do you think?

cheers

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]