mirror of https://github.com/CGAL/cgal
Add a default argument for BGL tests and examples, used when no command line argument in given.
This commit is contained in:
parent
cd14640d9a
commit
a1474a74d2
|
|
@ -15,11 +15,11 @@ typedef CGAL::Linear_cell_complex_for_bgl_combinatorial_map_helper
|
|||
typedef boost::graph_traits<LCC>::vertex_descriptor vertex_descriptor;
|
||||
typedef boost::graph_traits<LCC>::vertex_iterator vertex_iterator;
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
LCC lcc;
|
||||
CGAL::read_off(argv[1], lcc);
|
||||
|
||||
CGAL::read_off((argc>1)?argv[1]:"cube.off", lcc);
|
||||
|
||||
// This is the vector where the distance gets written to
|
||||
std::vector<int> distance(lcc.vertex_attributes().size());
|
||||
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ OutputIterator adjacent_vertices_V2(const LCC& g,
|
|||
}
|
||||
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
LCC lcc;
|
||||
CGAL::read_off(argv[1], lcc);
|
||||
CGAL::read_off((argc>1)?argv[1]:"cube.off", lcc);
|
||||
|
||||
GraphTraits::vertex_iterator vi = vertices(lcc).first;
|
||||
std::list<vertex_descriptor> V;
|
||||
|
|
|
|||
|
|
@ -63,13 +63,13 @@ void calculate_face_normals(const HalfedgeGraph& g,
|
|||
}
|
||||
}
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
typedef boost::property_map<LCC, CGAL::face_index_t>::const_type
|
||||
Face_index_map;
|
||||
|
||||
LCC lcc;
|
||||
CGAL::read_off(argv[1], lcc);
|
||||
CGAL::read_off((argc>1)?argv[1]:"cube.off", lcc);
|
||||
|
||||
// Ad hoc property_map to store normals. Face_index_map is used to
|
||||
// map face_descriptors to a contiguous range of indices. See
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@ void fct(const LCC& lcc)
|
|||
std::for_each(vb,ve, Fct());
|
||||
}
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
LCC lcc;
|
||||
CGAL::read_off(argv[1], lcc);
|
||||
CGAL::read_off((argc>1)?argv[1]:"cube.off", lcc);
|
||||
|
||||
fct(lcc);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ struct Source {
|
|||
}
|
||||
};
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
LCC lcc;
|
||||
CGAL::read_off(argv[1], lcc);
|
||||
CGAL::read_off((argc>1)?argv[1]:"cube.off", lcc);
|
||||
GraphTraits::vertex_descriptor vd = *(vertices(lcc).first);
|
||||
|
||||
typedef boost::transform_iterator<Source<LCC>,halfedge_around_target_iterator> adjacent_vertex_iterator;
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@ typedef boost::graph_traits<Polyhedron>::vertex_iterator vertex_iterator;
|
|||
|
||||
|
||||
|
||||
int main(int, char** argv) {
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
Polyhedron P;
|
||||
std::ifstream in(argv[1]);
|
||||
std::ifstream in((argc>1)?argv[1]:"cube.off");
|
||||
in >> P ;
|
||||
|
||||
// associate indices to the vertices using the "id()" field of the vertex.
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ adjacent_vertices_V2(const Polyhedron& g,
|
|||
}
|
||||
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in(argv[1]);
|
||||
std::ifstream in((argc>1)?argv[1]:"cube.off");
|
||||
Polyhedron P;
|
||||
in >> P;
|
||||
GraphTraits::vertex_iterator vi = vertices(P).first;
|
||||
|
|
|
|||
|
|
@ -63,14 +63,14 @@ void calculate_face_normals(const HalfedgeGraph& g,
|
|||
}
|
||||
}
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
typedef boost::property_map<
|
||||
Polyhedron,
|
||||
CGAL::face_index_t
|
||||
>::const_type Face_index_map;
|
||||
|
||||
std::ifstream in(argv[1]);
|
||||
std::ifstream in((argc>1)?argv[1]:"cube.off");
|
||||
Polyhedron P;
|
||||
in >> P ;
|
||||
|
||||
|
|
|
|||
|
|
@ -55,10 +55,10 @@ void fct(const Polyhedron& p)
|
|||
std::for_each(vb,ve, Fct());
|
||||
}
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Polyhedron P;
|
||||
std::ifstream in(argv[1]);
|
||||
std::ifstream in((argc>1)?argv[1]:"cube.off");
|
||||
in >> P ;
|
||||
|
||||
fct(P);
|
||||
|
|
|
|||
|
|
@ -37,9 +37,9 @@ struct Source {
|
|||
}
|
||||
};
|
||||
|
||||
int main(int, char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in(argv[1]);
|
||||
std::ifstream in((argc>1)?argv[1]:"cube.off");
|
||||
Polyhedron P;
|
||||
in >> P;
|
||||
GraphTraits::vertex_descriptor vd = *(vertices(P).first);
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ typedef CGAL::Surface_mesh<Point> Mesh;
|
|||
|
||||
typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
|
||||
|
||||
int main(int, char* argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
Mesh P;
|
||||
//std::cin >> P;
|
||||
std::ifstream in(argv[1]);
|
||||
std::ifstream in((argc>1)?argv[1]:"data/prim.off");
|
||||
in >> P;
|
||||
Mesh::Property_map<vertex_descriptor,vertex_descriptor> predecessor;
|
||||
predecessor = P.add_property_map<vertex_descriptor,vertex_descriptor>("v:predecessor").first;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ typedef CGAL::Halfedge_around_target_iterator<Polyhedron> halfedge_around_target
|
|||
typedef CGAL::Halfedge_around_face_iterator<Polyhedron> halfedge_around_face_iterator;
|
||||
typedef CGAL::Face_around_face_iterator<Polyhedron> face_around_face_iterator;
|
||||
typedef CGAL::Vertex_around_target_iterator<Polyhedron> vertex_around_target_iterator;
|
||||
int main(int, char* argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
BOOST_CONCEPT_ASSERT((CGAL::Concepts::BidirectionalCirculator<halfedge_around_face_circulator>)) CGAL_UNUSED;
|
||||
|
|
@ -49,7 +49,7 @@ int main(int, char* argv[])
|
|||
BOOST_CONCEPT_ASSERT((boost::BidirectionalIterator<in_edge_iterator>)) CGAL_UNUSED;
|
||||
BOOST_CONCEPT_ASSERT((boost::BidirectionalIterator<out_edge_iterator>)) CGAL_UNUSED;
|
||||
|
||||
std::ifstream in(argv[1]);
|
||||
std::ifstream in((argc>1)?argv[1]:"data/cube.off");
|
||||
Polyhedron P;
|
||||
in >> P;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue