# MatrixNTI2D | data-structure-typed
Documentation for data-structure-typed

# Class MatrixNTI2D<T>

data-structure-typed

#### Author

Tyler Zeng

#### Copyright

Copyright (c) 2022 Tyler Zeng zrwusa@gmail.com

#### License

MIT License

#### Type Parameters

- #### T = number

#### Hierarchy

- MatrixNTI2D

- Defined in src/data-structures/matrix/matrix.ts:9

#####
Index

### Constructors

constructor

### Properties

_matrix

### Methods

toArray

## Constructors

### constructor

- new MatrixNTI2D<T>(options): MatrixNTI2D <T>

- The constructor creates a matrix with the specified number of rows and columns, and initializes all elements to a given initial value or 0 if not provided.

  #### Type Parameters

  - #### T = number

  #### Parameters

  - ##### options: {
    col: number;
    initialVal?: T;
    row: number;
    }

    An object containing the following properties:

    - ##### col: number

    - ##### `Optional` initialVal?: T

    - ##### row: number

  #### Returns MatrixNTI2D <T>

  - Defined in src/data-structures/matrix/matrix.ts:17

## Properties

### `Private` `Readonly` _matrix

_matrix: T[][]

- Defined in src/data-structures/matrix/matrix.ts:10

## Methods

### toArray

- toArray(): T[][]

- #### Returns T[][]

  - Defined in src/data-structures/matrix/matrix.ts:24

Generated using TypeDoc