Query with C-curves

Given:   vq,   C1 .. Cm,   Curves.

candidates = []
for i in 1 .. m
{
	x[i] = Ci(vq)
	objects = select objectId from Curves
	            where C.curveId = i
		    and x[i]-m <= C.pointId <= x[i]+m
	candidates = candidates * objects
}
results = [];   maxD = infinity
for each obj in candidates
{
	dist = D(vobj, vq)
	if (#results < k  or  dist < maxD)
	{
		insert (obj,dist) into results
		maxD = largest dist in results
	}
}

Cost = 2Topen  +  mTsel  +  TPfN  +  TDfN

where

  • Tsel is the cost of the range query using e.g. B-tree   (typically log N)

  • f is the filtering factor