public void init ( DMatrixRMaj A ) { if ( A . numRows != A . numCols ) throw new IllegalArgumentException ( "Must be square" ) ; if ( A . numCols != N ) { N = A . numCols ; QT . reshape ( N , N , false ) ; if ( w . length < N ) { w = new double [ N ] ; gammas = new double [ N ] ; b = new double [ N ] ; } } // just copy the top right triangle QT . set ( A ) ; }
If needed declares and sets up internal data structures .