Private
_2dvectorThe data structure containing the real data.
It's defined as an Array of Array of T
is the type of element storable in the matrix
Add a column to the matrix
the column to be added
true if the new column was correctly added, otherwise it returns false
Error if a wrong input is passed
Add a row to the matrix
the row to be added
true if the new row was correctly added, otherwise it returns false
Error if a wrong input is passed
Get matrix columns iterator
the matrix columns iterator
Get matrix rows iterator
the matrix rows iterator
Insert a column at the specific columnIndex
index
the column index
the column to insert as an array of values
true if the new column was correctly inserted, otherwise it returns false
Error if a wrong input is passed
Insert a row at the specific rowIndex
index
the row index
the row to insert as an array of values
true if the new row was correctly inserted, otherwise it returns false
Error if a wrong input is passed
Look for a specific value inside the matrix
the value you're looking for
Remove matrix column at index 'columnIndex'
the index of the column to be removed. If it's not an integer number or if it's less than zero, an exception "Error('Wrong input')" is thrown
true if the column removal was successful, otherwise it returns false
exception "Error('Wrong input')" when any parameter in input is wrong
Remove matrix row at index 'rowIndex'
the index of the row to be removed. If it's not an integer number or if it's less than zero, an exception "Error('Wrong input')" is thrown
true if the row removal was successful, otherwise it returns false
exception "Error('Wrong input')" when any parameter in input is wrong
Replace matrix column at index 'columnIndex'
the index of the column to be replaced. If it's not an integer number or if it's less than zero, an exception "Error('Wrong input')" is thrown
the array of values which must replace the existing column. If it's not an array or if the array is empty, an exception "Error('Wrong input')" is thrown
true if the column replacement was successful, otherwise it returns false
exception "Error('Wrong input')" when any parameter in input is wrong
Replace matrix row at index 'rowIndex'
the index of the row to be replaced. If it's not an integer number or if it's less than zero, an exception "Error('Wrong input')" is thrown
the array of values which must replace the existing row. If it's not an array or if the array is empty, an exception "Error('Wrong input')" is thrown
true if the row replacement was successful, otherwise it returns false
exception "Error('Wrong input')" when any parameter in input is wrong
Set a value at coord
a string representation of the coordinates using the dash '-' as separator. Example: "1-4" represents x:1 and y:4
the value to set
the value at coord
or undefined if the string coordinates are wrong
The public method to setup the matrix
Optional
props: DanMatrixConstructorType<T>the optional input of type DanMatrixConstructorType
Error if a wrong input is passed
Generated using TypeDoc
DanMatrix is a class to handle two-dimension vectors, or matrices