Thisdocumentistheonline-onlyappendixto:Efficientk-closestpairqueriesingeneralmetricspacesYunjunGao·LuChen·XinhanLi·BinYao·GangChenReceived:21May2014/Revised:10February2015/Accepted:13March2015A.
EXAMPLEOFRMAEXAMPLE1.
WeillustrateRMAusingtherunningexampledepictedinFig.
7,andsupposek=2.
Firstofall,RMAupdatesmaxCPD2to5.
5usingLemma2,andprunestherootentrypairEP3,EQ1byRule1duetomindist(EP3,EQ1)>maxCPD2.
IttheninvokesRMA-PEPfortherootentrypairEP2,EQ1withthesmallestmindist.
SinceEP2andEQ1aretheintermediateentriespointingtonon-leafnodes,RMA-PEPcallsPRUNEtoevaluatethesubentriesofEP2,i.
e.
,EP6andEP7,whichcannotbediscardedbyRules1-2.
Similarly,thesubentriesEQ3andEQ4ofEQ1canalsonotbepruned.
Next,itevaluatestheremainingsubentriesnotpruned.
Forexample,sincebothemindist(EP6,EQ3)andmindist(EP6,EQ3)aresmallerthanmaxCPD2,EP6,EQ3isinsertedintoH,andmaxCPD2isupdatedto5viaLemma1;whileasmindist(EP6,EQ4)andmindist(EP6,EQ4)arelargerthanmaxCPD2,EP6,EQ4andEP7,EQ4arediscarded.
Atthistime,thealgorithmgetsH={EP6,EQ3,EP7,EQ3},andthen,recursivelyinvokesRMA-PEPforeveryentrypairinHuntilmindist(EP7,EQ3)>maxCPD2,afterwhichSR={p7,q3,p6,q3}.
Thereafter,similarasEP2,EQ1,RMAbacktrackstovisitthenextrootentrypairEP1,EQ2.
Thealgorithmproceedsinthesamemanneruntilmindist(EP1,EQ1)>maxCPD2,andreturnsthefinalqueryresultsetSR={p5,q9,p4,q9}.
Fig.
22illustratesthemainoperationsofRMAforM2CPsearch,inwhichtheprunedentrypairsareshownwithstrikethroughfonts.
B.
EXAMPLEOFIMAEXAMPLE2.
ConsidertherunningexampleillustratedinFig.
7again.
Tobeginwith,IMAupdatesmaxCPD2to5.
5usingLemma2,andinsertstherootentrypairsnotpruned(byRule1)intoH,whereH={EP2,EQ1,EP1,EQ2,EP1,EQ1,EP2,EQ2,EP3,EQ2}.
Then,itvisitsthetopentrypairEP2,EQ1ofH,addsallqualifiedsubentrypairsofEP2,EQ1notprunedbyRules1-2toH,andupdatesmaxCPD2to5viaLemma1.
Thereafter,similarasEP2,EQ1,IMAvisitstheheadentryEP1,EQ2ofH.
Next,itvisitsthetopentryEP5,EQ6ofH.
SinceEP5andEQ6pointstoleafnodes,IMAupdatesSRto{p5,q9,p4,q9},andmaxCPD2tod(p4,q9)(=1.
2).
Finally,IMAterminatesandreturnsthefinalresultsetSR,duetomindist(EP1,EQ1)>maxCPD2.
ThemainoperationsofIMAforM2CPretrievalaredepictedinFig.
23,wheretheprunedentrypairsareshownwithstrikethroughfonts.
C.
EXAMPLEOFEHMEXAMPLE3.
ConsidertherunningexampleshowninFig.
7again,andsupposeeCPD2=3(k=2).
Firstofall,EHMoperationsandcontentsoflocalheapsProcessrootentrypairsandgetH1={,,,,,},,,SRmaxCPDk5.
551.
233VisitofH1andgetH2={,,,}VisitofH2andupdateSRTerminatevisitingH2duetomindist(EP7,EQ3)>maxCPDkBacktracktovisitofH1andgetH3={,,,}VisitofH3andupdateSR,TerminatevisitingH3duetomindist(EP5,EQ5)>maxCPDk31.
2,TerminatevisitingH1duetomindist(EP1,EQ1)>maxCPDk,1.
2Fig.
22IllustrationofRMAoperationsProcessrootentrypairsVisitVisitVisitH(global),,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,SRmaxCPDk5.
5531.
2Fig.
23IllustrationofIMAupdatesmaxCPD2to5.
5,prunestherootentrypairEP3,EQ1asmindist(EP3,EQ1)>maxCPD2,andinsertsEP2,EQ1intoS(duetomindist(EP2,EQ1)=0),EP3,EQ2intoCH(asmindist(EP3,EQ2)>eCPD2),andEP1,EQ2,EP1,EQ1,EP2,EQ2intoH(sincetheirmindistarelargerthan0butsmallerthaneCPD2).
Then,thealgorithmvisitsthetopentrypairEP2,EQ1ofS,andaddsallitssubentrypairstoEHbecausetheiremindistislargerthaneCPD2.
Next,itvisitsentrypairsinHiterativelyuntilmindist(EP1,EQ1)>maxCPD2.
Finally,EHMterminates,andreturnsthefinalresultsetSR.
Notethat,inthiscase,compensationdoesnotneedsince,foreveryentrypairEP,EQpreservedinEHandCH,theiremindistormindistarelargerthanmaxCPD2.
Also,theI/OcostofEHMisthesameasthatofIMA,i.
e.
,threeintermediateentrypairsareaccessed.
Nevertheless,EHMavoidscomputingthemindistforentrypairsstoredinEH,incurringsmallercomputationalcost.
Fig.
24illustratestheoperationsofEHMforM2CPretrieval.
D.
EXAMPLEOFEHSEXAMPLE4.
WeillustrateEHSusingtheSM2CP(k=2)queryontheobjectsetOshowninFig.
2a,andsupposeeCPD2=r4.
Firstofall,EHSupdatesmaxCPD2withr5usingLemma7,andinsertse5,e5,e5,e6,ande6,e6intoSastheirmindistsequalsto0.
Itthenvisitsthetopentrye5,e5ofS,andcallsEHS-PEPtoexpande5,e5.
Sincee5=e5ande5pointstothenon-leafnode,EHS-PEPinsertsthequalifiedsubentrypairse1,e1,e1,e2,ande2,e2intoS,andupdatesmaxCPD2tor2usingLemma7.
Next,EHSvisitsthetopentrypaire1,e1ofS,andinvokesEHS-PEPtoexpande1,e1.
Sincee1=e1ande1pointstotheleafnode,EHS-PEPupdatesSRto{o1,o2}.
Similarly,thealgorithmproceedstoevaluateentrypairsofSuntilSisempty.
Finally,thealgorithmterminatesandreturnsSR={o3,o4,o1,o2}.
Fig.
25showstheoperationsofEHSforSM2CPretrieval.
E.
EXAMPLEOFMSAEXAMPLE5.
ConsidertheSM2CP(k=2)queryontheobjectsetOshowninFig.
2a,withCOMdnn-treeillustratedinFig.
10.
First,maxCPD2isinitializedtoinfinity.
MSAinsertsrootentriese5ande6intoH.
Then,itpopsthetopentrye5fromH.
Sincee5pointstothenon-leafnode,thealgorithminsertsthequalifiedsub-entriese1ande2intoH,sincee1.
dnn(=r1)ande2.
dnn(=d(o3,o4))aresmallerthanmaxCPD2.
Next,thealgorithmpopstheheadentrye1fromH.
Ase1pointstotheleafnode,thequalifiedsubentries(objects)o1ando2areinsertedintoCH.
Then,e2isprocessedsimilarly,afterwhichCH={o3,o4,o1,o2}andmaxCPD2=r1.
Thereafter,e6ispopped,andthewhile-loopstopsduetoe6.
dnn>maxCPD2.
Inthesequel,MSAevaluateseachobjectoiinCHinorder,andcomparesoiwithalreadyvisitedobjectsojtoupdateSRandmaxCPD2ifd(oi,oj)≤maxCPD2.
Forexample,whenvisitingo4,asd(o4,o3)≤maxCPD2,SRisupdatedto{o3,o4}.
Finally,thealgorithmreturnsSR={o3,o4,o1,o2}.
Fig.
26depictstheoperationsofMSAforSM2CPretrieval.
operationsProcessrootentrypairsVisitofSVisitofHVisitofHS,,,,,,,,,,,,,,HCHEH,,,,,,,,,SRmaxCPDk5.
5531.
2Fig.
24IllustrationofEHMoperationsProcessrootentrypairsVisitofSVisitofSVisitofSSSR,,HCHEH,,,,,,,VisitofS,,,,VisitofS,,VisitofS,,VisitofSVisitofSVisitofS,,,,maxCPDkr5r2r2r2r1r1r1r1r1r1Fig.
25IllustrationofEHSoperationsProcessrootentriesVisite5ofHVisite1ofHHSRe5,e6CHmaxCPDke1,e2,e6e2,e6Visito3ofCHe6Visito4ofCHVisito1ofCH,Visite2ofHo1,o2o3,o4,o1,o2o3,o4,o1,o2o3,o4,o1,o2Visito2ofCHo3,o4,o1,o2o3,o4,o1,o2r1r1r1r1r1∞∞∞Fig.
26IllustrationofMSA
在上个月的时候也有记录到 NameCheap 域名注册商有发布域名转入促销活动的,那时候我也有帮助自己和公司的客户通过域名转入到NC服务商这样可以实现省钱续费的目的。上个月续费转入的时候是选择9月和10月份到期的域名,这不还有几个域名年底到期的,正好看到NameCheap商家再次发布转入优惠,所以打算把剩下的还有几个看看一并转入进来。活动截止到9月20日,如果我们需要转入域名的话可以准备起来。 N...
优林怎么样?优林好不好?优林 是一家国人VPS主机商,成立于2016年,主营国内外服务器产品。云服务器基于hyper-v和kvm虚拟架构,国内速度还不错。今天优林给我们带来促销的是国内东北地区哈尔滨云服务器!全部是独享带宽!首月5折 续费5折续费!地区CPU内存硬盘带宽价格购买哈尔滨电信2核2G50G1M53元直达链接哈尔滨电信4核4G50G1M83元直达链接哈尔滨电信8核8G50G1M131元直...
justhost怎么样?justhost服务器好不好?JustHost是一家成立于2006年的俄罗斯服务器提供商,支持支付宝付款,服务器价格便宜,200Mbps大带宽不限流量,支持免费更换5次IP,支持控制面板自由切换机房,目前JustHost有俄罗斯6个机房可以自由切换选择,最重要的还是价格真的特别便宜,最低只需要87卢布/月,约8.5元/月起!总体来说,性价比很高,性价比不错,有需要的朋友可以...
eq2为你推荐
域名注册域名注册大概要多长时间域名注册申请域名怎么申请和注册域名注册公司找家正规的中文域名注册公司域名注册网网站域名申请,在那备案?空间域名空间和域名是什么?国外主机空间2个国外主机空间,都放了BLOG,看看哪个更快?北京网站空间一个小型企业网站空间和网站域名一年需要多少钱?便宜虚拟主机麻烦各位给我推荐一个比较便宜的虚拟主机,要质量好的。谢谢大家了虚拟主机评测浅谈建站新手如何挑选虚拟主机青岛虚拟主机阿里云主机青岛好还是杭州好
3322动态域名 adman 百度云100as 鲨鱼机 softbank邮箱 上海服务器 四核服务器 raid10 域名dns 什么是web服务器 阿里云邮箱登陆 美国迈阿密 国内空间 杭州电信宽带 qq空间打开很慢 超低价 linuxvi tko 文件传输 rewrite规则 更多