Merge remote-tracking branch 'origin/master' into Kinetic_shape_reconstruction-new_package-danston

This commit is contained in:
Dmitry Anisimov 2021-06-09 18:32:14 +02:00
commit 1bf723dab8
1032 changed files with 31779 additions and 5070 deletions

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
@ -77,7 +78,13 @@ jobs:
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 ./build_doc/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

@ -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

@ -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

@ -114,7 +114,7 @@ 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),
if (!CGAL::IO::read_points(fname, std::back_inserter(points),
CGAL::parameters::point_map(Point_map()).
normal_map(Normal_map())))
{

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

@ -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

@ -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

@ -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

@ -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); \
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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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);
}

View File

@ -29,7 +29,7 @@ typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
int main ()
{
CGAL::set_pretty_mode(std::cout); // for nice printouts.
CGAL::IO::set_pretty_mode(std::cout); // for nice printouts.
// create a polynomial representing x .-)
Polynomial_1 x = CGAL::shift(Polynomial_1(1),1);

View File

@ -31,7 +31,7 @@ typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
int main ()
{
CGAL::set_pretty_mode(std::cout); // for nice printouts.
CGAL::IO::set_pretty_mode(std::cout); // for nice printouts.
// Traits class object
Traits_2 traits;

View File

@ -29,7 +29,7 @@ typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
int main ()
{
CGAL::set_pretty_mode(std::cout); // for nice printouts.
CGAL::IO::set_pretty_mode(std::cout); // for nice printouts.
// Traits class object
AK1 ak1;

View File

@ -23,12 +23,12 @@
* The header file for the Arr_circle_segment_traits_2<Kenrel> class.
*/
#include <CGAL/atomic.h>
#include <CGAL/tags.h>
#include <CGAL/Arr_tags.h>
#include <CGAL/Arr_geometry_traits/Circle_segment_2.h>
#include <fstream>
#include <atomic>
namespace CGAL {
@ -80,7 +80,7 @@ public:
#ifdef CGAL_NO_ATOMIC
static unsigned int index;
#else
static CGAL::cpp11::atomic<unsigned int> index;
static std::atomic<unsigned int> index;
#endif
return (++index);
}

View File

@ -23,8 +23,8 @@
*/
#include <fstream>
#include <atomic>
#include <CGAL/atomic.h>
#include <CGAL/tags.h>
#include <CGAL/Arr_tags.h>
#include <CGAL/Arr_geometry_traits/Conic_arc_2.h>
@ -108,7 +108,7 @@ public:
#ifdef CGAL_NO_ATOMIC
static unsigned int index;
#else
static CGAL::cpp11::atomic<unsigned int> index;
static std::atomic<unsigned int> index;
#endif
return (++index);
}

View File

@ -26,9 +26,9 @@
#include <iostream>
#include <string.h>
#include <atomic>
#include <CGAL/basic.h>
#include <CGAL/atomic.h>
#include <CGAL/Arr_enums.h>
#include <CGAL/Arr_tags.h>
@ -958,7 +958,7 @@ public:
#ifdef CGAL_NO_ATOMIC
static size_t counter;
#else
static CGAL::cpp11::atomic<size_t> counter;
static std::atomic<size_t> counter;
#endif
if (doit) ++counter;
return counter;

View File

@ -28,7 +28,7 @@
#include <list>
#include <map>
#include <CGAL/N_step_adaptor_derived.h>
#include <CGAL/In_place_list.h>
#include <CGAL/Compact_container.h>
#include <CGAL/function_objects.h>
#include <CGAL/Iterator_project.h>
#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
@ -91,6 +91,9 @@ public:
/*! Destructor. */
virtual ~Arr_vertex_base() {}
void* for_compact_container() const { return static_cast<void*>(p_pt); }
void for_compact_container(void* ptr) { p_pt = static_cast<Point*>(ptr); }
// Access/modification for pointer squatting
void* inc() const { return p_inc; }
void set_inc(void * inc) const
@ -183,6 +186,9 @@ public:
/*! Destructor. */
virtual ~Arr_halfedge_base() {}
void* for_compact_container() const { return static_cast<void*>(p_cv); }
void for_compact_container(void* ptr) { p_cv = static_cast<X_monotone_curve*>(ptr); }
/*! Check if the curve pointer is nullptr. */
bool has_null_curve() const { return (p_cv == nullptr); }
@ -284,7 +290,7 @@ template <class V, class H, class F> class Arr_isolated_vertex;
* The default arrangement DCEL vertex class.
*/
template <class V, class H, class F>
class Arr_vertex : public V, public In_place_list_base<Arr_vertex<V,H,F> >
class Arr_vertex : public V
{
public:
@ -351,8 +357,7 @@ public:
* The default arrangement DCEL halfedge class.
*/
template <class V, class H, class F>
class Arr_halfedge : public H,
public In_place_list_base<Arr_halfedge<V,H,F> >
class Arr_halfedge : public H
{
public:
typedef H Base;
@ -532,7 +537,7 @@ public:
*/
template <class V, class H, class F>
class Arr_face : public F,
public In_place_list_base<Arr_face<V,H,F> >
public Compact_container_base
{
public:
typedef F Base;
@ -723,7 +728,7 @@ public:
* Representation of an outer CCB.
*/
template <class V, class H, class F>
class Arr_outer_ccb : public In_place_list_base<Arr_outer_ccb<V,H,F> > {
class Arr_outer_ccb {
public:
typedef Arr_outer_ccb<V,H,F> Self;
typedef Arr_halfedge<V,H,F> Halfedge;
@ -744,6 +749,9 @@ public:
p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular)
{ if (other.iter_is_not_singular) iter = other.iter; }
void* for_compact_container() const { return static_cast<void*>(p_f); }
void for_compact_container(void* ptr) { p_f = static_cast<Face*>(ptr); }
/*! Get a halfedge along the component (const version). */
const Halfedge* halfedge() const { return (*iter); }
@ -788,7 +796,7 @@ public:
* Representation of an inner CCB.
*/
template <class V, class H, class F>
class Arr_inner_ccb : public In_place_list_base<Arr_inner_ccb<V,H,F> >
class Arr_inner_ccb : public Compact_container_base
{
public:
typedef Arr_inner_ccb<V,H,F> Self;
@ -908,8 +916,7 @@ public:
* Representation of an isolated vertex.
*/
template <class V, class H, class F>
class Arr_isolated_vertex :
public In_place_list_base<Arr_isolated_vertex<V,H,F> > {
class Arr_isolated_vertex {
public:
typedef Arr_isolated_vertex<V,H,F> Self;
typedef Arr_face<V,H,F> Face;
@ -929,6 +936,9 @@ public:
p_f(other.p_f), iter_is_not_singular(other.iter_is_not_singular)
{ if (other.iter_is_not_singular) iv_it = other.iv_it; }
void* for_compact_container() const { return static_cast<void*>(p_f); }
void for_compact_container(void* ptr) { p_f = static_cast<Face*>(ptr); }
/*! Get the containing face (const version). */
const Face* face() const { return (p_f); }
@ -979,13 +989,6 @@ public:
typedef Inner_ccb Hole;
protected:
// The vetices, halfedges and faces are stored in three in-place lists.
typedef In_place_list<Vertex, false> Vertex_list;
typedef In_place_list<Halfedge, false> Halfedge_list;
typedef In_place_list<Face, false> Face_list;
typedef In_place_list<Outer_ccb, false> Outer_ccb_list;
typedef In_place_list<Inner_ccb, false> Inner_ccb_list;
typedef In_place_list<Isolated_vertex, false> Iso_vert_list;
typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator;
@ -995,6 +998,13 @@ protected:
typedef typename Allocator_traits::template rebind_alloc<Inner_ccb> Inner_ccb_allocator;
typedef typename Allocator_traits::template rebind_alloc<Isolated_vertex> Iso_vert_allocator;
typedef Compact_container<Vertex, Vertex_allocator> Vertex_list;
typedef Compact_container<Halfedge, Halfedge_allocator> Halfedge_list;
typedef Compact_container<Face, Face_allocator> Face_list;
typedef Compact_container<Outer_ccb, Outer_ccb_allocator> Outer_ccb_list;
typedef Compact_container<Inner_ccb, Inner_ccb_allocator> Inner_ccb_list;
typedef Compact_container<Isolated_vertex, Iso_vert_allocator> Iso_vert_list;
public:
typedef typename Halfedge_list::size_type Size;
typedef typename Halfedge_list::size_type size_type;
@ -1011,13 +1021,6 @@ protected:
Inner_ccb_list in_ccbs; // The inner CCBs.
Iso_vert_list iso_verts; // The isolated vertices.
Vertex_allocator vertex_alloc; // An allocator for vertices.
Halfedge_allocator halfedge_alloc; // An allocator for halfedges.
Face_allocator face_alloc; // An allocator for faces.
Outer_ccb_allocator out_ccb_alloc; // An allocator for outer CCBs.
Inner_ccb_allocator in_ccb_alloc; // An allocator for inner CCBs.
Iso_vert_allocator iso_vert_alloc; // Allocator for isolated vertices.
public:
// Definitions of iterators.
typedef typename Vertex_list::iterator Vertex_iterator;
@ -1144,10 +1147,7 @@ public:
/*! Create a new vertex. */
Vertex* new_vertex()
{
Vertex* v = vertex_alloc.allocate(1);
std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v);
vertices.push_back(*v);
return v;
return &*vertices.emplace();
}
/*! Create a new pair of opposite halfedges. */
@ -1167,37 +1167,25 @@ public:
/*! Create a new face. */
Face* new_face()
{
Face* f = face_alloc.allocate(1);
std::allocator_traits<Face_allocator>::construct(face_alloc, f);
faces.push_back (*f);
return(f);
return &*faces.emplace();
}
/*! Create a new outer CCB. */
Outer_ccb* new_outer_ccb()
{
Outer_ccb* oc = out_ccb_alloc.allocate(1);
std::allocator_traits<Outer_ccb_allocator>::construct(out_ccb_alloc, oc);
out_ccbs.push_back(*oc);
return (oc);
return &*out_ccbs.emplace();
}
/*! Create a new inner CCB. */
Inner_ccb* new_inner_ccb()
{
Inner_ccb* ic = in_ccb_alloc.allocate(1);
std::allocator_traits<Inner_ccb_allocator>::construct(in_ccb_alloc, ic);
in_ccbs.push_back(*ic);
return (ic);
return &*in_ccbs.emplace();
}
/*! Create a new isolated vertex. */
Isolated_vertex* new_isolated_vertex()
{
Isolated_vertex* iv = iso_vert_alloc.allocate(1);
std::allocator_traits<Iso_vert_allocator>::construct(iso_vert_alloc, iv);
iso_verts.push_back(*iv);
return (iv);
return &*iso_verts.emplace();
}
//@}
@ -1206,9 +1194,7 @@ public:
/*! Delete an existing vertex. */
void delete_vertex(Vertex* v)
{
vertices.erase(v);
std::allocator_traits<Vertex_allocator>::destroy(vertex_alloc, v);
vertex_alloc.deallocate(v,1);
vertices.erase (vertices.iterator_to(*v));
}
/*! Delete an existing pair of opposite halfedges. */
@ -1222,33 +1208,25 @@ public:
/*! Delete an existing face. */
void delete_face(Face* f)
{
faces.erase(f);
std::allocator_traits<Face_allocator>::destroy(face_alloc, f);
face_alloc.deallocate(f, 1);
faces.erase (faces.iterator_to(*f));
}
/*! Delete an existing outer CCB. */
void delete_outer_ccb(Outer_ccb* oc)
{
out_ccbs.erase(oc);
std::allocator_traits<Outer_ccb_allocator>::destroy(out_ccb_alloc, oc);
out_ccb_alloc.deallocate(oc, 1);
out_ccbs.erase (out_ccbs.iterator_to(*oc));
}
/*! Delete an existing inner CCB. */
void delete_inner_ccb(Inner_ccb* ic)
{
in_ccbs.erase(ic);
std::allocator_traits<Inner_ccb_allocator>::destroy(in_ccb_alloc, ic);
in_ccb_alloc.deallocate(ic, 1);
in_ccbs.erase (in_ccbs.iterator_to(*ic));
}
/*! Delete an existing isolated vertex. */
void delete_isolated_vertex(Isolated_vertex* iv)
{
iso_verts.erase(iv);
std::allocator_traits<Iso_vert_allocator>::destroy(iso_vert_alloc, iv);
iso_vert_alloc.deallocate(iv, 1);
iso_verts.erase (iso_verts.iterator_to(*iv));
}
/*! Delete all DCEL features. */
@ -1507,18 +1485,13 @@ protected:
/*! Create a new halfedge. */
Halfedge* _new_halfedge()
{
Halfedge* h = halfedge_alloc.allocate(1);
std::allocator_traits<Halfedge_allocator>::construct(halfedge_alloc, h);
halfedges.push_back(*h);
return (h);
return &*halfedges.emplace();
}
/*! Delete an existing halfedge. */
void _delete_halfedge(Halfedge* h)
{
halfedges.erase(h);
std::allocator_traits<Halfedge_allocator>::destroy(halfedge_alloc,h);
halfedge_alloc.deallocate(h, 1);
halfedges.erase (halfedges.iterator_to(*h));
}
};

View File

@ -155,7 +155,7 @@ OutputStream& operator<<(
OutputStream& os,
const Arr_parameter_space& ps) {
switch (::CGAL::get_mode(os)) {
switch (::CGAL::IO::get_mode(os)) {
case ::CGAL::IO::PRETTY:
switch(ps) {
case CGAL::ARR_LEFT_BOUNDARY:
@ -195,7 +195,7 @@ InputStream& operator>>(
InputStream& is,
Arr_parameter_space& ps) {
CGAL_precondition(CGAL::is_ascii(is));
CGAL_precondition(CGAL::IO::is_ascii(is));
int i;
is >> i;

View File

@ -23,7 +23,7 @@
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
#include <boost/variant.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
#ifdef CGAL_TD_DEBUG
@ -95,7 +95,7 @@ public:
typedef Td_ninetuple<boost::variant<Vertex_const_handle,Point>,
boost::variant<Vertex_const_handle,unsigned char>,
boost::variant<Halfedge_const_handle,
boost::shared_ptr<X_monotone_curve_2> >,
std::shared_ptr<X_monotone_curve_2> >,
Halfedge_const_handle,
unsigned char,
Self*, Self*,
@ -230,7 +230,7 @@ public:
if (type() == TD_EDGE)
{
//ptr()->e2 = (boost::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(top()->curve()));
//ptr()->e2 = (std::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(top()->curve()));
set_curve_for_rem_he(top()->curve());
return;
}
@ -238,8 +238,8 @@ public:
//else if (type() == TD_VERTEX)
Curve_end v_ce(left()->curve_end());
ptr()->e2 = (boost::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(v_ce.cv()));
//CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2>>( &(ptr()->e2)) != nullptr);
ptr()->e2 = (std::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(v_ce.cv()));
//CGAL_assertion(boost::get<std::shared_ptr<X_monotone_curve_2>>( &(ptr()->e2)) != nullptr);
ptr()->e1 = (v_ce.ce() == ARR_MIN_END ) ? CGAL_TD_CV_MIN_END : CGAL_TD_CV_MAX_END;
@ -255,7 +255,7 @@ public:
{
CGAL_precondition (type() == TD_EDGE);
ptr()->e2 = (boost::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(cv));
ptr()->e2 = (std::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(cv));
}
/*! Set the trapezoid's type flag (Trapezoid/Edge/Vertex). */
@ -537,8 +537,8 @@ public:
CGAL_precondition(is_on_boundaries());
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != nullptr);
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(boost::get<std::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<std::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(cv_ptr != nullptr);
Arr_curve_end ce =
@ -555,8 +555,8 @@ public:
CGAL_precondition(is_on_boundaries());
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != nullptr);
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(boost::get<std::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<std::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(cv_ptr != nullptr);
Arr_curve_end ce =
@ -572,8 +572,8 @@ public:
CGAL_precondition(type() == TD_VERTEX);
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != nullptr);
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(boost::get<std::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<std::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(cv_ptr != nullptr);
Arr_curve_end ce =
@ -587,8 +587,8 @@ public:
{
CGAL_precondition(!is_active() && type() == TD_EDGE);
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(boost::get<std::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
X_monotone_curve_2* cv_ptr = (boost::get<std::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
CGAL_assertion(cv_ptr != nullptr);
return *cv_ptr;
}

View File

@ -22,7 +22,7 @@
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
#include <boost/variant.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
#ifdef CGAL_TD_DEBUG

View File

@ -22,7 +22,7 @@
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
#include <boost/variant.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
#ifdef CGAL_TD_DEBUG
#define CGAL_TD_INLINE

View File

@ -22,7 +22,7 @@
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
#include <boost/variant.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
#ifdef CGAL_TD_DEBUG

View File

@ -22,7 +22,7 @@
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
#include <boost/variant.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
#ifdef CGAL_TD_DEBUG
@ -115,14 +115,14 @@ public:
public:
//c'tors
Data (boost::shared_ptr<X_monotone_curve_2>& _cv, Dag_node* _p_node)
Data (std::shared_ptr<X_monotone_curve_2>& _cv, Dag_node* _p_node)
: cv(_cv), p_node(_p_node) //, lb(_lb),lt(_lt),rb(_rb),rt(_rt)
{ }
~Data() { }
protected:
boost::shared_ptr<X_monotone_curve_2> cv;
std::shared_ptr<X_monotone_curve_2> cv;
Dag_node* p_node;
};
@ -148,7 +148,7 @@ public:
}
/*! Set the x_monotone_curve_2 for removed edge degenerate trapezoid. */
CGAL_TD_INLINE void set_curve(boost::shared_ptr<X_monotone_curve_2>& cv)
CGAL_TD_INLINE void set_curve(std::shared_ptr<X_monotone_curve_2>& cv)
{
ptr()->cv = cv;
}
@ -159,7 +159,7 @@ public:
//@{
/*! Constructor given Vertex & Halfedge handles. */
Td_inactive_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node* node = nullptr)
Td_inactive_edge (std::shared_ptr<X_monotone_curve_2>& cv, Dag_node* node = nullptr)
{
PTR = new Data(cv,node);
}

View File

@ -27,7 +27,7 @@
#include <boost/optional.hpp>
#include <boost/variant.hpp>
#include <boost/shared_ptr.hpp>
#include <memory>
#include <cstdlib>
#include <cstring>
@ -1206,7 +1206,7 @@ protected:
void deactivate_vertex (Dag_node& vtx_node) const;
void deactivate_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node& edge_node) const;
void deactivate_edge (std::shared_ptr<X_monotone_curve_2>& cv, Dag_node& edge_node) const;
//-----------------------------------------------------------------------------
// Description:

View File

@ -244,7 +244,7 @@ deactivate_vertex(Dag_node& vtx_node) const
template <typename Td_traits>
void Trapezoidal_decomposition_2<Td_traits>::
deactivate_edge(boost::shared_ptr<X_monotone_curve_2>& cv,
deactivate_edge(std::shared_ptr<X_monotone_curve_2>& cv,
Dag_node& edge_node) const
{
CGAL_precondition(traits->is_active(edge_node.get_data()));
@ -1870,7 +1870,7 @@ void Trapezoidal_decomposition_2<Td_traits>::remove(Halfedge_const_handle he)
//-----------------------------------
//3. remove the trapezoids that represent the removed halfedge
boost::shared_ptr<X_monotone_curve_2>
std::shared_ptr<X_monotone_curve_2>
removed_cv_ptr(new X_monotone_curve_2(he->curve()));
Base_map_item_iterator last_edge_fragment_it = mid_it;
//Base_trapezoid_iterator last_mid = mid_it;

View File

@ -237,7 +237,7 @@ public:
std::ostream& print (std::ostream& os) const
{
std::pair<double,double> double_p;
switch(::CGAL::get_mode(os))
switch(::CGAL::IO::get_mode(os))
{
case ::CGAL::IO::PRETTY:
double_p = this->to_double();

View File

@ -80,7 +80,7 @@ public:
typedef Triangulation_vertex_base_with_info_2<Vertex_const_handle, Kernel>
Vbb;
typedef Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
//typedef Triangulation_face_base_with_info_2<CGAL::Color,Kernel> Fbt;
//typedef Triangulation_face_base_with_info_2<CGAL::IO::Color,Kernel> Fbt;
typedef Constrained_triangulation_face_base_2<Kernel> Fb;
typedef Triangulation_data_structure_2<Vb,Fb> TDS;
typedef Exact_predicates_tag Itag;

View File

@ -288,6 +288,12 @@ public:
iend (nt)
{}
template <typename T>
I_Filtered_iterator (T* p) :
nt (pointer(p)),
iend (nt)
{}
I_Filtered_iterator (Iterator it, Iterator end) :
nt (it),
iend (end)
@ -305,6 +311,14 @@ public:
++nt;
}
template <typename P>
I_Filtered_iterator& operator= (const P* p)
{
nt = pointer(p);
iend =nt;
return *this;
}
/*! Access operations. */
Iterator current_iterator() const
{
@ -439,6 +453,12 @@ public:
iend (it)
{}
template <typename T>
I_Filtered_const_iterator (T* p) :
nt (pointer(p)),
iend (nt)
{}
I_Filtered_const_iterator (Iterator it, Iterator end) :
nt (it),
iend (end)
@ -465,6 +485,14 @@ public:
// ++nt;
}
template <typename P>
I_Filtered_const_iterator& operator= (const P* p)
{
nt = pointer(p);
iend =nt;
return *this;
}
/*! Access operations. */
Iterator current_iterator() const
{

View File

@ -3164,7 +3164,7 @@ public:
*/
void write(std::ostream& os) const {
switch (::CGAL::get_mode(os)) {
switch (::CGAL::IO::get_mode(os)) {
case ::CGAL::IO::PRETTY:
os << "arc@" << this->id() << "[(sup@" << this->curve().id();
if (this->is_vertical()) {
@ -3214,7 +3214,7 @@ public:
*/
void read(std::istream& is) {
CGAL_precondition(CGAL::is_ascii(is));
CGAL_precondition(CGAL::IO::is_ascii(is));
Rep rep;
@ -3371,7 +3371,7 @@ std::istream& operator>> (
std::istream& is,
Arc_2< CurvedKernelViaAnalysis_2, Rep_ >& arc) {
CGAL_precondition(CGAL::is_ascii(is));
CGAL_precondition(CGAL::IO::is_ascii(is));
//typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
//typedef Rep_ Rep;

View File

@ -231,7 +231,7 @@ public:
// avoid compiler warning
(void)arc;
//CGAL::set_pretty_mode(std::cerr);
//CGAL::IO::set_pretty_mode(std::cerr);
CERR("Construct_pt_on_arc: " << CGAL::to_double(x) << ", " << arcno <<
", " << c.id() << "\narc = " << arc << "\n");

View File

@ -615,7 +615,7 @@ public:
*/
void write(std::ostream& os) const {
switch(::CGAL::get_mode(os)) {
switch(::CGAL::IO::get_mode(os)) {
case ::CGAL::IO::PRETTY:
os << "point@" << this->id() << "(";
os << "sup@" << this->curve().id() << "; ";
@ -722,7 +722,7 @@ public:
*/
void read(std::istream& is) {
CGAL_precondition(CGAL::is_ascii(is));
CGAL_precondition(CGAL::IO::is_ascii(is));
Rep rep;
@ -823,7 +823,7 @@ std::istream& operator>> (
std::istream& is,
Point_2< CurvedKernelViaAnalysis_2, Rep_ >& pt) {
CGAL_precondition(CGAL::is_ascii(is));
CGAL_precondition(CGAL::IO::is_ascii(is));
//typedef CurvedKernelViaAnalysis_2 Curved_kernel_via_analysis_2;
//typedef Rep_ Rep;

View File

@ -2586,8 +2586,8 @@ inline bool is_isolated_pixel(const Pixel_2& /* pix */) {
// DEBUG ONLY
#ifdef Gfx_USE_OUT
void dump_neighbourhood(const Pixel_2& pix) {
CGAL::set_mode(std::cerr, CGAL::IO::PRETTY);
CGAL::set_mode(std::cout, CGAL::IO::PRETTY);
CGAL::IO::set_mode(std::cerr, CGAL::IO::PRETTY);
CGAL::IO::set_mode(std::cout, CGAL::IO::PRETTY);
Stripe box[2]; // 0 - left-right stripe, 1 - bottom-top stripe
//NT inv = NT(1) / NT(one << pix.level);

View File

@ -29,6 +29,8 @@
namespace CGAL {
namespace IO {
/*!
* Write an arrangement to an output stream using a given formatter.
* \param arr The arrangement.
@ -51,6 +53,8 @@ std::ostream&
return (os);
}
} // namespace IO
/*!
* Output operator (importer).
* \param os The output stream.
@ -72,6 +76,8 @@ std::ostream&
return (os);
}
namespace IO {
/*!
* Read an arrangement from an input stream using a given formatter.
* \param arr The arrangement.
@ -94,6 +100,8 @@ std::istream&
return (is);
}
} // namespace IO
/*!
* Output operator (exporter).
* \param is The input stream.
@ -115,6 +123,11 @@ std::istream&
return (is);
}
#ifndef CGAL_NO_DEPRECATED_CODE
using IO::read;
using IO::write;
#endif
} //namespace CGAL
#endif

View File

@ -120,8 +120,8 @@ public:
void write_arrangement_begin()
{
CGAL_assertion(m_out != nullptr);
m_old_out_mode = get_mode(*m_out);
set_ascii_mode(*m_out);
m_old_out_mode = IO::get_mode(*m_out);
IO::set_ascii_mode(*m_out);
_write_comment("BEGIN ARRANGEMENT");
}
@ -277,8 +277,8 @@ public:
void read_arrangement_begin()
{
CGAL_assertion(m_in != nullptr);
m_old_in_mode = get_mode(*m_in);
set_ascii_mode(*m_in);
m_old_in_mode = IO::get_mode(*m_in);
IO::set_ascii_mode(*m_in);
_skip_comments();
}

View File

@ -30,6 +30,8 @@
namespace CGAL {
namespace IO {
/*!
* Write an arrangement with history to an output stream using a given
* formatter.
@ -54,6 +56,8 @@ std::ostream& write
return (os);
}
} // namespace IO
/*!
* Output operator (importer).
* \param os The output stream.
@ -77,6 +81,8 @@ std::ostream& operator<<
return (os);
}
namespace IO {
/*!
* Read an arrangement with history from an input stream using a given
* formatter.
@ -101,6 +107,8 @@ std::istream& read
return (is);
}
} // namespace IO
/*!
* Output operator (exporter).
* \param is The input stream.
@ -124,6 +132,11 @@ std::istream& operator>>
return (is);
}
#ifndef CGAL_NO_DEPRECATED_CODE
using IO::read;
using IO::write;
#endif
} //namespace CGAL
#endif

View File

@ -18,6 +18,9 @@
#include <CGAL/IO/Fig_stream.h>
#include <list>
namespace CGAL {
namespace IO {
/*!
* Write an x-monotone conic arc to a FIG stream.
*/
@ -97,4 +100,6 @@ void write_conic_arc
return;
}
}} // namespace CGAL:IO
#endif

View File

@ -745,7 +745,7 @@ bool Overlay_test<T_Geom_traits, T_Topol_traits>::init()
// Expected arrangement.
Formatter formatter;
CGAL::read(m_arr, p_stream, formatter);
CGAL::IO::read(m_arr, p_stream, formatter);
p_stream.close();
@ -981,13 +981,13 @@ bool Overlay_test<T_Geom_traits, T_Topol_traits>::perform()
Arrangement arr;
Overlay_traits overlay_traits(m_verbose_level);
// Formatter formatter;
// CGAL::write(m_arr2, std::cout, formatter);
// CGAL::IO::write(m_arr2, std::cout, formatter);
CGAL::overlay(m_arr1, m_arr2, arr, overlay_traits);
// Generate the output for debugging purposes
// Formatter formatter;
// CGAL::write(arr, std::cout, formatter);
// CGAL::IO::write(arr, std::cout, formatter);
// Verify the resulting arrangement:
if (!equivalent_arr(arr, m_arr)) {

View File

@ -87,8 +87,8 @@ bool test(const char* points_filename, const char* xcurves_filename,
int main(int argc, char* argv[])
{
#if TEST_GEOM_TRAITS == ALGEBRAIC_GEOM_TRAITS
CGAL::set_pretty_mode(std::cout);
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cerr);
#endif
size_t verbose_level = 0;

View File

@ -96,8 +96,8 @@ bool test(const char* filename, int verbose_level)
int main(int argc, char* argv[])
{
#if TEST_GEOM_TRAITS == ALGEBRAIC_GEOM_TRAITS
CGAL::set_pretty_mode(std::cout);
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cerr);
#endif
if (argc < 2) {

View File

@ -129,8 +129,8 @@ bool test(const char* filename, int verbose_level)
int main(int argc, char* argv[])
{
#if TEST_GEOM_TRAITS == ALGEBRAIC_GEOM_TRAITS
CGAL::set_pretty_mode(std::cout);
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cerr);
#endif
if (argc < 2) {

View File

@ -128,8 +128,8 @@ bool test3(const char* points_filename, const char* xcurves_filename,
int main(int argc, char* argv[])
{
#if TEST_GEOM_TRAITS == ALGEBRAIC_GEOM_TRAITS
CGAL::set_pretty_mode(std::cout);
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cerr);
#endif
if (argc < 4) {

View File

@ -91,8 +91,8 @@ bool test1(const char* points_filename, const char* xcurves_filename,
int main(int argc, char* argv[])
{
#if TEST_GEOM_TRAITS == ALGEBRAIC_GEOM_TRAITS
CGAL::set_pretty_mode(std::cout);
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cerr);
#endif
if (argc < 5) {

View File

@ -73,8 +73,8 @@ int main(int argc, char* argv[])
{
#if TEST_GEOM_TRAITS == ALGEBRAIC_GEOM_TRAITS
CGAL::set_pretty_mode(std::cout);
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cerr);
#endif
Geom_traits traits;

View File

@ -84,8 +84,8 @@ bool test(const char* points_filename, const char* xcurves_filename,
int main(int argc, char* argv[])
{
#if TEST_GEOM_TRAITS == ALGEBRAIC_GEOM_TRAITS
CGAL::set_pretty_mode(std::cout);
CGAL::set_pretty_mode(std::cerr);
CGAL::IO::set_pretty_mode(std::cout);
CGAL::IO::set_pretty_mode(std::cerr);
#endif
size_t verbose_level = 0;

View File

@ -756,8 +756,8 @@ user might encounter.
- `CGAL::alpha_expansion_graphcut()`
\cgalCRPSection{I/O Functions}
- `CGAL::read_polygon_mesh()`
- `CGAL::write_polygon_mesh()`
- `CGAL::IO::read_polygon_mesh()`
- `CGAL::IO::write_polygon_mesh()`
- \link PkgBGLIoFuncsSTL I/O for STL files \endlink
- \link PkgBGLIoFuncsPLY I/O for PLY files \endlink
- \link PkgBGLIoFuncsOBJ I/O for OBJ files \endlink

View File

@ -39,7 +39,7 @@ int main(int argc, char* argv[])
Target1 T1;
{
CGAL::copy_face_graph(S, T1);
CGAL::write_OFF("lcc.off", T1);
CGAL::IO::write_OFF("lcc.off", T1);
}
S.clear();

View File

@ -20,7 +20,7 @@ typedef boost::graph_traits<LCC>::vertex_iterator vertex_iterator;
int main(int argc, char** argv)
{
LCC lcc;
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
CGAL::IO::read_polygon_mesh((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());

View File

@ -51,7 +51,7 @@ OutputIterator adjacent_vertices_V2(const LCC& g,
int main(int argc, char** argv)
{
LCC lcc;
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
CGAL::IO::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
GraphTraits::vertex_iterator vi = vertices(lcc).first;
std::list<vertex_descriptor> V;

View File

@ -70,7 +70,7 @@ int main(int argc, char** argv)
Face_index_map;
LCC lcc;
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
CGAL::IO::read_polygon_mesh((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

View File

@ -52,7 +52,7 @@ void fct(const LCC& lcc)
int main(int argc, char** argv)
{
LCC lcc;
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
CGAL::IO::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
fct(lcc);
return 0;

View File

@ -43,7 +43,7 @@ struct Source {
int main(int argc, char** argv)
{
LCC lcc;
CGAL::read_polygon_mesh((argc>1)?argv[1]:"cube.off", lcc);
CGAL::IO::read_polygon_mesh((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;

View File

@ -28,13 +28,13 @@ int main(int argc, char** argv )
std::vector<vertex_descriptor> V;
const char* filename = (argc>1)?argv[1]:"in.off";
const char* outname= (argc>2)?argv[2]:"out.off";
CGAL::read_polygon_mesh(filename, mesh);
CGAL::IO::read_polygon_mesh(filename, mesh);
for(vertex_descriptor vd : vertices(mesh)){
for(halfedge_descriptor hd : CGAL::halfedges_around_target(vd,mesh)){
if(! CGAL::is_border(edge(hd,mesh),mesh)){
CGAL::Euler::flip_edge(hd,mesh);
CGAL::write_polygon_mesh(outname, mesh);
CGAL::IO::write_polygon_mesh(outname, mesh);
return 0;
}
}

View File

@ -21,7 +21,7 @@ int main(int argc, char** argv)
}
Mesh mesh;
CGAL::read_OFF (in, mesh);
CGAL::IO::read_OFF (in, mesh);
boost::unordered_map<Face_index, bool> is_selected_map;

View File

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

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