ml-spectra-processing
    Preparing search index...

    Interface XEqualIntegrationVectorSimilarityOptions

    interface XEqualIntegrationVectorSimilarityOptions {
        recenter?: boolean;
        similarityFct?: (a: number, b: number) => number;
    }
    Index

    Properties

    recenter?: boolean

    Should we recenter the tree ? @default: true

    similarityFct?: (a: number, b: number) => number

    Function that based on the difference between the two values, return a similarity score between 0 and 1 The default one matches values that are identical up to the precision of a float64. The splits are the solution of a dichotomic search, so two spectra that are the same up to a shift do not give bit to bit identical values.

    (a, b) => (Math.abs(a - b) <= 1e-9 * Math.max(1, Math.abs(a), Math.abs(b)) ? 1 : 0)