h$"      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHNone5678:>? #Irp-treeInternal6one projection vector per tree level (as suggested in  9https://www.cs.helsinki.fi/u/ttonteri/pub/bigdata2016.pdf )rp-tree%Dense vectors with unboxed componentsrp-tree&Sparse vectors with unboxed componentsJrp-treeBounds around the cutting planeKrp-treelower bound on the cut pointLrp-tree upper boundMrp-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 indexrp-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 indexNrp-tree(Used for updating in a streaming setting rp-treeRandom projection treesThe first type parameter corresponds to a floating point scalar value, the second labels every tree part (e.g. for visual rendering) and the third 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 (Bi-)Functor instance for postprocessing and visualization.This implementation uses one projection vector per tree level (as suggested in  9https://www.cs.helsinki.fi/u/ttonteri/pub/bigdata2016.pdf ).Orp-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)Prp-tree4Vector distance induced by the L2 norm (dense-dense)Qrp-tree Vector sumRrp-tree Vector sumSrp-treeVector differenceTrp-treeVector differenceUrp-treeBinary operation on  sVrp-treesparse * dense -> densee.g. vector sum, differenceWrp-tree 1 )rp-treemin leaf size *rp-treenumber of trees n_t > 1+rp-treedata chunk size,rp-tree&nonzero density of projection vectors p_{nz} \in (0, 1).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 result0rp-treeConfigure the rp-tree forest construction process with some natural defaults1rp-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 depth, l > 1 rp-treemin leaf size,  m_{leaf} > 1rp-treenumber of trees, n_t > 1rp-treedata chunk size,  n_{chunk} > 3rp-tree'nonzero density of projection vectors, p_{nz} \in (0, 1)rp-tree!dimension of projection vectors, d > 1rp-tree data source0rp-tree data sizerp-treevector dimension1rp-treenumber of vectors to generaterp-tree*random generator for the vector components &'()*+,-./01None}>rp-tree(binary mixture of isotropic Gaussian rvs?rp-tree?binary mixture of isotropic Gaussian rvs with sparse components>rp-treenumber of data pointsrp-treevector dimension?rp-treenumber of data pointsrp-treevector dimensionrp-treenonzero density23<;:987654=>?None 58>?gArp-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) Brp-tree1average recall-at-k, computed over a set of treesCrp-tree$Retrieve points nearest to the query=in case of a narrow margin, collect both branches of the treeErp-tree&How many data items are stored in the  Frp-tree3How many data items are stored in each leaf of the  Arp-treedistance functionrp-tree k neighborsrp-treerandom projection forestrp-tree query pointrp-tree7ordered in increasing distance order to the query pointBrp-tree+k : number of nearest neighbors to considerrp-tree query pointCrp-tree query point  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF./0&'()*+,ABCDEF@  $%23456789:;< -=1?>"#!       !"#$%&'()*+,-./01234567889:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghiOjklmnopqrstuvwxyz{|}~"rp-tree-0.4-252TfFRJZSoFJQVWZvE0KV Data.RPTreeData.RPTree.InternalData.RPTree.GenData.RPTree.DrawData.RPTree.ConduitData.RPTree.Internal.TestingDVectorSVectorEmbedeEmbedeData fromListSv fromVectorSv fromListDv fromVectorDvRPTreeInnerinnermetricL2^+^^-^Scale.*RPForestserialiseRPForestdeserialiseRPForestleaveslevelspointsinnerSSinnerSDinnerDD metricSSL2 metricSDL2scaleDscaleScircle2d normalSparse2normal2sparsedensewriteCsvwriteDot RPTreeConfigRPCfgfpMaxTreeDepth fpMinLeafSize fpNumTreesfpDataChunkSizefpProjNzDensityliftCtreeforest rpTreeCfg dataSource BenchConfig bcDescriptionbcMaxTreeDepth bcMinLeafSize bcNumTrees bcChunkSize bcNZDensity bcVectorDim bcDataSizebcNumQueryPointsrandSeeddatDdatS RPTreeStatsknn recallWith candidates treeStatstreeSize leafSizes$fEqRPTreeStats$fShowRPTreeStatsRPTMargin cMarginLow cMarginHighRPTError$fSemigroupMargin _rpVectors metricDDL2sumSDsumSSdiffSDdiffSSbinSSbinSDDpartitionAtMedianTipBin_rpData_rpR_rpL _rpMargin _rpThreshold_rpLabelDVdvVecSVsvVecsvDim EmptyResult getMargintoListDv_rpTreerpDatarpLabelVErpTree rpTreeData/. normalizesortByVG rsReservoir rsfLookAhrsfW sampleWORreplaceInBufferdenseVGsparseVGResSRSFull RSPartialgenWgenSmixtureN normalDense2