ml-matrix 6.10.2 → 6.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/matrix.d.ts +27 -2
- package/package.json +1 -1
package/matrix.d.ts
CHANGED
|
@@ -260,7 +260,7 @@ export abstract class AbstractMatrix {
|
|
|
260
260
|
* @param columnIndex - Index of the element's column.
|
|
261
261
|
* @param value - The new value for the element.
|
|
262
262
|
*/
|
|
263
|
-
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
263
|
+
abstract set(rowIndex: number, columnIndex: number, value: number): this;
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* Returns the value of the given element of the matrix.
|
|
@@ -268,7 +268,7 @@ export abstract class AbstractMatrix {
|
|
|
268
268
|
* @param columnIndex - Index of the element's column.
|
|
269
269
|
* @returns - The value of the element.
|
|
270
270
|
*/
|
|
271
|
-
get(rowIndex: number, columnIndex: number): number;
|
|
271
|
+
abstract get(rowIndex: number, columnIndex: number): number;
|
|
272
272
|
|
|
273
273
|
/**
|
|
274
274
|
* Applies a callback for each element of the matrix. The function is called in the matrix (this) context.
|
|
@@ -934,6 +934,9 @@ export class Matrix extends AbstractMatrix {
|
|
|
934
934
|
constructor(data: ArrayLike<ArrayLike<number>>);
|
|
935
935
|
constructor(otherMatrix: AbstractMatrix);
|
|
936
936
|
|
|
937
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
938
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
939
|
+
|
|
937
940
|
/**
|
|
938
941
|
* Removes a column from the matrix (in place).
|
|
939
942
|
* @param index - Column index.
|
|
@@ -965,26 +968,38 @@ export default Matrix;
|
|
|
965
968
|
|
|
966
969
|
export class MatrixColumnView extends AbstractMatrix {
|
|
967
970
|
constructor(matrix: AbstractMatrix, column: number);
|
|
971
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
972
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
968
973
|
}
|
|
969
974
|
|
|
970
975
|
export class MatrixColumnSelectionView extends AbstractMatrix {
|
|
971
976
|
constructor(matrix: AbstractMatrix, columnIndices: ArrayLike<number>);
|
|
977
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
978
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
972
979
|
}
|
|
973
980
|
|
|
974
981
|
export class MatrixFlipColumnView extends AbstractMatrix {
|
|
975
982
|
constructor(matrix: AbstractMatrix);
|
|
983
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
984
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
976
985
|
}
|
|
977
986
|
|
|
978
987
|
export class MatrixFlipRowView extends AbstractMatrix {
|
|
979
988
|
constructor(matrix: AbstractMatrix);
|
|
989
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
990
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
980
991
|
}
|
|
981
992
|
|
|
982
993
|
export class MatrixRowView extends AbstractMatrix {
|
|
983
994
|
constructor(matrix: AbstractMatrix, row: number);
|
|
995
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
996
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
984
997
|
}
|
|
985
998
|
|
|
986
999
|
export class MatrixRowSelectionView extends AbstractMatrix {
|
|
987
1000
|
constructor(matrix: AbstractMatrix, rowIndices: ArrayLike<number>);
|
|
1001
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
1002
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
988
1003
|
}
|
|
989
1004
|
|
|
990
1005
|
export class MatrixSelectionView extends AbstractMatrix {
|
|
@@ -993,6 +1008,8 @@ export class MatrixSelectionView extends AbstractMatrix {
|
|
|
993
1008
|
rowIndices: ArrayLike<number>,
|
|
994
1009
|
columnIndices: ArrayLike<number>,
|
|
995
1010
|
);
|
|
1011
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
1012
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
996
1013
|
}
|
|
997
1014
|
|
|
998
1015
|
export class MatrixSubView extends AbstractMatrix {
|
|
@@ -1003,10 +1020,14 @@ export class MatrixSubView extends AbstractMatrix {
|
|
|
1003
1020
|
startColumn: number,
|
|
1004
1021
|
endColumn: number,
|
|
1005
1022
|
);
|
|
1023
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
1024
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
1006
1025
|
}
|
|
1007
1026
|
|
|
1008
1027
|
export class MatrixTransposeView extends AbstractMatrix {
|
|
1009
1028
|
constructor(matrix: AbstractMatrix);
|
|
1029
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
1030
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
1010
1031
|
}
|
|
1011
1032
|
|
|
1012
1033
|
export interface IWrap1DOptions {
|
|
@@ -1025,10 +1046,14 @@ export function wrap(twoDAray: ArrayLike<ArrayLike<number>>): WrapperMatrix2D;
|
|
|
1025
1046
|
|
|
1026
1047
|
export class WrapperMatrix1D extends AbstractMatrix {
|
|
1027
1048
|
constructor(data: ArrayLike<number>, options?: IWrap1DOptions);
|
|
1049
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
1050
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
1028
1051
|
}
|
|
1029
1052
|
|
|
1030
1053
|
export class WrapperMatrix2D extends AbstractMatrix {
|
|
1031
1054
|
constructor(data: ArrayLike<ArrayLike<number>>);
|
|
1055
|
+
set(rowIndex: number, columnIndex: number, value: number): this;
|
|
1056
|
+
get(rowIndex: number, columnIndex: number): number;
|
|
1032
1057
|
}
|
|
1033
1058
|
|
|
1034
1059
|
/**
|