Code Monkey home page Code Monkey logo

traces.jl's Introduction

Traces.jl : Graph canonical labeling and automorphism group computation

Simple Julia wrapper for traces of version 27r4.

Installation

Require gcc and a POSIX style build environment.

Add the package:

pkg.add("https://github.com/lidingxu/Traces.jl.git")

Example usage

Convert a Graph g to a nauty's SparseGraph, and return its canonical labelling (permutation), automophism (generators), orbits:

using Traces
using Graphs
g = Graph()
# add vertices and edges to g ...
canon_label, automorphism, orbit_class = Traces.traces(g, true, true)

API

Data structures

  • DEFAULTOPTIONS_TRACES : default options
  • TracesOptions : default constructor of options
  • TracesStats : default constructor of stats
  • SparseGraph: default constructor of traces' SparseGraph
  • tracesreturn: a struct containing return of traces, i.e., canonocial graph, generators, labels, partition, orbits, stats

Note: the index of Julia and Graph start at 1, the index of C and SparseGraph start at 0. See the user guide of nauty and traces for details about their data structure and function call.

Interfaces

  • backend_traces: a wrapper function call to C function Traces via ccall
  • backend_traces_with_automs: a wrapper function call to C function Traces_With_Automs via ccall

Helper methods

  • to_sparse: return a SparseGraph of Graphs, SimpleGraphs and MetaGraphs
  • traces: return readeable orbits, canonocial graph, generators (in cyclic representation), of Graphs/SimpleGraphs/MetaGraphs for given labels, parition

Warning: reuse of SparseGraph return by to_sparse may lead to a memory leak, because the memory allocated for the internal data structure may be released.

traces.jl's People

Contributors

lidingxu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.