コード例 #1
0
ファイル: delaunay2metis.cpp プロジェクト: yonggang985/Touch
static void output_finalized_vertices_for_sorting (
    vertex_list & finalized_vertices,
    vertex_db & vertices,ExtSort* es)
{
    vertex_list::iterator v_ptr = finalized_vertices.begin ();
    while (v_ptr != finalized_vertices.end ())
    {
        vertex_db::iterator v = vertices.find (*v_ptr);
        assert (v != vertices.end ()); // Do not comment out this line

        ///

        Vertex_info* temp = new Vertex_info();
        temp->vid = v->first;
        temp->vi  = v->second;
#ifndef NDEBUG
        std::cout << "\ninserting: "<< temp->vid << " :" << temp->vi.coords[0] << "," << temp->vi.coords[1] << temp->vi.coords[2];
#endif

        es->insert(temp);

//        v->second.output_in_binary (*v_ptr, YOUR_STREAM_HERE);
        vertices.erase (v);
        v_ptr++;
    }
    finalized_vertices.clear ();
}
コード例 #2
0
ファイル: metis2voronoi.cpp プロジェクト: yonggang985/Touch
static void output_finalized_vertices_for_sorting (
    vertex_list & finalized_vertices,
    dias::vertex_db & vertices,
    dias::ExtSort* es)
{
    vertex_list::iterator v_ptr = finalized_vertices.begin ();
    while (v_ptr != finalized_vertices.end ())
    {
        dias::vertex_db::iterator v = vertices.find (*v_ptr);
        assert (v != vertices.end ()); // Do not comment out this line

        dias::Vertex_info* temp = new dias::Vertex_info();
        temp->vid = v->first;
        temp->vi  = v->second;

        es->insert(temp);

        vertices.erase (v);
        v_ptr++;
    }
    finalized_vertices.clear ();
}