You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sebastien Brisard <se...@m4x.org> on 2011/08/03 07:48:01 UTC

[math] Utility classes for testing purposes

Hi,
I'm finalizing unit tests for the conjugate gradient method, for which I'm
using Hilbert matrices (see http://en.wikipedia.org/wiki/Hilbert_matrix).
These matrices are nice because
i. they are symmetric, positive definite,
ii. they are ill-conditioned,
iii. their inverse is known in closed-form.

I therefore implemented HilbertMatrix and InverseHilbertMatrix as
RealLinearOperator. These two classes are intended for testing purposes only,
but I do not want to embed them in ConjugateGradientTest, as they might be
used to test other iterative solvers as well. My question is simple: where
(meaning: which package) should these two classes go? Would o.a.c.math.linear
(in the src/test/java directory) be suitable? Any better suggestion?

Thanks beforehand,
Sebastien

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [math] Utility classes for testing purposes

Posted by Phil Steitz <ph...@gmail.com>.
On 8/2/11 10:48 PM, Sebastien Brisard wrote:
> Hi,
> I'm finalizing unit tests for the conjugate gradient method, for which I'm
> using Hilbert matrices (see http://en.wikipedia.org/wiki/Hilbert_matrix).
> These matrices are nice because
> i. they are symmetric, positive definite,
> ii. they are ill-conditioned,
> iii. their inverse is known in closed-form.
>
> I therefore implemented HilbertMatrix and InverseHilbertMatrix as
> RealLinearOperator. These two classes are intended for testing purposes only,
> but I do not want to embed them in ConjugateGradientTest, as they might be
> used to test other iterative solvers as well. My question is simple: where
> (meaning: which package) should these two classes go? Would o.a.c.math.linear
> (in the src/test/java directory) be suitable?

That would be fine, yes.

Phil
>  Any better suggestion?
>
> Thanks beforehand,
> Sebastien
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org