monus-weighted-search-0.1.0.0: Efficient search weighted by an ordered monoid with monus.
Copyright(c) Donnacha Oisín Kidney 2021
Maintainermail@doisinkidney.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

MonusWeightedSearch.Internal.AdjList

Description

This module provides an implementation of weighted graphs as arrays of words. It's useful for generating random graphs, and performance testing.

Synopsis

Documentation

newtype AdjList Source #

A graph with vertices labelled by words, and edges weighted by words.

Constructors

AdjList 

Fields

Instances

Instances details
Eq AdjList Source # 
Instance details

Defined in MonusWeightedSearch.Internal.AdjList

Methods

(==) :: AdjList -> AdjList -> Bool #

(/=) :: AdjList -> AdjList -> Bool #

Ord AdjList Source # 
Instance details

Defined in MonusWeightedSearch.Internal.AdjList

Show AdjList Source # 
Instance details

Defined in MonusWeightedSearch.Internal.AdjList

Arbitrary AdjList Source # 
Instance details

Defined in MonusWeightedSearch.Internal.AdjList

NFData AdjList Source # 
Instance details

Defined in MonusWeightedSearch.Internal.AdjList

Methods

rnf :: AdjList -> () #

randAdjList Source #

Arguments

:: Word

Edge Density (as a percentage)

-> Word

Size

-> IO AdjList 

Generate a random graph.

alSize :: AdjList -> Word Source #

Return the number of vertices in the graph.

toGraph :: AdjList -> Graph Word Source #

Convert an adjacency list to a standard graph.

fromGraph Source #

Arguments

:: Word

The number of vertices in the graph.

-> Graph Word

The graph.

-> AdjList 

Convert a graph to an adjacency list.