|
| Data.Vector.Generic.Mutable | | Portability | non-portable | | Stability | experimental | | Maintainer | Roman Leshchinskiy <rl@cse.unsw.edu.au> |
|
|
|
| Description |
| Generic interface to mutable vectors
|
|
| Synopsis |
|
|
|
| Documentation |
|
| class MVectorPure v a where | Source |
|
| Basic pure functions on mutable vectors
| | | Methods | | | Length of the mutable vector
| | | | :: v a | | | -> Int | starting index
| | -> Int | length of the slice
| | -> v a | | | Yield a part of the mutable vector without copying it. No range checks!
|
| | |
| | Instances | |
|
|
|
| Class of mutable vectors. The type m is the monad in which the mutable
vector can be transformed and a is the type of elements.
| | | Methods | | | Create a mutable vector of the given length. Length is not checked!
| | | | Create a mutable vector of the given length and fill it with an
initial value. Length is not checked!
| | | | Yield the element at the given position. Index is not checked!
| | | | Replace the element at the given position. Index is not checked!
| | | | Clear all references to external objects
| | | | Write the value at each position.
| | | | :: v a | target
| | -> v a | source
| | -> m () | | | Copy a vector. The two vectors may not overlap. This is not checked!
|
| | | | Grow a vector by the given number of elements. The length is not
checked!
|
| | Instances | |
|
|
|
| Yield a part of the mutable vector without copying it. Safer version of
unsafeSlice.
|
|
|
| Create a mutable vector of the given length. Safer version of
unsafeNew.
|
|
|
| Create a mutable vector of the given length and fill it with an
initial value. Safer version of unsafeNewWith.
|
|
|
| Yield the element at the given position. Safer version of unsafeRead.
|
|
|
| Replace the element at the given position. Safer version of
unsafeWrite.
|
|
|
| Copy a vector. The two vectors may not overlap. Safer version of
unsafeCopy.
|
|
|
| Grow a vector by the given number of elements. Safer version of
unsafeGrow.
|
|
|
| Create a new mutable vector and fill it with elements from the Stream.
The vector will grow logarithmically if the Size hint of the Stream is
inexact.
|
|
|
|
|
|
|
|
|
|
| Produced by Haddock version 2.4.2 |