-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove internal default to simplify the reexport and ensure fu…
…nction name = filename
- Loading branch information
Showing
53 changed files
with
111 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,9 @@ | ||
import cheminfo from 'eslint-config-cheminfo-typescript'; | ||
import globals from 'globals'; | ||
|
||
export default [ | ||
...cheminfo, | ||
{ | ||
languageOptions: { | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
languageOptions: {}, | ||
rules: {} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,81 @@ | ||
export { euclidean, squaredEuclidean } from 'ml-distance-euclidean'; | ||
export * from 'ml-distance-euclidean'; | ||
|
||
export { default as additiveSymmetric } from './distances/additiveSymmetric'; | ||
export * from './distances/additiveSymmetric'; | ||
|
||
export { default as avg } from './distances/avg'; | ||
export * from './distances/avg'; | ||
|
||
export { default as bhattacharyya } from './distances/bhattacharyya'; | ||
export * from './distances/bhattacharyya'; | ||
|
||
export { default as canberra } from './distances/canberra'; | ||
export * from './distances/canberra'; | ||
|
||
export { default as chebyshev } from './distances/chebyshev'; | ||
export * from './distances/chebyshev'; | ||
|
||
export { default as clark } from './distances/clark'; | ||
export * from './distances/clark'; | ||
|
||
export { default as czekanowski } from './distances/czekanowski'; | ||
export * from './distances/czekanowski'; | ||
|
||
export { default as dice } from './distances/dice'; | ||
export * from './distances/dice'; | ||
|
||
export { default as divergence } from './distances/divergence'; | ||
export * from './distances/divergence'; | ||
|
||
export { default as fidelity } from './distances/fidelity'; | ||
export * from './distances/fidelity'; | ||
|
||
export { default as gower } from './distances/gower'; | ||
export * from './distances/gower'; | ||
|
||
export { default as harmonicMean } from './distances/harmonicMean'; | ||
export * from './distances/harmonicMean'; | ||
|
||
export { default as hellinger } from './distances/hellinger'; | ||
export * from './distances/hellinger'; | ||
|
||
export { default as innerProduct } from './distances/innerProduct'; | ||
export * from './distances/innerProduct'; | ||
|
||
export { default as intersection } from './distances/intersection'; | ||
export * from './distances/intersection'; | ||
|
||
export { default as jaccard } from './distances/jaccard'; | ||
export * from './distances/jaccard'; | ||
|
||
export { default as jeffreys } from './distances/jeffreys'; | ||
export * from './distances/jeffreys'; | ||
|
||
export { default as jensenDifference } from './distances/jensenDifference'; | ||
export * from './distances/jensenDifference'; | ||
|
||
export { default as jensenShannon } from './distances/jensenShannon'; | ||
export * from './distances/jensenShannon'; | ||
|
||
export { default as kdivergence } from './distances/kdivergence'; | ||
export * from './distances/kdivergence'; | ||
|
||
export { default as kulczynski } from './distances/kulczynski'; | ||
export * from './distances/kulczynski'; | ||
|
||
export { default as kullbackLeibler } from './distances/kullbackLeibler'; | ||
export * from './distances/kullbackLeibler'; | ||
|
||
export { default as kumarJohnson } from './distances/kumarJohnson'; | ||
export * from './distances/kumarJohnson'; | ||
|
||
export { default as lorentzian } from './distances/lorentzian'; | ||
export * from './distances/lorentzian'; | ||
|
||
export { default as manhattan } from './distances/manhattan'; | ||
export * from './distances/manhattan'; | ||
|
||
export { default as matusita } from './distances/matusita'; | ||
export * from './distances/matusita'; | ||
|
||
export { default as minkowski } from './distances/minkowski'; | ||
export * from './distances/minkowski'; | ||
|
||
export { default as motyka } from './distances/motyka'; | ||
export * from './distances/motyka'; | ||
|
||
export { default as neyman } from './distances/neyman'; | ||
export * from './distances/neyman'; | ||
|
||
export { default as pearson } from './distances/pearson'; | ||
export * from './distances/pearson'; | ||
|
||
export { default as probabilisticSymmetric } from './distances/probabilisticSymmetric'; | ||
export * from './distances/probabilisticSymmetric'; | ||
|
||
export { default as ruzicka } from './distances/ruzicka'; | ||
export * from './distances/ruzicka'; | ||
|
||
export { default as soergel } from './distances/soergel'; | ||
export * from './distances/soergel'; | ||
|
||
export { default as sorensen } from './distances/sorensen'; | ||
export * from './distances/sorensen'; | ||
|
||
export { default as squared } from './distances/squared'; | ||
export * from './distances/squared'; | ||
|
||
export { default as squaredChord } from './distances/squaredChord'; | ||
export * from './distances/squaredChord'; | ||
|
||
export { default as taneja } from './distances/taneja'; | ||
export * from './distances/taneja'; | ||
|
||
export { default as tanimoto } from './distances/tanimoto'; | ||
export * from './distances/tanimoto'; | ||
|
||
export { default as topsoe } from './distances/topsoe'; | ||
export * from './distances/topsoe'; | ||
|
||
export { default as waveHedges } from './distances/waveHedges'; | ||
export * from './distances/waveHedges'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import { NumberArray } from 'cheminfo-types'; | ||
|
||
import czekanowskiSimilarity from '../similarities/czekanowski'; | ||
import { czekanowski as czekanowskiSimilarity } from '../similarities/czekanowski'; | ||
/** | ||
*Returns the Czekanowski distance between vectors a and b | ||
* @link [Czekanowski algorithm](https://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) | ||
* @param a - first vector | ||
* @param b - second vector | ||
*/ | ||
export default function czekanowskiDistance( | ||
a: NumberArray, | ||
b: NumberArray, | ||
): number { | ||
export function czekanowski(a: NumberArray, b: NumberArray): number { | ||
return 1 - czekanowskiSimilarity(a, b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { NumberArray } from 'cheminfo-types'; | ||
|
||
import kumarHassebrook from '../similarities/kumarHassebrook'; | ||
import { kumarHassebrook } from '../similarities/kumarHassebrook'; | ||
/** | ||
*Returns Jaccard distance between vectors a and b | ||
* @link [Jaccard algorithm](https://www.naun.org/main/NAUN/ijmmas/mmmas-49.pdf) | ||
* @param a - first vector | ||
* @param b - second vector | ||
*/ | ||
export default function jaccard(a: NumberArray, b: NumberArray): number { | ||
export function jaccard(a: NumberArray, b: NumberArray): number { | ||
return 1 - kumarHassebrook(a, b); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.