/GraphInvariants.jl

A Julia package for computing graph invariants

Primary LanguageJuliaMIT LicenseMIT

GraphInvariants.jl

Dev Build Status Coverage Code Style: Blue ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

Overview

The goal of GraphInvariants.jl is to provide a wide range of functions for computing invariants on graphs, and is inspired by the GrinPy Python library.

GraphInvariants.jl computes invariants for any graph type that implements the Graphs.jl AbstractGraph interface.

Installation

Currently, GraphInvariants.jl is not a registered Julia package, but can be installed from this repository's URL:

pkg> add https://github.com/somacdivad/GraphInvariants.jl

We plan to register GraphInvariants.jl as soon as version 0.1.0 is released.

Basic use

To compute an invariant, pass an AbstractGraph object to the invariant's function. For instance, the following code creates a cycle graph on five vertices and computes its independence number:

julia> using Graphs

julia> using GraphInvariants

julia> g = cycle_graph(5)
{5, 5} undirected simple Int64 graph

julia> independence_number(g)
2

Documentation

The full documentation is a work in progress, but is available on GitHub Pages. You can also access documentation for methods using Julia's help system.

Project Status

This project is still in its early stages. We plan to implement the following invariants for the version 0.1.0 release:

  • Chromatic number
  • Clique number
  • Independence number
  • Domination number
  • Total domination number
  • Connected domination number
  • Independent domination number
  • Matching number

More invariants will be added in later versions, including:

  • Zero forcing number
  • Topological indices, like the Randić and Zagreb indices
  • Residue
  • And more...