def scatter_complete

bendtorch-core@0.1.0.0 · src/tensor/axis_algebra.bend:3075

import bendtorch-core@0.1.0.0/src/tensor/axis_algebra.bend as AxisAlgebra
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape
import bendtorch-core@0.1.0.0/src/tensor/layout.bend as Layout
import bendtorch-core@0.1.0.0/src/tensor/axis_spec.bend as Axis

3075def scatter_complete(+shape: Shape.Shape, +axes: List<&2, U32>, +coords: List<&2, U32>,
3076  accepted: {True{} == Layout.bijective(shape, axes) : Bool}, length: {Shape.rank_dimensions(coords) == Shape.rank_dimensions(Shape.dimensions(shape)) : Nat}) ->
3077  {Layout.inverse_coordinates(Shape.dimensions(shape), axes, coords, 0) ==
3078    Some{Axis.order(U32, coords, Axis.inverse_axes(Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes)))} : Maybe<&2, List<&2, U32>>}:
3079  certificate = facts_lists(U32, Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes), coords,
3080    Equal.trans(Nat, List.length(&2, U32, coords), Shape.rank_dimensions(coords), Shape.rank_dimensions(Shape.dimensions(shape)), word_length(coords), length), shape_facts(shape, axes, accepted))
3081  Equal.trans(Maybe<&2, List<&2, U32>>, Layout.inverse_coordinates(Shape.dimensions(shape), axes, coords, 0),
3082    Axis.scatter(U32, Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes), coords, 0n),
3083    Some{Axis.order(U32, coords, Axis.inverse_axes(Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes)))}, inverse_coordinates(shape, axes, coords), scattered(U32, Shape.rank_dimensions(Shape.dimensions(shape)), Shape.naturals(axes), coords, certificate))

Uses (21)

Used by (4)