algorithms-go/DataStructure/graph/undirected_graph.go
2021-04-07 18:13:02 +08:00

18 lines
221 B
Go

package graph
//无向图
type UnGraph struct {
graph
}
func NewUndirected() *UnGraph {
return &UnGraph{
graph{
edgesCount: 0,
edges: make(map[VertexId]map[VertexId]int),
isDirected: false,
},
}
}