Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Matrix

Hierarchy

Index

Constructors

constructor

  • new Matrix(size: number[], klass?: string, noalloc?: boolean): Matrix
  • Parameters

    • size: number[]
    • Default value klass: string = "single"
    • Default value noalloc: boolean = false

    Returns Matrix

Properties

_data

_data: typedef.AllowedTypedArray

_data_ctor

_data_ctor: any

_klass

_klass: string

_ndims

_ndims: number

_numel

_numel: number

_size

_size: number[]

_strides

_strides: number[]

Static _autodestruct_stack

_autodestruct_stack: Matrix[] = []

Static _autodestruct_stack_top

_autodestruct_stack_top: Matrix[] = null

Methods

Private _alloccpu

  • _alloccpu(): typedef.AllowedTypedArray

_find

_getarrayindex

  • _getarrayindex(inds: number[]): number

_getdata

  • _getdata(): typedef.AllowedTypedArray

_isvalidindex

  • _isvalidindex(inds: number[]): boolean

_isvalidindexerr

  • _isvalidindexerr(inds: number[]): void

copy

  • copy(klass?: string): Matrix

destruct

  • destruct(): void

disp

  • disp(X?: any): void

get

  • get(): number
  • get(...args: number[]): number
  • get(...args: any[]): Matrix

get_matrix_logical

get_matrix_nd

get_matrix_nd_old

get_matrix_single

get_scalar

  • get_scalar(inds: number[]): number

getdatacopy

  • getdatacopy(src_offset?: number, length?: number, dst?: typedef.AllowedTypedArray): typedef.AllowedTypedArray
  • Parameters

    • Default value src_offset: number = 0
    • Optional length: number
    • Optional dst: typedef.AllowedTypedArray

    Returns typedef.AllowedTypedArray

getdataref

  • getdataref(src_offset?: number, length?: number): typedef.AllowedTypedArray
  • Parameters

    • Default value src_offset: number = 0
    • Optional length: number

    Returns typedef.AllowedTypedArray

inspect

  • inspect(depth: number): string

mat2jsa

  • mat2jsa(one_d_flatten?: boolean): any[]
  • Parameters

    • Default value one_d_flatten: boolean = false

    Returns any[]

reshape_inplace

  • reshape_inplace(sz: Matrix): any
  • reshape_inplace(sz: number[]): any
  • reshape_inplace(...sz: number[]): any

set

set_matrix_logical

  • set_matrix_logical(val: number | Matrix, map: Matrix): void

set_matrix_nd

set_matrix_nd_old

set_matrix_single

set_scalar

  • set_scalar(val: number | Matrix, inds: number[]): void

setdata

  • setdata(src: typedef.AllowedTypedArray, dst_offset?: number): void
  • Parameters

    • src: typedef.AllowedTypedArray
    • Default value dst_offset: number = 0

    Returns void

squeeze_inplace

  • squeeze_inplace(): void

toString

  • toString(): string

to_cpu

valueOf

  • valueOf(): number

Static Private _get_ind_iterator

  • _get_ind_iterator(ind: number | Colon | Matrix, dim_size: number): object
  • Parameters

    Returns object

    • iter: function
        • (index: number): number
        • Parameters

          • index: number

          Returns number

    • length: number

Static _isinteger

  • _isinteger(x: any): boolean

Static _isvalidklass

  • _isvalidklass(klass: any): boolean

Static _logical_cast

  • _logical_cast(val: any): number

Static _logical_cast_required

  • _logical_cast_required(klass_dst: string, klass_src?: string): boolean
  • Parameters

    • klass_dst: string
    • Optional klass_src: string

    Returns boolean

Static autodestruct_pop

  • autodestruct_pop(): void

Static autodestruct_push

  • autodestruct_push(): void

Static jsa2mat

  • jsa2mat(ary: any, one_d_column?: boolean, klass?: string): Matrix
  • Parameters

    • ary: any
    • Default value one_d_column: boolean = false
    • Default value klass: string = "single"

    Returns Matrix

Static numel

Static size

Static sizejsa

  • sizejsa(X: Matrix): number[]

Static typedarray2mat

  • typedarray2mat(size: number[], klass?: string, data: typedef.AllowedTypedArray): Matrix
  • Parameters

    • size: number[]
    • Default value klass: string = "single"
    • data: typedef.AllowedTypedArray

    Returns Matrix

Object literals

Static data_ctors

data_ctors: object

int32

int32: Int32ArrayConstructor = Int32Array

logical

logical: Uint8ArrayConstructor = Uint8Array

single

single: Float32ArrayConstructor = Float32Array

uint8

uint8: Uint8ArrayConstructor = Uint8Array

Generated using TypeDoc