public boolean convert( ChessboardCornerGraph cluster , GridInfo info ) {
		// default to an invalid value to ensure a failure doesn't go unnoticed.
		info.reset();

		// Get the edges in a consistent order
		if( !orderEdges(cluster) )
			return false;

		// Now we need to order the nodes into a proper grid which follows right hand rule
		if( !orderNodes(cluster.corners,info) )
			return false;

		// select a valid corner to be (0,0). If there are multiple options select the one which is
		int corner = selectCorner(info);
		if( corner == -1 ) {
			if( verbose != null) verbose.println("Failed to find valid corner.");
			return false;
		}
		// rotate the grid until the select corner is at (0,0)
		for (int i = 0; i < corner; i++) {
			rotateCCW(info);
		}

		return true;
	}
public boolean convert ( ChessboardCornerGraph cluster , GridInfo info ) { info . reset ( ) ; if ( ! orderEdges ( cluster ) ) return false ; if ( ! orderNodes ( cluster . corners , info ) ) return false ; int corner = selectCorner ( info ) ; if ( corner == - 1 ) { if ( verbose != null ) verbose . println ( "Failed to find valid corner." ) ; return false ; } for ( int i = 0 ; i < corner ; i ++ ) { rotateCCW ( info ) ; } return true ; }
Puts cluster nodes into grid order and computes the number of rows and columns. If the cluster is not
a complete grid this function will fail and return false

@param cluster (Input) cluster. Edge order will be modified.
@param info (Output) Contains ordered nodes and the grid's size.
@return true if successful or false if it failed