Safe Haskell | None |
---|---|
Language | GHC2021 |
Data.Graph.Unicyclic
Synopsis
- data UnicyclicComponents w = UnicyclicComponents {
- numComponentsUC :: !Int
- componentIDsUC :: !(Vector Int)
- onCycleUC :: !(Vector Bool)
- inverseUC :: !(SparseGraph w)
- buildUnicyclicComponents :: Int -> Vector Int -> UnicyclicComponents ()
- buildUnicyclicComponentsW :: Unbox w => Int -> Vector (Int, w) -> UnicyclicComponents w
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 |