@[extern lean_mk_empty_float_array]
Equations
Instances For
@[reducible, inline, deprecated FloatArray.emptyWithCapacity (since := "2025-03-12")]
Equations
Instances For
@[extern lean_float_array_push]
Equations
Instances For
@[extern lean_float_array_uget]
Equations
Instances For
@[extern lean_float_array_fget]
Equations
Instances For
@[extern lean_float_array_get]
Equations
Instances For
instance
FloatArray.instGetElemNatFloatLtSize :
GetElem FloatArray Nat Float fun (xs : FloatArray) (i : Nat) => i < xs.size
Equations
instance
FloatArray.instGetElemUSizeFloatLtNatToNatSize :
GetElem FloatArray USize Float fun (xs : FloatArray) (i : USize) => i.toNat < xs.size
Equations
@[extern lean_float_array_uset]
Equations
Instances For
@[extern lean_float_array_fset]
Equations
Instances For
@[extern lean_float_array_set]
Equations
Instances For
@[inline]
unsafe def
FloatArray.forInUnsafe
{β : Type v}
{m : Type v → Type w}
[Monad m]
(as : FloatArray)
(b : β)
(f : Float → β → m (ForInStep β))
:
m β
We claim this unsafe implementation is correct because an array cannot have more than usizeSz
elements in our runtime.
This is similar to the Array
version.
Equations
Instances For
@[specialize #[]]
unsafe def
FloatArray.forInUnsafe.loop
{β : Type v}
{m : Type v → Type w}
[Monad m]
(as : FloatArray)
(f : Float → β → m (ForInStep β))
(sz i : USize)
(b : β)
:
m β
Equations
Instances For
@[implemented_by FloatArray.forInUnsafe]
def
FloatArray.forIn
{β : Type v}
{m : Type v → Type w}
[Monad m]
(as : FloatArray)
(b : β)
(f : Float → β → m (ForInStep β))
:
m β
Reference implementation for forIn
Equations
Instances For
Equations
@[inline]
unsafe def
FloatArray.foldlMUnsafe
{β : Type v}
{m : Type v → Type w}
[Monad m]
(f : β → Float → m β)
(init : β)
(as : FloatArray)
(start : Nat := 0)
(stop : Nat := as.size)
:
m β
See comment at forInUnsafe
Equations
Instances For
@[specialize #[]]
unsafe def
FloatArray.foldlMUnsafe.fold
{β : Type v}
{m : Type v → Type w}
[Monad m]
(f : β → Float → m β)
(as : FloatArray)
(i stop : USize)
(b : β)
:
m β
Equations
Instances For
@[inline]
def
FloatArray.foldl
{β : Type v}
(f : β → Float → β)
(init : β)
(as : FloatArray)
(start : Nat := 0)
(stop : Nat := as.size)
:
β