func FormatGrid(g Graph) string {
	if g == nil {
		return "<nil>"
	}
	var b strings.Builder
	l := g.Len()
	for i := 0; i < l; i++ {
		for j := 0; j < l; j++ {
			if g.Has(uint(i), uint(j)) {
				b.WriteByte('*')
			} else {
				b.WriteByte('-')
			}
		}
		b.WriteByte('\n')
	}
	return b.String()
}
// FormatGrid formats the graph as a grid on multiple lines.
FormatGrid formats the graph as a grid on multiple lines.
// FormatGrid formats the graph as a grid on multiple lines .
func FormatGrid(g Graph) string {
	if g == nil {
		return "<nil>"
	}
	var b strings.Builder
	l := g.Len()
	for i := 0; i < l; i++ {
		for j := 0; j < l; j++ {
			if g.Has(uint(i), uint(j)) {
				b.WriteByte('*')
			} else {
				b.WriteByte('-')
			}
		}
		b.WriteByte('\n')
	}
	return b.String()
}
func FormatGrid ( g Graph ) string { if g == nil { return " " } var b strings . Builder l := g . Len ( ) for i := 0 ; i < l ; i ++ { for j := 0 ; j < l ; j ++ { if g . Has ( uint ( i ) , uint ( j ) ) { b . WriteByte ( '*' ) } else { b . WriteByte ( '-' ) } } b . WriteByte ( '\n' ) } return b . String ( ) }
FormatGrid formats the graph as a grid on multiple lines.
FormatGrid formats the graph as a grid on multiple lines .