std::vector<Node*>::const_iterator AbstractLayer::local_end(int_t depth) const { if (depth >= depth_) throw BadProperty("Selected depth out of range"); index min_nodes_per_layer = local_size()/depth_; index last_gid_at_depth = gids_[(depth+1)*(global_size()/depth_)-1]; std::vector<Node*>::const_iterator iter = local_begin(); for(iter += (depth+1)*min_nodes_per_layer; iter != local_end(); ++iter) { if ((*iter)->get_gid() > last_gid_at_depth) break; } return iter; }
inline tree local_begin_script () { return local_begin (MATH_LEVEL, as_string (index_level+1)); }