toysolver-0.3.0: Assorted decision procedures for SAT, Max-SAT, PB, MIP, etc

Copyright(c) Masahiro Sakai 2014
LicenseBSD-style
Maintainermasahiro.sakai@gmail.com
Stabilityprovisional
Portabilitynon-portable (BangPatterns, FlexibleContexts, ScopedTypeVariables)
Safe HaskellNone
LanguageHaskell2010

ToySolver.Internal.Data.Vec

Contents

Description

Simple 1-dimentional resizable array

Synopsis

Vec type

data GenericVec a e Source

Instances

Eq (GenericVec a e) 

Constructors

new :: MArray a e IO => IO (GenericVec a e) Source

clone :: MArray a e IO => GenericVec a e -> IO (GenericVec a e) Source

Operators

getSize :: MArray a e IO => GenericVec a e -> IO Int Source

Get the internal representation array

read :: MArray a e IO => GenericVec a e -> Int -> IO e Source

write :: MArray a e IO => GenericVec a e -> Int -> e -> IO () Source

unsafeRead :: MArray a e IO => GenericVec a e -> Int -> IO e Source

unsafeWrite :: MArray a e IO => GenericVec a e -> Int -> e -> IO () Source

resize :: MArray a e IO => GenericVec a e -> Int -> IO () Source

growTo :: MArray a e IO => GenericVec a e -> Int -> IO () Source

push :: MArray a e IO => GenericVec a e -> e -> IO () Source

unsafePop :: MArray a e IO => GenericVec a e -> IO e Source

clear :: MArray a e IO => GenericVec a e -> IO () Source

getElems :: MArray a e IO => GenericVec a e -> IO [e] Source

Low-level operators

getArray :: GenericVec a e -> IO (a Index e) Source

Get the internal representation array

getCapacity :: MArray a e IO => GenericVec a e -> IO Int Source

Get the internal representation array

resizeCapacity :: MArray a e IO => GenericVec a e -> Int -> IO () Source

Pre-allocate internal buffer for n elements.