Hi Phil,

With the 1 base system, I keep casting back and forth between the 0 based underlying java system and the 1 based matrix system. But only in selected cases, not as a general rule. It also requires me to make specific methods just to increase the row number by one, as the method returns them at the 0 based system. This happens always as soon as you use a matrix or array by itsself and with matrcies combined, as I do. The fact that java uses the "0-based" notation anyways conflicts with the mathematical notation.... Why not stay with that....???

As most methods in the RealMatrixImpl return a RealMatrix and NOT a RealMatrixImpl, the methods need to be in the RealMAtrix itself also. There is no option to create a RealMatrixImpl directly from a RealMatrix, and requires casting around with new RealMatrixImpl(RealMAtrix.getArray()); MatrixUtil depends on how... But results in a lot of cating around also unless implemented as static's....

Kim

Phil Steitz wrote:
I need to understand better exactly what the problem is with the indexing. I don't see anything wrong with the current implementation. The element accessor methods use standard matrix notation, which starts with index = 1 in each case. The methods that provide access to copies of the underlying double[][] arrays are for efficiency and return arrays which are correctly sized to hold the matrix data. I would be -1 to changing the matrix accessor methods (getEntry, setEntry, getRow, getColumn) to be "0-based" as this conflicts with standard mathematical notation.

I am OK with adding the additional methods above to (post 1.0) RealMatrixImpl or a MatrixUtils class.

Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- http://www.kimvdlinde.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to