puresat-0.1: Pure Haskell SAT-solver
Safe HaskellNone
LanguageHaskell2010

PureSAT.Vec

Synopsis

Documentation

data Vec s a Source #

newVec Source #

Arguments

:: Int

capacity

-> ST s (Vec s a) 

sizeofVec :: Vec s a -> ST s Int Source #

insertVec :: Vec s a -> a -> ST s (Vec s a) Source #

Insert at the end: push_back

The new vector may be returned. The vec is done such way, as we use it in mutable context already, so we don't need an extra STRef.

readVec :: Vec s a -> Int -> ST s a Source #

writeVec :: Vec s a -> Int -> a -> ST s () Source #

shrinkVec :: Vec s a -> Int -> ST s () Source #

Shrink vector. New size should be smaller than the current.