module Phase::MultiWritable(T)

Direct including types

Defined in:

multi_writable.cr

Instance Method Summary

Instance Method Detail

def []=(region : Indexable | IndexRegion, value) #

[View source]
def []=(bool_mask : MultiIndexable(Bool), value) #

TODO consider overriding these in NArray, may benefit from speedup?


[View source]
def []=(*args) #

These two should go last


[View source]
def set_available(region : Indexable, value : T) #

[View source]
def set_chunk(region_literal : Indexable, src : MultiIndexable(T)) #

NOTE changed name from 'value' to 'src' - approve? Copies the elements from a MultiIndexable src into region. Raises an error if region is out-of-bounds for this {{@type}} or if the shape of region does not match src.shape


[View source]
def set_chunk(region : Indexable | IndexRegion, value : T) #

Sets each element in region to value. Raises an error if region is out-of-bounds for this {{@type}}.


[View source]
def set_element(coord : Indexable, value : T) #

Sets the element specified by coord to value. Raises an error if coord is out-of-bounds for this {{@type}}.


[View source]
def set_mask(bool_mask, src : MultiIndexable(T)) #

[View source]
def set_mask(bool_mask, value) #

[View source]
def set_mask(bool_mask : MultiIndexable(Bool), &) #

[View source]
def shape : Shape #

[View source]
def size #

[View source]
def unsafe_set_chunk(region : IndexRegion, src : MultiIndexable(T)) #

Copies the elements from a MultiIndexable src into region, assuming that region is in canonical form and in-bounds for this {{@type}} and the shape of region matches the shape of src. For full specification of canonical form see RegionHelpers documentation. TODO: make this actually happen


[View source]
def unsafe_set_chunk(region : IndexRegion, value : T) #

Sets each element in region to value, assuming that region is in canonical form and in-bounds for this {{@type}} For full specification of canonical form see RegionHelpers documentation. TODO: make this actually happen


[View source]
abstract def unsafe_set_element(coord : Coord, value : T) #

Given a coordinate representing some location in the {{@type}} and a value, store the value at that coordinate. Assumes that the coordinate is in-bounds for this {{@type}}.


[View source]