算法:Hausdorff相似性同质关联

map(key, value){

/*key: void*/

/*value: identity + coordinates of one entity from GADM*/

for(i=0; i

sim = HausSim(NUTS[i].coordinates, value. coordinates)

emit(NUTS[i].identity, value. identity + sim)

}

}

reduce(key, value){

/*key: identity of one entity from NUTS */

/*value: identities of entities in GADM + their Hausdorff similarities with the entity in the key */

while(value. hasNext){

if(value.sim>maxSim){

maxSim=value.sim;

maxIden=value.Iden

}

}

if(maxSim>threshold)

emit(key, maxIden)

}