I do use it at one place, but that is a piece that needs overhaul anyway, and after that, they are gone there also. My impression is that you either want a double[][] array to dealw with, or a Matrix in itself.

Kim

Phil Steitz wrote:

Do you use the setXxx stuff anywhere or see any reason that we need to maintain it?

-----Original Message----- From: Kim van der Linde [mailto:[EMAIL PROTECTED] Sent: Mon 9/27/2004 11:21 AM To: Jakarta Commons Developers List Cc: Subject: Re: [math] API changes for RC2





        Phil Steitz wrote:
        
        > "Spooky" -- delightful word choice ;-)  The getDataRef  method is
        > there to limit copy operations and to support hacking the underlying
        > array -- evil, hazardous, breaks encapsulation -- altogether
        > "spooky"; but users may want this in some cases.
        
        I do:
        
        Matrix diffMatrix = new Matrix(cases, variables);
        double diffArray[][] = diffMatrix.getDataRef();
        double baseArray[][] = baseMatrix.getDataRef();
        //verbose(true, "Robust baseMatrix\n"+baseMatrix.toSquareString());
        for (int x = 0; x < cases; x++)
        {
           for (int y = 0; y < variables; y++)
           {
             diffArray[x][y] = baseArray[x][y] - robustMeans[y];
           }
        }
        //verbose(true, "Robust diffArray\n"+diffMatrix.toSquareString());
        robustDist = Distances.mahalanobis(diffMatrix, robustCovar);
        det = Math.sqrt(robustCovar.getDeterminant());
        
        Just an example.......
        
        Kim
        
        --
        http://www.kimvdlinde.com
        
        ---------------------------------------------------------------------
        To unsubscribe, e-mail: [EMAIL PROTECTED]
        For additional commands, e-mail: [EMAIL PROTECTED]
        
        



------------------------------------------------------------------------

---------------------------------------------------------------------
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