public void printDualGraph ( ) { System . out . println ( "============= Dual" ) ; int l = BoofMiscOps . numDigits ( vertexes . size ) ; String format = "%" + l + "d" ; for ( Vertex n : vertexes . toList ( ) ) { ChessboardCorner c = corners . get ( n . index ) ; System . out . printf ( "[" + format + "] {%3.0f, %3.0f} -> 90[ " , n . index , c . x , c . y ) ; for ( int i = 0 ; i < n . perpendicular . size ( ) ; i ++ ) { Edge e = n . perpendicular . get ( i ) ; System . out . printf ( format + " " , e . dst . index ) ; } System . out . println ( "]" ) ; System . out . print ( " -> 180[ " ) ; for ( int i = 0 ; i < n . parallel . size ( ) ; i ++ ) { Edge e = n . parallel . get ( i ) ; System . out . printf ( format + " " , e . dst . index ) ; } System . out . println ( "]" ) ; } }
Prints the graph . Used for debugging the code .