Skip to content

Commit dd0b69c

Browse files
committed
chore: fix eslint and prettier in benchmark
1 parent 22d602d commit dd0b69c

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

benchmark/benchmarkLinePlot.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
import { run, bench, lineplot, do_not_optimize } from 'mitata';
2-
import { SparseMatrix } from '../src/index.js';
32
import { xSequentialFillFromStep } from 'ml-spectra-processing';
3+
4+
import { SparseMatrix } from '../src/index.js';
5+
46
import { SparseMatrix as SparseMatrixOld } from './class/SparseMatrixOld.js';
57
import { randomMatrix } from './utils/randomMatrix.js';
8+
69
const density = 0.02; // Fixed density for this comparison;
710

11+
/* eslint
12+
func-names: 0
13+
camelcase: 0
14+
*/
815
// Prepare matrices once
916
const sizes = Array.from(
1017
xSequentialFillFromStep({ from: 4, step: 4, size: 13 }),

benchmark/benchmarkMitata.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import { run, bench, group, do_not_optimize } from 'mitata';
22
import { Matrix } from 'ml-matrix';
3+
34
import { SparseMatrix as SparseMatrixOld } from './class/SparseMatrixOld2.js';
45
import { randomSparseMatrix } from './utils/randomSparseMatrix.js';
56

7+
/* eslint
8+
func-names: 0
9+
camelcase: 0
10+
*/
11+
612
const sizes = [64, 128, 256];
713
const densities = [0.01, 0.015, 0.02, 0.025, 0.03];
814

benchmark/class/SparseMatrixOld.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ export class SparseMatrix {
159159
*/
160160
mmul(other) {
161161
if (this.columns !== other.rows) {
162-
// eslint-disable-next-line no-console
163162
console.warn(
164163
'Number of columns of left matrix are not equal to number of rows of right matrix.',
165164
);
@@ -1383,4 +1382,4 @@ export class SparseMatrix {
13831382
SparseMatrix.prototype.klass = 'Matrix';
13841383

13851384
SparseMatrix.identity = SparseMatrix.eye;
1386-
SparseMatrix.prototype.tensorProduct = SparseMatrix.prototype.kroneckerProduct;
1385+
SparseMatrix.prototype.tensorProduct = SparseMatrix.prototype.kroneckerProduct;

0 commit comments

Comments
 (0)