private static Vec getColumn ( Matrix x ) { Vec t ; for ( int i = 0 ; i < x . cols ( ) ; i ++ ) { t = x . getColumn ( i ) ; if ( t . dot ( t ) > 0 ) return t ; } throw new ArithmeticException ( "Matrix is essentially zero" ) ; }
Returns the first non zero column