Idris2Doc : Data.RRBVector.Unsized

Data.RRBVector.Unsized

(source)
Relaxed Radix Balanced Vectors (RRBVector)

Reexports

importpublic Data.RRBVector.Unsized.Internal

Definitions

empty : RRBVectora
  The empty vector. O(1)

Totality: total
Visibility: export
singleton : a->RRBVectora
  A vector with a single element. O(1)

Totality: total
Visibility: export
fromList : Lista->RRBVectora
  Create a new vector from a list. O(n)

Totality: total
Visibility: export
replicate : Nat->a->RRBVectora
  Creates a vector of length n with every element set to x. O(log n)

Totality: total
Visibility: export
toList : RRBVectora->Lista
  Convert a vector to a list. O(n)

Totality: total
Visibility: export
foldl : (b->a->b) ->b->RRBVectora->b
Totality: total
Visibility: export
foldr : (a->b->b) ->b->RRBVectora->b
Totality: total
Visibility: export
null : RRBVectora->Bool
  Is the vector empty? O(1)

Totality: total
Visibility: export
length : RRBVectora->Nat
  Return the size of a vector. O(1)

Totality: total
Visibility: export
lookup : Nat->RRBVectora->Maybea
  The element at the index or Nothing if the index is out of range. O(log n)

Totality: total
Visibility: export
index : Nat->RRBVectora->a
  The element at the index.
Calls 'idris_crash' if the index is out of range. O(log n)

Totality: total
Visibility: export
(!?) : RRBVectora->Nat->Maybea
  A flipped version of lookup. O(log n)

Totality: total
Visibility: export
(!!) : RRBVectora->Nat->a
  A flipped version of index. O(log n)

Totality: total
Visibility: export
update : Nat->a->RRBVectora->RRBVectora
  Update the element at the index with a new element.
If the index is out of range, the original vector is returned. O (log n)

Totality: total
Visibility: export
adjust : Nat-> (a->a) ->RRBVectora->RRBVectora
  Adjust the element at the index by applying the function to it.
If the index is out of range, the original vector is returned. O(log n)

Totality: total
Visibility: export
take : Nat->RRBVectora->RRBVectora
  The first i elements of the vector.
If the vector contains less than or equal to i elements, the whole vector is returned. O(log n)

Totality: total
Visibility: export
drop : Nat->RRBVectora->RRBVectora
  The vector without the first i elements.
If the vector contains less than or equal to i elements, the empty vector is returned. O(log n)

Totality: total
Visibility: export
splitAt : Nat->RRBVectora-> (RRBVectora, RRBVectora)
  Split the vector at the given index. O(log n)

Totality: total
Visibility: export
viewl : RRBVectora->Maybe (a, RRBVectora)
  The first element and the vector without the first element, or 'Nothing' if the vector is empty. O(log n)

Totality: total
Visibility: export
viewr : RRBVectora->Maybe (RRBVectora, a)
  The vector without the last element and the last element, or 'Nothing' if the vector is empty. O(log n)

Totality: total
Visibility: export
map : (a->b) ->RRBVectora->RRBVectorb
  Apply the function to every element. O(n)

Totality: total
Visibility: export
reverse : RRBVectora->RRBVectora
  Reverse the vector. O(n)

Totality: total
Visibility: export
zip : RRBVectora->RRBVectorb->RRBVector (a, b)
  Take two vectors and return a vector of corresponding pairs.
If one input is longer, excess elements are discarded from the right end. O(min(n1,n2))

Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 6
(<|) : a->RRBVectora->RRBVectora
  Add an element to the left end of the vector. O(log n)

Totality: total
Visibility: export
Fixity Declarations:
infixr operator, level 0
infixr operator, level 5
(|>) : RRBVectora->a->RRBVectora
  Add an element to the right end of the vector. O(log n)

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 0
infixl operator, level 5
(><) : RRBVectora->RRBVectora->RRBVectora
  Concatenates two vectors. O(log(max(n1,n2)))

Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 5
insertAt : Nat->a->RRBVectora->RRBVectora
  Insert an element at the given index, shifting the rest of the vector over.
If the index is negative, add the element to the left end of the vector.
If the index is bigger than or equal to the length of the vector, add the element to the right end of the vector. O(log n)

Totality: total
Visibility: export
deleteAt : Nat->RRBVectora->RRBVectora
  Delete the element at the given index.
If the index is out of range, return the original vector. O(log n)

Totality: total
Visibility: export
showRRBVectorRep : Showa=>Show (Treea) =>Show (RRBVectora) =>RRBVectora->String
  Show the full representation of the vector.

Totality: total
Visibility: export