void graph_insert_data( const std::vector <pgr_edge_t > &data_edges) { for (const auto edge : data_edges) { graph_add_edge(edge); } adjust_vertices(); for ( int64_t i = 0; (unsigned int) i < gVertices_map.size(); ++i ) graph[i].id = gVertices_map.find(i)->second; }
//! \brief Inserts *count* edges of type *pgr_edge_t* into the graph void graph_insert_data(const pgr_edge_t *data_edges, int64_t count) { for (unsigned int i = 0; i < count; ++i) { graph_add_edge(data_edges[i]); } adjust_vertices(); for ( int64_t i = 0; (unsigned int) i < gVertices_map.size(); ++i ) graph[i].id = gVertices_map.find(i)->second; }
/* call downstream function with each path */ list_forall (p, plist) { TRY(calc_sums(p->priv)); TRY(calc_lon(p->priv)); TRY(bestpolygon(p->priv)); TRY(adjust_vertices(p->priv)); TRY(smooth(&p->priv->curve, p->sign, param->alphamax)); if (param->opticurve) { TRY(opticurve(p->priv, param->opttolerance)); p->priv->fcurve = &p->priv->ocurve; } else { p->priv->fcurve = &p->priv->curve; } privcurve_to_curve(p->priv->fcurve, &p->curve); if (progress->callback) { cn += p->priv->len; progress_update(cn/nn, progress); } }