Idris2Doc : Data.Tensor.Axis

Data.Tensor.Axis

(source)

Reexports

importpublic Decidable.Equality

Definitions

AxisName : Type
  The name for an axis is an arbitrary string

Visibility: public export
recordAxis : Type
  An axis is a container (the "size" of the axis) together with its name

Totality: total
Visibility: public export
Constructor: 
(~>) : AxisName->Cont->Axis

Projections:
.cont : Axis->Cont
.name : Axis->AxisName
.name : Axis->AxisName
Visibility: public export
name : Axis->AxisName
Visibility: public export
.cont : Axis->Cont
Visibility: public export
cont : Axis->Cont
Visibility: public export
rename : Axis->AxisName->Axis
Visibility: public export
TTInternalName : AxisName
  In some cases we TensorType might need to assign a default name to an axis,
one which is internal and will not be exposed to the user.
This is the default name for such cases

Visibility: public export
(~~>) : AxisName->Nat->Axis
  A "constructor" for cubical axes

Visibility: public export
Fixity Declaration: infixr operator, level 0
dataIsCubical : Axis->Type
  Follows the pattern of `IsCubical` from `Data.Container.Object.Instances`

Totality: total
Visibility: public export
Constructor: 
MkIsCubical : (name : AxisName) -> (n : Nat) ->IsCubical (name~~>n)
dimHelper : IsCubicala->Nat
Visibility: public export
dim : (0a : Axis) ->IsCubicala=>Nat
Visibility: public export
dataIsNaperian : Axis->Type
Totality: total
Visibility: public export
Constructor: 
MkIsNaperian : (name : AxisName) -> (pos : Type) ->IsNaperian (name~>Nappos)
LogHelper : IsNaperiana=>Type
Visibility: public export
Log : (0a : Axis) ->IsNaperiana=>Type
Visibility: public export
toContNaperian : IsNaperiana->IsNaperian (a.cont)
Visibility: public export
cubicalShapeHelper : AllIsCubicalshape->ListNat
Visibility: public export
cubicalShape : (0shape : VectrAxis) ->AllIsCubicalshape=>ListNat
  Given a list of cubical axes, return the list of their dimensions

Visibility: public export
size : (0shape : VectrAxis) ->AllIsCubicalshape=>Nat
  Size of a cubical tensor, i.e. its number of elements

Visibility: public export
dataTensorShape : Nat->Type
Totality: total
Visibility: public export
Constructors:
Nil : TensorShape0
(::) : (a : Axis) -> (as : TensorShapek) ->NewAxisConsistentaas=>TensorShape (Sk)

Hints:
Absa=>AllTensorMonoid (contsshape) =>Abs (Tensorshapea)
AllAlgebrashapea=>Algebra (Tensorshape) a
AllTensorMonoid (contsshape) =>Applicative (Tensorshape)
AllEqshapea=>Eq (Tensorshapea)
Expa=>AllTensorMonoid (contsshape) =>Exp (Tensorshapea)
AllFoldableshape=>Foldable (Tensorshape)
Fractionala=>AllTensorMonoid (contsshape) =>Fractional (Tensorshapea)
FromDoublea=>AllTensorMonoid (contsshape) =>FromDouble (Tensorshapea)
Functor (Tensorshape)
Nega=>AllTensorMonoid (contsshape) =>Neg (Tensorshapea)
Numa=>AllTensorMonoid (contsshape) =>Num (Tensorshapea)
Randoma=>Applicative (Tensorshape) =>Traversable (Tensorshape) =>Random (Tensorshapea)
AllShowshapea=>Show (Tensorshapea)
AllTraversableshape=>AllFoldableshape=>Traversable (Tensorshape)
toVect : TensorShapek->VectkAxis
Visibility: public export
dataNewAxisConsistent : Axis->TensorShapek->Type
Totality: total
Visibility: public export
Constructors:
NewAxis : NotElem (a.name) (name<$>toVectas) ->NewAxisConsistentaas
ExistingAxis : (e : Elem (a.name) (name<$>toVectas)) -> (index (elemToFine) (toVectas)) .cont=a.cont->NewAxisConsistentaas
toList : TensorShapek->ListAxis
Visibility: public export
conts : TensorShapek->ListCont
  Convenience function, turns it also into a list
Because `Data.Container` uses lists with tensors

Visibility: public export
axisNames : TensorShapek->VectkAxisName
  Names of the axes in a tensor shape

Visibility: public export
axisSizes : TensorShapek->VectkCont
  Sizes of the axes in a tensor shape

Visibility: public export
size : (shape : TensorShapek) ->AllIsCubical (contsshape) =>Nat
  Size of a tensor shape, i.e. its number of elements

Visibility: public export
dataInShape : AxisName->TensorShapek->Nat->Type
  Proof that an axis name appears in a tensor shape n times
The proof indirectly carries data of the exact indices where it appears
Notably, can appear zero times, this case is needed for recursion

Totality: total
Visibility: public export
Constructors:
Here : InShapeaxisNameasn=> {auto{conArg:17216} : NewAxisConsistent (axisName~>a) as} ->InShapeaxisName ((axisName~>a) ::as) (Sn)
There : InShapeaxisNameasn=> {auto{conArg:17234} : NewAxisConsistentaas} ->InShapeaxisName (a::as) n
.getByName : (shape : TensorShapek) -> (axisName : AxisName) ->InShapeaxisNameshapen->IsSuccn=>Axis
  Recovers the axis from a shape given its name, and a prof that it is there
Recovers the first occurence

Visibility: public export
removeAllOccurrences : (shape : TensorShaperank) -> (toDelete : AxisName) ->InShapetoDeleteshapek=> (m : Nat**TensorShapem)
Visibility: public export
removeDuplicates : (shape : TensorShaperank) -> (axisName : AxisName) ->InShapeaxisNameshapek=>IsSucck=> (m : Nat**TensorShapem)
  TODO rethink this function?
In a tensor shape removes all but the first occurence of an axis
removeDuplicates ["x" ~> 1, "y" ~> 3, "x" ~> 1] "x" = ["x" ~> 1, "y" ~> 1]

Visibility: public export