Update curr
prev = curr ; } } } return true ; } public static int [ ] GetRow ( int [ , ] matrix , int row ) { var rowLength = matrix . GetLength ( 1 ) ; var rowVector = new int [ rowLength ] ; for ( var i = 0 ; i < rowLength ; i ++ ) rowVector [ i ] = matrix [ row , i ] ; return rowVector ; } public static int [ , ] newTempIn ( int [ , ] points , int [ ] row1 , int [ ] row2 , int [ ] row3 ) { int [ , ] temp = new int [ points . GetLength ( 0 ) , points . GetLength ( 1 ) ] ; for ( var i = 0 ; i < row1 . Length ; i ++ ) { temp [ 0 , i ] = row1 [ i ] ; temp [ 1 , i ] = row2 [ i ] ; temp [ 2 , i ] = row3 [ i ] ; } return temp ; }