Re: [ojAlgo-user] Strange matrix multiplication problem
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2007-12-10 21:01:31
|
Can you send me code that reproduce the problem? You have to "copy" the history of the matrices you use in that multiplication. It matters how the they were created. /Anders On 10 dec 2007, at 17.49, Anders Peterson wrote: > On 10 dec 2007, at 14.20, Tor Erik Askeland wrote: > >> Hi, >> >> I'm quite new to ojAlgo and I'm trying to do a matrix multiplication. >> >> Here is the snippet of code I'm trying to run: >> >> r = sx.multiplyRight(currentState); >> r = r.add(sxPrev.multiplyRight(previousState)); >> >> Where sx is 12x2, currentState is 2x1, sxPrev is 12x2 and >> previousState is 2x1. They are all the type PrimitiveMatrix, but I'm >> just using the BasicMatrix interface. R is a BasicMatrix by the way. >> >> This should result in r being a vector of size 12x1, but the computer >> just hangs on the first line and doesn't run past it. > > Never experienced "just hanging" with ojAlgo. Can you step through > the code in the debugger to see what happens? > > Does using multiplyLeft instead work? > > r = currentState.multiplyLeft(sx); > > /Anders > > >> The second line does however run properly if the first line is >> commented out. >> >> Have anyone got any suggestions to what the problem might be? >> >> >> Tor Erik >> >> >> --------------------------------------------------------------------- >> ---- >> SF.Net email is sponsored by: >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> ojAlgo-user mailing list >> ojA...@li... >> https://lists.sourceforge.net/lists/listinfo/ojalgo-user >> >> > |