Skip to content

A teeny-tiny project for creating graph layouts driven by edge weights.

Notifications You must be signed in to change notification settings

Aliath/graphmaker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphmaker

Tiny project to build graph layout by edge weights.

edges := []graphmaker.Edge{
    {source: "A", target: "B", weight: 5},
    {source: "A", target: "C", weight: 5 * math.Sqrt(2)},
    {source: "A", target: "D", weight: 5},

    {source: "B", target: "C", weight: 5},
    {source: "B", target: "D", weight: 5 * math.Sqrt(2)},

    {source: "C", target: "D", weight: 5},
}

nodeIdentifiers := []string{"A", "B", "C", "D"}

result, _ := graphmaker.BuildGraph(edges, nodeIdentifiers)

fmt.Println(result) // [{0 0 A} {5 0 B} {5.000000000000001 -5 C} {7.105427357601002e-16 -5.000000000000001 D}]

About

A teeny-tiny project for creating graph layouts driven by edge weights.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages