Table of Contents

Class SwiftShortArray2D

Namespace
SwiftCollections.Dimensions
Assembly
SwiftCollections.dll

Represents a 2D array specifically designed to handle short integer values.

[JsonConverter(typeof(StateJsonConverterFactory))]
[MemoryPackable(GenerateType.Object)]
public class SwiftShortArray2D : SwiftArray2D<short>, IEnumerable<short>, IEnumerable, IMemoryPackable<SwiftArray2D<short>>, IStateBacked<Array2DState<short>>, IMemoryPackable<SwiftShortArray2D>, IMemoryPackFormatterRegister
Inheritance
SwiftShortArray2D
Implements
IMemoryPackable<SwiftArray2D<short>>
IStateBacked<Array2DState<short>>
IMemoryPackable<SwiftShortArray2D>
IMemoryPackFormatterRegister
Inherited Members
Extension Methods

Remarks

MemoryPack GenerateType: Object

SwiftCollections.Array2DState<short> State

Constructors

SwiftShortArray2D()

Initializes a new instance of the SwiftShortArray2D class.

public SwiftShortArray2D()

SwiftShortArray2D(Array2DState<short>)

Initializes a new instance of the SwiftShortArray2D class using the specified array state.

[MemoryPackConstructor]
public SwiftShortArray2D(Array2DState<short> state)

Parameters

state Array2DState<short>

The state object that provides the initial data and configuration for the two-dimensional short array. Cannot be null.

SwiftShortArray2D(short[,])

Initializes a new instance of the SwiftShortArray2D class using the specified two-dimensional array of short values.

public SwiftShortArray2D(short[,] source)

Parameters

source short[,]

A two-dimensional array of short values that provides the initial data for the array.

SwiftShortArray2D(int, int)

Initializes a new instance of the SwiftShortArray2D class with the specified dimensions.

public SwiftShortArray2D(int width, int height)

Parameters

width int

The number of columns in the two-dimensional array. Must be greater than zero.

height int

The number of rows in the two-dimensional array. Must be greater than zero.

SwiftShortArray2D(int, int, short)

Initializes a new instance of the SwiftShortArray2D class with the specified dimensions and default value.

public SwiftShortArray2D(int width, int height, short defaultValue)

Parameters

width int

The number of columns in the two-dimensional array. Must be greater than zero.

height int

The number of rows in the two-dimensional array. Must be greater than zero.

defaultValue short

The value to assign to each element in the array upon initialization.

Methods

Normalize(short, short)

Normalizes all elements in the array to a specified range.

public void Normalize(short min, short max)

Parameters

min short
max short

Scale(short)

Scales all elements in the array by the specified factor.

public void Scale(short factor)

Parameters

factor short