patch_collection TrueClusterHistogram::getPatches(const DataPointCollection &dps, int npatches){ cout << "npatches: " << npatches << " dps size: " << dps.size() << endl; int per_image = 20;//1 + (npatches / dps.size()); cout << "extracting " << per_image << " per image " << endl; typedef DataPointCollection::const_iterator dpit; patch_collection total; for(dpit i = dps.begin(); i != dps.end(); ++i){ addPatches(*i, per_image, total); } return total; }
void Foam::fvMesh::addFvPatches ( const List<polyPatch*> & p, const bool validBoundary ) { if (boundary().size()) { FatalErrorIn ( "fvMesh::addFvPatches(const List<polyPatch*>&, const bool)" ) << " boundary already exists" << abort(FatalError); } // first add polyPatches addPatches(p, validBoundary); boundary_.addPatches(boundaryMesh()); }