sclass G22FindSimilarMasksTask { // Image we are looking up Image2B queryImage; // where all the masks are that we are comparing the queryImage to IG22MasksHolder masksHolder; // where the found masks go (probability = similarity) new ProbabilisticList> outList; // probabilistic stack & scheduler new PStack pstack; // how many full mask comparisons were made int comparisons; IProbabilisticScheduler scheduler() { ret pstack.scheduler(); } void foundMask(IG22Mask mask, double similarity) { print("Found mask with similarity " + formatDouble3X(similarity) + " in step " + scheduler().stepCount()); outList.add(mask, similarity); } }