const std::vector<Projection::MaskCell>& Projection::get_sphere_mask(double radius) { // check if already calculated if(radius2mask_.find(radius) == radius2mask_.end()) { // compute std::vector<MaskCell> mask; calculate_sphere_mask(mask, radius); radius2mask_[radius] = mask; } return radius2mask_.find(radius)->second; }
const std::vector<Projection::MaskCell>& Projection::get_sphere_mask() { // check if already calculated if (mask_.size() == 0) calculate_sphere_mask(mask_); return mask_; }