-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import cheminfo from 'eslint-config-cheminfo-typescript'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
...cheminfo, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
rules: {} | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ import { Tree } from './createTree'; | |
|
||
/** | ||
Check warning on line 3 in src/compressTree.ts GitHub Actions / nodejs / lint-eslint
|
||
* Destructive compression in which we reduce the number of decimals | ||
* @param tree | ||
Check warning on line 5 in src/compressTree.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options | ||
Check warning on line 6 in src/compressTree.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options.fixed | ||
Check warning on line 7 in src/compressTree.ts GitHub Actions / nodejs / lint-eslint
|
||
*/ | ||
export function compressTree( | ||
tree: Tree, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,8 @@ export interface CreateTreeOptions { | |
|
||
/** | ||
Check warning on line 38 in src/createTree.ts GitHub Actions / nodejs / lint-eslint
|
||
* Function that creates the tree | ||
* @param dataXY | ||
Check warning on line 40 in src/createTree.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options | ||
Check warning on line 41 in src/createTree.ts GitHub Actions / nodejs / lint-eslint
|
||
*/ | ||
|
||
export function createTree( | ||
|
@@ -48,7 +50,7 @@ export function createTree( | |
minWindow = 0.16, | ||
threshold = 0.01, | ||
from = x[0], | ||
to = x[x.length - 1], | ||
to = x.at(-1) as number, | ||
} = options; | ||
|
||
return mainCreateTree(x, y, from, to, minWindow, threshold); | ||
|
@@ -72,7 +74,7 @@ function mainCreateTree(x, y, from, to, minWindow, threshold) { | |
if (x[i] >= to) { | ||
break; | ||
} | ||
sum += y[i]; | ||
sum += y[i] as number; | ||
center += x[i] * y[i]; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,10 @@ export interface TreeSimilarityOptions { | |
|
||
/** | ||
* Similarity between two nodes | ||
* @return similarity measure between tree nodes | ||
* @param treeA | ||
Check warning on line 11 in src/treeSimilarity.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param treeB | ||
Check warning on line 12 in src/treeSimilarity.ts GitHub Actions / nodejs / lint-eslint
|
||
* @param options | ||
Check warning on line 13 in src/treeSimilarity.ts GitHub Actions / nodejs / lint-eslint
|
||
* @returns similarity measure between tree nodes | ||
*/ | ||
export function treeSimilarity( | ||
treeA: Tree | null, | ||
|