8000 GitHub - gigaherz/GraphLib: A simple graph library that is generic but was designed for the use case of assembling block networks in Minecraft Mods
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A simple graph library that is generic but was designed for the use case of assembling block networks in Minecraft Mods

License

Notifications You must be signed in to change notification settings

gigaherz/GraphLib

Repository files navigation

GraphLib

GraphLib is a simple graph library that helps maintain networks of nodes, joining and splitting graphs as necessary. It was designed for use in Minecraft Mods' networks, but it can be used for any other purpose.

See LICENSE.txt for the usage terms.

Gradle

Include my maven repository in your gradle

repositories {
    maven {
        url 'http://dogforce-games.com/maven'
    }
}

And add the library as a dependency (no need for deobf)

dependencies {
    implementation "dev.gigaherz.graph:GraphLib3:3.0.5"
}

The library can be shaded (with relocation) or embedded through jar-in-jar. Refer to the corresponding documentation on the embedding system of your platform for details.

Usage

5DE6

GraphLib starts with the idea of GraphObjects. These are the nodes in the graph.

To build a graph, just connect GraphObjects to other GraphObjects. Graph.connect lets you create a single edge, while Graph.integrate lets you connect a node to a number of neighbours all at once.

The ConcurrentGraph class does the same, but using thread-safe logic.

A graph can optionally contain additional data belonging to the network. When present, this data must implement the Mergeable interface, which will be used when two networks are joined together.

About

A simple graph library that is generic but was designed for the use case of assembling block networks in Minecraft Mods

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages

0