/** * @param out * @param id * @param level * @param sonID * @throws IOException */ public void outputAsDot( Writer out, String id, int level, int sonID ) throws IOException { if ( isLeaf() ) { GraphvizDot.writeVertex( id, getDotVertex( level, sonID, true ), out ); } else { GraphvizDot.writeVertex( id, getDotVertex( level, sonID, false ), out ); for ( int i = 0; i < 4; ++i ) { QTree<T> child = children[i]; if ( child != null ) { String newID = id + i; child.outputAsDot( out, newID, level + 1, i ); GraphvizDot.writeEdge( id, newID, null, out ); } } } }