Next: arrays shapes, Previous: arrays coordinates, Up: arrays [Index]
A single element position in a multidimensional array is described by a
position
object; position
objects are disjoint from
all the other Scheme objects.
The following bindings are exported by the library (vicare
containers arrays)
. Bindings prefixed by $
are unsafe
operations: they do not validate their arguments.
Build and return a new multidimensional array position
object
containing the specified coordinates.
Build and return a new multidimensional array position
object
of the specified dimension containing all 0
as coordinates.
Build and return a new multidimensional array position
object
having the items in the given vector argument as coordinates.
Build and return a new multidimensional array position
object
having the items in the given proper list argument as coordinates.
Build and return a copy of the position
object pos.
Return #t
if obj is a position
object; otherwise
return #f
.
Return #t
if obj is a valid index to select a coordinate in
the position
object pos; otherwise return #f
.
With position-index?
: it is an error if pos is not a
position
object. With $position-index?
: the argument
pos is not validated befor accessing it as position
object.
Return the number of coordinates of the element position
object pos.
Return the coordinate at index idx in the position
object pos.
Store a new coordinate coord at index idx in the
position
object pos
Return #t
if all the arguments are position
objects and
their coordinates are equal.
The following bindings are validation clauses to be used with the
facilities of the library (vicare arguments validation)
.
Succeed if obj is a position
object; the second clause
accepts also #f
.
Assuming pos is a position
object (this argument is
not validated): succeed if obj is a valid index to select
a coordinate in pos.
Succeed if obj is a proper list of items, each being a
multidimensional array position
object.
Next: arrays shapes, Previous: arrays coordinates, Up: arrays [Index]