private void assignRandomLowerTriangularMatrix(int n,SecureRandom sr){
  numRows=n;
  numColumns=n;
  length=(n + 31) >>> 5;
  matrix=new int[numRows][length];
  for (int i=0; i < numRows; i++) {
    int q=i >>> 5;
    int r=i & 0x1f;
    int s=31 - r;
    r=1 << r;
    for (int j=0; j < q; j++) {
      matrix[i][j]=sr.nextInt();
    }
    matrix[i][q]=(sr.nextInt() >>> s) | r;
    for (int j=q + 1; j < length; j++) {
      matrix[i][j]=0;
    }
  }
}

private void assignRandomLowerTriangularMatrix ( int n , SecureRandom sr ) { numRows = n ; numColumns = n ; length = ( n + 31 ) > > > 5 ; matrix = new int [ numRows ] [ length ] ; for ( int i = 0 ; i < numRows ; i ++ ) { int q = i > > > 5 ; int r = i & 0x1f ; int s = 31 - r ; r = 1 << r ; for ( int j = 0 ; j < q ; j ++ ) { matrix [ i ] [ j ] = sr . nextInt ( ) ; } matrix [ i ] [ q ] = ( sr . nextInt ( ) > > > s ) | r ; for ( int j = q + 1 ; j < length ; j ++ ) { matrix [ i ] [ j ] = 0 ; } } }
create a nxn random lower triangular matrix .
