Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 1.7% on proxy.golang.org
Top 0.7% dependent packages on proxy.golang.org
Top 1.3% dependent repos on proxy.golang.org
Top 3.2% forks on proxy.golang.org
Top 1.7% docker downloads on proxy.golang.org

proxy.golang.org : github.com/dominikbraun/graph

Package graph is a library for creating generic graph data structures and modifying, analyzing, and visualizing them. A graph consists of vertices of type T, which are identified by a hash value of type K. The hash value for a given vertex is obtained using the hashing function passed to New. A hashing function takes a T and returns a K. For primitive types like integers, you may use a predefined hashing function such as IntHash – a function that takes an integer and uses that integer as the hash value at the same time: For storing custom data types, you need to provide your own hashing function. This example takes a City instance and returns its name as the hash value: Creating a graph using this hashing function will yield a graph of vertices of type City identified by hash values of type string. Adding vertices to a graph of integers is simple. graph.Graph.AddVertex takes a vertex and adds it to the graph. Most functions accept and return only hash values instead of entire instances of the vertex type T. For example, graph.Graph.AddEdge creates an edge between two vertices and accepts the hash values of those vertices. Because this graph uses the IntHash hashing function, the vertex values and hash values are the same. All operations that modify the graph itself are methods of Graph. All other operations are top-level functions of by this library. For detailed usage examples, take a look at the README.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/dominikbraun/graph
Keywords: algorithm, graph, graph-algorithms, graph-theory, graph-traversal, graph-visualization
License: Apache-2.0
Latest release: 11 months ago
First release: almost 2 years ago
Namespace: github.com/dominikbraun
Dependent packages: 159
Dependent repositories: 17
Stars: 1,309 on GitHub
Forks: 59 on GitHub
Docker dependents: 7
Docker downloads: 664,224
See more repository details: repos.ecosyste.ms
Last synced: 3 days ago

    Loading...
    Readme
    Loading...