Skip to content

Emeline-1/basic_graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

basic_graph

This project implements a very basic graph in the Go Language.

It allows to:

  • Create a new instance of a graph,
  • Add edges to this graph,
  • And get all connected components of the graph.

Example

import ("basic_graph",
        "fmt")

g := graph.New ()
g.Add_edge ("node1", "node2")
g.Add_edge ("node1", "node3")
g.Add_edge ("node4", "node5")

g.Set_Iterator ()
for g.Next_connected_component() {
  fmt.Println (g.Connected_component ())
}

Expected output: ["node1", "node2", "node3"] , ["node4", "node5"]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages