[Small Feature] Rename plane_graph_to_lcc -> read_plane_graph_in_lcc

This commit is contained in:
Yliess Bellargui 2025-07-08 09:45:15 +02:00
parent e170d7b0de
commit afc4f72b26
12 changed files with 26 additions and 26 deletions

View File

@ -28,15 +28,15 @@ Here a small example:
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
*/
template<class LCC>
typename LCC::Dart_descriptor plane_graph_to_lcc(LCC& lcc,
typename LCC::Dart_descriptor read_plane_graph_in_lcc(LCC& lcc,
std::istream& ais);
/*!
\ingroup PkgLinearCellComplexConstructions
\deprecated Use `plane_graph_to_lcc()` instead.
\deprecated Use `read_plane_graph_in_lcc()` instead.
*/
template<class LCC>
[[deprecated("Use plane_graph_to_lcc instead")]]
[[deprecated("Use read_plane_graph_in_lcc instead")]]
typename LCC::Dart_descriptor import_from_plane_graph(LCC& lcc, std::istream& ais);
} /* namespace CGAL */

View File

@ -5,7 +5,7 @@ namespace CGAL{
Imports `apoly` (a `Polyhedron_3`) into `lcc`, a model of the `LinearCellComplex` concept. Objects are added in `lcc`, existing darts are not modified. Returns a dart created during the import.
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 2 and \link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
\sa `CGAL::plane_graph_to_lcc<LCC>`
\sa `CGAL::read_plane_graph_in_lcc<LCC>`
\sa `CGAL::triangulation_3_to_lcc<LCC,Triangulation>`
*/
template<class LCC,class Polyhedron>

View File

@ -8,7 +8,7 @@ Objects are added in `lcc`, existing darts are not modified. Returns a dart crea
\pre \link GenericMap::dimension `LCC::dimension`\endlink \f$ \geq\f$ 3 and
\link LinearCellComplex::ambient_dimension `LCC::ambient_dimension`\endlink==3.
\sa `CGAL::plane_graph_to_lcc<LCC>`
\sa `CGAL::read_plane_graph_in_lcc<LCC>`
\sa `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>`
*/

View File

@ -64,7 +64,7 @@ which constructs a vector as the difference of points `p2-p1`, and
\link LinearCellComplexTraits::Vector ` Vector `\endlink `operator() (const CGAL::Origin&, const ` \link Point ` Point`\endlink`& p)`
which constructs a vector as the difference of point `p` and a point at the origin
(used in \link CGAL::barycenter `barycenter`\endlink
and `CGAL::plane_graph_to_lcc`).
and `CGAL::read_plane_graph_in_lcc`).
typedef unspecified_type Construct_vector;
/*!
@ -103,7 +103,7 @@ a model of \link Kernel::Direction_2 `Direction_2`\endlink.
typedef unspecified_type Direction_2;
/*!
a model of \link Kernel::ConstructDirection_2 `ConstructDirection_2`\endlink (used in `CGAL::plane_graph_to_lcc`).
a model of \link Kernel::ConstructDirection_2 `ConstructDirection_2`\endlink (used in `CGAL::read_plane_graph_in_lcc`).
*/
typedef unspecified_type Construct_direction_2;

View File

@ -109,7 +109,7 @@ There are two functions allowing to build a linear cell complex from two other \
<LI>\link ::polyhedron_3_to_lcc `polyhedron_3_to_lcc(lcc,ap)`\endlink: adds in `lcc` all the cells present in `ap`, a `Polyhedron_3`.
</UL>
Lastly, the function \link ::plane_graph_to_lcc `plane_graph_to_lcc(lcc,ais)`\endlink adds in `lcc` all the cells reconstructed from the planar graph read in `ais`, a `std::istream` (see the \link ::plane_graph_to_lcc `reference manual`\endlink for the file format).
Lastly, the function \link ::read_plane_graph_in_lcc `read_plane_graph_in_lcc(lcc,ais)`\endlink adds in `lcc` all the cells reconstructed from the planar graph read in `ais`, a `std::istream` (see the \link ::read_plane_graph_in_lcc `reference manual`\endlink for the file format).
\subsection Linear_cell_complexModificationOperations Modification Operations
\anchor ssecmodifop

View File

@ -62,7 +62,7 @@
\cgalCRPSection{Global Functions}
\cgalCRPSubsection{Constructions for Linear Cell Complex}
- `CGAL::plane_graph_to_lcc<LCC>` (formerly `import_from_plane_graph`)
- `CGAL::read_plane_graph_in_lcc<LCC>` (formerly `import_from_plane_graph`)
- `CGAL::triangulation_3_to_lcc<LCC,Triangulation>` (formerly `import_from_triangulation_3`)
- `CGAL::polyhedron_3_to_lcc<LCC,Polyhedron>` (formerly `import_from_polyhedron_3`)

View File

@ -24,7 +24,7 @@ create_single_source_cgal_program(
"linear_cell_complex_3_with_colored_vertices.cpp")
create_single_source_cgal_program("linear_cell_complex_3_with_mypoint.cpp")
create_single_source_cgal_program("linear_cell_complex_4.cpp")
create_single_source_cgal_program("plane_graph_to_lcc_2.cpp")
create_single_source_cgal_program("read_plane_graph_in_lcc_2.cpp")
create_single_source_cgal_program("voronoi_2.cpp")
create_single_source_cgal_program("voronoi_3.cpp")

View File

@ -8,7 +8,7 @@ Examples for Linear_cell_complex package:
Three "basic" examples, detailed in the user manual.
* plane_graph_to_lcc_2.cpp
* read_plane_graph_in_lcc_2.cpp
Program allowing to transform a planar graph into a 2D linear cell complex.

View File

@ -42,7 +42,7 @@ int main(int narg, char** argv)
std::ifstream is(filename.c_str());
std::cout<<"Import plane graph from "<<filename<<std::endl;
CGAL::plane_graph_to_lcc(lcc, is);
CGAL::read_plane_graph_in_lcc(lcc, is);
// Display the lcc characteristics.
std::cout<<"LCC characteristics:"<<std::endl<<" ";

View File

@ -36,7 +36,7 @@ namespace CGAL {
* Imports a plane-embedded graph from a list of points and edges represented as pairs of vertex indices
*/
template< class LCC >
typename LCC::Dart_descriptor plane_graph_to_lcc(LCC& alcc,
typename LCC::Dart_descriptor read_plane_graph_in_lcc(LCC& alcc,
const std::vector<typename LCC::Point>& vertices,
const std::vector<size_t>& edge_indices)
{
@ -131,13 +131,13 @@ namespace CGAL {
}
template< class LCC >
[[deprecated("Use plane_graph_to_lcc instead")]]
[[deprecated("Use read_plane_graph_in_lcc instead")]]
typename LCC::Dart_descriptor
import_from_plane_graph(LCC& alcc,
const std::vector<typename LCC::Point>& vertices,
const std::vector<size_t>& edge_indices)
{
return plane_graph_to_lcc(alcc, vertices, edge_indices);
return read_plane_graph_in_lcc(alcc, vertices, edge_indices);
}
/**
@ -148,7 +148,7 @@ import_from_plane_graph(LCC& alcc,
* @return A dart created during the conversion.
*/
template< class LCC >
typename LCC::Dart_descriptor plane_graph_to_lcc(LCC& alcc,
typename LCC::Dart_descriptor read_plane_graph_in_lcc(LCC& alcc,
std::istream& ais)
{
using FT = typename LCC::FT;
@ -195,32 +195,32 @@ import_from_plane_graph(LCC& alcc,
edge_indices.push_back(v2);
}
return plane_graph_to_lcc(alcc, vertices, edge_indices);
return read_plane_graph_in_lcc(alcc, vertices, edge_indices);
}
template <class LCC>
[[deprecated("Use plane_graph_to_lcc instead")]]
[[deprecated("Use read_plane_graph_in_lcc instead")]]
typename LCC::Dart_descriptor
import_from_plane_graph(LCC& alcc, std::istream& ais)
{
return plane_graph_to_lcc(alcc, ais);
return read_plane_graph_in_lcc(alcc, ais);
}
template < class LCC >
typename LCC::Dart_descriptor
plane_graph_to_lcc(LCC& alcc, const char* filename)
read_plane_graph_in_lcc(LCC& alcc, const char* filename)
{
std::ifstream input(filename);
if (!input.is_open()) return alcc.null_descriptor;
return plane_graph_to_lcc(alcc, input);
return read_plane_graph_in_lcc(alcc, input);
}
template <class LCC>
[[deprecated("Use plane_graph_to_lcc instead")]]
[[deprecated("Use read_plane_graph_in_lcc instead")]]
typename LCC::Dart_descriptor
import_from_plane_graph(LCC& alcc, const char* filename)
{
return plane_graph_to_lcc(alcc, filename);
return read_plane_graph_in_lcc(alcc, filename);
}
template < class LCC >

View File

@ -382,7 +382,7 @@ bool test_LCC_2()
std::cout<<"Error: impossible to open 'data/graph.txt'"<<std::endl;
return false;
}
CGAL::plane_graph_to_lcc<LCC>(lcc,in);
CGAL::read_plane_graph_in_lcc<LCC>(lcc,in);
if ( !check_number_of_cells_2(lcc, 66, 166, 104, 2) )
return false;
lcc.clear();
@ -431,7 +431,7 @@ struct Test_change_orientation_LCC_2<LCC, CGAL::Combinatorial_map_tag>
std::cout<<"Error: impossible to open 'data/graph.txt'"<<std::endl;
return false;
}
CGAL::plane_graph_to_lcc<LCC>(lcc,in);
CGAL::read_plane_graph_in_lcc<LCC>(lcc,in);
trace_test_begin();

View File

@ -15,7 +15,7 @@ int main()
input << "3 3\n0.0 0.0\n1.0 0.0\n0.0 1.0\n0 1\n1 2\n2 0\n";
// Test new function
auto d1 = CGAL::plane_graph_to_lcc(lcc1, input);
auto d1 = CGAL::read_plane_graph_in_lcc(lcc1, input);
assert(d1 != LCC::null_descriptor);
// Rewind input stream for second test