Research Article

Secure kNN Computation and Integrity Assurance of Data Outsourcing in the Cloud

Algorithm 2

.
Require:
, ,
Ensure:
C, hash, result
for each entry in   do
if is a data object   then
//Enlarge the to encompass
C.Enlarge
end if
if  E.getProduct.MaxDist and
in   then
result.add
end if
if   E.getProduct
and E.id not in   then
(11) Alarm the client
(12) end if
(13)if   is a symbol [ then
(14)
(15)end if
(16)if   is a pair   then
(17) if  
then
(18) Alarm the client
(19)end if
(20)
(21)
(22) end if
(23)if is a symbol ] then
(24)
(25)end if
(26) end for