Equations
- FloatArray.instBEq.beq { data := a } { data := b } = (a == b)
- FloatArray.instBEq.beq x✝¹ x✝ = false
Instances For
Equations
- FloatArray.instBEq = { beq := FloatArray.instBEq.beq }
Instances For
Equations
Instances For
Equations
- FloatArray.instInhabited = { default := FloatArray.empty }
Equations
- FloatArray.instEmptyCollection = { emptyCollection := FloatArray.empty }
Instances For
Instances For
Instances For
Equations
- FloatArray.instGetElemNatFloatLtSize = { getElem := fun (xs : FloatArray) (i : Nat) (h : i < xs.size) => xs.get i h }
Equations
- FloatArray.instGetElemUSizeFloatLtNatToNatSize = { getElem := fun (xs : FloatArray) (i : USize) (h : i.toNat < xs.size) => xs.uget i h }
Instances For
Instances For
Instances For
Marks a float array as linear, which is a no-op logically.
At runtime the array is first made unique, copying it if the reference is not already unique, and
then marked. If the environment variable LEAN_ABORT_ON_NONLINEAR is set, every non-linear use
from that point on causes a panic instead of a silent copy.
To debug where the non-linearity is coming from you can set a breakpoint on lean_internal_panic.
Equations
- ds.markLinear = ds
Instances For
Returns es, propagating the linearity marker of ds onto it. This is a no-op logically.
See also FloatArray.markLinear.
Equations
- ds.propagateMark es = es
Instances For
Equations
- ds.toList = FloatArray.toList.loop✝ ds 0 []
Instances For
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
- as.forInUnsafe b f = FloatArray.forInUnsafe.loop✝ as f as.usize 0 b
Instances For
Reference implementation for forIn
Equations
- as.forIn b f = FloatArray.forIn.loop✝ as f as.size ⋯ b
Instances For
Equations
- FloatArray.instForInFloatOfMonad = { forIn := fun {β : Type ?u.2} => FloatArray.forIn }
See comment at forInUnsafe
Equations
- One or more equations did not get rendered due to their size.
Instances For
Reference implementation for foldlM
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- FloatArray.foldl f init as start stop = (FloatArray.foldlM (fun (x1 : β) (x2 : Float) => pure (f x1 x2)) init as start stop).run
Instances For
Equations
- instToStringFloatArray = { toString := fun (ds : FloatArray) => ds.toList.toString }