iota-0.1.0.0
Safe HaskellNone
LanguageGHC2021

Data.Graph.Unicyclic

Synopsis

Documentation

data UnicyclicComponents w Source #

Constructors

UnicyclicComponents 

Fields

buildUnicyclicComponents Source #

Arguments

:: Int

the number of vertices

-> Vector Int

next

-> UnicyclicComponents () 
>>> uni = buildUnicyclicComponents 5 $ U.fromList [1,2,0,0,4]
>>> numComponentsUC uni
2
>>> componentIDsUC uni
[0,0,0,0,1]
>>> onCycleUC uni
[True,True,True,False,True]

buildUnicyclicComponentsW Source #

Arguments

:: Unbox w 
=> Int

the number of vertices

-> Vector (Int, w)

(next, weight)

-> UnicyclicComponents w