hPDB-1.2.0.2: Protein Databank file format library

Safe HaskellNone
LanguageHaskell98

Bio.PDB.Structure.List

Description

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

Synopsis

Documentation

type List a = Vector a Source

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) Int Source

Length of mutable vector.

empty :: Vector a Source

Empty vector.

last :: Vector a -> a Source

last on immutable vectors.

singleton :: a -> Vector a Source

Vector with a single element

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

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 -> a Source

foldl on immutable vectors.

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

foldl' on immutable vectors.

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

foldr on immutable vectors.

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

foldM on immutable vectors.

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

filter on immutable vectors.

length :: Vector a -> Int Source

length on immutable vectors.

defaultSize :: Num a => a Source

Default initial size of a mutable vector for structure contents.

residueVectorSize :: Num a => a Source

Default initial size of a mutable vector for residue contents.

chainVectorSize :: Num a => a Source

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 b Source

map on immutable vectors.

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

Indexing of an immutable vector.

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

Concatenation of two immutable

concat :: [Vector a] -> Vector a Source

Concatenation of a list of immutable vectors.

init :: Vector a -> Vector a Source

Remove last element of immutable vectors.

tail :: Vector a -> Vector a Source

Remove first element of immutable vector.

head :: Vector a -> a Source

First element of immutable vector.