Merge remote-tracking branch 'cgal/master' into Distance_3-Add_Tri_Tri-GF

This commit is contained in:
Mael Rouxel-Labbé 2021-06-23 22:30:03 +02:00
commit 084a1efe2d
1728 changed files with 131062 additions and 9934 deletions

5
.clang-tidy Normal file
View File

@ -0,0 +1,5 @@
---
Checks: '-clang-diagnostic*,-clang-analyzer*,modernize-use-nullptr'
HeaderFilterRegex: 'CGAL/*'
...

View File

@ -65,6 +65,7 @@ jobs:
mkdir -p build_doc && cd build_doc && cmake ../Documentation/doc
- name: Build and Upload Doc
id: build_and_run
if: steps.get_round.outputs.result != 'stop'
run: |
set -ex
@ -73,11 +74,17 @@ jobs:
wget --no-verbose cgal.github.io -O tmp.html
if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html; then
#list impacted packages
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true)
if [ "$LIST_OF_PKGS" = "" ]; then
exit 1
fi
cd build_doc && make -j2 doc && make -j2 doc_with_postprocessing
cd build_doc && make -j2 doc
make -j2 doc_with_postprocessing 2>tmp.log
if [ -s tmp.log ]; then
content=`cat ./tmp.log`
echo ::set-output name=DoxygenError::$(cat tmp.log)
exit 1
fi
cd ..
git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git
mkdir -p cgal.github.io/${PR_NUMBER}/$ROUND
@ -99,7 +106,7 @@ jobs:
- name: Post address
uses: actions/github-script@v3
if: steps.get_round.outputs.result != 'stop'
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
with:
script: |
const address = "The documentation is built. It will be available, after a few minutes, here : https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/${{ steps.get_round.outputs.result }}/Manual/index.html"
@ -109,3 +116,17 @@ jobs:
issue_number: ${{ github.event.issue.number }},
body: address
});
- name: Post error
uses: actions/github-script@v3
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
with:
script: |
const error = "${{steps.build_and_run.outputs.DoxygenError}}"
const msg = "There was an error while building the doc: \n"+error
github.issues.createComment({
owner: "CGAL",
repo: "cgal",
issue_number: ${{ github.event.issue.number }},
body: msg
});

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.14)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_traits_benchmark)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)

View File

@ -1,6 +1,6 @@
# This is the CMake script for compiling the AABB tree demo.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_tree_Demo)
# Find includes in corresponding build directories

View File

@ -154,7 +154,7 @@ void MainWindow::on_actionInside_points_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"#Points:",10000,1,100000000,9,&ok);
if(!ok)
@ -171,19 +171,19 @@ void MainWindow::on_actionPoints_in_interval_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"#Points:",10000,1,100000000,9,&ok);
if(!ok)
return;
const double min =
QInputDialog::getDouble(NULL, "min",
QInputDialog::getDouble(nullptr, "min",
"Min:",-0.1,-1000.0,1000.0,9,&ok);
if(!ok)
return;
const double max =
QInputDialog::getDouble(NULL, "max",
QInputDialog::getDouble(nullptr, "max",
"Max:",0.1,-1000.0,1000.0,9,&ok);
if(!ok)
return;
@ -199,7 +199,7 @@ void MainWindow::on_actionBoundary_segments_triggered()
bool ok;
const unsigned int nb_slices = (unsigned)
QInputDialog::getInt(NULL, "#Slices",
QInputDialog::getInt(nullptr, "#Slices",
"Slices:",100,1,1000000,8,&ok);
if(!ok)
@ -216,7 +216,7 @@ void MainWindow::on_actionBoundary_points_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"Points:",1000,1,10000000,8,&ok);
if(!ok)
@ -233,7 +233,7 @@ void MainWindow::on_actionEdge_points_triggered()
bool ok;
const unsigned int nb_points = (unsigned)
QInputDialog::getInt(NULL, "#Points",
QInputDialog::getInt(nullptr, "#Points",
"Points:",1000,1,10000000,8,&ok);
if(!ok)
@ -248,7 +248,7 @@ void MainWindow::on_actionEdge_points_triggered()
void MainWindow::on_actionBench_distances_triggered()
{
bool ok;
const double duration = QInputDialog::getDouble(NULL, "Duration",
const double duration = QInputDialog::getDouble(nullptr, "Duration",
"Duration (s):",1.0,0.01,1000,8,&ok);
if(!ok)
return;
@ -262,7 +262,7 @@ void MainWindow::on_actionBench_distances_triggered()
void MainWindow::on_actionBench_intersections_triggered()
{
bool ok;
const double duration = QInputDialog::getDouble(NULL, "Duration",
const double duration = QInputDialog::getDouble(nullptr, "Duration",
"Duration (s):",1.0,0.01,1000.0,8,&ok);
if(!ok)
return;
@ -361,7 +361,7 @@ void MainWindow::on_actionRefine_bisection_triggered()
{
bool ok;
const double max_len =
QInputDialog::getDouble(NULL, "Max edge len",
QInputDialog::getDouble(nullptr, "Max edge len",
"Max edge len:",0.1,0.001,100.0,9,&ok);
if(!ok)
return;

View File

@ -18,7 +18,7 @@ class MainWindow :
{
Q_OBJECT
public:
MainWindow(QWidget* parent = 0);
MainWindow(QWidget* parent = nullptr);
~MainWindow();
public slots:

View File

@ -33,7 +33,7 @@ Scene::Scene()
, m_grid_size(slow_distance_grid_size)
, m_cut_plane(NONE)
{
m_pPolyhedron = NULL;
m_pPolyhedron = nullptr;
// view options
m_view_points = true;
@ -541,7 +541,7 @@ int Scene::open(QString filename)
return -1;
}
if(m_pPolyhedron != NULL)
if(m_pPolyhedron != nullptr)
delete m_pPolyhedron;
// allocate new polyhedron
@ -553,7 +553,7 @@ int Scene::open(QString filename)
QApplication::restoreOverrideCursor();
delete m_pPolyhedron;
m_pPolyhedron = NULL;
m_pPolyhedron = nullptr;
return -1;
}
@ -571,7 +571,7 @@ void Scene::update_bbox()
std::cout << "Compute bbox...";
m_bbox = Bbox();
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "failed (no polyhedron)." << std::endl;
return;
@ -794,7 +794,7 @@ FT Scene::bbox_diag() const
void Scene::build_facet_tree()
{
if ( NULL == m_pPolyhedron )
if ( nullptr == m_pPolyhedron )
{
std::cerr << "Build facet tree failed: load polyhedron first." << std::endl;
return;
@ -813,7 +813,7 @@ void Scene::build_facet_tree()
void Scene::build_edge_tree()
{
if ( NULL == m_pPolyhedron )
if ( nullptr == m_pPolyhedron )
{
std::cerr << "Build edge tree failed: load polyhedron first." << std::endl;
return;
@ -860,7 +860,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
const double vmin,
const double vmax)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -913,7 +913,7 @@ void Scene::generate_points_in(const unsigned int nb_points,
void Scene::generate_inside_points(const unsigned int nb_points)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -955,7 +955,7 @@ void Scene::generate_inside_points(const unsigned int nb_points)
void Scene::generate_boundary_segments(const unsigned int nb_slices)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1005,7 +1005,7 @@ void Scene::generate_boundary_segments(const unsigned int nb_slices)
void Scene::generate_boundary_points(const unsigned int nb_points)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1055,7 +1055,7 @@ void Scene::generate_boundary_points(const unsigned int nb_points)
void Scene::generate_edge_points(const unsigned int nb_points)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1219,7 +1219,7 @@ void Scene::cut_segment_plane()
{
const Segment* inter_seg = CGAL::object_cast<Segment>(&(it->first));
if ( NULL != inter_seg )
if ( nullptr != inter_seg )
{
m_cut_segments.push_back(*inter_seg);
}
@ -1280,7 +1280,7 @@ void Scene::toggle_view_plane()
void Scene::refine_bisection(const FT max_sqlen)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -1295,7 +1295,7 @@ void Scene::refine_bisection(const FT max_sqlen)
void Scene::refine_loop()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;

View File

@ -6,7 +6,7 @@
Viewer::Viewer(QWidget* parent)
: CGAL::QGLViewer(parent),
m_pScene(NULL),
m_pScene(nullptr),
m_custom_mouse(false)
{
}
@ -19,7 +19,7 @@ void Viewer::setScene(Scene* pScene)
void Viewer::draw()
{
CGAL::QGLViewer::draw();
if(m_pScene != NULL)
if(m_pScene != nullptr)
{
m_pScene->draw(this);
}

View File

@ -6,7 +6,7 @@
void Scene::benchmark_intersections(const double duration)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -67,7 +67,7 @@ void Scene::bench_intersections(Facet_tree& tree,
void Scene::benchmark_distances(const double duration)
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -101,7 +101,7 @@ std::size_t Scene::nb_digits(std::size_t value)
// refinement loop
void Scene::bench_memory()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -137,7 +137,7 @@ void Scene::bench_memory()
void Scene::bench_construction()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -174,7 +174,7 @@ void Scene::bench_construction()
void Scene::bench_intersections_vs_nbt()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;
@ -218,7 +218,7 @@ void Scene::bench_intersections_vs_nbt()
void Scene::bench_distances_vs_nbt()
{
if(m_pPolyhedron == NULL)
if(m_pPolyhedron == nullptr)
{
std::cout << "Load polyhedron first." << std::endl;
return;

View File

@ -27,7 +27,7 @@ void triangle_mesh(const char* fname)
typedef CGAL::AABB_tree<Traits> Tree;
TriangleMesh tmesh;
if(!CGAL::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
if(!CGAL::IO::read_polygon_mesh(fname, tmesh) || CGAL::is_triangle_mesh(tmesh))
{
std::cerr << "Invalid input." << std::endl;
return;

View File

@ -99,7 +99,7 @@ public:
// types
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
const double* My_triangle_primitive::point_container = 0;
const double* My_triangle_primitive::point_container = nullptr;
int main()
{

View File

@ -106,7 +106,7 @@ public:
// types
typedef CGAL::AABB_traits<K, My_triangle_primitive> My_AABB_traits;
typedef CGAL::AABB_tree<My_AABB_traits> Tree;
const std::vector<My_point>* My_triangle_primitive::point_container = 0;
const std::vector<My_point>* My_triangle_primitive::point_container = nullptr;
int main()
{

View File

@ -47,7 +47,7 @@ int main(int argc, char* argv[])
const char* filename = (argc > 1) ? argv[1] : "data/tetrahedron.off";
Mesh mesh;
if(!CGAL::read_polygon_mesh(filename, mesh))
if(!CGAL::IO::read_polygon_mesh(filename, mesh))
{
std::cerr << "Invalid input." << std::endl;
return 1;

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_tree_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(AABB_tree_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Advancing_front_surface_reconstruction_Examples)
find_package(CGAL REQUIRED)

View File

@ -114,9 +114,9 @@ int main (int argc, char* argv[])
const char* fname = (argc>1) ? argv[1] : "data/cube.pwn";
// Loading point set from a file.
if (!CGAL::read_points(fname, std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))
if (!CGAL::IO::read_points(fname, std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))
{
std::cerr << "Error: cannot read file" << std::endl;
return EXIT_FAILURE;

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Advancing_front_surface_reconstruction_Tests)
find_package(CGAL REQUIRED)

View File

@ -267,7 +267,7 @@ compute the <i>least</i> common multiple of the denominators.
The package is part of \cgal since release 3.3. Of course the package is based
on the former Number type support of CGAL. This goes back to Stefan Schirra and Andreas Fabri. But on the other hand the package is to a large extend influenced
by the experience with the number type support in <span class="textsc">Exacus</span> \cgalCite{beh-eeeafcs-05},
by the experience with the number type support in \exacus \cgalCite{beh-eeeafcs-05},
which in the main goes back to
Lutz Kettner, Susan Hert, Arno Eigenwillig and Michael Hemmer.
However, the package abstracts from the pure support for

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_foundations_Examples)
find_package(CGAL REQUIRED)

View File

@ -17,7 +17,7 @@ int main(){
CGAL::Gmpq fraction(4,5);
FT::Decompose()(fraction,numerator,denominator);
CGAL::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cout);
std::cout << "decompose fraction: "<< std::endl;
std::cout << "fraction : " << fraction << std::endl;
std::cout << "numerator : " << numerator<< std::endl;

View File

@ -31,7 +31,7 @@ binary_func(const A& a , const B& b){
}
int main(){
CGAL::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cout);
// Function call for ImplicitInteroperable types
std::cout<< binary_func(double(3), int(5)) << std::endl;

View File

@ -56,9 +56,9 @@ public:
Output_rep(const T& tt) : t(tt) {}
std::ostream& operator () (std::ostream& out) const {
if ( needs_parens_as_product(t)) {
return out << "(" << oformat(t) << ")";
return out << "(" << IO::oformat(t) << ")";
} else {
return out << oformat(t);
return out << IO::oformat(t);
}
}
};

View File

@ -20,6 +20,7 @@
#include <CGAL/number_type_config.h>
#include <CGAL/Algebraic_structure_traits.h>
#include <CGAL/Real_embeddable_traits.h>
#include <CGAL/Kernel/Same_uncertainty.h>
namespace CGAL {
CGAL_NTS_BEGIN_NAMESPACE
@ -302,19 +303,21 @@ to_interval( const Real_embeddable& x) {
}
template <typename NT>
NT approximate_sqrt(const NT& nt, CGAL::Null_functor)
typename Coercion_traits<double, NT>::Type
approximate_sqrt(const NT& x, CGAL::Null_functor)
{
return NT(sqrt(CGAL::to_double(nt)));
return sqrt(CGAL::to_double(x));
}
template <typename NT, typename Sqrt>
NT approximate_sqrt(const NT& nt, Sqrt sqrt)
typename Sqrt::result_type
approximate_sqrt(const NT& nt, Sqrt sqrt)
{
return sqrt(nt);
}
template <typename NT>
NT approximate_sqrt(const NT& nt)
decltype(auto) approximate_sqrt(const NT& nt)
{
// the initial version of this function was using Algebraic_category
// for the dispatch but some ring type (like Gmpz) provides a Sqrt
@ -324,6 +327,36 @@ NT approximate_sqrt(const NT& nt)
return approximate_sqrt(nt, Sqrt());
}
template <class NT>
typename Same_uncertainty_nt<Comparison_result, NT>::type
compare_quotients(const NT& xnum, const NT& xden,
const NT& ynum, const NT& yden)
{
// No assumptions on the sign of den are made
// code assumes that SMALLER == - 1;
CGAL_precondition( SMALLER == static_cast<Comparison_result>(-1) );
int xsign = sign(xnum) * sign(xden) ;
int ysign = sign(ynum) * sign(yden) ;
if (xsign == 0) return static_cast<Comparison_result>(-ysign);
if (ysign == 0) return static_cast<Comparison_result>(xsign);
// now (x != 0) && (y != 0)
int diff = xsign - ysign;
if (diff == 0)
{
int msign = sign(xden) * sign(yden);
NT leftop = NT(xnum * yden * msign);
NT rightop = NT(ynum * xden * msign);
return CGAL::compare(leftop, rightop);
}
else
{
return (xsign < ysign) ? SMALLER : LARGER;
}
}
CGAL_NTS_END_NAMESPACE
} //namespace CGAL

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_foundations_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -310,7 +310,7 @@ that does not follow the generic programming paradigm, by avoiding
interfaces between layers. Specifically, working with
only one number type allows to optimize some polynomial operations
as well as memory handling. The implementation of these kernels
make heavy use of the <span class="textsc">Mpfr</span> \cgalCite{cgal:mt-mpfr} and <span class="textsc">Mpfi</span> \cgalCite{cgal:r-mpfi}
make heavy use of the \mpfr \cgalCite{cgal:mt-mpfr} and \mpfi \cgalCite{cgal:r-mpfi}
libraries, and of their \cgal interfaces, `Gmpfr` and `Gmpfi`.
The algebraic numbers (roots of the polynomials) are represented
in the two RS kernels by a `Gmpfi` interval and a pointer to
@ -368,12 +368,12 @@ ideas that was brought to them throughout the last years. In particular,
they want to thank Menelaos Karavelas and Elias Tsigaridas for their
initial contributions.
The two generic models where initially developed as part of the <span class="textsc">Exacus</span> \cgalCite{beh-eeeafcs-05} project.
The two generic models where initially developed as part of the \exacus \cgalCite{beh-eeeafcs-05} project.
However, the models are now fully integrated into the \cgal library,
since also the relevant layers of <span class="textsc">Exacus</span> are now part of \cgal.
since also the relevant layers of \exacus are now part of \cgal.
The main authors for `Algebraic_kernel_d_1<Coeff>` and `Algebraic_kernel_d_2<Coeff>` are
Michael Hemmer and Michael Kerber, respectively. Notwithstanding, the authors also want to emphasize the
contribution of all authors of the <span class="textsc">Exacus</span> project,
contribution of all authors of the \exacus project,
particularly the contribution of Arno Eigenwillig, Sebastian Limbach and Pavel Emeliyanenko.
The two univariate kernels that interface the library RS \cgalCite{cgal:r-rs} were

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_d_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -49,7 +49,7 @@
#include <CGAL/tss.h>
#include <boost/shared_ptr.hpp>
#include <memory>
namespace CGAL {
@ -393,8 +393,8 @@ public:
Algebraic_curve_kernel_2()
: _m_gcd_cache_2(new Gcd_cache_2())
{
_m_curve_cache_2 = boost::shared_ptr<Curve_cache_2>(new Curve_cache_2(this));
_m_curve_pair_cache_2 = boost::shared_ptr<Curve_pair_cache_2> (new Curve_pair_cache_2(this));
_m_curve_cache_2 = std::shared_ptr<Curve_cache_2>(new Curve_cache_2(this));
_m_curve_pair_cache_2 = std::shared_ptr<Curve_pair_cache_2> (new Curve_pair_cache_2(this));
// std::cout << "CONSTRUCTION Algebraic_curve_kernel_2 " << std::endl;
}
@ -2766,9 +2766,9 @@ public:
protected:
mutable boost::shared_ptr<Curve_cache_2> _m_curve_cache_2;
mutable boost::shared_ptr<Curve_pair_cache_2> _m_curve_pair_cache_2;
mutable boost::shared_ptr<Gcd_cache_2> _m_gcd_cache_2;
mutable std::shared_ptr<Curve_cache_2> _m_curve_cache_2;
mutable std::shared_ptr<Curve_pair_cache_2> _m_curve_pair_cache_2;
mutable std::shared_ptr<Gcd_cache_2> _m_gcd_cache_2;
}; // class Algebraic_curve_kernel_2

View File

@ -436,8 +436,8 @@ std::ostream&
operator << (std::ostream& os,
const CGAL::internal::Algebraic_real_d_1<Coefficient, Rational, HandlePolicy, RepClass >& x){
os << "[" << x.polynomial()
<< ",[" << oformat(x.low())
<< " , " << oformat(x.high()) << " ]]";
<< ",[" << IO::oformat(x.low())
<< " , " << IO::oformat(x.high()) << " ]]";
return os;
}
@ -458,9 +458,9 @@ operator >> (std::istream& is,
is >> poly;
swallow(is, ',');// read the ","
swallow(is, '[');// read the ","
is >> iformat(low);
is >> IO::iformat(low);
swallow(is, ',');// read the ","
is >> iformat(high);
is >> IO::iformat(high);
swallow(is, ']');// read the "]"
swallow(is, ']');// read the "]"
x = ALGNUM(poly, low, high);

View File

@ -2417,7 +2417,7 @@ std::ostream& operator<< (
typedef typename Curve::Asymptote_y Asymptote_y;
switch (::CGAL::get_mode(out)) {
switch (::CGAL::IO::get_mode(out)) {
case ::CGAL::IO::PRETTY: {
out << "--------------- Analysis results ---------------" << std::endl;
@ -2514,7 +2514,7 @@ std::istream& operator>> (
std::istream& is,
Curve_analysis_2< AlgebraicKernelWithAnalysis_2, Rep_ >& curve) {
CGAL_precondition(CGAL::is_ascii(is));
CGAL_precondition(CGAL::IO::is_ascii(is));
typedef AlgebraicKernelWithAnalysis_2 Algebraic_kernel_with_analysis_2;

View File

@ -441,7 +441,7 @@ protected:
}
/*
#if CGAL_ACK_DEBUG_FLAG
::CGAL::set_ascii_mode(CGAL_ACK_DEBUG_PRINT);
::CGAL::IO::set_ascii_mode(CGAL_ACK_DEBUG_PRINT);
CGAL_ACK_DEBUG_PRINT << "Stha: " << (*seq_it) << std::endl;
#endif
*/

View File

@ -675,7 +675,7 @@ template < class AlgebraicCurveKernel_2, class Rep>
std::ostream& operator<< (std::ostream& os,
const Xy_coordinate_2<AlgebraicCurveKernel_2, Rep>& pt)
{
switch (::CGAL::get_mode(os)) {
switch (::CGAL::IO::get_mode(os)) {
case ::CGAL::IO::PRETTY: {
os << "[x-coord: " << CGAL::to_double(pt.x()) << "; curve: " <<
pt.curve().polynomial_2() <<
@ -703,7 +703,7 @@ std::istream& operator >> (
std::istream& is,
Xy_coordinate_2< AlgebraicCurveKernel_2, Rep_>& pt) {
CGAL_precondition(CGAL::is_ascii(is));
CGAL_precondition(CGAL::IO::is_ascii(is));
// this instance's first template argument
typedef AlgebraicCurveKernel_2 Algebraic_curve_kernel_2;

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_d_Tests)
# CGAL and its components

View File

@ -162,7 +162,7 @@ template<typename Arithmetic_kernel> void test_routine() {
CGAL_ACK_DEBUG_PRINT << "P[3(0,P[2(0,-2)(2,2)])(1,P[1(1,-1)])(3,P[1(1,-6)])]" << std::endl;
#endif
f=from_string<Poly_int2>("P[3(0,P[2(0,-2)(2,2)])(1,P[1(1,-1)])(3,P[1(1,-6)])]");
::CGAL::set_pretty_mode(std::cout);
::CGAL::IO::set_pretty_mode(std::cout);
curve=construct_curve_2(f);
assert(curve.number_of_status_lines_with_event()==1);
assert(number_of_objects<Algebraic_kernel_d_2>(curve)==2);

View File

@ -92,7 +92,7 @@ void test_algebraic_curve_kernel_2() {
Poly_2 polys[ACK_2_n_polys];
::CGAL::set_mode(std::cerr, ::CGAL::IO::PRETTY);
::CGAL::IO::set_mode(std::cerr, ::CGAL::IO::PRETTY);
//std::cerr << "constructing curves..\n";
for(int i = 0; i < ACK_2_n_polys; i++) {

View File

@ -291,7 +291,7 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
assert(compare_1(bound,Algebraic_real_1(2)) == SMALLER );
}
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cerr);
// Approximations
bool all_right = true;
@ -408,13 +408,13 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
#define CGAL_TEST_ALGEBRAIC_REAL_IO(_f) \
alg1=_f; \
ss<<CGAL::oformat(alg1); \
ss<<CGAL::IO::oformat(alg1); \
CGAL_assertion(ss.good()); \
ss>>CGAL::iformat(alg2); \
CGAL_assertion(!ss.fail()); \
ss>>CGAL::IO::iformat(alg2); \
CGAL_assertion(!ss.fail()); \
ss.clear(); \
assert(alg1==alg2)
// Note: after the reading ss>>CGAL::iformat(alg2) the state of ss can
// Note: after the reading ss>>CGAL::IO::iformat(alg2) the state of ss can
// have the eofbit. The C++ norm says if one tries to write to a stream
// with eofbit, then the failbit will be set. That is why one must
// clear the iostate with ss.clear().
@ -422,7 +422,7 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
Algebraic_real_1 alg1,alg2;
std::stringstream ss;
CGAL::set_ascii_mode(ss);
CGAL::IO::set_ascii_mode(ss);
// test construction from int, Coefficient and Bound
CGAL_TEST_ALGEBRAIC_REAL_IO(construct_algebraic_real_1(int(2)));

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_for_circles_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Algebraic_kernel_for_spheres_Tests)
find_package(CGAL REQUIRED)

View File

@ -37,7 +37,7 @@ does not make sense if the traits class already provides exact constructions.
<ul>
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
the class `Cartesian_converter` is used internally to switch between the traits class
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
to convert a two-dimensional point of the traits class to a two-dimensional point
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
@ -106,7 +106,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `CGAL::Interval_nt<Protected>`
with `Protected=true`. Access to the exact value is provided through the function
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
(it is `Gmpq` if `gmp` is available and `Quotient<CGAL::MP_Float>` otherwise).
An overload for the function `double to_double(FT)` is also available. Its
precision is controlled through `FT::set_relative_precision_of_to_double()` in

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_2_Examples)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_2_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_3_Demo)
# Find includes in corresponding build directories

View File

@ -16,7 +16,7 @@ class MainWindow : public CGAL::Qt::DemosMainWindow, private Ui::MainWindow
Q_OBJECT
public:
MainWindow(QWidget* parent = 0);
MainWindow(QWidget* parent = nullptr);
void connectActions();

View File

@ -71,7 +71,7 @@ meaning in particular that the alpha complex may have
singular faces. For \f$ 0 \leq k \leq d-1\f$,
a \f$ k\f$-simplex of the alpha complex is said to be
singular if it is not a facet of a \f$ (k+1)\f$-simplex of the complex.
%CGAL provides two versions of alpha shapes. In the general mode,
\cgal provides two versions of alpha shapes. In the general mode,
the alpha shapes correspond strictly to the above definition.
The regularized mode provides a regularized version of the alpha shapes.
It corresponds to the domain covered by a regularized version

View File

@ -36,7 +36,7 @@ does not make sense if the traits class already provides exact constructions.
<ul>
<li>When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
the class `Cartesian_converter` is used internally to switch between the traits class
and the %CGAL kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
and the \cgal kernel `CGAL::Simple_cartesian<NT>`, where `NT` can be either `CGAL::Interval_nt` or
`CGAL::Exact_rational`. `Cartesian_converter` must thus offer the necessary functors
to convert a three-dimensional point of the traits class to a three-dimensional point
of `CGAL::Simple_cartesian<NT>`. However, these functors are not necessarily provided by
@ -103,7 +103,7 @@ allowing filtered exact comparisons (that is, interval arithmetic is first used
resorting to exact arithmetic). Access to the interval containing the exact value is provided through the function
`FT::Approximate_nt approx() const` where `FT::Approximate_nt` is `Interval_nt<Protected>`
with `Protected=true`. Access to the exact value is provided through the function
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of %CGAL
`FT::Exact_nt exact() const` where `FT::Exact_nt` depends on the configuration of \cgal
(it may be `mpq_class`, `Gmpq`, `Quotient<CGAL::MP_Float>`, etc).
An overload for the function `double to_double(FT)` is also available. Its
precision is controlled through `FT::set_relative_precision_of_to_double()` in

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_3_Examples)
find_package(CGAL REQUIRED)

View File

@ -20,7 +20,7 @@
#include <CGAL/internal/Exact_type_selector.h>
#include <CGAL/Has_conversion.h>
#include <boost/shared_ptr.hpp>
#include <memory>
#include <boost/type_traits.hpp>
#include <boost/optional.hpp>

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Alpha_shapes_3_Tests)
find_package(CGAL REQUIRED)

View File

@ -23,7 +23,7 @@ template <class Point>
bool
file_input(std::ifstream& is, std::list<Point>& L, int nb=0)
{
CGAL::set_ascii_mode(is);
CGAL::IO::set_ascii_mode(is);
int n;
is >> n;
if (nb != 0 && nb <= n) n=nb;

View File

@ -22,7 +22,7 @@ template <class Weighted_point>
bool
file_input(std::ifstream& is, std::list<Weighted_point>& L)
{
CGAL::set_ascii_mode(is);
CGAL::IO::set_ascii_mode(is);
int n;
is >> n;
std::cout << "Reading " << n << " points" << std::endl;

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Apollonius_graph_2_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -1966,7 +1966,7 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
CGAL_assertion( n >= 1 );
if( is_ascii(os) ) {
if( IO::is_ascii(os) ) {
os << n << ' ' << m << ' ' << dimension() << std::endl;
} else {
os << n << m << dimension();
@ -1980,24 +1980,24 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
V[infinite_vertex()] = inum++;
// finite vertices
if (is_ascii(os)) os << std::endl;
if (IO::is_ascii(os)) os << std::endl;
for (Finite_vertices_iterator vit = finite_vertices_begin();
vit != finite_vertices_end(); ++vit) {
V[vit] = inum++;
os << vit->site();
if ( is_ascii(os) ) { os << ' '; }
if ( IO::is_ascii(os) ) { os << ' '; }
os << vit->number_of_hidden_sites();
typename Vertex::Hidden_sites_iterator hit;
for (hit = vit->hidden_sites_begin(); hit != vit->hidden_sites_end();
++hit) {
if ( is_ascii(os) ) { os << ' '; }
if ( IO::is_ascii(os) ) { os << ' '; }
os << *hit;
}
// write non-combinatorial info of the vertex
// os << *vit ;
if ( is_ascii(os) ) { os << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl; }
}
if ( is_ascii(os) ) { os << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl; }
// vertices of the faces
inum = 0;
@ -2007,25 +2007,25 @@ Apollonius_graph_2<Gt,Agds,LTag>::file_output(std::ostream& os) const
F[fit] = inum++;
for(int j = 0; j < dim ; ++j) {
os << V[ fit->vertex(j) ];
if( is_ascii(os) ) { os << ' '; }
if( IO::is_ascii(os) ) { os << ' '; }
}
// write non-combinatorial info of the face
// os << *fit ;
if( is_ascii(os) ) { os << std::endl; }
if( IO::is_ascii(os) ) { os << std::endl; }
}
if( is_ascii(os) ) { os << std::endl; }
if( IO::is_ascii(os) ) { os << std::endl; }
// neighbor pointers of the faces
for( All_faces_iterator it = all_faces_begin();
it != all_faces_end(); ++it) {
for(int j = 0; j < dimension()+1; ++j){
os << F[ it->neighbor(j) ];
if( is_ascii(os) ) { os << ' '; }
if( IO::is_ascii(os) ) { os << ' '; }
}
if( is_ascii(os) ) { os << std::endl; }
if( IO::is_ascii(os) ) { os << std::endl; }
}
if ( is_ascii(os) ) { os << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl; }
}

View File

@ -484,7 +484,7 @@ file_output(std::ostream& os) const
// write each level of the hierarchy
for (unsigned int i = 0; i < ag_hierarchy_2__maxlevel; ++i) {
hierarchy[i]->file_output(os);
if ( is_ascii(os) ) { os << std::endl << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
}
Vertex_map* V = new Vertex_map[ag_hierarchy_2__maxlevel];
@ -520,22 +520,22 @@ file_output(std::ostream& os) const
}
// write up and down pointer info
if ( is_ascii(os) ) { os << std::endl << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
for (unsigned int i = 0; i < ag_hierarchy_2__maxlevel; ++i) {
os << i;
if ( is_ascii(os) ) { os << " "; }
if ( IO::is_ascii(os) ) { os << " "; }
os << hierarchy[i]->number_of_vertices();
if ( is_ascii(os) ) { os << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl; }
for (Finite_vertices_iterator vit = hierarchy[i]->finite_vertices_begin();
vit != hierarchy[i]->finite_vertices_end(); ++vit) {
os << V[i][vit];
if ( is_ascii(os) ) { os << " "; }
if ( IO::is_ascii(os) ) { os << " "; }
os << V_down[i][vit];
if ( is_ascii(os) ) { os << " "; }
if ( IO::is_ascii(os) ) { os << " "; }
os << V_up[i][vit];
if ( is_ascii(os) ) { os << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl; }
}
if ( is_ascii(os) ) { os << std::endl << std::endl; }
if ( IO::is_ascii(os) ) { os << std::endl << std::endl; }
}
delete[] V;

View File

@ -19,7 +19,7 @@
#include <CGAL/Apollonius_graph_2/basic.h>
#include <CGAL/atomic.h>
#include <atomic>
namespace CGAL {
@ -33,8 +33,8 @@ public:
typedef bool bool_;
typedef unsigned long long_;
#else
typedef CGAL::cpp11::atomic<bool> bool_;
typedef CGAL::cpp11::atomic<unsigned long> long_;
typedef std::atomic<bool> bool_;
typedef std::atomic<unsigned long> long_;
#endif
static bool_ count_cases;

View File

@ -19,7 +19,7 @@
#include <CGAL/Apollonius_graph_2/basic.h>
#include <CGAL/atomic.h>
#include <atomic>
#define AG2_PROFILE_PREDICATES
@ -33,7 +33,7 @@ public:
#ifdef CGAL_NO_ATOMIC
typedef unsigned long long_;
#else
typedef CGAL::cpp11::atomic<unsigned long> long_;
typedef std::atomic<unsigned long> long_;
#endif
// high level predicates

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Apollonius_graph_2_Tests)
find_package(CGAL REQUIRED)

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Arithmetic_kernel_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -56,7 +56,7 @@ public:
int i = 0;
for(InputIterator it = begin;it != end; it++, i++) {
std::stringstream curr_item;
::CGAL::set_pretty_mode(curr_item);
::CGAL::IO::set_pretty_mode(curr_item);
curr_item << i << "th: ";
curr_item << (*it);
curve_list->insertItem(curr_item.str());

View File

@ -237,7 +237,7 @@ void xAlci_main_window::oc_rasterize_click()
oc_activate_layers();
} else {
// CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION);
::CGAL::set_pretty_mode(std::cout);
::CGAL::IO::set_pretty_mode(std::cout);
Poly_int2 f;
if(!input_poly(f, oc_input->text().ascii()))

View File

@ -194,16 +194,16 @@ void xAlci_main_window::oc_analyse_click()
Poly_int2 ress = fxx*fy*fy - ((fx*fy*fxy)*Poly_int1(2,0)) + fyy*fx*fx,
res1 = f*fx, res2 = f*fy;
CGAL::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cout);
std::cout << "curv:\n " << ress << "\n\n";
std::cout << "fx:\n " << fx << "\n\n";
std::cout << "fy:\n " << fy << "\n\n";
std::cout << "f*fx:\n " << res1 << "\n\n";
std::cout << "f*fy:\n " << res2 << "\n\n";
CGAL::set_ascii_mode(std::cout);
CGAL::IO::set_ascii_mode(std::cout);
std::cout << "f:\n " << f << "\n\n";
CGAL::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cout);
std::cout << "f:\n " << f << "\n\n";
timer.reset();

View File

@ -277,11 +277,11 @@ inline std::ostream & operator<<(std::ostream & os, const Arr::Vertex & vertex)
inline Window_stream & operator<<(Window_stream & ws, Arr & arr)
{
Arr::Edge_iterator ei;
ws << CGAL::blue();
ws << CGAL::IO::blue();
for (ei = arr.edges_begin(); ei != arr.edges_end(); ++ei)
ws << (*ei).curve();
Arr::Vertex_iterator vi;
ws << CGAL::red();
ws << CGAL::IO::red();
for (vi = arr.vertices_begin(); vi != arr.vertices_end(); ++vi)
ws << (*vi).point();
return ws;

View File

@ -22,7 +22,7 @@ class AlgebraicCurveInputDialog : public QDialog
Q_OBJECT
public:
explicit AlgebraicCurveInputDialog(QWidget *parent = 0);
explicit AlgebraicCurveInputDialog(QWidget *parent = nullptr);
~AlgebraicCurveInputDialog();
std::string getLineEditText();
Ui::AlgebraicCurveInputDialog* getUi(){return this->ui;}

View File

@ -21,7 +21,7 @@ class QPaintEvent;
class ArrangementDemoGraphicsView : public QGraphicsView
{
public:
ArrangementDemoGraphicsView( QWidget* parent = 0 );
ArrangementDemoGraphicsView( QWidget* parent = nullptr );
void setBackgroundColor( QColor color );
QColor getBackgroundColor( ) const;

View File

@ -41,7 +41,7 @@ QVariant ArrangementDemoPropertiesDialog::property( int index )
}
QTableWidgetItem* item = this->ui->tableWidget->item( index, 0 );
if ( item == 0 )
if ( item == nullptr )
{
return res;
}
@ -102,17 +102,17 @@ void ArrangementDemoPropertiesDialog::setupUi( )
*/
void ArrangementDemoPropertiesDialog::updateUi( )
{
if ( this->parent == NULL )
if ( this->parent == nullptr )
{
return;
}
ArrangementDemoTab* currentTab = this->parent->getCurrentTab();
if ( currentTab == NULL )
if ( currentTab == nullptr )
{
return;
}
CGAL::Qt::ArrangementGraphicsItemBase* agi = currentTab->getArrangementGraphicsItem( );
if ( agi == NULL )
if ( agi == nullptr )
{
return;
}

View File

@ -41,7 +41,7 @@ class ArrangementDemoPropertiesDialog : public QDialog
GRID_COLOR_KEY /*!< color of the grid */
};
ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_ = 0 );
ArrangementDemoPropertiesDialog( ArrangementDemoWindow* parent_ = nullptr );
QVariant property( int index );
protected:

View File

@ -31,7 +31,7 @@ struct ArrReader
ArrFormatter arrFormatter;
auto arr = new Arrangement();
CGAL::read(*arr, ifs, arrFormatter);
CGAL::IO::read(*arr, ifs, arrFormatter);
return arr;
}
};
@ -106,7 +106,7 @@ struct ArrWriter
using ArrFormatter = CGAL::Arr_with_history_text_formatter<TextFormatter>;
ArrFormatter arrFormatter;
CGAL::write(*arr, ofs, arrFormatter);
CGAL::IO::write(*arr, ofs, arrFormatter);
}
};

View File

@ -1,6 +1,6 @@
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Arrangement_on_surface_2_Demo)
if(NOT POLICY CMP0070 AND POLICY CMP0053)

View File

@ -56,7 +56,7 @@ class ColorItemEditor : public QPushButton
Q_PROPERTY(QColor color READ color WRITE setColor USER true)
public:
ColorItemEditor(QWidget *widget = 0);
ColorItemEditor(QWidget *widget = nullptr);
public:
QColor color( ) const;

View File

@ -23,7 +23,7 @@ namespace Ui
class NewTabDialog : public QDialog
{
public:
NewTabDialog( QWidget* parent = 0 );
NewTabDialog( QWidget* parent = nullptr );
int checkedId( ) const;
protected:

View File

@ -22,7 +22,7 @@ class PropertyValueDelegate : public QItemDelegate
Q_OBJECT
public:
PropertyValueDelegate( QObject* parent = 0 );
PropertyValueDelegate( QObject* parent = nullptr );
public:
QWidget* createEditor( QWidget* parent, const QStyleOptionViewItem& option,

View File

@ -24,7 +24,7 @@ class RationalCurveInputDialog : public QDialog
Q_OBJECT
public:
explicit RationalCurveInputDialog(QWidget *parent = 0);
explicit RationalCurveInputDialog(QWidget *parent = nullptr);
~RationalCurveInputDialog();
std::string getNumeratorText();
std::string getDenominatorText();

View File

@ -126,7 +126,7 @@ operator()(const Point_2& p, const X_monotone_curve_2& c) const
// AlgKernel ker;
int n = 100;
if (this->scene != NULL && this->scene->views().size() != 0)
if (this->scene != nullptr && this->scene->views().size() != 0)
{ // use the scene to approximate the resolution of the curve
QGraphicsView* view = this->scene->views().first();
CGAL::Bbox_2 bb = c.bbox(); // assumes bounded curve

View File

@ -185,7 +185,7 @@ void VerticalRayGraphicsItem::modelChanged( )
QRectF VerticalRayGraphicsItem::viewportRect( ) const
{
QRectF res;
if ( this->scene( ) == NULL )
if ( this->scene( ) == nullptr )
{
return res;
}
@ -207,7 +207,7 @@ QRectF VerticalRayGraphicsItem::viewportRect( ) const
void VerticalRayGraphicsItem::drawArrowhead( QPainter* painter,
double targetY, bool isShootingUp )
{
if ( this->scene( ) == 0 || this->scene( )->views( ).size( ) == 0 )
if ( this->scene( ) == nullptr || this->scene( )->views( ).size( ) == 0 )
{
return;
}

View File

@ -662,9 +662,9 @@ functions can be used. The program works in three
steps, as demonstrated in \cgalFigureRef{arr_figex_3}. Note that
here we still stick to integer coordinates, but as we work on a
larger scale we use an unbounded integer number-type (in this
case, the `Gmpz` type taken from the <span class="textsc">Gmp</span> library)
case, the `Gmpz` type taken from the \gmp library)
instead of the built-in `int` type.\cgalFootnote{As a rule of thumb, one can use a bounded integer type for representing line segments whose coordinates are bounded by \f$ \lfloor\sqrt[3]{M}\rfloor\f$, where \f$ M\f$ is the maximal representable integer value. This guarantees that no overflows occur in the computations carried out by the traits class, hence all traits-class predicates always return correct results.}
In case the <span class="textsc">Gmp</span> library is not installed (as indicated by
In case the \gmp library is not installed (as indicated by
the `CGAL_USE_GMP` flag defined in `CGAL/basic.h`), we
use `MP_Float`, a number-type included in \cgal's support
library that is capable of storing floating-point numbers with
@ -2064,8 +2064,7 @@ rational numbers, and this ensures the robustness and correctness of
any computation.\cgalFootnote{Many of the example programs in the rest
of the chapter include a header file named `arr_rational_nt.h`, which
defines a type named `Number_type` as either `Gmpq` or
`Quotient<MP_Float>`, depending on whether <span
class="textsc">Gmp</span> is installed or not.}
`Quotient<MP_Float>`, depending on whether \gmp is installed or not.}
An instance of the `Arr_segment_traits_2<Kernel>` class
template can be very efficient for constructing arrangements induced
@ -2480,7 +2479,7 @@ and extracting the real roots of a polynomial with integer
coefficients. It is highly recommended to use the
`CORE_algebraic_number_traits` class, which is included in the
arrangement package. It relies on the exact number types
implemented in the <span class="textsc">Core</span> library and performs exact
implemented in the \core library and performs exact
computations on the number types it defines.
</UL>
@ -3588,15 +3587,15 @@ and defines a simple textual input/output format.
\section arr_secbgl Adapting to Boost Graphs
<span class="textsc">Boost</span>\cgalFootnote{See also <span class="textsc">Boost</span>'s homepage at: <TT>www.boost.org</TT>.}
is a collection of portable \cpp libraries that extend the Standard Template Library (<span class="textsc">Stl</span>). The <span class="textsc">Boost</span> Graph Library (<span class="textsc">bgl</span>), which one of the libraries in the collection, offers an
\boost\cgalFootnote{See also \boost's homepage at: <TT>www.boost.org</TT>.}
is a collection of portable \cpp libraries that extend the Standard Template Library (\stl). The \boost Graph Library (\bgl), which one of the libraries in the collection, offers an
extensive set of generic graph algorithms parameterized through templates.
As our arrangements are embedded as planar graphs, it is only
natural to extend the underlying data structure with the interface that the
<span class="textsc">bgl</span> expects, and gain the ability to perform the operations that the <span class="textsc">bgl</span> supports, such as shortest-path computation. This section describes how apply
the graph algorithms implemented in the <span class="textsc">bgl</span> to `Arrangement_2` instances.
\bgl expects, and gain the ability to perform the operations that the \bgl supports, such as shortest-path computation. This section describes how apply
the graph algorithms implemented in the \bgl to `Arrangement_2` instances.
An instance of `Arrangement_2` is adapted to a <span class="textsc">Boost</span> graph through the
An instance of `Arrangement_2` is adapted to a \boost graph through the
provision of a set of free functions that operate on the arrangement features
and conform with the relevant BGL concepts. Besides the straightforward
adaptation, which associates a vertex with each \dcel vertex and an edge
@ -3607,7 +3606,7 @@ faces.
\subsection arr_ssecbgl_primal The Primal Arrangement Representation
Arrangement instances are adapted to <span class="textsc">Boost</span> graphs by specializing the
Arrangement instances are adapted to \boost graphs by specializing the
\link BGLArgtGT `boost:graph_traits` \endlink template for `Arrangement_2` instances. The
graph-traits states the graph concepts that the arrangement class models
(see below) and defines the types required by these concepts.
@ -3620,11 +3619,11 @@ graph-edge type. As halfedges are directed, we consider the graph to be
directed as well. Moreover, as several interior-disjoint \f$ x\f$-monotone curves
(say circular arcs) may share two common endpoints, inducing an arrangement
with two vertices that are connected with several edges, we allow parallel
edges in our <span class="textsc">Boost</span> graph.
edges in our \boost graph.
Given an `Arrangement_2` instance, we can efficiently traverse its
vertices and halfedges. Thus, the arrangement graph is a model of the concepts
`VertexListGraph` and `EdgeListGraph` introduced by the <span class="textsc">bgl</span>.
`VertexListGraph` and `EdgeListGraph` introduced by the \bgl.
At the same time, we use an iterator adapter of the circulator over the
halfedges incident to a vertex (`Halfedge_around_vertex_circulator` - see
Section \ref arr_sssectr_vertex), so it is possible to go over the ingoing
@ -3634,17 +3633,17 @@ is a model of the concept `BidirectionalGraph` (this concept refines
It is important to notice that the vertex descriptors we use are
`Vertex_handle` objects and <I>not</I> vertex indices. However, in order
to gain more efficiency in most <span class="textsc">bgl</span> algorithm, it is better to have them
to gain more efficiency in most \bgl algorithm, it is better to have them
indexed \f$ 0, 1, \ldots, (n-1)\f$, where \f$ n\f$ is the number of vertices. We
therefore introduce the `Arr_vertex_index_map<Arrangement>` class-template,
which maintains a mapping of vertex handles to indices, as required by the
<span class="textsc">bgl</span>. An instance of this class must be attached to a valid arrangement
\bgl. An instance of this class must be attached to a valid arrangement
vertex when it is created. It uses the notification mechanism (see
Section \ref arr_secnotif) to automatically maintain the mapping of vertices
to indices, even when new vertices are inserted into the arrangement or
existing vertices are removed.
In most algorithm provided by the <span class="textsc">bgl</span>, the output is given by
In most algorithm provided by the \bgl, the output is given by
<I>property maps</I>, such that each map entry corresponds to a vertex.
For example, when we compute the shortest paths from a given source vertex
\f$ s\f$ to all other vertices we can obtain a map of distances and a map of
@ -3659,7 +3658,7 @@ allows for an efficient mapping of `Vertex_handle` objects to
properties of type `Type`. Note however that unlike the
`Arr_vertex_index_map` class, the vertex property-map class is not
kept synchronized with the number of vertices in the arrangement, so it
should not be reused in calls to <span class="textsc">bgl</span> functions in case the arrangement
should not be reused in calls to \bgl functions in case the arrangement
is modified in between these calls.
\cgalFigureBegin{arr_figex_bgl,ex_bgl.png}
@ -3668,7 +3667,7 @@ An arrangement of 7 line segments, as constructed by `bgl_primal_adapter.cpp` an
In the following example we construct an arrangement of 7 line segments,
as shown in \cgalFigureRef{arr_figex_bgl},
then use Dijkstra's shortest-paths algorithm from the <span class="textsc">bgl</span> to compute
then use Dijkstra's shortest-paths algorithm from the \bgl to compute
the graph distance of all vertices from the leftmost vertex in the
arrangement \f$ v_0\f$. Note the usage of the `boost::vector_property_map<Type, IndexMap>` and
the `Arr_vertex_property_map` classes. The latter one, instantiated by
@ -3692,7 +3691,7 @@ graph-edge type. We treat the graph edges as directed, such that a halfedge
`e` is directed from \f$ f_1\f$, which is its incident face, to \f$ f_2\f$, which
is the incident face of its twin halfedge. As two arrangement faces may
share more than a single edge on their boundary, we allow parallel
edges in our <span class="textsc">Boost</span> graph. As is the case in the primal graph, the dual
edges in our \boost graph. As is the case in the primal graph, the dual
arrangement graph is also a model of the concepts `VertexListGraph`,
`EdgeListGraph` and `BidirectionalGraph` (thus also of
`IncidenceGraph`).
@ -3740,7 +3739,7 @@ exhibits slightly better performance than the default one
(`Arr_segment_traits_2`
even when the segments intersect each other, due to the small overhead
of the latter (optimized) traits class. (For example, when the so
called <span class="textsc">Leda</span> rational kernel is used).
called \leda rational kernel is used).
<LI>Prior knowledge of the combinatorial structure of the arrangement can
be used to accelerate operations that insert \f$ x\f$-monotone curves,

View File

@ -43,7 +43,7 @@ geometric kernels templated with the `NtTraits::Rational` and
instantiate the `CORE_algebraic_number_traits` class as the `NtTraits`
parameter, with `Cartesian<NtTraits::Rational>` and
`Cartesian<NtTraits::Algebraic>` instantiating the two kernel types,
respectively. The number types in this case are provided by the <span class="textsc">Core</span>
respectively. The number types in this case are provided by the \core
library, with its ability to exactly represent simple algebraic numbers.
While `Arr_Bezier_curve_traits_2` models the concept

View File

@ -61,7 +61,7 @@ It is recommended to instantiate the `CORE_algebraic_number_traits`
class as the `NtTraits` parameter, with
`Cartesian<NtTraits::Rational>` and `Cartesian<NtTraits::Algebraic>`
instantiating the two kernel types, respectively.
The number types in this case are provided by the <span class="textsc">Core</span> library, with its
The number types in this case are provided by the \core library, with its
ability to exactly represent simple algebraic numbers.
The traits class inherits its point type from `AlgKernel::Point_2`,

View File

@ -7,11 +7,11 @@ namespace CGAL {
\anchor arr_refarr_dcel_base
The `Arr_dcel_base` class is an important ingredient in the
definition of <span class="textsc">Dcel</span> data structures. It serves as a basis class for
definition of \dcel data structures. It serves as a basis class for
any instance of the `Dcel` template parameter of the
`Arrangement_2` template. In particular it is the basis class of
the default `Dcel` template parameter, and the basis class of any
extended <span class="textsc">Dcel</span>. The template parameters `V`, `H`, and `F`
extended \dcel. The template parameters `V`, `H`, and `F`
must be instantiated with models of the concepts
`ArrangementDcelVertex`, `ArrangementDcelHalfedge`,
and `ArrangementDcelFace` respectively.
@ -26,7 +26,7 @@ public:
/*!
The basic <span class="textsc">Dcel</span> face type. Serves as a basis class for an extended
The basic \dcel face type. Serves as a basis class for an extended
face record with auxiliary data fields.
\cgalModels `ArrangementDcelFace`
@ -39,7 +39,7 @@ class Arr_face_base {
/*!
The basic <span class="textsc">Dcel</span> halfedge type. Serves as a basis class for an
The basic \dcel halfedge type. Serves as a basis class for an
extended halfedge record with auxiliary data fields. The `Curve`
parameter is the type of \f$ x\f$-monotone curves associated with the vertices.
@ -54,7 +54,7 @@ class Arr_halfedge_base {
/*!
The basic <span class="textsc">Dcel</span> vertex type. Serves as a basis class for an extended
The basic \dcel vertex type. Serves as a basis class for an extended
vertex record with auxiliary data fields. The `Point` parameter is
the type of points associated with the vertices.

View File

@ -4,12 +4,12 @@ namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
The default <span class="textsc">Dcel</span> class used by the `Arrangement_2` class-template
The default \dcel class used by the `Arrangement_2` class-template
is parameterized by a traits class, which is a model of the
`ArrangementBasicTraits_2` concept. It simply uses the nested
`Traits::Point_2` and `Traits::X_monotone_curve_2` to instantiate
the base vertex and halfedge types, respectively. Thus, the default
<span class="textsc">Dcel</span> records store no other information, except for the topological
\dcel records store no other information, except for the topological
incidence relations and the geometric data attached to vertices and edges.
\cgalModels `ArrangementDcelWithRebind`

View File

@ -6,8 +6,8 @@ namespace CGAL {
\ingroup PkgArrangementOnSurface2Overlay
An instance of `Arr_default_overlay_traits` should be used for overlaying two arrangements
of type `Arrangement` that store no auxiliary data with their <span class="textsc">Dcel</span> records, where the resulting overlaid arrangement stores no auxiliary
<span class="textsc">Dcel</span> data as well. This class simply gives empty implementation for all
of type `Arrangement` that store no auxiliary data with their \dcel records, where the resulting overlaid arrangement stores no auxiliary
\dcel data as well. This class simply gives empty implementation for all
traits-class functions.
\cgalModels `OverlayTraits`
@ -30,10 +30,10 @@ namespace CGAL {
An instance of `Arr_face_overlay_traits` should be used for overlaying two arrangements
of types `Arr_A` and `Arr_B`, which are instantiated using the same
geometric traits-class and with the <span class="textsc">Dcel</span> classes `Dcel_A` and
geometric traits-class and with the \dcel classes `Dcel_A` and
`Dcel_B` respectively, in order to store their overlay in an arrangement
of type `Arr_R`, which is instantiated using a third <span class="textsc">Dcel</span> class
`Dcel_R`. All three <span class="textsc">Dcel</span> classes are assumed to be instantiations of the
of type `Arr_R`, which is instantiated using a third \dcel class
`Dcel_R`. All three \dcel classes are assumed to be instantiations of the
`Arr_face_extended_dcel` template with types `FaceData_A`,
`FaceData_B` and `FaceData_R`, respectively.

View File

@ -4,11 +4,11 @@ namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_extended_dcel` class-template extends the topological-features of the <span class="textsc">Dcel</span>
The `Arr_extended_dcel` class-template extends the topological-features of the \dcel
namely the vertex, halfedge, and face types. While it is possible to maintain
extra (non-geometric) data with the curves or points of the arrangement by
extending their types respectively, it is also possible to extend the vertex,
halfedge, or face types of the <span class="textsc">Dcel</span> through inheritance. As the technique to
halfedge, or face types of the \dcel through inheritance. As the technique to
extend these types is somewhat cumbersome and difficult for inexperienced
users, the `Arr_extended_dcel` class-template provides a convenient way to do that.
Each one of the three features is extended with a corresponding data type
@ -54,7 +54,7 @@ namespace CGAL {
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_extended_face` class-template extends the face topological-features of the
<span class="textsc">Dcel</span>. It is parameterized by a face base-type `FaceBase` and a data type
\dcel. It is parameterized by a face base-type `FaceBase` and a data type
`FData` used to extend the face base-type.
\cgalModels `ArrangementDcelFace`
@ -106,7 +106,7 @@ namespace CGAL {
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_extended_halfedge` class-template extends the halfedge topological-features of
the <span class="textsc">Dcel</span>. It is parameterized by a halfedge base-type `HalfedgeBase`
the \dcel. It is parameterized by a halfedge base-type `HalfedgeBase`
and a data type `HData` used to extend the halfedge base-type.
\cgalModels `ArrangementDcelHalfedge`
@ -158,7 +158,7 @@ namespace CGAL {
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_extended_vertex` class-template extends the vertex
topological-features of the <span class="textsc">Dcel</span>. It is parameterized by a
topological-features of the \dcel. It is parameterized by a
vertex base-type `VertexBase` and a data type `VData` used to extend
the vertex base-type.
@ -210,12 +210,12 @@ namespace CGAL {
/*!
\ingroup PkgArrangementOnSurface2DCEL
The `Arr_face_extended_dcel` class-template extends the <span class="textsc">Dcel</span> face-records, making it
The `Arr_face_extended_dcel` class-template extends the \dcel face-records, making it
possible to store extra (non-geometric) data with the arrangement faces.
The class should be instantiated by an `FData` type which represents the
extra data stored with each face.
Note that all types of <span class="textsc">Dcel</span> features (namely vertex, halfedge and face)
Note that all types of \dcel features (namely vertex, halfedge and face)
are provided as template parameters. However, by default they are defined
as follows:

View File

@ -9,13 +9,13 @@ the output arrangement `res` to represent the overlaid arrangement.
Computes the overlay of two input arrangement
objects, and returns the overlaid arrangement. All three arrangements
can be instantiated with different geometric traits classes and different
<span class="textsc">Dcel</span> classes (encapsulated in the various topology-traits classes).
\dcel classes (encapsulated in the various topology-traits classes).
The geometry traits of the resulting arrangement is used to construct the
resulting arrangement. This means that all the types (e.g.,
`Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`)
of both input arrangements have to be convertible to the types in the
resulting arrangement. A given overlay-traits object is used to properly
construct the overlaid <span class="textsc">Dcel</span> that represents the resulting arrangement.
construct the overlaid \dcel that represents the resulting arrangement.
\pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" is not supported).
@ -45,13 +45,13 @@ consolidated set of curves that induce `res`.
Computes the overlay of two input arrangement
objects, and returns the overlaid arrangement. All three arrangements
can be instantiated with different geometric traits classes and different
<span class="textsc">Dcel</span> classes (encapsulated in the various topology-traits classes).
\dcel classes (encapsulated in the various topology-traits classes).
The geometry traits of the resulting arrangement is used to construct the
resulting arrangement. This means that all the types (e.g.,
`Traits::Point_2`, `Traits::Curve_2`, and `Traits::Point_2`)
of both input arrangements have to be convertible to the types in the
resulting arrangement. A given overlay-traits object is used to properly
construct the overlaid <span class="textsc">Dcel</span> that represents the resulting arrangement.
construct the overlaid \dcel that represents the resulting arrangement.
\pre `res` does not refer to either `arr1` or `arr2` (that is, "self overlay" is not supported).

View File

@ -8,11 +8,11 @@ namespace CGAL {
An object `arr` of the class `Arrangement_2` represents the
planar subdivision induced by a set of \f$ x\f$-monotone curves and isolated
points into maximally connected cells. The arrangement is represented as
a doubly-connected edge-list (<span class="textsc">Dcel</span>) such that each <span class="textsc">Dcel</span> vertex
a doubly-connected edge-list (\dcel) such that each \dcel vertex
is associated with a point of the plane and each edge is
associated with an \f$ x\f$-monotone curve whose interior is disjoint from all
other edges and vertices. Recall that an arrangement
edge is always comprised of a pair of twin <span class="textsc">Dcel</span> halfedges.
edge is always comprised of a pair of twin \dcel halfedges.
The `Arrangement_2` template has two parameters:
<UL>
@ -26,7 +26,7 @@ namespace CGAL {
value of this parameter is by default
`Arr_default_dcel<Traits>`.
</UL>
The available traits classes and <span class="textsc">Dcel</span> classes are described below.
The available traits classes and \dcel classes are described below.
\sa `ArrangementDcel`
\sa `Arr_default_dcel<Traits>`
@ -71,7 +71,7 @@ public:
typedef Traits Traits_2;
/*!
the <span class="textsc">Dcel</span> representation of the arrangement.
the \dcel representation of the arrangement.
*/
typedef unspecified_type Dcel;

View File

@ -8,8 +8,8 @@ namespace CGAL {
An object `arr` of the class `Arrangement_with_history_2` represents the
planar subdivision induced by a set of input curves \f$ \cal C\f$.
The arrangement is represented as a doubly-connected edge-list (<span class="textsc">Dcel</span>).
As is the case for the `Arrangement_2<Traits,Dcel>`, each <span class="textsc">Dcel</span>
The arrangement is represented as a doubly-connected edge-list (\dcel).
As is the case for the `Arrangement_2<Traits,Dcel>`, each \dcel
vertex is associated with a point and each edge is associated with an
\f$ x\f$-monotone curve whose interior is disjoint from all other edges and
vertices. Each such \f$ x\f$-monotone curve is a subcurve of some
@ -66,7 +66,7 @@ the traits class in use.
typedef unspecified_type Traits_2;
/*!
the <span class="textsc">Dcel</span> representation of the arrangement.
the \dcel representation of the arrangement.
*/
typedef unspecified_type Dcel;

View File

@ -1,6 +1,9 @@
namespace CGAL {
namespace IO {
/*!
\defgroup PkgArrangementOnSurface2Read CGAL::read()
\defgroup PkgArrangementOnSurface2Read CGAL::IO::read()
\ingroup PkgArrangementOnSurface2IO
Reads a given arrangement from a given input stream
@ -37,7 +40,7 @@ std::istream& read (Arrangement_2<Traits,Dcel>& arr,
/// @}
/*!
\defgroup PkgArrangementOnSurface2Write CGAL::write()
\defgroup PkgArrangementOnSurface2Write CGAL::IO::write()
\ingroup PkgArrangementOnSurface2IO
Writes a given arrangement into a given output stream
@ -69,13 +72,15 @@ std::ostream& write (const Arrangement_2<Traits,Dcel>& arr,
/// @}
} // namespace IO
/*!
\ingroup PkgArrangementOnSurface2op_left_shift
Inserts the arrangement object `arr` into the output stream
`os` using the output format defined by the
`Arr_text_formatter` class. Only the basic geometric and
topological features of the arrangement are inserted. Auxiliary data
that may be attached to the <span class="textsc">Dcel</span> features is ignored.
that may be attached to the \dcel features is ignored.
*/
template<typename Traits, typename Dcel>
std::ostream& operator<< (std::ostream& os,
@ -93,4 +98,4 @@ template<class Traits, class Dcel>
std::istream& operator>>(std::istream& is, Arrangement_2<Traits,Dcel>& arr);
} /* end namespace CGAL*/
} /* end namespace CGAL::IO*/

View File

@ -7,7 +7,7 @@ namespace CGAL {
`Arr_extended_dcel_text_formatter` defines the format of an arrangement in an input or output stream
(typically a file stream), thus enabling reading and writing an `Arrangement`
instance using a simple text format. The `Arrangement` class should be
instantiated with a <span class="textsc">Dcel</span> class which in turn instantiates the
instantiated with a \dcel class which in turn instantiates the
`Arr_extended_dcel` template with the `VertexData`, `HalfedgeData` and
`FaceData` types.
The formatter supports reading and writing the data objects attached to the
@ -41,7 +41,7 @@ namespace CGAL {
`Arr_face_extended_text_formatter` defines the format of an arrangement in an input or output stream
(typically a file stream), thus enabling reading and writing an `Arrangement`
instance using a simple text format. The `Arrangement` class should be
instantiated with a <span class="textsc">Dcel</span> class which in turn instantiates the
instantiated with a \dcel class which in turn instantiates the
`Arr_face_extended_dcel` template with a `FaceData` type.
The formatter supports reading and writing the data objects attached to the
arrangement faces as well.
@ -73,7 +73,7 @@ namespace CGAL {
`Arr_text_formatter` defines the format of an arrangement in an input or output stream
(typically a file stream), thus enabling reading and writing an `Arrangement`
instance using a simple text format. The arrangement is assumed to store no auxiliary
data with its <span class="textsc">Dcel</span> records (and if there are such records they will not be written
data with its \dcel records (and if there are such records they will not be written
or read by the formatter).
The `Arr_text_formatter` class assumes that the nested `Point_2` and the `Curve_2` types

View File

@ -1,5 +1,7 @@
namespace CGAL {
namespace IO {
/*!
\ingroup PkgArrangementOnSurface2Read
@ -26,13 +28,15 @@ std::ostream& write (const Arrangement_with_history_2<Traits,Dcel>& arr,
std::ostream& os,
WithHistoryFormatter& formatter);
} // namespace IO
/*!
\ingroup PkgArrangementOnSurface2op_left_shift
Inserts the arrangement-with-history object `arr` into the output
stream `os` using the output format defined by the
`Arr_with_history_text_formatter` class. Only the basic geometric
and topological features of the arrangement are inserted. Auxiliary
data that may be attached to the <span class="textsc">Dcel</span> features is ignored.
data that may be attached to the \dcel features is ignored.
*/
template<typename Traits, typename Dcel>
std::ostream& operator<< (std::ostream& os,

View File

@ -3,7 +3,7 @@
\ingroup PkgArrangementOnSurface2ConceptsDCEL
\cgalConcept
A doubly-connected edge-list (<span class="textsc">Dcel</span> for short) data-structure. It consists
A doubly-connected edge-list (\dcel for short) data-structure. It consists
of three containers of records: vertices \f$ V\f$, halfedges \f$ E\f$, and faces \f$ F\f$.
It maintains the incidence relation among them. The halfedges are ordered
in pairs sometimes referred to as twins, such that each halfedge pair
@ -112,12 +112,12 @@ typedef unspecified_type Face_const_iterator;
/// @{
/*!
constructs an empty <span class="textsc">Dcel</span> with one unbounded face.
constructs an empty \dcel with one unbounded face.
*/
Arr_dcel();
/*!
assigns the contents of the `other` <span class="textsc">Dcel</span> whose unbounded face
assigns the contents of the `other` \dcel whose unbounded face
is given by `uf`, to `dcel`. The function returns a pointer to
the unbounded face of `dcel` after the assignment.
*/

View File

@ -3,7 +3,7 @@
\ingroup PkgArrangementOnSurface2ConceptsDCEL
\cgalConcept
A face record in a <span class="textsc">Dcel</span> data structure. A face may either be unbounded,
A face record in a \dcel data structure. A face may either be unbounded,
otherwise it has an incident halfedge along the chain defining its outer
boundary. A face may also contain holes and isolated vertices in its
interior.
@ -22,12 +22,12 @@ public:
/// @{
/*!
the corresponding <span class="textsc">Dcel</span> vertex type.
the corresponding \dcel vertex type.
*/
typedef unspecified_type Vertex;
/*!
the corresponding <span class="textsc">Dcel</span> halfedge type.
the corresponding \dcel halfedge type.
*/
typedef unspecified_type Halfedge;

View File

@ -3,7 +3,7 @@
\ingroup PkgArrangementOnSurface2ConceptsDCEL
\cgalConcept
A halfedge record in a <span class="textsc">Dcel</span> data structure. Two halfedges with opposite
A halfedge record in a \dcel data structure. Two halfedges with opposite
directions always form an edge (a halfedge pair). The halfedges form together
chains, defining the boundaries of connected components, such that all
halfedges along a chain have the same incident face. Note that the chain the
@ -29,17 +29,17 @@ public:
/// @{
/*!
the corresponding <span class="textsc">Dcel</span> vertex type.
the corresponding \dcel vertex type.
*/
typedef unspecified_type Vertex;
/*!
the corresponding <span class="textsc">Dcel</span> face type.
the corresponding \dcel face type.
*/
typedef unspecified_type Face;
/*!
the corresponding <span class="textsc">Dcel</span> hole type.
the corresponding \dcel hole type.
*/
typedef unspecified_type Hole;

View File

@ -3,7 +3,7 @@
\ingroup PkgArrangementOnSurface2ConceptsDCEL
\cgalConcept
A hole record in a <span class="textsc">Dcel</span> data structure, which stores the face that contains
A hole record in a \dcel data structure, which stores the face that contains
the hole in its interior, along with an iterator for the hole in the holes'
container of this face.
@ -19,7 +19,7 @@ public:
/// @{
/*!
the corresponding <span class="textsc">Dcel</span> face type.
the corresponding \dcel face type.
*/
typedef unspecified_type Face;

View File

@ -3,7 +3,7 @@
\ingroup PkgArrangementOnSurface2ConceptsDCEL
\cgalConcept
An isolated vertex-information record in a <span class="textsc">Dcel</span> data structure, which stores
An isolated vertex-information record in a \dcel data structure, which stores
the face that contains the isolated vertex in its interior, along with an
iterator for the isolated vertex in the isolated vertices' container of this
face.
@ -20,7 +20,7 @@ public:
/// @{
/*!
the corresponding <span class="textsc">Dcel</span> face type.
the corresponding \dcel face type.
*/
typedef unspecified_type Face;

View File

@ -3,13 +3,13 @@
\ingroup PkgArrangementOnSurface2ConceptsDCEL
\cgalConcept
A vertex record in a <span class="textsc">Dcel</span> data structure. A vertex is always associated
A vertex record in a \dcel data structure. A vertex is always associated
with a point. However, the vertex record only stores a pointer to the
associated point, and the actual `Point` object is stored elsewhere.
A vertex usually has several halfedges incident to it, such that it is
possible to access one of these halfedges directly and to traverse all
incident halfedges around the vertex. However, the <span class="textsc">Dcel</span> may also contain
incident halfedges around the vertex. However, the \dcel may also contain
isolated vertices that have no incident halfedges. In this case, the vertex
stores an isolated vertex-information record, indicating the face that
contains this vertex in its interior.
@ -27,12 +27,12 @@ public:
/// @{
/*!
the corresponding <span class="textsc">Dcel</span> halfedge type.
the corresponding \dcel halfedge type.
*/
typedef unspecified_type Halfedge;
/*!
the corresponding <span class="textsc">Dcel</span> isolated
the corresponding \dcel isolated
vertex-information type.
*/
typedef unspecified_type Isolated_vertex;

View File

@ -39,7 +39,7 @@ typedef unspecified_type template <class T> rebind;
/// @{
/*!
constructs an empty <span class="textsc">Dcel</span> with one unbouned face.
constructs an empty \dcel with one unbouned face.
*/
Arr_dcel();

View File

@ -31,7 +31,7 @@ concept are expected to be open on the right, open at the bottom, or
open at the top, the corresponding nested type must be convertible to
`CGAL::Arr_open_side_tag`. A model of the concept `ArrangementOpenBoundaryTraits_2` must have
all the four categories convertible to
`CGAL::Arr_open_side_tag`.\cgalFootnote{We intend to introduce more concepts that require only a subset of the categories to be convertible to `Arr_open_side_tag`.} In this case the <span class="textsc">Dcel</span> of the arrangement
`CGAL::Arr_open_side_tag`.\cgalFootnote{We intend to introduce more concepts that require only a subset of the categories to be convertible to `Arr_open_side_tag`.} In this case the \dcel of the arrangement
instantiated with the model is initialized with an implicit bounding
rectangle. When the parameter space is bounded, it is the exact
geometric embedding of the implicit bounding rectangle.

View File

@ -4,11 +4,11 @@
\cgalConcept
A model for the `OverlayTraits` should be able to operate on records (namely,
vertices, halfedges and faces) of two input <span class="textsc">Dcel</span> classes, named
`Dcel_A` and `Dcel_B`, and construct the records of an output <span class="textsc">Dcel</span> class, referred to as `Dcel_R`.
vertices, halfedges and faces) of two input \dcel classes, named
`Dcel_A` and `Dcel_B`, and construct the records of an output \dcel class, referred to as `Dcel_R`.
Models for the concept are used by the global `overlay()` function to
maintain the auxiliary data stored with the <span class="textsc">Dcel</span> records of the resulting
maintain the auxiliary data stored with the \dcel records of the resulting
overlaid arrangement, based on the contents of the input records.
\cgalHasModel `CGAL::Arr_default_overlay_traits<Arrangement>`

View File

@ -203,8 +203,8 @@ implemented as peripheral classes or as free (global) functions.
- `CGAL::locate()`
- `CGAL::decompose()`
- `CGAL::overlay()`
- `CGAL::read()`
- `CGAL::write()`
- `CGAL::IO::read()`
- `CGAL::IO::write()`
- `CGAL::remove_curve()`
- \link PkgArrangementOnSurface2op_left_shift `CGAL::operator<<` \endlink
- \link PkgArrangementOnSurface2op_right_shift `CGAL::operator<<` \endlink

View File

@ -1,7 +1,7 @@
# Created by the script cgal_create_cmake_script
# This is the CMake script for compiling a CGAL application.
cmake_minimum_required(VERSION 3.1...3.15)
cmake_minimum_required(VERSION 3.1...3.20)
project(Arrangement_on_surface_2_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)

View File

@ -32,7 +32,7 @@ typedef Arr_traits_2::Polynomial_2 Polynomial_2;
int main() {
// For nice printouts
CGAL::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cout);
Arr_traits_2 arr_traits;

View File

@ -119,14 +119,14 @@ int main ()
std::ofstream out_file ("arr_ex_dcel_io.dat");
Formatter formatter;
write (arr, out_file, formatter);
CGAL::IO::write (arr, out_file, formatter);
out_file.close();
// Read the arrangement from the file.
Arrangement_2 arr2;
std::ifstream in_file ("arr_ex_dcel_io.dat");
read (arr2, in_file, formatter);
CGAL::IO::read (arr2, in_file, formatter);
in_file.close();
std::cout << "The arrangement vertices: " << std::endl;

View File

@ -27,9 +27,10 @@ int main()
arr.insert_at_vertices(s4, v4, v1);
// Remove the isolated vertices located in the unbounded face.
Arrangement::Vertex_iterator curr, next = arr.vertices_begin();
for (curr = next++; curr != arr.vertices_end(); curr = next++) {
Arrangement::Vertex_iterator iter = arr.vertices_begin();
while (iter != arr.vertices_end()) {
// Keep an iterator to the next vertex, as curr might be deleted.
Arrangement::Vertex_iterator curr = iter ++;
if (curr->is_isolated() && curr->face() == uf)
arr.remove_isolated_vertex(curr);
}

Some files were not shown because too many files have changed in this diff Show More