h$"9      !"#$%&'()*+,-./012345678None5678>? #9rp-treeInternal%one projection vector per node (like annoy)rp-tree%Dense vectors with unboxed componentsrp-tree&Sparse vectors with unboxed components:rp-treeBounds around the cutting plane;rp-treelower bound on the cut point<rp-tree upper bound=rp-tree Exceptionsrp-tree0Pairing of a data item with its vector embedding*The vector is used internally for indexingrp-treevector embeddingrp-tree data itemrp-tree(Unsafe) Pack a ) from its vector dimension and components0Note : the relevant invariants are not checked :9vector components are _assumed_ to be in increasing order3vector dimension is larger than any component index>rp-tree(Used for updating in a streaming setting?rp-treeInternal6one projection vector per tree level (as suggested in  9https://www.cs.helsinki.fi/u/ttonteri/pub/bigdata2016.pdf ) rp-treeRandom projection treesThe first type parameter corresponds to a floating point scalar value, the second is the type of the data collected at the leaves of the tree (e.g. lists of vectors)We keep them separate to leverage the Functor instance for postprocessing and visualization6One projection vector per tree level (as suggested in  9https://www.cs.helsinki.fi/u/ttonteri/pub/bigdata2016.pdf )@rp-tree+one random projection vector per tree level rp-treeInner product spacesThis typeclass is provided as a convenience for library users to interface their own vector types.rp-treeScale a vectorrp-tree0A random projection forest is an ordered set of  sThis supports efficient updates of the ensemble in the streaming/online setting.rp-treeSerialise each tree in the  as a separate bytestringrp-treeDeserialise each tree in the + from a separate bytestring and reconstructrp-tree1All data buckets stored at the leaves of the treerp-treeNumber of tree levelsrp-tree.Set of data points used to construct the indexrp-treesparse-sparse inner productrp-treesparse-dense inner productrp-tree6Vector distance induced by the L2 norm (sparse-sparse)rp-tree5Vector distance induced by the L2 norm (sparse-dense)Arp-tree4Vector distance induced by the L2 norm (dense-dense)Brp-tree Vector sumCrp-tree Vector sumDrp-treeVector differenceErp-treeVector differenceFrp-treeBinary operation on  sGrp-treesparse * dense -> densee.g. vector sum, differenceHrp-treeNB : prints distance information rounded to two decimal digits#rp-treedata point, label st#uv$wxyz{|}None3?x~rp-tree"Populate a tree from a data streamAssumptions on the data source:'non-empty : contains at least one value>stationary : each chunk is representative of the whole datasetbounded : we wait until the end of the stream to produce a result&rp-tree$Populate a forest from a data streamAssumptions on the data source:'non-empty : contains at least one value>stationary : each chunk is representative of the whole datasetbounded : we wait until the end of the stream to produce a result'rp-treeSource of random data points~rp-tree random seedrp-treemax tree depthrp-tree min leaf sizerp-treedata chunk sizerp-tree%nonzero density of projection vectorsrp-treedimension of projection vectorsrp-tree data source&rp-tree random seedrp-treemax tree depthrp-tree min leaf sizerp-treenumber of treesrp-treedata chunk sizerp-tree%nonzero density of projection vectorsrp-treedimension of projection vectorsrp-tree data source'rp-treenumber of vectors to generaterp-tree*random generator for the vector components%~&'None4rp-tree(binary mixture of isotropic Gaussian rvs5rp-tree?binary mixture of isotropic Gaussian rvs with sparse components4rp-treenumber of data pointsrp-treevector dimension5rp-treenumber of data pointsrp-treevector dimensionrp-treenonzero density()210/.-,+*345None 58>?-6rp-tree Look up the k# nearest neighbors to a query pointThe supplied distance function d. must satisfy the definition of a metric, i.e.%identity of indiscernible elements : ( d(x, y) = 0 \leftrightarrow x \equiv y  symmetry :  d(x, y) = d(y, x) triangle inequality :  d(x, y) + d(y, z) \geq d(x, z) 7rp-tree1average recall-at-k, computed over a set of trees8rp-tree$Retrieve points nearest to the query=in case of a narrow margin, collect both branches of the tree6rp-treedistance functionrp-tree k neighborsrp-treerandom projection forestrp-tree query pointrp-tree7ordered in increasing distance order to the query point7rp-tree+k : number of nearest neighbors to considerrp-tree query point8rp-tree query point9  !"#$%&'()*+,-./0123456789&678  $#3()*+,-./012%'54!"        !"#$%&'()*+,-../0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTU?VWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$rp-tree-0.3.2-BxSYrWfmEUT15wzPBL1Gm8 Data.RPTreeData.RPTree.InternalData.RPTree.GenData.RPTree.DrawData.RPTree.ConduitData.RPTree.Internal.TestingDVectorSVectorEmbedeEmbedeData fromListSv fromVectorSv fromListDv fromVectorDvRPTreeInnerinnermetricL2^+^^-^Scale.*RPForestserialiseRPForestdeserialiseRPForestleaveslevelspointsinnerSSinnerSDinnerDD metricSSL2 metricSDL2scaleDscaleS normalSparse2normal2sparsedensewriteCsvdrawliftCforest dataSource BenchConfig bcDescriptionbcMaxTreeDepth bcMinLeafSize bcNumTrees bcChunkSize bcNZDensity bcVectorDim bcDataSizebcNumQueryPointsrandSeeddatDdatSknn recallWith candidatesRTMargin cMarginLow cMarginHighRPTError$fSemigroupMarginRPT _rpVectors metricDDL2sumSDsumSSdiffSDdiffSSbinSSbinSDDpartitionAtMedianRTipRBin_rDataDVdvVecSVsvVecsvDim EmptyResult getMargintoListDvTipBin_rpData_rpR_rpL _rpMargin _rpThresholdrData_rpTreerpDatarpTree rpTreeData/. normalizesortByVG rsReservoir rsfLookAhrsfW sampleWORreplaceInBufferdenseVGsparseVGResSRSFull RSPartialgenWgenSmixtureN normalDense2BoxedboxedtoCsvRowtoCsvdrawRPT toStringRPTtoBoxtipDatatxtbysidestacktree