Compare two shapes, returning true if every dimension of this
is
smaller than or equal to the corresponding dimension in other
.
Compare two shapes, returning true if every dimension of this
is
smaller than or equal to the corresponding dimension in other
.
Shape to compare with this
.
True if this
and other
have the same number of dimensions and
this
is no larger in any corresponding dimension.
Get the size of the indexed "dimension".
Concatenate two shapes to form a higher dimensional shape.
Concatenate "this" and "that" to create a higher-dimensional shape.
Number of dimensions for this shape.
Reduces the Shape by a factor in each dimension, rounding up when the original size is not an integer multiple of the downsample factor.
Reduces the Shape by a factor in each dimension, rounding up when the original size is not an integer multiple of the downsample factor. The is the standard we use throughout Cog.
Drop the first "d" dimensions from "this", returning smaller shape.
Drop the last "d" dimensions from "this", returning smaller shape.
Test "this" and "other" Shape for equality.
Test "this" and "other" Shape for equality. Allows "==" to work.
Required because of overriding equals.
Required because of overriding equals.
Return an iterator over all possible discrete locations in the shape.
Return an iterator over all possible discrete locations in the shape. For example, the Shape (2, 3) has the following locations:
(0, 0) (0, 1) (0, 2) (1, 0) (1, 1) (1, 2)
Join "this" and "that" to create a same-dimensional shape representing the two shapes abutted.
Join "this" and "that" to create a same-dimensional shape representing the two shapes abutted. Join of 0D fields illegal.
Get the size of the last dimension.
Get the size of the last dimension. If this is 0-dimensions, returns 0.
Map this shape to another shape using "f".
Number of points in this discrete shape.
Convert the shape to an array.
Like ordinary toString but allows for a prefix besides "Shape"
Convert a Shape to a String for debugging.
Convert a Shape to a String for debugging.
A Shape describes the dimensions of a discrete, hyper-rectangular object.
For historical reasons, the elements of a shape also have the following names: 3D: (layers, rows, columns) 2D: (rows, columns) 1D: (columns)