ShapeAutoOpens Module

Functions and values

Function or value Description

boundsIsScalar bounds

Full Usage: boundsIsScalar bounds

Parameters:
    bounds : int[,]

Returns: bool

Checks if the full bounds is a scalar location

bounds : int[,]
Returns: bool

boundsToLocation bounds

Full Usage: boundsToLocation bounds

Parameters:
    bounds : int[,]

Returns: int[]

Converts the array of three-position bounds specifications to a location.

bounds : int[,]
Returns: int[]

boundsToShape bounds

Full Usage: boundsToShape bounds

Parameters:
    bounds : int[,]

Returns: int[]

Converts the array of three-position bounds specifications to a shape without squeezing out scalars

bounds : int[,]
Returns: int[]

dilatedCoordinates coordinates dilations

Full Usage: dilatedCoordinates coordinates dilations

Parameters:
    coordinates : int[]
    dilations : int[]

Returns: int[]

Dilates the given coordinates.

coordinates : int[]
dilations : int[]
Returns: int[]

flatIndexToIndex shape flatIndex

Full Usage: flatIndexToIndex shape flatIndex

Parameters:
    shape : int[]
    flatIndex : int

Returns: int[]

Converts the given flat index to an index in the context of the given shape.

shape : int[]
flatIndex : int
Returns: int[]

indexToFlatIndex shape index

Full Usage: indexToFlatIndex shape index

Parameters:
    shape : int[]
    index : int[]

Returns: int

Converts the given index to a flat index in the context of the given shape.

shape : int[]
index : int[]
Returns: int

mirrorCoordinates coordinates shape mirrorDims

Full Usage: mirrorCoordinates coordinates shape mirrorDims

Parameters:
    coordinates : int[]
    shape : int[]
    mirrorDims : int[]

Returns: int[]

Mirrors the coordinates in the given dimensions in the context of the given shape.

coordinates : int[]
shape : int[]
mirrorDims : int[]
Returns: int[]

shapeLength shape

Full Usage: shapeLength shape

Parameters:
Returns: int

Gets the total number of elements in a shape.

shape : Shape
Returns: int

shapeToFullBounds shape

Full Usage: shapeToFullBounds shape

Parameters:
Returns: int[,]
shape : Shape
Returns: int[,]

© Copyright 2021, DiffSharp Contributors.