Idris2Doc : Data.ArrayVect

Data.ArrayVect

(source)

Definitions

dataArrayVect : Nat->Type->Type
  A fixed-length vector.

The constructors are the source-level specification. The exported
operations below are transformed during code generation so transformed
producers and consumers use `IArray` as their runtime representation.
Complexity notes on operations describe that transformed runtime path.

Totality: total
Visibility: export
Constructors:
Nil : ArrayVect0a
(::) : a->ArrayVectna->ArrayVect (Sn) a

Hints:
Applicative (ArrayVectn)
Eqa=>Eq (ArrayVectna)
Foldable (ArrayVectn)
Functor (ArrayVectn)
Orda=>Ord (ArrayVectna)
Showa=>Show (ArrayVectna)
fromVect : Vectna->ArrayVectna
  Runtime after transform: O(n). Allocates n array elements.

Totality: total
Visibility: export
toVect : ArrayVectna->Vectna
  Runtime after transform: O(n). Allocates an n-element `Vect`.

Totality: total
Visibility: export
fromList : (xs : Lista) ->ArrayVect (lengthxs) a
  Runtime after transform: O(n). Allocates n array elements.

Totality: total
Visibility: export
toList : ArrayVectna->Lista
  Runtime after transform: O(n). Allocates n list cons cells.

Totality: total
Visibility: export
empty : ArrayVect0a
  Runtime after transform: O(1). Allocates an empty array.

Totality: total
Visibility: export
singleton : a->ArrayVect1a
  Runtime after transform: O(1). Allocates a one-element array.

Totality: total
Visibility: export
replicate : (n : Nat) ->a->ArrayVectna
  Runtime after transform: O(n). Allocates n array elements.

Totality: total
Visibility: export
generate : (n : Nat) -> (Finn->a) ->ArrayVectna
  Runtime after transform: O(n), plus callback cost. Allocates n array elements.

Totality: total
Visibility: export
iterate : (n : Nat) -> (a->a) ->a->ArrayVectna
  Runtime after transform: O(n), plus callback cost. Allocates n array elements.

Totality: total
Visibility: export
length : ArrayVectna->Nat
  Runtime after transform: O(1). Allocates nothing.

Totality: total
Visibility: export
null : ArrayVectna->Bool
  Runtime after transform: O(1). Allocates nothing.

Totality: total
Visibility: export
index : Finn->ArrayVectna->a
  Runtime after transform: O(1). Allocates nothing.

Totality: total
Visibility: export
head : ArrayVect (Sn) a->a
  Runtime after transform: O(1). Allocates nothing.

Totality: total
Visibility: export
tail : ArrayVect (Sn) a->ArrayVectna
  Runtime after transform: O(n) for a tail of length n.
Allocates n array elements.

Totality: total
Visibility: export
map : (a->b) ->ArrayVectna->ArrayVectnb
  Runtime after transform: O(n), plus callback cost. Allocates n array elements.

Totality: total
Visibility: export
mapWithIndex : (Finn->a->b) ->ArrayVectna->ArrayVectnb
  Runtime after transform: O(n), plus callback cost. Allocates n array elements.

Totality: total
Visibility: export
updateAt : Finn-> (a->a) ->ArrayVectna->ArrayVectna
  Runtime after transform: O(n), plus callback cost.
Copies the whole array and allocates n array elements.

Totality: total
Visibility: export
replaceAt : Finn->a->ArrayVectna->ArrayVectna
  Runtime after transform: O(n).
Copies the whole array and allocates n array elements.

Totality: total
Visibility: export
(++) : ArrayVectma->ArrayVectna->ArrayVect (m+n) a
  Runtime after transform: O(m + n). Allocates m + n array elements.

Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 7
take : (m : Nat) ->ArrayVect (m+n) a->ArrayVectma
  Runtime after transform: O(1). Allocates nothing and reuses the array prefix.

Totality: total
Visibility: export
drop : (m : Nat) ->ArrayVectna->ArrayVect (minusnm) a
  Runtime after transform: O(n `minus` m). Allocates n `minus` m array elements.

Totality: total
Visibility: export
zipWith : (a->b->c) ->ArrayVectna->ArrayVectnb->ArrayVectnc
  Runtime after transform: O(n), plus callback cost. Allocates n array elements.

Totality: total
Visibility: export
foldr : (a->acc->acc) ->acc->ArrayVectna->acc
  Runtime after transform: O(n), plus callback cost. Allocates nothing.

Totality: total
Visibility: export
foldl : (acc->a->acc) ->acc->ArrayVectna->acc
  Runtime after transform: O(n), plus callback cost. Allocates nothing.

Totality: total
Visibility: export
filter : (a->Bool) ->ArrayVectna-> (m : Nat**ArrayVectma)
  Runtime after transform: O(n), plus predicate cost.
Allocates an n-slot result buffer; the returned vector length is the number retained.

Totality: total
Visibility: export
mapMaybe : (a->Maybeb) ->ArrayVectna-> (m : Nat**ArrayVectmb)
  Runtime after transform: O(n), plus callback cost.
Allocates an n-slot result buffer; the returned vector length is the number produced.

Totality: total
Visibility: export
equals : Eqa=>ArrayVectna->ArrayVectna->Bool
  Runtime after transform: O(n) worst case. Allocates nothing.

Totality: total
Visibility: export
compare : Orda=>ArrayVectna->ArrayVectna->Ordering
  Runtime after transform: O(n) worst case. Allocates nothing.

Totality: total
Visibility: export