Skip to content

emrebdr/tdag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tdag

Directed Acyclic Graph

This is a simple implementation of a directed acyclic graph (DAG) in Go. It is not meant to be a general purpose graph library, but rather a simple implementation of a DAG that can be used to build more complex graph libraries.

Usage

import "github.com/tosuninc/tdag"

// Create a new DAG
dag := tdag.New()

// Add a vertex to the DAG
vertex1, _ := dag.AddVertex("vertex1")

// Add another vertex to the DAG
vertex2, _ := dag.AddVertex("vertex2")

// Add an edge between the two vertices
edge, err := dag.AddEdge(vertex1, vertex2)

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments

Authors

About

Directed Acyclic Graph

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages