Idris2Doc : Data.NumIdr.Vector

Data.NumIdr.Vector

(source)

Reexports

importpublic Data.NumIdr.Array

Definitions

Vector : Nat->Type->Type
  A vector is a rank-1 array.

Totality: total
Visibility: public export
dim : Vectorna->Nat
  The length (number of dimensions) of the vector.

Totality: total
Visibility: public export
dimEq : (v : Vectorna) ->n=dimv
Totality: total
Visibility: export
vector : {defaultBrep : Rep} ->RepConstraintrepa=>Vectna->Vectorna
  Construct a vector from a `Vect`.

Totality: total
Visibility: export
toVect : Vectorna->Vectna
  Convert a vector into a `Vect`.

Totality: total
Visibility: export
basis : {defaultBrep : Rep} ->RepConstraintrepa=>Numa=>Finn->Vectorna
  Return the `i`-th basis vector.

Totality: total
Visibility: export
basisX : {defaultBrep : Rep} ->RepConstraintrepa=>Numa=>Vector (1+n) a
  The first basis vector.

Totality: total
Visibility: export
basisY : {defaultBrep : Rep} ->RepConstraintrepa=>Numa=>Vector (2+n) a
  The second basis vector.

Totality: total
Visibility: export
basisZ : {defaultBrep : Rep} ->RepConstraintrepa=>Numa=>Vector (3+n) a
  The third basis vector.

Totality: total
Visibility: export
unit2D : {defaultBrep : Rep} ->RepConstraintrepDouble=>Double->Vector2Double
  Calculate the 2D unit vector with the given angle off the x-axis.

Totality: total
Visibility: export
unit3D : {defaultBrep : Rep} ->RepConstraintrepDouble=>Double->Double->Vector3Double
  Calculate the 3D unit vector corresponding to the given spherical coordinates,
where the polar axis is the z-axis.

@ pol The polar angle of the vector
@ az The azimuthal angle of the vector

Totality: total
Visibility: export
index : Finn->Vectorna->a
  Index the vector at the given coordinate.

Totality: total
Visibility: export
(!!) : Vectorna->Finn->a
  Index the vector at the given coordinate.

This is the operator form of `index`.

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 10
infixl operator, level 10
infixl operator, level 10
indexNB : Nat->Vectorna->Maybea
  Index the vector at the given coordinate, returning `Nothing` if the
coordinate is out of bounds.

Totality: total
Visibility: export
(!?) : Vectorna->Nat->Maybea
  Index the vector at the given coordinate, returning `Nothing` if the
coordinate is out of bounds.

This is the operator form of `indexNB`.

Totality: total
Visibility: export
Fixity Declarations:
infixl operator, level 10
infixl operator, level 10
infixl operator, level 10
.x : Vector (1+n) a->a
  Return the x-coordinate (the first value) of the vector.

Totality: total
Visibility: export
.y : Vector (2+n) a->a
  Return the y-coordinate (the second value) of the vector.

Totality: total
Visibility: export
.z : Vector (3+n) a->a
  Return the z-coordinate (the third value) of the vector.

Totality: total
Visibility: export
swizzle : Vectn (Finm) ->Vectorma->Vectorna
  Construct a vector by pulling coordinates from another vector.

Totality: total
Visibility: export
swapCoords : Finn->Finn->Vectorna->Vectorna
  Swap two coordinates in a vector.

Totality: total
Visibility: export
permuteCoords : Permutationn->Vectorna->Vectorna
  Permute the coordinates in a vector.

Totality: total
Visibility: export
(++) : Vectorma->Vectorna->Vector (m+n) a
  Concatenate one vector with another.

Totality: total
Visibility: export
Fixity Declaration: infixr operator, level 7
dot : Numa=>Vectorna->Vectorna->a
  Calculate the dot product of the two vectors.

Totality: total
Visibility: export
perp : Nega=>Vector2a->Vector2a->a
  Calculate the perpendicular product of the two vectors.

Totality: total
Visibility: export
cross : Nega=>Vector3a->Vector3a->Vector3a
  Calculate the cross product of the two vectors.

Totality: total
Visibility: export
triple : Nega=>Vector3a->Vector3a->Vector3a->a
  Calculate the triple product of the three vectors.

Totality: total
Visibility: export