hPDB-0.9999: Protein Databank file format library

Safe HaskellNone

Bio.PDB.Structure.List

Description

Collections used within the Structure, currently aliases for the Vector and MVector types.

Synopsis

Documentation

type List a = Vector aSource

Type alias for a immutable sequence of elements.

data TempList m a Source

Type alias for a mutable sequence of elements.

Instances

initialNew :: Int -> ST m (TempList m a)Source

Allocate initial space for a new mutable vector.

new :: MonadTrans t => Int -> t (ST m) (TempList m a)Source

Create a new mutable vector.

add :: MonadTrans t => TempList s a -> a -> t (ST s) ()Source

Appends an element to a mutable vector.

finalize :: MonadTrans t => TempList s a -> t (ST s) (Vector a)Source

Finalizes a mutable vector, and returns immutable vector. [Does it shrink allocated space?]

tempLength :: MonadTrans t1 => TempList s t -> t1 (ST s) IntSource

Length of mutable vector.

empty :: Vector aSource

Empty vector.

last :: Vector a -> aSource

last on immutable vectors.

singleton :: a -> Vector aSource

Vector with a single element

map :: (a -> b) -> Vector a -> Vector bSource

map on immutable vectors.

mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b)Source

mapM on immutable vectors.

foldl :: (a -> b -> a) -> a -> Vector b -> aSource

foldl on immutable vectors.

foldl' :: (a -> b -> a) -> a -> Vector b -> aSource

foldl' on immutable vectors.

foldr :: (a -> b -> b) -> b -> Vector a -> bSource

foldr on immutable vectors.

foldM :: Monad m => (a -> b -> m a) -> a -> Vector b -> m aSource

foldM on immutable vectors.

filter :: (a -> Bool) -> Vector a -> Vector aSource

filter on immutable vectors.

length :: Vector a -> IntSource

length on immutable vectors.

defaultSize :: Num a => aSource

Default initial size of a mutable vector for structure contents.

residueVectorSize :: Num a => aSource

Default initial size of a mutable vector for residue contents.

chainVectorSize :: Num a => aSource

Default initial size of a mutable vector for chain contents.

toList :: Vector a -> [a]Source

Conversion of an immutable vector to list.

vimap :: (Int -> a -> b) -> Vector a -> Vector bSource

map on immutable vectors.

(!) :: Vector a -> Int -> aSource

Indexing of an immutable vector.

(++) :: Vector a -> Vector a -> Vector aSource

Concatenation of two immutable

concat :: [Vector a] -> Vector aSource

Concatenation of a list of immutable vectors.

init :: Vector a -> Vector aSource

Remove last element of immutable vectors.

tail :: Vector a -> Vector aSource

Remove first element of immutable vector.

head :: Vector a -> aSource

First element of immutable vector.