ac-library-hs-0.1.0.0: Data structures and algorithms
Safe HaskellNone
LanguageGHC2021

AtCoder.Internal.McfCsr

Description

Internal CSR for MinCostFlow.

Since: 1.0.0

Synopsis

Compressed sparse row

data Csr s cap cost #

CSR for min cost flow.

Since: 1.0.0

Constructors

Csr 

Fields

Constructor

build :: (HasCallStack, Num cap, Unbox cap, Unbox cost, Num cost, PrimMonad m) => Int -> Vector (Int, Int, cap, cap, cost) -> m (Vector Int, Csr (PrimState m) cap cost) #

\(O(n + m)\) Creates Csr.

Since: 1.0.0

Accessor

adj :: (HasCallStack, Num cap, Unbox cap, Unbox cost) => Csr s cap cost -> Int -> Vector (Int, Int, cost) #

\(O(1)\) Returns a vector of (to, rev, cost).

Since: 1.0.0