Logo Search packages:      
Sourcecode: octave-ann version File versions  Download package

basic.m

ann

pts=;

querypts=;

kd=ANNkd_tree(10,128)
kd=ANNkd_tree(pts)
assert(kd.theDim()==size(pts,2));
assert(kd.nPoints()==size(pts,1));

kd.Print(true);
kd.Print(false);
kd.Dump(true);
kd.Dump(false);

s=kd.getStats()
s.dim
s.n_pts
s.bkt_size
s.n_lf
s.n_tl
s.n_spl
s.n_shr
s.depth
s.sum_ar
s.avg_ar


[nn_idx,dd]=kd.annkSearch(querypts(4,:),5)
[nn_idx,dd]=kd.annkPriSearch(querypts(4,:),5);
[n,nn_idx,dd]=kd.annkFRSearch(querypts(4,:),2,5);

for i=1:size(querypts,1),
  [nn_idx,dd]=kd.annkSearch(querypts(i,:),5)
endfor

annMaxPtsVisit(10)

Generated by  Doxygen 1.6.0   Back to index