"use strict";(self.webpackChunkbio=self.webpackChunkbio||[]).push([[413],{7862:(e,t,n)=>{var r;n.d(t,{y:()=>r}),function(e){e.EUCLIDEAN="EUCLIDEAN",e.MANHATTAN="MANHATTAN"}(r||(r={}))},6361:(e,t,n)=>{n.d(t,{UH:()=>r.UH,sQ:()=>r.sQ}),n(1040);var r=n(7861)},7861:(e,t,n)=>{n.d(t,{UH:()=>M,sQ:()=>N});var r=n(1811),o=n(3979),a=n(5697),i=n(850),s=n(708),g=n(1040);const c={[g.CF.Euclidean]:i.dP},u={[g.W.Levenshtein]:r.T,[g.W.JaroWinkler]:o.H$,[g.W.Manhattan]:function(e,t){if(e.length!==t.length)return 1;{let n=0;for(let r=1;r<e.length;r++)n+=e[r]==t[r]?0:1;return n/e.length}},[g.W.Onehot]:function(e,t){return e===t?0:1}},h={[g.gk.Tanimoto]:a.KR,[g.gk.Dice]:a._h,[g.gk.Asymmetric]:a.yU,[g.gk.BraunBlanquet]:a.Dz,[g.gk.Cosine]:a.Zd,[g.gk.Kulczynski]:a.s,[g.gk.McConnaughey]:a.aW,[g.gk.RogotGoldberg]:a.MI,[g.gk.Russel]:a.fX,[g.gk.Sokal]:a.NB,[g.gk.Hamming]:a.UX,[g.gk.Euclidean]:a.WI},k={[g.gd.TanimotoIntArray]:a.FV},l={[g.Yc.Difference]:a.bX},m={[g.gj.CommonItems]:a.Jv},y={[g.Qe.Vector]:{[g.CF.Euclidean]:c[g.CF.Euclidean]},[g.Qe.String]:{[g.W.Levenshtein]:u[g.W.Levenshtein],[g.W.JaroWinkler]:u[g.W.JaroWinkler],[g.W.Manhattan]:u[g.W.Manhattan],[g.W.Onehot]:u[g.W.Onehot]},[g.Qe.BitArray]:{[g.gk.Tanimoto]:h[g.gk.Tanimoto],[g.gk.Dice]:h[g.gk.Dice],[g.gk.Asymmetric]:h[g.gk.Asymmetric],[g.gk.BraunBlanquet]:h[g.gk.BraunBlanquet],[g.gk.Cosine]:h[g.gk.Cosine],[g.gk.Kulczynski]:h[g.gk.Kulczynski],[g.gk.McConnaughey]:h[g.gk.McConnaughey],[g.gk.RogotGoldberg]:h[g.gk.RogotGoldberg],[g.gk.Russel]:h[g.gk.Russel],[g.gk.Sokal]:h[g.gk.Sokal]},[g.Qe.MacroMolecule]:{[s.U.HAMMING]:s.o[s.U.HAMMING],[s.U.LEVENSHTEIN]:s.o[s.U.LEVENSHTEIN],[s.U.NEEDLEMANN_WUNSCH]:s.o[s.U.NEEDLEMANN_WUNSCH],[s.U.MONOMER_CHEMICAL_DISTANCE]:s.o[s.U.MONOMER_CHEMICAL_DISTANCE]},[g.Qe.Number]:{[g.Yc.Difference]:l[g.Yc.Difference]},[g.Qe.IntArray]:{[g.gd.TanimotoIntArray]:k[g.gd.TanimotoIntArray]},[g.Qe.NumberArray]:{[g.gj.CommonItems]:m[g.gj.CommonItems]}},d=Object.keys(y).reduce(((e,t)=>{for(const n of Object.keys(y[t]))e[n]=t;return e}),{});function N(e){return"BitArray"==d[e]}class M{constructor(e){this.method=e,this.dataType=d[e]}metricNeedsArgs(e){return d[e]==g.Qe.MacroMolecule.toString()||d[e]==g.Qe.Number.toString()||function(e){return d[e]==g.Qe.NumberArray.toString()}(e)}getMeasure(e){const t=y;if(!t.hasOwnProperty(this.dataType)||!t[this.dataType].hasOwnProperty(this.method))throw new Error(`Unknown measure ${this.method} for data type ${this.dataType}`);return this.metricNeedsArgs(this.method)?t[this.dataType][this.method](e):t[this.dataType][this.method]}static getMetricByDataType(e){return Object.keys(y[e])}static get availableMeasures(){return Object.keys(y)}}},850:(e,t,n)=>{function r(e,t){let n=0;const r=e.length;if(r!==t.length)throw new Error("The dimensionality of the vectors must match");for(let o=0;o<r;++o)n+=Math.pow(e[o]-t[o],2);return Math.sqrt(n)}n.d(t,{dP:()=>r})}}]);
//# sourceMappingURL=413.js.map