Skip to main content

dst

Overloads

NameDescription
dst(const RealMatrix input, const List<integer> axes) -> RealMatrixDiscrete Sine Transform
dst(const RealMatrix input, const List<integer> axes, integer type, real normalization, bool ortho) -> RealMatrixDiscrete Sine Transform with full options
dst(const RealArray input, const List<integer> axes, integer type, real normalization, bool ortho) -> RealArrayDiscrete Sine Transform with full options
dst(const RealArray input, const List<integer> axes) -> RealArrayDiscrete Sine Transform

dst(const RealMatrix input, const List<integer> axes) -> RealMatrix

Discrete Sine Transform

Performs discrete sine transform with default parameters (type=II, normalization=1.0, ortho=true). Type II applies 1/sqrt(2) scaling which, combined with ortho=true, results in output scaled by sqrt(2*N) where N is the transform size along each axis.

Parameters

  • input: Real input matrix (Nx1 for 1D, NxM for 2D)
  • axes: Vector of axes to transform. For 1D (Nx1): use [0]. For 2D (NxM): use [0] for rows, [1] for columns, or [0,1] for full 2D DST

Returns

Real output matrix with same shape as input

dst(const RealMatrix input, const List<integer> axes, integer type, real normalization, bool ortho) -> RealMatrix

Discrete Sine Transform with full options

Performs discrete sine transform with all custom parameters

Parameters

  • input: Real input matrix (Nx1 for 1D, NxM for 2D)
  • axes: Vector of axes to transform. For 1D (Nx1): use [0]. For 2D (NxM): use [0] for rows, [1] for columns, or [0,1] for full 2D DST
  • type: DCT type (1-4). Type II and Type III are inverses of each other when using matching parameters.
  • normalization: Multiplicative scaling factor applied to output (default: 1.0). For round-trip recovery with ortho=true: use 1.0/sqrt(2N) for both DCT-II (type=2) forward and DCT-III (type=3) inverse, where N is the transform size. For 2D (NxM), the normalization=1.0/sqrt(2N2M).
  • ortho: If true, apply orthonormal scaling (default: true)

Returns

Real output matrix with same shape as input

dst(const RealArray input, const List<integer> axes, integer type, real normalization, bool ortho) -> RealArray

Discrete Sine Transform with full options

Performs discrete sine transform with all custom parameters

Parameters

  • input: Real input array (Nx1 for 1D, NxM for 2D)
  • axes: Vector of axes to transform. For 1D (Nx1): use [0]. For 2D (NxM): use [0] for rows, [1] for columns, or [0,1] for full 2D DST
  • type: DCT type (1-4). Type II and Type III are inverses of each other when using matching parameters.
  • normalization: Multiplicative scaling factor applied to output (default: 1.0). For round-trip recovery with ortho=true: use 1.0/sqrt(2N) for both DCT-II (type=2) forward and DCT-III (type=3) inverse, where N is the transform size. For 2D (NxM), the normalization=1.0/sqrt(2N2M).
  • ortho: If true, apply orthonormal scaling (default: true)

Returns

Real output array with same shape as input

dst(const RealArray input, const List<integer> axes) -> RealArray

Discrete Sine Transform

Performs discrete sine transform with default parameters (type=II, normalization=1.0, ortho=true). Type II applies 1/sqrt(2) scaling which, combined with ortho=true, results in output scaled by sqrt(2*N) where N is the transform size along each axis.

Parameters

  • input: Real input array (Nx1 for 1D, NxM for 2D)
  • axes: Vector of axes to transform. For 1D (Nx1): use [0]. For 2D (NxM): use [0] for rows, [1] for columns, or [0,1] for full 2D DST

Returns

Real output array with same shape as input