Usage Guide

This guide shows how to use GraphLab.jl for various tasks.

Running Examples

The package includes example scripts in the GraphLab/examples/ directory. These scripts demonstrate how to use the package to benchmark and compare different graph partitioning methods.

To run these examples you need to clone the repo using the command:

git clone https://github.com/lechekhabm/GraphLab.jl

Quick Start Example

using GraphLab

A, coords = GraphLab.build_adjacency("network")
p = GraphLab.part_spectral(A)
GraphLab.draw_graph(A, coords, p, file_name="test.png")

A simple example demonstrating the usage of GraphLab.jl is available in this Google Colab notebook: Open in Colab.

Example 1: Comparing Partitioning Methods

Script: GraphLab.jl/examples/ex1.jl

This example compares different graph partitioning methods, including:

  • Coordinate Bisection
  • Inertial Bisection
  • Spectral Bisection
  • Bisection using METIS

The script evaluates these methods on a series of different graphs, providing insights into their performance and effectiveness.

Coordinate Bisection

Coordinate Bisection

Inertial Bisection

Inertial Bisection

Spectral Bisection

Spectral Bisection

METIS Bisection

METIS

How to Run Example 1

  1. Navigate to the examples directory:

    cd GraphLab.jl/examples
  2. Run the example script in the Julia or directly from the terminal:

    julia ex1.jl

Example 2: Recursive Bisection

Script: GraphLab.jl/examples/ex2.jl

This example demonstrates recursive bisection using different methods, including:

  • Coordinate Bisection
  • Inertial Bisection
  • Spectral Bisection
  • Recursive Bisection using METIS K-way
Recursive Coordinate Bisection

Recursive Coordinate Bisection

Recursive Inertial Bisection

Recursive Inertial Bisection

Recursive Spectral Bisection

Recursive Spectral Bisection

Recursive METIS Bisection

Recursive METIS Bisection (K-way is also available)

How to Run Example 2

  1. Navigate to the examples directory:

    cd GraphLab.jl/examples
  2. Run the example script in the Julia or directly from the terminal:

    julia ex2.jl