mios-1.2.1: A Minisat-based SAT solver in Haskell

Safe HaskellTrustworthy
LanguageHaskell2010

SAT.Solver.Mios.Data.Vec

Description

The fundamental data structure: Fixed Mutable Unboxed Int Vector

Synopsis

Documentation

type Vec = IOVector Int Source #

Costs of all operations are O(1)

sizeOfVector :: Vec -> IO Int Source #

returns the size of Vec

getNth :: Vec -> Int -> IO Int Source #

gets the nth value

setNth :: Vec -> Int -> Int -> IO () Source #

sets the nth value

swapBetween :: Vec -> Int -> Int -> IO () Source #

swaps two elements

modifyNth :: Vec -> (Int -> Int) -> Int -> IO () Source #

modify the nth value

setAll :: Vec -> Int -> IO () Source #

sets all elements

newVec :: Int -> IO Vec Source #

returns a new Vec

newVecWith :: Int -> Int -> IO Vec Source #

returns a new Vec filled with an Int

newSizedVecIntFromList :: [Int] -> IO Vec Source #

returns a new Vec from a [Int]

newSizedVecIntFromUVector :: Vector Int -> IO Vec Source #

returns a new Vec from a Unboxed Int Vector

vecGrow :: Vec -> Int -> IO Vec Source #

calls unasfeGrow