sorry, i mean ch.solveRight(eye(4)) fails with AOOB
On Wed, Jul 17, 2013 at 3:11 PM, Dmitriy Lyubimov <[email protected]> wrote: > if you have scala plugin installed in idea, i have this scala DSL module > added to mahout on this branch > https://github.com/dlyubimov/mahout-commits/tree/dev-0.9.x-scala > > > file > /home/dmitriy/projects/asf/mahout-commits/math-scala/src/test/scala/mahout/math/MatrixOpsTest.scala > > this test fails if used with chol(a, true) or if rightMultiply(eye(4)): > > test("chol") { > > // try to solve Ax=b with cholesky: > // this requires > // (LL')x = B > // L'x= (L^-1)B > // x=(L'^-1)(L^-1)B > > val a = dense((1, 2, 3), (2, 3, 4), (3, 4, 5.5)) > > // make sure it is symmetric for a valid solution > a := a.t %*% a > > printf("A= \n%s\n", a) > > val b = dense((9, 8, 7)).t > > printf("b = \n%s\n", b) > > // fails if chol(a,true) > val ch = chol(a) > > printf("L = \n%s\n", ch.getL) > > printf("(L^-1)b =\n%s\n", ch.solveLeft(b)) > > val x = ch.solveRight(eye(3)) %*% ch.solveLeft(b) > > printf("x = \n%s\n", x.toString) > > val axmb = (a %*% x) - b > > printf("AX - B = \n%s\n", axmb.toString) > > assert(axmb.norm < 1e-10) > > } > > > > > On Wed, Jul 17, 2013 at 2:28 PM, Ted Dunning <[email protected]>wrote: > >> These problems are very strange. >> >> I am now looking at the tests for Cholesky and it seems that they cover >> all >> of the sorts of things that you are talking about. >> >> I can fix the size compatibility test and will add a test that implements >> your other issue to see if that helps me understand what is happening. >> >> >> On Wed, Jul 17, 2013 at 1:02 PM, Dmitriy Lyubimov <[email protected]> >> wrote: >> >> > btw, another nitpicking, solveRight(eye(n) ) and solveLeft() do not >> check >> > for cardinality of argument, throwing ArrayOutOfBounds. yes the burden >> of >> > dumbness is on the user but the burden of explanation is on >> implementation >> > :) >> > >> > >
