Shape.Shape()

Constructor of Shape object.

Synopsis

Shape()

Shape.Expand()

Expand shape of Shape object.

Synopsis

Shape Expand(int axis)

Arguments

axis: given axis.

Return

Shape object in (N+1)-dimensions.

Shape.GetDim()

Get i-th dimension in Shape object.

Synopsis

long GetDim(int i)

Arguments

i: index of dimensions.

Return

the i-th dimension.

Shape.GetND()

Get number of dimensions in Shape object.

Synopsis

int GetND()

Return

number of dimensions.

Shape.GetSize()

Get size of Shape object.

Synopsis

long GetSize()

Return

size of shape.

Shape.GetStart()

Get the i-th start postion in Shape object.

Synopsis

int GetStart(int i)

Arguments

i: index of dimensions.

Return

start position in i-th dimension.

Shape.GetStride()

Get i-th stride in Shape object.

Synopsis

int GetStride(int i)

Arguments

i: index of dimensions.

Return

stride in i-th dimension.

Shape.Rebuild()

Rebuild Shape object, that is, keep dimensions while reset strides and starts.

Synopsis

Shape Rebuild()

Return

new Shape object.

Shape.Represent()

String representation of Shape object.

Synopsis

string Represent(int type)

Arguments

type: 0: dimensions; 1: strides; 2: starts.

Return

string object.

Shape.Squeeze()

Remove axis of length 1 from Shape object.

Synopsis

Shape Squeeze(int axis)

Arguments

axis: given axis, where the length is 1.

Return

Shape object in (N-1)-dimensions.