Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Sep 17, 2024
1 parent 69cb82c commit 8b1bbdb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,18 +88,18 @@
},
"homepage": "https://github.com/mljs/spectra-processing#readme",
"devDependencies": {
"@vitest/coverage-v8": "^2.0.5",
"@vitest/coverage-v8": "^2.1.1",
"cheminfo-build": "^1.2.0",
"eslint": "^8.57.0",
"eslint-config-cheminfo-typescript": "^15.0.0",
"eslint-config-cheminfo-typescript": "^15.0.1",
"jest-matcher-deep-close-to": "^3.0.2",
"jscpd": "^4.0.5",
"ml-spectra-fitting": "^4.2.3",
"prettier": "^3.3.3",
"rimraf": "^6.0.1",
"spectrum-generator": "^8.0.11",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
"typescript": "^5.6.2",
"vitest": "^2.1.1"
},
"dependencies": {
"binary-search": "^1.3.6",
Expand Down
2 changes: 1 addition & 1 deletion src/matrix/matrixAbsoluteMedian.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function matrixAbsoluteMedian(matrix: DoubleMatrix): number {
const currentRow = row * nbColumns;
for (let column = 0; column < nbColumns; column++) {
const value = matrix[row][column];
flatten[currentRow + column] = value < 0 ? -value : value;
flatten[currentRow + column] = Math.abs(value);
}
}
return xMedian(flatten);
Expand Down
3 changes: 1 addition & 2 deletions src/matrix/matrixMaxAbsoluteZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export function matrixMaxAbsoluteZ(matrix: NumberArray[]): number {

for (let column = 0; column < nbColumns; column++) {
for (let row = 0; row < nbRows; row++) {
let value = matrix[row][column];
if (value < 0) value *= -1;
const value = Math.abs(matrix[row][column]);
if (value > max) max = value;
}
}
Expand Down
6 changes: 1 addition & 5 deletions src/x/xAbsoluteSum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ export function xAbsoluteSum(

let sum = 0;
for (let i = fromIndex; i <= toIndex; i++) {
if (array[i] < 0) {
sum -= array[i];
} else {
sum += array[i];
}
sum += Math.abs(array[i]);
}

return sum;
Expand Down
1 change: 1 addition & 0 deletions src/x/xAdd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { isAnyArray } from 'is-any-array';
* This function xAdd the first array by the second array or a constant value to each element of the first array
* @param array1 - the first array
* @param array2 - the second array or number
* @returns the result of the addition
*/
export function xAdd(
array1: NumberArray,
Expand Down
1 change: 1 addition & 0 deletions src/xyObject/xyObjectMaxYPoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { xyObjectCheck } from './xyObjectCheck';
/**
* Finds the max y value and return a {x,y,index} point
* @param points - Object that contains property x (an ordered increasing array) and y (an array)
* @returns max point
*/
export function xyObjectMaxYPoint(points: Point[] = []): Point {
xyObjectCheck(points);
Expand Down

0 comments on commit 8b1bbdb

Please sign in to comment.