Merge branch 'master' into CGAL-Clean_CMakeLists.txt-GF

This commit is contained in:
Mael 2022-12-05 16:03:41 +01:00 committed by GitHub
commit 6538b22e06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1006 changed files with 15036 additions and 15812 deletions

1
.github/install.sh vendored
View File

@ -1,5 +1,4 @@
#!/bin/bash #!/bin/bash
sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
sudo apt-get update sudo apt-get update
sudo apt-get install -y libmpfr-dev \ sudo apt-get install -y libmpfr-dev \
libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \ libeigen3-dev qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev \

32
.github/workflows/Remove_labels.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: remove_labels
on:
pull_request_target:
types: [synchronize]
jobs:
remove_label:
runs-on: ubuntu-latest
if: contains(github.event.pull_request.labels.*.name, 'Tested')
name: remove label
steps:
- name: removelabel
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
name: "Tested",
});
- name: Post address
uses: actions/github-script@v6
if: ${{ success() }}
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: "This pull-request was previously marked with the label `Tested`, but has been modified with new commits. That label has been removed."
})

View File

@ -4,9 +4,16 @@ on:
issue_comment: issue_comment:
types: [created] types: [created]
permissions:
contents: read # to fetch code (actions/checkout)
jobs: jobs:
build: build:
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create comment
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/github-script@v6 - uses: actions/github-script@v6
@ -40,6 +47,19 @@ jobs:
//get pullrequest url //get pullrequest url
const pr_number = context.payload.issue.number const pr_number = context.payload.issue.number
return pr_number return pr_number
- name: Emoji-comment
uses: actions/github-script@v6
if: steps.get_round.outputs.result != 'stop'
with:
script: |
github.rest.reactions.createForIssueComment({
comment_id: ${{ github.event.comment.id }},
owner: context.repo.owner,
repo: context.repo.repo,
content: 'rocket'
})
- uses: actions/checkout@v3 - uses: actions/checkout@v3
name: "checkout branch" name: "checkout branch"
if: steps.get_round.outputs.result != 'stop' if: steps.get_round.outputs.result != 'stop'
@ -49,7 +69,6 @@ jobs:
token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }} token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
fetch-depth: 2 fetch-depth: 2
- name: install dependencies - name: install dependencies
if: steps.get_round.outputs.result != 'stop' if: steps.get_round.outputs.result != 'stop'
run: | run: |
@ -83,14 +102,17 @@ jobs:
#list impacted packages #list impacted packages
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) 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 if [ "$LIST_OF_PKGS" = "" ]; then
echo "::set-output name=DoxygenError::No package affected." echo "DoxygenError=No package affected." >> $GITHUB_OUTPUT
exit 1 exit 1
fi fi
cd build_doc && make -j2 doc cd build_doc && make -j2 doc
make -j2 doc_with_postprocessing 2>tmp.log make -j2 doc_with_postprocessing 2>tmp.log
if [ -s tmp.log ]; then if [ -s tmp.log ]; then
content=`cat ./tmp.log` content=`cat ./tmp.log`
echo "::set-output name=DoxygenError::$(cat tmp.log)" delimiter="$(openssl rand -hex 8)"
echo "DoxygenError<<${delimiter}" >> "${GITHUB_OUTPUT}"
cat tmp.log >> "${GITHUB_OUTPUT}"
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
exit 1 exit 1
fi fi
cd .. cd ..
@ -110,7 +132,7 @@ jobs:
mv tmp.html index.html mv tmp.html index.html
git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master
else else
echo "::set-output name=DoxygenError::This round already exists. Overwrite it with /force-build." echo "DoxygenError=This round already exists. Overwrite it with /force-build." >> $GITHUB_OUTPUT
exit 1 exit 1
fi fi
@ -131,11 +153,13 @@ jobs:
}); });
- name: Post error - name: Post error
env:
ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}}
uses: actions/github-script@v6 uses: actions/github-script@v6
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }} if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
with: with:
script: | script: |
const error = "${{steps.build_and_run.outputs.DoxygenError}}" const error = process.env.ERRORMSG
const msg = "There was an error while building the doc: \n"+error const msg = "There was an error while building the doc: \n"+error
github.rest.issues.createComment({ github.rest.issues.createComment({
owner: "CGAL", owner: "CGAL",

View File

@ -4,8 +4,12 @@ on:
issue_comment: issue_comment:
types: [created] types: [created]
permissions: {}
jobs: jobs:
build: build:
permissions:
pull-requests: write # to create comment
if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme') if: (github.event.comment.user.login == 'sloriot' || github.event.comment.user.login == 'lrineau') && contains(github.event.comment.body, '/testme')
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -2,7 +2,7 @@
<body> <body>
<h2>AABB Tree Demo</h2> <h2>AABB Tree Demo</h2>
<p>Copyright &copy;2009 <p>Copyright &copy;2009
<a href="http://www-sop.inria.fr/">INRIA Sophia Antipolis - Mediterranee<a/></p> <a href="https://www.inria.fr/fr/centre-inria-universite-cote-azur">INRIA Sophia Antipolis - Mediterranee<a/></p>
<p>This application illustrates the AABB tree component <p>This application illustrates the AABB tree component
of <a href="https://www.cgal.org/">CGAL</a>, applied to polyhedron of <a href="https://www.cgal.org/">CGAL</a>, applied to polyhedron
facets and edges.</p> facets and edges.</p>

View File

@ -527,7 +527,6 @@ private:
{ {
CGAL::Timer timer; CGAL::Timer timer;
timer.start(); timer.start();
int nb_test = 0;
while ( timer.time() < duration ) while ( timer.time() < duration )
{ {
Point a = random_point_in<K>(m_tree.bbox()); Point a = random_point_in<K>(m_tree.bbox());
@ -539,8 +538,6 @@ private:
test(segment, m_polyhedron, m_tree, m_naive); test(segment, m_polyhedron, m_tree, m_naive);
test(ray, m_polyhedron, m_tree, m_naive); test(ray, m_polyhedron, m_tree, m_naive);
test(line, m_polyhedron, m_tree, m_naive); test(line, m_polyhedron, m_tree, m_naive);
++nb_test;
} }
timer.stop(); timer.stop();

View File

@ -370,19 +370,19 @@ namespace CGAL {
coord_type K, min_K; coord_type K, min_K;
const coord_type eps; const coord_type eps;
const coord_type inv_eps_2; // 1/(eps^2) const coord_type inv_eps_2; // 1/(eps^2)
const coord_type eps_3; // test de ^3 donc points tel 1e-7 soit petit const coord_type eps_3; // tests using cubed eps so points such that 1e-7 is small
const criteria STANDBY_CANDIDATE; const criteria STANDBY_CANDIDATE;
const criteria STANDBY_CANDIDATE_BIS; const criteria STANDBY_CANDIDATE_BIS;
const criteria NOT_VALID_CANDIDATE; const criteria NOT_VALID_CANDIDATE;
//--------------------------------------------------------------------- //---------------------------------------------------------------------
//Pour une visu correcte // For a correct visualization
//pour retenir les facettes selectionnees // to retain the selected facets
int _vh_number; int _vh_number;
int _facet_number; int _facet_number;
//--------------------------------------------------------------------- //---------------------------------------------------------------------
//Pour le post traitement // For post-processing
mutable int _postprocessing_counter; mutable int _postprocessing_counter;
int _size_before_postprocessing; int _size_before_postprocessing;
@ -501,9 +501,8 @@ namespace CGAL {
} }
//------------------------------------------------------------------- //-------------------------------------------------------------------
// pour gerer certaines aretes interieures: a savoir celle encore connectee au // to handle certain interior edges, meaning those still connected to the boundary
// bord (en fait seule, les aretes interieures reliant 2 bords nous // (actually, only the interior edges linking two boundaries are relevant)
// interressent...)
inline void set_interior_edge(Vertex_handle w, Vertex_handle v) inline void set_interior_edge(Vertex_handle w, Vertex_handle v)
{ {
@ -806,7 +805,7 @@ namespace CGAL {
if ((number_of_facets() > static_cast<int>(T.number_of_vertices()))&& if ((number_of_facets() > static_cast<int>(T.number_of_vertices()))&&
(NB_BORDER_MAX > 0)) (NB_BORDER_MAX > 0))
// en principe 2*nb_sommets = nb_facettes: y a encore de la marge!!! // in theory 2*vertices_n = facets_n: plenty of room!!!
{ {
while(postprocessing()){ while(postprocessing()){
extend2_timer.start(); extend2_timer.start();
@ -1068,9 +1067,8 @@ namespace CGAL {
//--------------------------------------------------------------------- //---------------------------------------------------------------------
bool is_interior_edge(const Edge_like& key) const bool is_interior_edge(const Edge_like& key) const
// pour gerer certaines aretes interieures: a savoir celle encore connectee au // to handle certain interior edges, meaning those still connected to the boundary
// bord (en fait seule, les aretes interieures reliant 2 bords nous // (actually, only the interior edges linking two boundaries are relevant)
// interressent...)
{ {
return (is_interior_edge(key.first, key.second)|| return (is_interior_edge(key.first, key.second)||
is_interior_edge(key.second, key.first)); is_interior_edge(key.second, key.first));
@ -1299,7 +1297,6 @@ namespace CGAL {
#ifdef AFSR_LAZY #ifdef AFSR_LAZY
value = lazy_squared_radius(cc); value = lazy_squared_radius(cc);
#else #else
// qualified with CGAL, to avoid a compilation error with clang
if(volume(pp0, pp1, pp2, pp3) != 0){ if(volume(pp0, pp1, pp2, pp3) != 0){
value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3); value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3);
} else { } else {
@ -1337,7 +1334,6 @@ namespace CGAL {
{ {
value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V; value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V;
if ((value < 0)||(norm_V > inv_eps_2)){ if ((value < 0)||(norm_V > inv_eps_2)){
// qualified with CGAL, to avoid a compilation error with clang
value = T.geom_traits().compute_squared_radius_3_object()(cp1, cp2, cp3); value = T.geom_traits().compute_squared_radius_3_object()(cp1, cp2, cp3);
} }
} }
@ -1365,7 +1361,7 @@ namespace CGAL {
/// @} /// @}
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// For a border edge e we determine the incident facet which has the highest // For a border edge e, we determine the incident facet which has the highest
// chance to be a natural extension of the surface // chance to be a natural extension of the surface
Radius_edge_type Radius_edge_type
@ -1425,8 +1421,7 @@ namespace CGAL {
P2Pn = construct_vector(p2, pn); P2Pn = construct_vector(p2, pn);
v2 = construct_cross_product(P2P1,P2Pn); v2 = construct_cross_product(P2P1,P2Pn);
//pas necessaire de normer pour un bon echantillon: // no need to normalize for a correct sampling: one can then test v1*v2 >= 0
// on peut alors tester v1*v2 >= 0
norm = sqrt(norm1 * compute_scalar_product(v2,v2)); norm = sqrt(norm1 * compute_scalar_product(v2,v2));
pscal = v1*v2; pscal = v1*v2;
// check if the triangle will produce a sliver on the surface // check if the triangle will produce a sliver on the surface
@ -1437,7 +1432,8 @@ namespace CGAL {
if (tmp < min_valueA) if (tmp < min_valueA)
{ {
PnP1 = p1-pn; PnP1 = p1-pn;
// DELTA represente la qualite d'echantillonnage du bord // DELTA encodes the quality of the border sampling
//
// We skip triangles having an internal angle along e // We skip triangles having an internal angle along e
// whose cosinus is smaller than -DELTA // whose cosinus is smaller than -DELTA
// that is the angle is larger than arcos(-DELTA) // that is the angle is larger than arcos(-DELTA)
@ -1462,37 +1458,36 @@ namespace CGAL {
if ((min_valueA == infinity()) || border_facet) // bad facets case if ((min_valueA == infinity()) || border_facet) // bad facets case
{ {
min_facet = Facet(c, i); // !!! sans aucune signification.... min_facet = Facet(c, i); // !!! without any meaning....
value = NOT_VALID_CANDIDATE; // Attention a ne pas inserer dans PQ value = NOT_VALID_CANDIDATE; // Do not insert in the PQ
} }
else else
{ {
min_facet = min_facetA; min_facet = min_facetA;
//si on considere seulement la pliure value appartient a [0, 2] // If we only consider the fold value belongs to [0, 2]
// value = coord_type(1) - min_valueP; // value = coord_type(1) - min_valueP;
// si la pliure est bonne on note suivant le alpha sinon on prend en compte la // If the fold is OK, we rate based on the alpha value. Otherwise, take only the fold into account
// pliure seule... pour discriminer entre les bons slivers... // to discriminate between good slivers.
// si on veut discriminer les facettes de bonnes pliures plus finement //
// alors -(1+1/min_valueA) app a [-inf, -1] // If we wish to discriminate the facets with good folds more finely,
// -min_valueP app a [-1, 1] // then:
// -(1+1/min_valueA) is within [-inf, -1]
// -min_valueP is within [-1, 1]
//
if (min_valueP > COS_BETA) if (min_valueP > COS_BETA)
value = -(coord_type(1) + coord_type(1)/min_valueA); value = -(coord_type(1) + coord_type(1)/min_valueA);
else else
{ {
//on refuse une trop grande non-uniformite // reject overly non-uniform values
coord_type tmp = priority (*this, c, i); coord_type tmp = priority (*this, c, i);
if (min_valueA <= K * tmp) if (min_valueA <= K * tmp)
value = - min_valueP; value = - min_valueP;
else else
{ {
value = STANDBY_CANDIDATE; // tres mauvais candidat mauvaise pliure value = STANDBY_CANDIDATE; // extremely bad candidate, bad fold + large alpha; handle later
// + grand alpha... a traiter plus tard.... min_K = (std::min)(min_K, min_valueA/tmp);
min_K =
(std::min)(min_K,
min_valueA/tmp);
} }
} }
} }
@ -1597,7 +1592,7 @@ namespace CGAL {
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// test de reciprocite avant de recoller une oreille anti-singularite // reciprocity test before glueing anti-singularity ear
int int
test_merge(const Edge_like& ordered_key, const Border_elt& result, test_merge(const Edge_like& ordered_key, const Border_elt& result,
const Vertex_handle& v, const coord_type& ear_alpha) const Vertex_handle& v, const coord_type& ear_alpha)
@ -1622,12 +1617,12 @@ namespace CGAL {
coord_type norm = sqrt(compute_scalar_product(v1, v1) * compute_scalar_product(v2, v2)); coord_type norm = sqrt(compute_scalar_product(v1, v1) * compute_scalar_product(v2, v2));
if (v1*v2 > COS_BETA*norm) if (v1*v2 > COS_BETA*norm)
return 1; // label bonne pliure sinon: return 1; // mark as good fold
if (ear_alpha <= K * priority(*this, neigh, n_ind)) if (ear_alpha <= K * priority(*this, neigh, n_ind))
return 2; // label alpha coherent... return 2; // mark alpha consistent
return 0; //sinon oreille a rejeter... return 0; // ear to be rejected
} }
@ -1753,7 +1748,7 @@ namespace CGAL {
Edge_like ordered_key(v1,v2); Edge_like ordered_key(v1,v2);
if (!is_border_elt(ordered_key, result12)) if (!is_border_elt(ordered_key, result12))
std::cerr << "+++probleme coherence bord <validate>" << std::endl; std::cerr << "+++issue with border consistency <validate>" << std::endl;
bool is_border_el1 = is_border_elt(ordered_el1, result1), bool is_border_el1 = is_border_elt(ordered_el1, result1),
is_border_el2 = is_border_elt(ordered_el2, result2); is_border_el2 = is_border_elt(ordered_el2, result2);
@ -1782,8 +1777,7 @@ namespace CGAL {
return FINAL_CASE; return FINAL_CASE;
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
//on peut alors marquer v1 et on pourrait essayer de merger // we can then mark v1 and could try to merge without any useless computation???
//sans faire de calcul inutile???
if (is_border_el1) if (is_border_el1)
{ {
Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third), Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
@ -1796,7 +1790,7 @@ namespace CGAL {
return EAR_CASE; return EAR_CASE;
} }
//--------------------------------------------------------------------- //---------------------------------------------------------------------
//idem pour v2 //idem for v2
if (is_border_el2) if (is_border_el2)
{ {
Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second), Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
@ -1852,9 +1846,9 @@ namespace CGAL {
// border incident to a point... _mark<1 even if th orientation // border incident to a point... _mark<1 even if th orientation
// may be such as one vh has 2 successorson the same border... // may be such as one vh has 2 successorson the same border...
{ {
// a ce niveau on peut tester si le recollement se fait en // at this level, we can test if glueing can be done while keeping
// maintenant la compatibilite d'orientation des bords (pour // compatible orientations for the borders (for an orientable surface...)
// surface orientable...) ou si elle est brisee... // or if it is broken
Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second), Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
edge_Efacet.second); edge_Efacet.second);
Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third), Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
@ -1884,8 +1878,8 @@ namespace CGAL {
Border_elt result_ear2; Border_elt result_ear2;
Edge_like ear1_e, ear2_e; Edge_like ear1_e, ear2_e;
// pour maintenir la reconstruction d'une surface orientable : // to preserve the reconstruction of an orientable surface, we check that
// on verifie que les bords se recollent dans des sens opposes // borders glue to one another in opposite directions
if (ordered_key.first==v1) if (ordered_key.first==v1)
{ {
ear1_e = Edge_like(c->vertex(i), ear1_c ->vertex(ear1_i)); ear1_e = Edge_like(c->vertex(i), ear1_c ->vertex(ear1_i));
@ -1897,7 +1891,7 @@ namespace CGAL {
ear2_e = Edge_like(c->vertex(i), ear2_c ->vertex(ear2_i)); ear2_e = Edge_like(c->vertex(i), ear2_c ->vertex(ear2_i));
} }
//maintient la surface orientable // preserves orientability of the surface
bool is_border_ear1 = is_ordered_border_elt(ear1_e, result_ear1); bool is_border_ear1 = is_ordered_border_elt(ear1_e, result_ear1);
bool is_border_ear2 = is_ordered_border_elt(ear2_e, result_ear2); bool is_border_ear2 = is_ordered_border_elt(ear2_e, result_ear2);
bool ear1_valid(false), ear2_valid(false); bool ear1_valid(false), ear2_valid(false);
@ -1931,8 +1925,7 @@ namespace CGAL {
{ {
Validation_case res = validate(ear1, e1.first); Validation_case res = validate(ear1, e1.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE))) if (!((res == EAR_CASE)||(res == FINAL_CASE)))
std::cerr << "+++probleme de recollement : cas " std::cerr << "+++issue in glueing: case " << res << std::endl;
<< res << std::endl;
e2 = compute_value(edge_Ifacet_2); e2 = compute_value(edge_Ifacet_2);
if (ordered_key.first == v1) if (ordered_key.first == v1)
@ -1948,8 +1941,7 @@ namespace CGAL {
{ {
Validation_case res = validate(ear2, e2.first); Validation_case res = validate(ear2, e2.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE))) if (!((res == EAR_CASE)||(res == FINAL_CASE)))
std::cerr << "+++probleme de recollement : cas " std::cerr << "+++issue in glueing : case " << res << std::endl;
<< res << std::endl;
e1 = compute_value(edge_Ifacet_1); e1 = compute_value(edge_Ifacet_1);
if (ordered_key.first == v1) if (ordered_key.first == v1)
@ -1962,25 +1954,23 @@ namespace CGAL {
_ordered_border.insert(Radius_ptr_type(e1.first, p1)); _ordered_border.insert(Radius_ptr_type(e1.first, p1));
} }
} }
else// les deux oreilles ne se recollent pas sur la meme arete... else // both ears do not glue on the same edge
{ {
// on resoud la singularite. // resolve the singularity
if (ear1_valid) if (ear1_valid)
{ {
Validation_case res = validate(ear1, e1.first); Validation_case res = validate(ear1, e1.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE))) if (!((res == EAR_CASE)||(res == FINAL_CASE)))
std::cerr << "+++probleme de recollement : cas " std::cerr << "+++issue in glueing: case " << res << std::endl;
<< res << std::endl;
} }
if (ear2_valid) if (ear2_valid)
{ {
Validation_case res = validate(ear2, e2.first); Validation_case res = validate(ear2, e2.first);
if (!((res == EAR_CASE)||(res == FINAL_CASE))) if (!((res == EAR_CASE)||(res == FINAL_CASE)))
std::cerr << "+++probleme de recollement : cas " std::cerr << "+++issue in glueing : case " << res << std::endl;
<< res << std::endl;
} }
// on met a jour la PQ s'il y a lieu... mais surtout pas
// avant la resolution de la singularite // Update the PQ if needed, but not before resolving the singularity
if (!ear1_valid) if (!ear1_valid)
{ {
_ordered_border.insert(Radius_ptr_type(e1.first, p1)); _ordered_border.insert(Radius_ptr_type(e1.first, p1));
@ -2020,7 +2010,7 @@ namespace CGAL {
if (new_candidate.first == STANDBY_CANDIDATE) if (new_candidate.first == STANDBY_CANDIDATE)
{ {
// a garder pour un K un peu plus grand... // put aside for a slightly larger K
new_candidate.first = STANDBY_CANDIDATE_BIS; new_candidate.first = STANDBY_CANDIDATE_BIS;
} }
@ -2042,8 +2032,8 @@ namespace CGAL {
void void
extend() extend()
{ {
// initilisation de la variable globale K: qualite d'echantillonnage requise // Initialize the global variable K: required sampling quality
K = K_init; // valeur d'initialisation de K pour commencer prudemment... K = K_init; // initial value of K to start carefully
coord_type K_prev = K; coord_type K_prev = K;
Vertex_handle v1, v2; Vertex_handle v1, v2;
@ -2052,7 +2042,7 @@ namespace CGAL {
} }
do do
{ {
min_K = infinity(); // pour retenir le prochain K necessaire pour progresser... min_K = infinity(); // to store the next K required to progress
do do
{ {
@ -2111,8 +2101,7 @@ namespace CGAL {
(_ordered_border.begin()->first < STANDBY_CANDIDATE_BIS)); (_ordered_border.begin()->first < STANDBY_CANDIDATE_BIS));
K_prev = K; K_prev = K;
K += (std::max)(K_step, min_K - K + eps); K += (std::max)(K_step, min_K - K + eps);
// on augmente progressivement le K mais on a deja rempli sans // Progressively increase K, but having already filled without issue beforehand
// faire des betises auparavant...
} }
while((!_ordered_border.empty())&&(K <= K)&&(min_K != infinity())&&(K!=K_prev)); while((!_ordered_border.empty())&&(K <= K)&&(min_K != infinity())&&(K!=K_prev));
@ -2125,9 +2114,8 @@ namespace CGAL {
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// En principe, si l'allocateur de cellules etait bien fait on aurait pas besoin // In theory, if the cell allocator were properly made, one would not need to manually update
// de mettre a jour les valeurs rajoutees pour les cellules a la main... // the values added for the cells
void void
re_init_for_free_cells_cache(const Vertex_handle& vh) re_init_for_free_cells_cache(const Vertex_handle& vh)
{ {
@ -2152,9 +2140,8 @@ namespace CGAL {
int index = c->index(vh); int index = c->index(vh);
Cell_handle neigh = c->neighbor(index); Cell_handle neigh = c->neighbor(index);
int n_ind = neigh->index(c); int n_ind = neigh->index(c);
neigh->set_smallest_radius(n_ind, -1); // pour obliger le recalcul neigh->set_smallest_radius(n_ind, -1); // forces recomputation
// si c est selectionnee c'est qu'elle est aussi le mem_IFacet renvoye par // if c is selected, then it is also the mem_IFacet returned by compute_value... so to be swapped too
// compute_value... donc a swapper aussi
if (c->is_selected_facet(index)) if (c->is_selected_facet(index))
{ {
int fn = c->facet_number(index); int fn = c->facet_number(index);
@ -2214,8 +2201,8 @@ namespace CGAL {
circ = next(circ); circ = next(circ);
} }
while(circ.first.first != c); while(circ.first.first != c);
// si on passe par la, alors y a eu un probleme.... // if we are here, something went wrong
std::cerr << "+++probleme dans la MAJ avant remove..." << std::endl; std::cerr << "+++issue in the update before removal..." << std::endl;
return Facet(c, start.second); return Facet(c, start.second);
} }
@ -2237,7 +2224,7 @@ namespace CGAL {
ordered_map_erase(border_elt.second.first.first, ordered_map_erase(border_elt.second.first.first,
border_IO_elt(vh, vh_succ)); border_IO_elt(vh, vh_succ));
remove_border_edge(vh, vh_succ); remove_border_edge(vh, vh_succ);
// 1- a virer au cas ou car vh va etre detruit // 1- remove just in case since vh is about to be destroyed
remove_interior_edge(vh_succ, vh); remove_interior_edge(vh_succ, vh);
bool while_cond(true); bool while_cond(true);
do do
@ -2266,14 +2253,14 @@ namespace CGAL {
{ {
ordered_map_erase(result.first.first, border_IO_elt(vh_int, vh)); ordered_map_erase(result.first.first, border_IO_elt(vh_int, vh));
remove_border_edge(vh_int, vh); remove_border_edge(vh_int, vh);
// 1- a virer au cas ou car vh va etre detruit // 1- remove just in case since vh is about to be destroyed
remove_interior_edge(vh_int, vh); remove_interior_edge(vh_int, vh);
while_cond = false; while_cond = false;
} }
// a titre preventif... on essaye de s'assurer de marquer les aretes
// interieures au sens large...
// 2- a virer a tout pris pour que maintenir le sens de interior edge // As a preventive measure, we try to ensure marking the interior edges in a broad sense
// 2- remove to preserve the interior edge
remove_interior_edge(vh_int, vh_succ); remove_interior_edge(vh_int, vh_succ);
remove_interior_edge(vh_succ, vh_int); remove_interior_edge(vh_succ, vh_int);
@ -2304,16 +2291,16 @@ namespace CGAL {
bool bool
create_singularity(const Vertex_handle& vh) create_singularity(const Vertex_handle& vh)
{ {
// Pour reperer le cas de triangle isole // To detect the isolated triangle case
if (vh->is_on_border()) if (vh->is_on_border())
{ {
// vh sommet 0 // vh vertex 0
Next_border_elt border_elt = *(vh->first_incident()); Next_border_elt border_elt = *(vh->first_incident());
Vertex_handle vh_1 = border_elt.first;// sommet 1 Vertex_handle vh_1 = border_elt.first;// vertex 1
border_elt = *(vh_1->first_incident()); border_elt = *(vh_1->first_incident());
Vertex_handle vh_2 = border_elt.first;// sommet 2 Vertex_handle vh_2 = border_elt.first;// vertex 2
border_elt = *(vh_2->first_incident()); border_elt = *(vh_2->first_incident());
Vertex_handle vh_3 = border_elt.first;// sommet 0 ??? Vertex_handle vh_3 = border_elt.first;// vertex 0 ???
Cell_handle c; Cell_handle c;
int i, j, k; int i, j, k;
if ((vh_3 == vh)&&(T.is_facet(vh, vh_1, vh_2, c, i ,j ,k))) if ((vh_3 == vh)&&(T.is_facet(vh, vh_1, vh_2, c, i ,j ,k)))
@ -2328,7 +2315,7 @@ namespace CGAL {
} }
// Reperer le cas d'aretes interieures... // Detect the interior edges case
std::list<Vertex_handle> vh_list; std::list<Vertex_handle> vh_list;
T.incident_vertices(vh, std::back_inserter(vh_list)); T.incident_vertices(vh, std::back_inserter(vh_list));
@ -2402,9 +2389,9 @@ namespace CGAL {
std::list<Vertex_handle> L_v; std::list<Vertex_handle> L_v;
// Pour controler les sommets choisis sur le bord... // To control vertices chosen on the boundary
// nombre d'aretes a partir duquel on considere que c'est irrecuperable NB_BORDER_MAX // NB_BORDER_MAX: number of edges from which we consider that things are irrecoverable
int vh_on_border_inserted(0); int vh_on_border_inserted(0);
for(Finite_vertices_iterator v_it = T.finite_vertices_begin(); for(Finite_vertices_iterator v_it = T.finite_vertices_begin();
@ -2445,7 +2432,7 @@ namespace CGAL {
std::size_t itmp, L_v_size_mem; std::size_t itmp, L_v_size_mem;
L_v_size_mem = L_v.size(); L_v_size_mem = L_v.size();
if ((vh_on_border_inserted != 0)&& // pour ne post-traiter que les bords if ((vh_on_border_inserted != 0)&& // to post-process only the borders
(L_v.size() < .1 * _size_before_postprocessing)) (L_v.size() < .1 * _size_before_postprocessing))
{ {
{ {
@ -2460,7 +2447,7 @@ namespace CGAL {
} }
#ifdef VERBOSE #ifdef VERBOSE
if(L_v.size() > 0){ if(L_v.size() > 0){
std::cout << " " << L_v.size() << " non regular points." << std::endl; std::cout << " " << L_v.size() << " non-regular points." << std::endl;
} }
#endif // VERBOSE #endif // VERBOSE
re_compute_values(); re_compute_values();
@ -2469,7 +2456,7 @@ namespace CGAL {
postprocess_timer.stop(); postprocess_timer.stop();
return false; return false;
} }
// we stop if we removed more than 10% of points or after 20 rounds // we stop if we removed more than 10% of points, or after 20 rounds
if ((L_v_size_mem == L_v.size())|| if ((L_v_size_mem == L_v.size())||
((_size_before_postprocessing - T.number_of_vertices()) > ((_size_before_postprocessing - T.number_of_vertices()) >
.1 * _size_before_postprocessing)|| .1 * _size_before_postprocessing)||
@ -2479,7 +2466,6 @@ namespace CGAL {
} }
min_K = infinity(); min_K = infinity();
// fin--
// if (_postprocessing_counter < 5) // if (_postprocessing_counter < 5)
// return true; // return true;
postprocess_timer.stop(); postprocess_timer.stop();

View File

@ -220,7 +220,7 @@ namespace CGAL {
else else
{ {
if (m_incident_border->second->first != nullptr) if (m_incident_border->second->first != nullptr)
std::cerr << "+++probleme de MAJ du bord <Vertex_base>" << std::endl; std::cerr << "+++issue while updating border <Vertex_base>" << std::endl;
*m_incident_border->second = elt; *m_incident_border->second = elt;
} }
} }

View File

@ -73,7 +73,7 @@ namespace CGAL {
* in turn required by the \c CurvedKernelViaAnalysis_2 concept * in turn required by the \c CurvedKernelViaAnalysis_2 concept
* (see the documentation of the corresponding package). Therefore, * (see the documentation of the corresponding package). Therefore,
* some types and methods of the class have both an "algebraic" name * some types and methods of the class have both an "algebraic" name
* (demanded by \c CurveKernelWithAnalysis_d_2) and an "non-algebraic name * (demanded by \c CurveKernelWithAnalysis_d_2) and a "non-algebraic" name
* (demanded by \c CurveKernel_2). * (demanded by \c CurveKernel_2).
* *
* \b Algebraic_curve_kernel_2 is a template class, and needs a model * \b Algebraic_curve_kernel_2 is a template class, and needs a model
@ -356,8 +356,8 @@ public:
const OuterFunctor& outer) const OuterFunctor& outer)
: _inner(inner), _outer(outer) {} : _inner(inner), _outer(outer) {}
Unary_compose(const Unary_compose& other) Unary_compose(const Unary_compose& other) = default;
: _inner(other._inner), _outer(other._outer) {} Unary_compose& operator=(const Unary_compose& other) = default;
Unary_compose() : _inner(::boost::none),_outer(::boost::none) {} Unary_compose() : _inner(::boost::none),_outer(::boost::none) {}

View File

@ -45,7 +45,7 @@ namespace internal {
* @Unpublished{abbott-quadratic, * @Unpublished{abbott-quadratic,
* author = {John Abbott}, * author = {John Abbott},
* title = {Quadratic Interval Refinement for Real Roots}, * title = {Quadratic Interval Refinement for Real Roots},
* url = {http://www.dima.unige.it/~abbott/}, * url = {https://www.dima.unige.it/~abbott/},
* note = {Poster presented at the 2006 Internat. Sympos. on Symbolic * note = {Poster presented at the 2006 Internat. Sympos. on Symbolic
and Algebraic Computation (ISSAC 2006)} and Algebraic Computation (ISSAC 2006)}
* } * }

View File

@ -1147,8 +1147,8 @@ public:
Bitstream_descartes() : Base(new Rep()) {} Bitstream_descartes() : Base(new Rep()) {}
//! Copy constructor //! Copy constructor
Bitstream_descartes(const Self& other) : Base(static_cast<const Base&>(other)) Bitstream_descartes(const Self& other) = default;
{} Bitstream_descartes& operator=(const Self& other) = default;
/*! /*!
* \brief Constructor for a polynomial \c f * \brief Constructor for a polynomial \c f

View File

@ -436,6 +436,9 @@ public:
friend class CGAL::internal::Bitstream_descartes_E08_tree<TRAITS>; friend class CGAL::internal::Bitstream_descartes_E08_tree<TRAITS>;
friend class CGAL::internal::Bitstream_descartes_E08_tree_rep<TRAITS>; friend class CGAL::internal::Bitstream_descartes_E08_tree_rep<TRAITS>;
Bitstream_descartes_E08_node(const Self&) = default;
Self& operator= (const Self&) = delete;
private: private:
// "node data" (set individually in subdivision) // "node data" (set individually in subdivision)
Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead
@ -466,8 +469,6 @@ private:
log_eps_ = n.log_eps_; log_eps_ = n.log_eps_;
log_C_eps_ = n.log_C_eps_; log_C_eps_ = n.log_C_eps_;
} }
Self& operator= (const Self&) = delete;
}; // struct Bitstream_descartes_E08_node }; // struct Bitstream_descartes_E08_node

View File

@ -525,6 +525,9 @@ public:
friend class internal::Bitstream_descartes_rndl_tree<TRAITS>; friend class internal::Bitstream_descartes_rndl_tree<TRAITS>;
friend class internal::Bitstream_descartes_rndl_tree_rep<TRAITS>; friend class internal::Bitstream_descartes_rndl_tree_rep<TRAITS>;
Bitstream_descartes_rndl_node(const Self&) = default;
Self& operator= (const Self&) = delete;
private: private:
// "node data" (set individually in subdivision) // "node data" (set individually in subdivision)
Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead Integer lower_num_, upper_num_; // TODO use lower_num_, width_num_ instead
@ -557,8 +560,6 @@ private:
log_eps_ = n.log_eps_; log_eps_ = n.log_eps_;
log_C_eps_ = n.log_C_eps_; log_C_eps_ = n.log_C_eps_;
} }
Self& operator= (const Self&)=delete;
}; // struct Bitstream_descartes_rndl_node }; // struct Bitstream_descartes_rndl_node

View File

@ -762,7 +762,7 @@ std::istream& operator >> (
is >> arcno; is >> arcno;
// read the ") // read the ")"
swallow(is, ')'); swallow(is, ')');
pt = Xy_coordinate_2(x, curve, arcno); pt = Xy_coordinate_2(x, curve, arcno);

View File

@ -187,7 +187,7 @@ void test_real_root_isolator() {
assert( n == number_of_roots); assert( n == number_of_roots);
}{ }{
//std::cout << "Kameny 3\n"; //std::cout << "Kameny 3\n";
// from http://www-sop.inria.fr/saga/POL/BASE/1.unipol // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol/
NT c = CGAL::ipower(NT(10),12); NT c = CGAL::ipower(NT(10),12);
Polynomial P(NT(-3),NT(0),c); Polynomial P(NT(-3),NT(0),c);
@ -202,7 +202,7 @@ void test_real_root_isolator() {
assert(3 == internal::check_intervals_real_root_isolator<Isolator>(P)); assert(3 == internal::check_intervals_real_root_isolator<Isolator>(P));
}{ }{
//std::cout << "Kameny 4\n"; //std::cout << "Kameny 4\n";
// from http://www-sop.inria.fr/saga/POL/BASE/1.unipol // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol
NT z(0); NT z(0);
NT a = CGAL::ipower(NT(10),24); // a = 10^{24} NT a = CGAL::ipower(NT(10),24); // a = 10^{24}
@ -218,7 +218,7 @@ void test_real_root_isolator() {
assert( 4 == internal::check_intervals_real_root_isolator<Isolator>(P)); assert( 4 == internal::check_intervals_real_root_isolator<Isolator>(P));
}{ }{
//std::cout << "Polynomial with large and small clustered roots\n"; //std::cout << "Polynomial with large and small clustered roots\n";
// from http://www-sop.inria.fr/saga/POL/BASE/1.unipol // from https://www-sop.inria.fr/saga/POL/BASE/1.unipol
// there seems to be some error or misunderstanding // there seems to be some error or misunderstanding
NT z(0); NT z(0);

View File

@ -23,7 +23,6 @@
#include <CGAL/assertions.h> #include <CGAL/assertions.h>
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/triangulation_assertions.h>
#include <CGAL/Unique_hash_map.h> #include <CGAL/Unique_hash_map.h>
#include <CGAL/utility.h> #include <CGAL/utility.h>
@ -849,7 +848,7 @@ Alpha_shape_2<Dt,EACT>::initialize_interval_edge_map()
{ {
// both faces are infinite by definition unattached // both faces are infinite by definition unattached
// the edge is finite by construction // the edge is finite by construction
CGAL_triangulation_precondition((is_infinite(pNeighbor) CGAL_precondition((is_infinite(pNeighbor)
&& is_infinite(pFace))); && is_infinite(pFace)));
interval = make_triple(squared_radius(pFace, i), interval = make_triple(squared_radius(pFace, i),
Infinity, Infinity,
@ -859,7 +858,7 @@ Alpha_shape_2<Dt,EACT>::initialize_interval_edge_map()
else else
{ // is_infinite(pNeighbor) { // is_infinite(pNeighbor)
CGAL_triangulation_precondition((is_infinite(pNeighbor) CGAL_precondition((is_infinite(pNeighbor)
&& !is_infinite(pFace))); && !is_infinite(pFace)));
if (is_attached(pFace, i)) if (is_attached(pFace, i))
interval = make_triple(UNDEFINED, interval = make_triple(UNDEFINED,
@ -1109,7 +1108,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_vertex_list()const {
// which might be infinity // which might be infinity
// write the vertex // write the vertex
v = (*vertex_alpha_it).second; v = (*vertex_alpha_it).second;
CGAL_triangulation_assertion((classify(v) == REGULAR)); CGAL_assertion((classify(v) == REGULAR));
Alpha_shape_vertices_list.push_back(v); Alpha_shape_vertices_list.push_back(v);
} }
} }
@ -1122,7 +1121,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_vertex_list()const {
++vertex_alpha_it) ++vertex_alpha_it)
{ {
v = (*vertex_alpha_it).second; v = (*vertex_alpha_it).second;
CGAL_triangulation_assertion((classify(v) == SINGULAR)); CGAL_assertion((classify(v) == SINGULAR));
Alpha_shape_vertices_list.push_back(v); Alpha_shape_vertices_list.push_back(v);
} }
@ -1159,7 +1158,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
{ {
pInterval = &(*edge_alpha_it).first; pInterval = &(*edge_alpha_it).first;
CGAL_triangulation_assertion(pInterval->second != Infinity); CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 2 // since this happens only for convex hull of dimension 2
// thus singular // thus singular
@ -1171,7 +1170,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
// and alpha is smaller than the upper boundary // and alpha is smaller than the upper boundary
// which might be infinity // which might be infinity
// visualize the boundary // visualize the boundary
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, CGAL_assertion((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second) (*edge_alpha_it).second.second)
== REGULAR)); == REGULAR));
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first, Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
@ -1191,7 +1190,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
if (pInterval->first == UNDEFINED) if (pInterval->first == UNDEFINED)
{ {
CGAL_triangulation_assertion(pInterval->second != Infinity); CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 2 // since this happens only for convex hull of dimension 2
// thus singular // thus singular
@ -1203,7 +1202,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
// and alpha is smaller than the upper boundary // and alpha is smaller than the upper boundary
// which might be infinity // which might be infinity
// visualize the boundary // visualize the boundary
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, CGAL_assertion((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second) (*edge_alpha_it).second.second)
== REGULAR)); == REGULAR));
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first, Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
@ -1219,7 +1218,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
// if alpha is smaller than the upper boundary // if alpha is smaller than the upper boundary
// which might be infinity // which might be infinity
// visualize the boundary // visualize the boundary
CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first, CGAL_assertion(((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second) (*edge_alpha_it).second.second)
== REGULAR) == REGULAR)
|| (classify((*edge_alpha_it).second.first, || (classify((*edge_alpha_it).second.first,
@ -1324,7 +1323,7 @@ Alpha_shape_2<Dt,EACT>::number_of_solid_components(const Type_of_alpha& alpha) c
++face_it) ++face_it)
{ {
Face_handle pFace = face_it; Face_handle pFace = face_it;
CGAL_triangulation_postcondition( pFace != nullptr); CGAL_postcondition( pFace != nullptr);
if (classify(pFace, alpha) == INTERIOR){ if (classify(pFace, alpha) == INTERIOR){
Data& data = marked_face_set[pFace]; Data& data = marked_face_set[pFace];
@ -1358,7 +1357,7 @@ Alpha_shape_2<Dt,EACT>::traverse(const Face_handle& pFace,
for (int i=0; i<3; i++) for (int i=0; i<3; i++)
{ {
pNeighbor = fh->neighbor(i); pNeighbor = fh->neighbor(i);
CGAL_triangulation_assertion(pNeighbor != nullptr); CGAL_assertion(pNeighbor != nullptr);
if (classify(pNeighbor, alpha) == INTERIOR){ if (classify(pNeighbor, alpha) == INTERIOR){
Data& data = marked_face_set[pNeighbor]; Data& data = marked_face_set[pNeighbor];
if(data == false){ if(data == false){
@ -1514,7 +1513,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
// write the vertex // write the vertex
v = (*vertex_alpha_it).second; v = (*vertex_alpha_it).second;
CGAL_triangulation_assertion((classify(v) == CGAL_assertion((classify(v) ==
Alpha_shape_2<Dt,EACT>::REGULAR)); Alpha_shape_2<Dt,EACT>::REGULAR));
// if we used Edelsbrunner and Muecke's definition // if we used Edelsbrunner and Muecke's definition
// regular means incident to a higher-dimensional face // regular means incident to a higher-dimensional face
@ -1536,7 +1535,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
{ {
pInterval = &(*edge_alpha_it).first; pInterval = &(*edge_alpha_it).first;
CGAL_triangulation_assertion(pInterval->second != Infinity); CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 1 // since this happens only for convex hull of dimension 1
// thus singular // thus singular
@ -1563,10 +1562,10 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
f = pNeighbor; f = pNeighbor;
} }
CGAL_triangulation_assertion((classify(f) == CGAL_assertion((classify(f) ==
Alpha_shape_2<Dt,EACT>::INTERIOR)); Alpha_shape_2<Dt,EACT>::INTERIOR));
CGAL_triangulation_assertion((classify(f, i) == CGAL_assertion((classify(f, i) ==
Alpha_shape_2<Dt,EACT>::REGULAR)); Alpha_shape_2<Dt,EACT>::REGULAR));
os << V[f->vertex(f->ccw(i))] << ' ' os << V[f->vertex(f->ccw(i))] << ' '
@ -1595,8 +1594,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
// write the vertex // write the vertex
v = (*vertex_alpha_it).second; v = (*vertex_alpha_it).second;
CGAL_triangulation_assertion((classify(v) == CGAL_assertion((classify(v) == Alpha_shape_2<Dt,EACT>::REGULAR));
Alpha_shape_2<Dt,EACT>::REGULAR));
V[v] = number_of_vertices++; V[v] = number_of_vertices++;
os << v->point() << std::endl; os << v->point() << std::endl;
} }
@ -1608,8 +1606,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
++vertex_alpha_it) ++vertex_alpha_it)
{ {
v = (*vertex_alpha_it).second; v = (*vertex_alpha_it).second;
CGAL_triangulation_assertion((classify(v) == CGAL_assertion((classify(v) == Alpha_shape_2<Dt,EACT>::SINGULAR));
Alpha_shape_2<Dt,EACT>::SINGULAR));
V[v] = number_of_vertices++; V[v] = number_of_vertices++;
os << v->point() << std::endl; os << v->point() << std::endl;
@ -1652,7 +1649,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
if (pInterval->second != Infinity && if (pInterval->second != Infinity &&
pInterval->second <= get_alpha()) pInterval->second <= get_alpha())
{ {
CGAL_triangulation_assertion((classify(f, i) == CGAL_assertion((classify(f, i) ==
Alpha_shape_2<Dt,EACT>::REGULAR)); Alpha_shape_2<Dt,EACT>::REGULAR));
// assure that all vertices are in ccw order // assure that all vertices are in ccw order
if (classify(f) == Alpha_shape_2<Dt,EACT>::EXTERIOR) if (classify(f) == Alpha_shape_2<Dt,EACT>::EXTERIOR)
@ -1665,7 +1662,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
f = pNeighbor; f = pNeighbor;
} }
CGAL_triangulation_assertion((classify(f) == CGAL_assertion((classify(f) ==
Alpha_shape_2<Dt,EACT>::INTERIOR)); Alpha_shape_2<Dt,EACT>::INTERIOR));
os << V[f->vertex(f->ccw(i))] << ' ' os << V[f->vertex(f->ccw(i))] << ' '
@ -1680,7 +1677,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
// write the singular edges // write the singular edges
if (pInterval->first != UNDEFINED) if (pInterval->first != UNDEFINED)
{ {
CGAL_triangulation_assertion((classify(f, i) == CGAL_assertion((classify(f, i) ==
Alpha_shape_2<Dt,EACT>::SINGULAR)); Alpha_shape_2<Dt,EACT>::SINGULAR));
os << V[f->vertex(f->ccw(i))] << ' ' os << V[f->vertex(f->ccw(i))] << ' '
<< V[f->vertex(f->cw(i))] << std::endl; << V[f->vertex(f->cw(i))] << std::endl;
@ -1739,7 +1736,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
// which might be infinity // which might be infinity
// visualize the boundary // visualize the boundary
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, CGAL_assertion((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second) == (*edge_alpha_it).second.second) ==
REGULAR)); REGULAR));
@ -1769,7 +1766,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
if (pInterval->first == UNDEFINED) if (pInterval->first == UNDEFINED)
{ {
CGAL_triangulation_assertion(pInterval->second != Infinity); CGAL_assertion(pInterval->second != Infinity);
// since this happens only for convex hull of dimension 1 // since this happens only for convex hull of dimension 1
// thus singular // thus singular
@ -1782,7 +1779,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
// which might be infinity // which might be infinity
// visualize the boundary // visualize the boundary
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first, CGAL_assertion((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second) == (*edge_alpha_it).second.second) ==
REGULAR)); REGULAR));
L.push_back((this->segment((*edge_alpha_it).second.first, L.push_back((this->segment((*edge_alpha_it).second.first,
@ -1802,7 +1799,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
// which might be infinity // which might be infinity
// visualize the boundary // visualize the boundary
CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first, CGAL_assertion(((classify((*edge_alpha_it).second.first,
(*edge_alpha_it).second.second) == (*edge_alpha_it).second.second) ==
REGULAR) || REGULAR) ||
(classify((*edge_alpha_it).second.first, (classify((*edge_alpha_it).second.first,

View File

@ -319,7 +319,7 @@ private :
} }
// the version to be used with Tag_true is templated to avoid // the version to be used with Tag_true is templated to avoid
// instanciation through explicit instantiation of the whole class // instantiation through explicit instantiation of the whole class
void set_alpha_min_of_vertices(Tag_false) void set_alpha_min_of_vertices(Tag_false)
{ {
for( Finite_vertices_iterator vit = finite_vertices_begin(); for( Finite_vertices_iterator vit = finite_vertices_begin();
@ -401,7 +401,7 @@ public:
// Returns the n-th alpha-value. // Returns the n-th alpha-value.
// n < size() // n < size()
{ {
CGAL_triangulation_assertion( n > 0 && CGAL_assertion( n > 0 &&
n <= static_cast<int>(alpha_spectrum.size()) ); n <= static_cast<int>(alpha_spectrum.size()) );
return alpha_spectrum[n-1]; return alpha_spectrum[n-1];
} }
@ -1713,7 +1713,7 @@ Alpha_shape_3<Dt,EACT>::number_of_solid_components(const NT& alpha) const
for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it) for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it)
{ {
Cell_handle pCell = cell_it; Cell_handle pCell = cell_it;
CGAL_triangulation_assertion(pCell != nullptr); CGAL_assertion(pCell != nullptr);
if (classify(pCell, alpha) == INTERIOR){ if (classify(pCell, alpha) == INTERIOR){
Data& data = marked_cell_set[pCell]; Data& data = marked_cell_set[pCell];
@ -1745,7 +1745,7 @@ void Alpha_shape_3<Dt,EACT>::traverse(Cell_handle pCell,
for (int i=0; i<=3; i++) for (int i=0; i<=3; i++)
{ {
pNeighbor = pCell->neighbor(i); pNeighbor = pCell->neighbor(i);
CGAL_triangulation_assertion(pNeighbor != nullptr); CGAL_assertion(pNeighbor != nullptr);
if (classify(pNeighbor, alpha) == INTERIOR){ if (classify(pNeighbor, alpha) == INTERIOR){
Data& data = marked_cell_set[pNeighbor]; Data& data = marked_cell_set[pNeighbor];
if(data == false){ if(data == false){

View File

@ -45,6 +45,7 @@ int main(int argc, char** argv)
const double alpha = diag_length / relative_alpha; const double alpha = diag_length / relative_alpha;
const double offset = diag_length / relative_offset; const double offset = diag_length / relative_offset;
std::cout << "alpha: " << alpha << ", offset: " << offset << std::endl;
// Construct the wrap // Construct the wrap
CGAL::Real_timer t; CGAL::Real_timer t;

View File

@ -47,16 +47,9 @@ int main(int argc, char** argv)
const double offset = diag_length / relative_offset; const double offset = diag_length / relative_offset;
// Construct the wrap // Construct the wrap
using Oracle = CGAL::Alpha_wraps_3::internal::Triangle_mesh_oracle<K>;
Oracle oracle;
oracle.add_triangle_mesh(input);
CGAL::Real_timer t; CGAL::Real_timer t;
t.start(); t.start();
Mesh wrap;
CGAL::Alpha_wraps_3::internal::Alpha_wrap_3<Oracle> aw3(oracle);
// There is no limit on how many seeds can be used. // There is no limit on how many seeds can be used.
// However, the algorithm automatically determines whether a seed can be used // However, the algorithm automatically determines whether a seed can be used
// to initialize the refinement based on a few conditions (distance to the offset, value of alpha, etc.) // to initialize the refinement based on a few conditions (distance to the offset, value of alpha, etc.)
@ -66,7 +59,8 @@ int main(int argc, char** argv)
Point_3(0, 50, 0) // a point within the armadillo surface Point_3(0, 50, 0) // a point within the armadillo surface
}; };
aw3(alpha, offset, wrap, CGAL::parameters::seed_points(std::ref(seeds))); Mesh wrap;
alpha_wrap_3(input, alpha, offset, wrap, CGAL::parameters::seed_points(std::ref(seeds)));
t.stop(); t.stop();
std::cout << "Result: " << num_vertices(wrap) << " vertices, " << num_faces(wrap) << " faces" << std::endl; std::cout << "Result: " << num_vertices(wrap) << " vertices, " << num_faces(wrap) << " faces" << std::endl;

View File

@ -29,7 +29,7 @@
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
#include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h> #include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h>
#include <CGAL/Alpha_wrap_3/internal/gate_priority_queue.h> #include <CGAL/Alpha_wrap_3/internal/gate_priority_queue.h>
#include <CGAL/Alpha_wrap_3/internal/geometry_utils.h> #include <CGAL/Alpha_wrap_3/internal/geometry_utils.h>
#include <CGAL/Alpha_wrap_3/internal/oracles.h> #include <CGAL/Alpha_wrap_3/internal/oracles.h>
@ -229,11 +229,14 @@ private:
} }
public: public:
template <typename OutputMesh, typename NamedParameters> template <typename OutputMesh,
typename InputNamedParameters = parameters::Default_named_parameters,
typename OutputNamedParameters = parameters::Default_named_parameters>
void operator()(const double alpha, // = default_alpha() void operator()(const double alpha, // = default_alpha()
const double offset, // = alpha / 30. const double offset, // = alpha / 30.
OutputMesh& output_mesh, OutputMesh& output_mesh,
const NamedParameters& np) const InputNamedParameters& in_np = parameters::default_values(),
const OutputNamedParameters& out_np = parameters::default_values())
{ {
namespace PMP = Polygon_mesh_processing; namespace PMP = Polygon_mesh_processing;
@ -241,25 +244,25 @@ public:
using parameters::get_parameter_reference; using parameters::get_parameter_reference;
using parameters::choose_parameter; using parameters::choose_parameter;
using OVPM = typename CGAL::GetVertexPointMap<OutputMesh, NamedParameters>::type; using OVPM = typename CGAL::GetVertexPointMap<OutputMesh, OutputNamedParameters>::type;
OVPM ovpm = choose_parameter(get_parameter(np, internal_np::vertex_point), OVPM ovpm = choose_parameter(get_parameter(out_np, internal_np::vertex_point),
get_property_map(vertex_point, output_mesh)); get_property_map(vertex_point, output_mesh));
typedef typename internal_np::Lookup_named_param_def < typedef typename internal_np::Lookup_named_param_def <
internal_np::visitor_t, internal_np::visitor_t,
NamedParameters, InputNamedParameters,
Wrapping_default_visitor // default Wrapping_default_visitor // default
>::reference Visitor; >::reference Visitor;
Wrapping_default_visitor default_visitor; Wrapping_default_visitor default_visitor;
Visitor visitor = choose_parameter(get_parameter_reference(np, internal_np::visitor), default_visitor); Visitor visitor = choose_parameter(get_parameter_reference(in_np, internal_np::visitor), default_visitor);
std::vector<Point_3> no_seeds; std::vector<Point_3> no_seeds;
using Seeds = typename internal_np::Lookup_named_param_def< using Seeds = typename internal_np::Lookup_named_param_def<
internal_np::seed_points_t, NamedParameters, std::vector<Point_3> >::reference; internal_np::seed_points_t, InputNamedParameters, std::vector<Point_3> >::reference;
Seeds seeds = choose_parameter(get_parameter_reference(np, internal_np::seed_points), no_seeds); Seeds seeds = choose_parameter(get_parameter_reference(in_np, internal_np::seed_points), no_seeds);
const bool do_enforce_manifoldness = choose_parameter(get_parameter(np, internal_np::do_enforce_manifoldness), true); const bool do_enforce_manifoldness = choose_parameter(get_parameter(in_np, internal_np::do_enforce_manifoldness), true);
#ifdef CGAL_AW3_TIMER #ifdef CGAL_AW3_TIMER
CGAL::Real_timer t; CGAL::Real_timer t;
@ -360,14 +363,6 @@ public:
} }
// Convenience overloads // Convenience overloads
template <typename OutputMesh>
void operator()(const double alpha,
const double offset,
OutputMesh& output_mesh)
{
return operator()(alpha, offset, output_mesh, parameters::default_values());
}
template <typename OutputMesh> template <typename OutputMesh>
void operator()(const double alpha, void operator()(const double alpha,
OutputMesh& output_mesh) OutputMesh& output_mesh)

View File

@ -13,8 +13,8 @@
// Andreas Fabri // Andreas Fabri
// Michael Hemmer // Michael Hemmer
// //
#ifndef CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_TRAITS_H #ifndef CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H
#define CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_TRAITS_H #define CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
@ -89,14 +89,14 @@ public:
}; };
template <typename GT> template <typename GT>
class Alpha_wrap_AABB_traits class Alpha_wrap_AABB_geom_traits
: public GT : public GT
{ {
public: public:
using Ball_3 = internal::Ball_3<GT>; using Ball_3 = internal::Ball_3<GT>;
public: public:
Alpha_wrap_AABB_traits(const GT& gt = GT()) : GT(gt) { } Alpha_wrap_AABB_geom_traits(const GT& gt = GT()) : GT(gt) { }
public: public:
class Construct_ball_3 class Construct_ball_3
@ -295,4 +295,4 @@ public:
} // namespace Alpha_wraps_3 } // namespace Alpha_wraps_3
} // namespace CGAL } // namespace CGAL
#endif // CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_TRAITS_H #endif // CGAL_ALPHA_WRAP_3_INTERNAL_ALPHA_WRAP_AABB_GEOM_TRAITS_H

View File

@ -145,6 +145,8 @@ public:
bool empty() const { return m_tree_ptr->empty(); } bool empty() const { return m_tree_ptr->empty(); }
bool do_call() const { return (!empty() || base().do_call()); } bool do_call() const { return (!empty() || base().do_call()); }
void clear() { m_tree_ptr->clear() && base().clear(); }
public: public:
typename AABB_tree::Bounding_box bbox() const typename AABB_tree::Bounding_box bbox() const
{ {
@ -313,6 +315,8 @@ public:
bool empty() const { return m_tree_ptr->empty(); } bool empty() const { return m_tree_ptr->empty(); }
bool do_call() const { return !empty(); } bool do_call() const { return !empty(); }
void clear() { m_tree_ptr->clear(); }
public: public:
typename AABB_tree::Bounding_box bbox() const typename AABB_tree::Bounding_box bbox() const
{ {

View File

@ -14,7 +14,7 @@
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
#include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h> #include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h>
#include <CGAL/Alpha_wrap_3/internal/Oracle_base.h> #include <CGAL/Alpha_wrap_3/internal/Oracle_base.h>
#include <CGAL/AABB_primitive.h> #include <CGAL/AABB_primitive.h>
@ -38,7 +38,7 @@ namespace internal {
template <typename GT_> template <typename GT_>
struct PS_oracle_traits struct PS_oracle_traits
{ {
using Geom_traits = Alpha_wrap_AABB_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 using Geom_traits = Alpha_wrap_AABB_geom_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Points = std::vector<typename GT_::Point_3>; using Points = std::vector<typename GT_::Point_3>;
using PR_iterator = typename Points::const_iterator; using PR_iterator = typename Points::const_iterator;

View File

@ -14,7 +14,7 @@
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
#include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h> #include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h>
#include <CGAL/Alpha_wrap_3/internal/Oracle_base.h> #include <CGAL/Alpha_wrap_3/internal/Oracle_base.h>
#include <CGAL/AABB_traits.h> #include <CGAL/AABB_traits.h>
@ -38,7 +38,7 @@ namespace internal {
template <typename GT_> template <typename GT_>
struct SS_oracle_traits struct SS_oracle_traits
{ {
using Geom_traits = Alpha_wrap_AABB_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 using Geom_traits = Alpha_wrap_AABB_geom_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Segments = std::vector<typename GT_::Segment_3>; using Segments = std::vector<typename GT_::Segment_3>;
using SR_iterator = typename Segments::const_iterator; using SR_iterator = typename Segments::const_iterator;

View File

@ -14,7 +14,7 @@
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
#include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h> #include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h>
#include <CGAL/Alpha_wrap_3/internal/Oracle_base.h> #include <CGAL/Alpha_wrap_3/internal/Oracle_base.h>
#include <CGAL/Alpha_wrap_3/internal/splitting_helper.h> #include <CGAL/Alpha_wrap_3/internal/splitting_helper.h>
@ -37,7 +37,7 @@ namespace internal {
template <typename GT_> template <typename GT_>
struct TM_oracle_traits struct TM_oracle_traits
{ {
using Geom_traits = Alpha_wrap_AABB_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 using Geom_traits = Alpha_wrap_AABB_geom_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Point_3 = typename Geom_traits::Point_3; using Point_3 = typename Geom_traits::Point_3;
using AABB_traits = typename AABB_tree_splitter_traits<Point_3, Geom_traits>::AABB_traits; using AABB_traits = typename AABB_tree_splitter_traits<Point_3, Geom_traits>::AABB_traits;

View File

@ -14,7 +14,7 @@
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
#include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h> #include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h>
#include <CGAL/Alpha_wrap_3/internal/Oracle_base.h> #include <CGAL/Alpha_wrap_3/internal/Oracle_base.h>
#include <CGAL/Alpha_wrap_3/internal/splitting_helper.h> #include <CGAL/Alpha_wrap_3/internal/splitting_helper.h>
@ -38,7 +38,7 @@ namespace internal {
template <typename GT_> template <typename GT_>
struct TS_oracle_traits struct TS_oracle_traits
{ {
using Geom_traits = Alpha_wrap_AABB_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3 using Geom_traits = Alpha_wrap_AABB_geom_traits<GT_>; // Wrap the kernel to add Ball_3 + custom Do_intersect_3
using Point_3 = typename Geom_traits::Point_3; using Point_3 = typename Geom_traits::Point_3;
using AABB_traits = typename AABB_tree_splitter_traits<Point_3, Geom_traits>::AABB_traits; using AABB_traits = typename AABB_tree_splitter_traits<Point_3, Geom_traits>::AABB_traits;
using AABB_tree = typename AABB_tree_splitter_traits<Point_3, Geom_traits>::AABB_tree; using AABB_tree = typename AABB_tree_splitter_traits<Point_3, Geom_traits>::AABB_tree;

View File

@ -14,7 +14,7 @@
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
#include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h> #include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h>
#include <CGAL/Alpha_wrap_3/internal/offset_intersection.h> #include <CGAL/Alpha_wrap_3/internal/offset_intersection.h>
#include <CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h> #include <CGAL/Alpha_wrap_3/internal/Triangle_mesh_oracle.h>

View File

@ -14,7 +14,7 @@
#include <CGAL/license/Alpha_wrap_3.h> #include <CGAL/license/Alpha_wrap_3.h>
#include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_traits.h> #include <CGAL/Alpha_wrap_3/internal/Alpha_wrap_AABB_geom_traits.h>
#include <CGAL/AABB_tree/internal/AABB_traversal_traits.h> #include <CGAL/AABB_tree/internal/AABB_traversal_traits.h>
#include <CGAL/AABB_primitive.h> #include <CGAL/AABB_primitive.h>

View File

@ -112,7 +112,7 @@ void alpha_wrap_3(const PointRange& points,
Oracle oracle(alpha, gt); Oracle oracle(alpha, gt);
oracle.add_triangle_soup(points, faces, in_np); oracle.add_triangle_soup(points, faces, in_np);
AW3 alpha_wrap_builder(oracle); AW3 alpha_wrap_builder(oracle);
alpha_wrap_builder(alpha, offset, alpha_wrap, out_np); alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np);
} }
// Convenience overloads // Convenience overloads
@ -261,7 +261,7 @@ void alpha_wrap_3(const TriangleMesh& tmesh,
Oracle oracle(alpha, gt); Oracle oracle(alpha, gt);
oracle.add_triangle_mesh(tmesh, in_np); oracle.add_triangle_mesh(tmesh, in_np);
AW3 alpha_wrap_builder(oracle); AW3 alpha_wrap_builder(oracle);
alpha_wrap_builder(alpha, offset, alpha_wrap, out_np); alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np);
} }
// The convenience overloads are the same for triangle mesh & point set // The convenience overloads are the same for triangle mesh & point set
@ -357,7 +357,7 @@ void alpha_wrap_3(const PointRange& points,
Oracle oracle(gt); Oracle oracle(gt);
oracle.add_point_set(points, in_np); oracle.add_point_set(points, in_np);
AW3 alpha_wrap_builder(oracle); AW3 alpha_wrap_builder(oracle);
alpha_wrap_builder(alpha, offset, alpha_wrap, out_np); alpha_wrap_builder(alpha, offset, alpha_wrap, in_np, out_np);
} }
// Convenience overloads, common to both mesh and point set // Convenience overloads, common to both mesh and point set

View File

@ -45,7 +45,6 @@ void alpha_wrap_triangle_manifoldness(Mesh& input_mesh,
Mesh nm_wrap; Mesh nm_wrap;
CGAL::alpha_wrap_3(input_mesh, alpha, offset, nm_wrap, CGAL::alpha_wrap_3(input_mesh, alpha, offset, nm_wrap,
CGAL::parameters::default_values(),
CGAL::parameters::do_enforce_manifoldness(false)); CGAL::parameters::do_enforce_manifoldness(false));
std::cout << "Result: " << vertices(nm_wrap).size() << " vertices, " << faces(nm_wrap).size() << " faces" << std::endl; std::cout << "Result: " << vertices(nm_wrap).size() << " vertices, " << faces(nm_wrap).size() << " faces" << std::endl;
@ -67,7 +66,6 @@ void alpha_wrap_triangle_manifoldness(Mesh& input_mesh,
Mesh m_wrap; Mesh m_wrap;
CGAL::alpha_wrap_3(input_mesh, alpha, offset, m_wrap, CGAL::alpha_wrap_3(input_mesh, alpha, offset, m_wrap,
CGAL::parameters::default_values(),
CGAL::parameters::do_enforce_manifoldness(true)); CGAL::parameters::do_enforce_manifoldness(true));
// CGAL::IO::write_polygon_mesh("last.off", wrap, CGAL::parameters::stream_precision(17)); // CGAL::IO::write_polygon_mesh("last.off", wrap, CGAL::parameters::stream_precision(17));

View File

@ -47,7 +47,6 @@ void alpha_wrap_triangle_mesh(Mesh& input_mesh,
Mesh wrap; Mesh wrap;
CGAL::alpha_wrap_3(input_mesh, alpha, offset, wrap, CGAL::alpha_wrap_3(input_mesh, alpha, offset, wrap,
CGAL::parameters::default_values(),
CGAL::parameters::do_enforce_manifoldness(enforce_manifoldness)); CGAL::parameters::do_enforce_manifoldness(enforce_manifoldness));
std::cout << "Result: " << vertices(wrap).size() << " vertices, " << faces(wrap).size() << " faces" << std::endl; std::cout << "Result: " << vertices(wrap).size() << " vertices, " << faces(wrap).size() << " faces" << std::endl;

View File

@ -53,7 +53,7 @@ is_valid(bool verbose, int level) const
if (number_of_vertices() < 3) return true; if (number_of_vertices() < 3) return true;
// CGAL_triangulation_assertion(result); // CGAL_assertion(result);
for (All_edges_iterator eit = all_edges_begin(); for (All_edges_iterator eit = all_edges_begin();
eit != all_edges_end(); ++eit) { eit != all_edges_end(); ++eit) {
@ -64,7 +64,7 @@ is_valid(bool verbose, int level) const
if ( !is_infinite(v) ) { if ( !is_infinite(v) ) {
result = result && result = result &&
( incircle(f, v->site()) != NEGATIVE ); ( incircle(f, v->site()) != NEGATIVE );
// CGAL_triangulation_assertion(result); // CGAL_assertion(result);
} }
Edge sym_e = sym_edge(e); Edge sym_e = sym_edge(e);
f = sym_e.first; f = sym_e.first;
@ -72,7 +72,7 @@ is_valid(bool verbose, int level) const
if ( !is_infinite(v) ) { if ( !is_infinite(v) ) {
result = result && result = result &&
( incircle(f, v->site()) != NEGATIVE ); ( incircle(f, v->site()) != NEGATIVE );
// CGAL_triangulation_assertion(result); // CGAL_assertion(result);
} }
} }
@ -83,7 +83,7 @@ is_valid(bool verbose, int level) const
std::cerr << "Apollonius diagram is NOT valid..." << std::flush; std::cerr << "Apollonius diagram is NOT valid..." << std::flush;
} }
// CGAL_triangulation_assertion(result); // CGAL_assertion(result);
return result; return result;
} }
@ -100,7 +100,7 @@ typename Apollonius_graph_2<Gt,Agds,LTag>::Point_2
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
circumcenter(const Face_handle& f) const circumcenter(const Face_handle& f) const
{ {
CGAL_triangulation_precondition (dimension()==2 || !is_infinite(f)); CGAL_precondition (dimension()==2 || !is_infinite(f));
return circumcenter(f->vertex(0)->site(), return circumcenter(f->vertex(0)->site(),
f->vertex(1)->site(), f->vertex(1)->site(),
f->vertex(2)->site()); f->vertex(2)->site());
@ -122,7 +122,7 @@ typename Apollonius_graph_2<Gt,Agds,LTag>::Site_2
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
circumcircle(const Face_handle& f) const circumcircle(const Face_handle& f) const
{ {
CGAL_triangulation_precondition (dimension()==2 || !is_infinite(f)); CGAL_precondition (dimension()==2 || !is_infinite(f));
return circumcircle(f->vertex(0)->site(), return circumcircle(f->vertex(0)->site(),
f->vertex(1)->site(), f->vertex(1)->site(),
f->vertex(2)->site()); f->vertex(2)->site());
@ -178,7 +178,7 @@ typename Gt::Object_2
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
dual(const Edge e) const dual(const Edge e) const
{ {
CGAL_triangulation_precondition( !is_infinite(e) ); CGAL_precondition( !is_infinite(e) );
if ( dimension() == 1 ) { if ( dimension() == 1 ) {
Site_2 p = (e.first)->vertex(cw(e.second))->site(); Site_2 p = (e.first)->vertex(cw(e.second))->site();
@ -207,16 +207,16 @@ dual(const Edge e) const
} }
// only one of the adjacent faces is infinite // only one of the adjacent faces is infinite
CGAL_triangulation_assertion( is_infinite( e.first ) || CGAL_assertion( is_infinite( e.first ) ||
is_infinite( e.first->neighbor(e.second) ) is_infinite( e.first->neighbor(e.second) )
); );
CGAL_triangulation_assertion( !(is_infinite( e.first ) && CGAL_assertion( !(is_infinite( e.first ) &&
is_infinite( e.first->neighbor(e.second) ) is_infinite( e.first->neighbor(e.second) )
) )
); );
CGAL_triangulation_assertion CGAL_assertion
( is_infinite( e.first->vertex(e.second) ) || ( is_infinite( e.first->vertex(e.second) ) ||
is_infinite( tds().mirror_vertex(e.first, e.second) ) ); is_infinite( tds().mirror_vertex(e.first, e.second) ) );
@ -246,7 +246,7 @@ primal(const Edge e) const
// typedef typename Geom_traits::Hyperbola_segment_2 Hyperbola_segment; // typedef typename Geom_traits::Hyperbola_segment_2 Hyperbola_segment;
// typedef typename Geom_traits::Parabola_segment_2 Parabola_segment; // typedef typename Geom_traits::Parabola_segment_2 Parabola_segment;
// CGAL_triangulation_precondition( !is_infinite(e) ); // CGAL_precondition( !is_infinite(e) );
if ( number_of_vertices() != 2 ) { if ( number_of_vertices() != 2 ) {
if ( is_infinite(e) ) { if ( is_infinite(e) ) {
@ -257,7 +257,7 @@ primal(const Edge e) const
Site_2 s = tds().mirror_vertex( e.first, e.second )->site(); Site_2 s = tds().mirror_vertex( e.first, e.second )->site();
ray = construct_Apollonius_primal_ray_2_object()(p,r,s); ray = construct_Apollonius_primal_ray_2_object()(p,r,s);
} else { } else {
CGAL_triangulation_assertion CGAL_assertion
( is_infinite( e.first->vertex(ccw(e.second)) ) ); ( is_infinite( e.first->vertex(ccw(e.second)) ) );
Site_2 q = e.first->vertex( cw(e.second) )->site(); Site_2 q = e.first->vertex( cw(e.second) )->site();
Site_2 r = e.first->vertex( e.second )->site(); Site_2 r = e.first->vertex( e.second )->site();
@ -317,11 +317,11 @@ typename Apollonius_graph_2<Gt,Agds,LTag>::Edge
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
flip(Face_handle& f, int i) flip(Face_handle& f, int i)
{ {
CGAL_triangulation_precondition ( f != Face_handle() ); CGAL_precondition ( f != Face_handle() );
CGAL_triangulation_precondition (i == 0 || i == 1 || i == 2); CGAL_precondition (i == 0 || i == 1 || i == 2);
CGAL_triangulation_precondition( dimension()==2 ); CGAL_precondition( dimension()==2 );
CGAL_triangulation_precondition( f->vertex(i) != tds().mirror_vertex(f,i) ); CGAL_precondition( f->vertex(i) != tds().mirror_vertex(f,i) );
this->_tds.flip(f, i); this->_tds.flip(f, i);
@ -383,7 +383,7 @@ void
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
remove_degree_2(Vertex_handle v) remove_degree_2(Vertex_handle v)
{ {
CGAL_triangulation_precondition( is_degree_2(v) ); CGAL_precondition( is_degree_2(v) );
this->_tds.remove_degree_2( v ); this->_tds.remove_degree_2( v );
} }
@ -403,7 +403,7 @@ void
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
remove_degree_3(Vertex_handle v, Face_handle f) remove_degree_3(Vertex_handle v, Face_handle f)
{ {
CGAL_triangulation_precondition( degree(v) == 3 ); CGAL_precondition( degree(v) == 3 );
this->_tds.remove_degree_3(v, f); this->_tds.remove_degree_3(v, f);
} }
@ -416,7 +416,7 @@ typename Apollonius_graph_2<Gt,Agds,LTag>::Vertex_handle
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
insert_first(const Site_2& p) insert_first(const Site_2& p)
{ {
CGAL_triangulation_precondition(number_of_vertices() == 0); CGAL_precondition(number_of_vertices() == 0);
Vertex_handle v = this->_tds.insert_second(); Vertex_handle v = this->_tds.insert_second();
v->set_site(p); v->set_site(p);
return v; return v;
@ -428,7 +428,7 @@ typename Apollonius_graph_2<Gt,Agds,LTag>::Vertex_handle
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
insert_second(const Site_2& p) insert_second(const Site_2& p)
{ {
CGAL_triangulation_precondition( number_of_vertices() == 1 ); CGAL_precondition( number_of_vertices() == 1 );
Vertex_handle vnew; Vertex_handle vnew;
Vertex_handle v(finite_vertices_begin()); Vertex_handle v(finite_vertices_begin());
if ( is_hidden(v->site(), p) ) { if ( is_hidden(v->site(), p) ) {
@ -439,7 +439,7 @@ insert_second(const Site_2& p)
v->set_site(p); v->set_site(p);
vnew = v; vnew = v;
} else { } else {
CGAL_triangulation_precondition(number_of_vertices() == 1); CGAL_precondition(number_of_vertices() == 1);
vnew = this->_tds.insert_dim_up(infinite_vertex(), true); vnew = this->_tds.insert_dim_up(infinite_vertex(), true);
vnew->set_site(p); vnew->set_site(p);
// vnew = Delaunay_graph::insert_second(p); // vnew = Delaunay_graph::insert_second(p);
@ -453,7 +453,7 @@ typename Apollonius_graph_2<Gt,Agds,LTag>::Vertex_handle
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
insert_third(const Site_2& p) insert_third(const Site_2& p)
{ {
CGAL_triangulation_precondition( number_of_vertices() == 2 ); CGAL_precondition( number_of_vertices() == 2 );
Face_handle f((*finite_edges_begin()).first); Face_handle f((*finite_edges_begin()).first);
Vertex_handle v1(f->vertex(0)); Vertex_handle v1(f->vertex(0));
@ -592,7 +592,7 @@ insert_third(const Site_2& p)
} }
} }
// CGAL_triangulation_assertion( is_valid() ); // CGAL_assertion( is_valid() );
return v; return v;
} }
@ -1752,8 +1752,8 @@ void
Apollonius_graph_2<Gt,Agds,LTag>:: Apollonius_graph_2<Gt,Agds,LTag>::
remove(Vertex_handle v) remove(Vertex_handle v)
{ {
CGAL_triangulation_precondition( v != Vertex_handle() ); CGAL_precondition( v != Vertex_handle() );
CGAL_triangulation_precondition( !is_infinite(v) ); CGAL_precondition( !is_infinite(v) );
// find a neighbor of v to use for point location of hidden sites to // find a neighbor of v to use for point location of hidden sites to
// be re-inserted // be re-inserted
@ -1900,7 +1900,7 @@ remove_degree_d_vertex(Vertex_handle v)
CGAL_assertion( found ); CGAL_assertion( found );
CGAL_USE(found); CGAL_USE(found);
} }
CGAL_triangulation_precondition( degree(v) == 3 ); CGAL_precondition( degree(v) == 3 );
this->_tds.remove_degree_3( v, Face_handle() ); this->_tds.remove_degree_3( v, Face_handle() );

View File

@ -332,8 +332,8 @@ void
Apollonius_graph_hierarchy_2<Gt,Agds,LTag>:: Apollonius_graph_hierarchy_2<Gt,Agds,LTag>::
remove(Vertex_handle v) remove(Vertex_handle v)
{ {
CGAL_triangulation_precondition( v != Vertex_handle()); CGAL_precondition( v != Vertex_handle());
CGAL_triangulation_precondition( !is_infinite(v)); CGAL_precondition( !is_infinite(v));
// get the hidden circles // get the hidden circles
typename Apollonius_graph_base::Site_list wp_list; typename Apollonius_graph_base::Site_list wp_list;

View File

@ -19,7 +19,6 @@
#include <list> #include <list>
#include <CGAL/Triangulation_ds_vertex_base_2.h> #include <CGAL/Triangulation_ds_vertex_base_2.h>
#include <CGAL/triangulation_assertions.h>
namespace CGAL { namespace CGAL {

View File

@ -48,12 +48,10 @@ ArrangementPainterOstream<CGAL::Arr_polyline_traits_2<SegmentTraits>>&
ArrangementPainterOstream<CGAL::Arr_polyline_traits_2<SegmentTraits>>:: ArrangementPainterOstream<CGAL::Arr_polyline_traits_2<SegmentTraits>>::
operator<<(const X_monotone_curve_2& curve) operator<<(const X_monotone_curve_2& curve)
{ {
int cnt = 0;
for (typename X_monotone_curve_2::Subcurve_const_iterator it = for (typename X_monotone_curve_2::Subcurve_const_iterator it =
curve.subcurves_begin(); curve.subcurves_begin();
it != curve.subcurves_end(); ++it) it != curve.subcurves_end(); ++it)
{ {
cnt++;
this->painterOstream << *it; this->painterOstream << *it;
} }
@ -200,7 +198,6 @@ ArrangementPainterOstream<CGAL::Arr_conic_traits_2<
auto p_curr = app_pts.begin(); auto p_curr = app_pts.begin();
auto end_pts = app_pts.end(); auto end_pts = app_pts.end();
auto p_next = p_curr + 1; auto p_next = p_curr + 1;
int count = 0;
do do
{ {
QPointF p1(p_curr->first, p_curr->second); QPointF p1(p_curr->first, p_curr->second);
@ -208,7 +205,6 @@ ArrangementPainterOstream<CGAL::Arr_conic_traits_2<
this->qp->drawLine(p1, p2); this->qp->drawLine(p1, p2);
p_curr++; p_curr++;
p_next++; p_next++;
++count;
} while (p_next != end_pts); } while (p_next != end_pts);
}; };

View File

@ -19,7 +19,7 @@
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to ** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements ** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain additional ** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception ** rights. These rights are described in the Nokia Qt LGPL Exception
@ -31,7 +31,7 @@
** Foundation and appearing in the file LICENSE.GPL included in the ** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to ** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be ** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html. ** met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
** If you have questions regarding the use of this file, please contact ** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com. ** Nokia at qt-info@nokia.com.

View File

@ -19,7 +19,7 @@
** Foundation and appearing in the file LICENSE.LGPL included in the ** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to ** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements ** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** will be met: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
** **
** In addition, as a special exception, Nokia gives you certain additional ** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception ** rights. These rights are described in the Nokia Qt LGPL Exception
@ -31,7 +31,7 @@
** Foundation and appearing in the file LICENSE.GPL included in the ** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to ** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be ** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html. ** met: https://www.gnu.org/licenses/gpl-3.0.html.
** **
** If you have questions regarding the use of this file, please contact ** If you have questions regarding the use of this file, please contact
** Nokia at qt-info@nokia.com. ** Nokia at qt-info@nokia.com.

View File

@ -1937,8 +1937,8 @@ perform a point-location query on the resulting arrangement. The query
point \f$q\f$ is drawn as a plus sign. The face that contains it is point \f$q\f$ is drawn as a plus sign. The face that contains it is
drawn with a shaded texture. The program calls an instance of the drawn with a shaded texture. The program calls an instance of the
function template `print_arrangement_size()`, which prints function template `print_arrangement_size()`, which prints
quantitative measures of the arrangement; see \ref lst_paz "code quantitative measures of the arrangement; see \ref lst_paz
example" for its listing in Section \ref aos_ssec-basic-arr_class. "code example" for its listing in Section \ref aos_ssec-basic-arr_class.
\cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp} \cgalExample{Arrangement_on_surface_2/incremental_insertion.cpp}

View File

@ -112,7 +112,7 @@ public:
typedef X_monotone_curve_2 Curve_2; typedef X_monotone_curve_2 Curve_2;
//! A functor that trims curves. //! A functor that trims curves.
Class Trim_2 { class Trim_2 {
public: public:
//! \name Creation //! \name Creation
//! @{ //! @{

View File

@ -8,7 +8,6 @@ namespace ArrTraits {
* \cgalHasModel ArrangementClosedLeftTraits_2::Compare_y_on_boundary_2 * \cgalHasModel ArrangementClosedLeftTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementClosedRightTraits_2::Compare_y_on_boundary_2 * \cgalHasModel ArrangementClosedRightTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2 * \cgalHasModel ArrangementIdentifiedVerticalTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementOpenBoundaryTraits_2::Compare_y_on_boundary_2
* \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_y_on_boundary_2 * \cgalHasModel ArrangementSphericalBoundaryTraits_2::Compare_y_on_boundary_2
*/ */
class CompareYOnBoundary_2 { class CompareYOnBoundary_2 {

View File

@ -316,7 +316,7 @@ _vertical_ray_shoot(const Point_2& p, bool shoot_up) const
// face) we check the isolated vertices inside the face to check whether there // face) we check the isolated vertices inside the face to check whether there
// is an isolated vertex right above/below the query point. // is an isolated vertex right above/below the query point.
// //
template <class Arrangement> template <typename Arrangement>
typename Arr_trapezoid_ric_point_location<Arrangement>::result_type typename Arr_trapezoid_ric_point_location<Arrangement>::result_type
Arr_trapezoid_ric_point_location<Arrangement>:: Arr_trapezoid_ric_point_location<Arrangement>::
_check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found, _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found,
@ -324,40 +324,36 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found,
bool shoot_up, bool shoot_up,
const Td_map_item& tr) const const Td_map_item& tr) const
{ {
const auto* gt = this->arrangement()->geometry_traits();
const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER); const Comparison_result point_above_under = (shoot_up ? SMALLER : LARGER);
typename Geometry_traits_2::Compare_x_2 compare_x = auto compare_x = gt->compare_x_2_object();
this->arrangement()->traits()->compare_x_2_object(); auto compare_xy = gt->compare_xy_2_object();
typename Geometry_traits_2::Compare_xy_2 compare_xy = auto compare_y_at_x = gt->compare_y_at_x_2_object();
this->arrangement()->traits()->compare_xy_2_object();
typename Geometry_traits_2::Compare_y_at_x_2 compare_y_at_x =
this->arrangement()->traits()->compare_y_at_x_2_object();
Isolated_vertex_const_iterator iso_verts_it;
Vertex_const_handle closest_iso_v; Vertex_const_handle closest_iso_v;
const Vertex_const_handle invalid_v; const Vertex_const_handle invalid_v;
const Halfedge_const_handle invalid_he; const Halfedge_const_handle invalid_he;
Face_const_handle face;
// If the closest feature is a valid halfedge, take its incident face. // If the closest feature is a valid halfedge, take its incident face.
// Otherwise, take the unbounded face. // Otherwise, take the unbounded face.
if (halfedge_found == invalid_he) Face_const_handle face = (halfedge_found == invalid_he) ?
face = _get_unbounded_face(tr, p, All_sides_oblivious_category()); _get_unbounded_face(tr, p, All_sides_oblivious_category()) :
else halfedge_found->face();
face = halfedge_found->face();
// Go over the isolated vertices in the face. // Go over the isolated vertices in the face.
// The following statement pacifies MSVC. Without it the implicit conversion
// from the iterator to the corresponding handle fails!
Isolated_vertex_const_iterator iso_verts_it;
for (iso_verts_it = face->isolated_vertices_begin(); for (iso_verts_it = face->isolated_vertices_begin();
iso_verts_it != face->isolated_vertices_end(); ++iso_verts_it) iso_verts_it != face->isolated_vertices_end(); ++iso_verts_it)
{ {
// The current isolated vertex should have the same x-coordinate as the // The current isolated vertex should have the same x-coordinate as the
// query point in order to be below or above it. // query point in order to be below or above it.
if (compare_x (p, iso_verts_it->point()) != EQUAL) if (compare_x (p, iso_verts_it->point()) != EQUAL) continue;
continue;
// Make sure the isolated vertex is above the query point (if we shoot up) // Make sure the isolated vertex is above the query point (if we shoot up)
// or below it (if we shoot down). // or below it (if we shoot down).
if (compare_xy (p, iso_verts_it->point()) != point_above_under) if (compare_xy (p, iso_verts_it->point()) != point_above_under) continue;
continue;
// Check if the current isolated vertex lies closer to the query point than // Check if the current isolated vertex lies closer to the query point than
// the closest feature so far. // the closest feature so far.
@ -379,12 +375,10 @@ _check_isolated_for_vertical_ray_shoot (Halfedge_const_handle halfedge_found,
// If we found an isolated vertex above (or under) the query point, return // If we found an isolated vertex above (or under) the query point, return
// a handle to this vertex. // a handle to this vertex.
if (closest_iso_v != invalid_v) if (closest_iso_v != invalid_v) return make_result(closest_iso_v);
return make_result(closest_iso_v);
// If we are inside the unbounded face, return this face. // If we are inside the unbounded face, return this face.
if (halfedge_found == invalid_he) if (halfedge_found == invalid_he) return make_result(face);
return make_result(face);
// Return the halfedge lying above (or below) the query point. // Return the halfedge lying above (or below) the query point.
return make_result(halfedge_found); return make_result(halfedge_found);

View File

@ -776,7 +776,7 @@ _is_in_connected_component (const Point_2& p,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Find the first halfedge around a given target vertex, when going clockwise // Find the first halfedge around a given target vertex, when going clockwise
// from "6 o'clock" around this vertex (when shooting up) or starting from // from "6 o'clock" around this vertex (when shooting up) or starting from
// "12 o'clock (when shooting down). // "12 o'clock" (when shooting down).
// //
template <class Arrangement> template <class Arrangement>
typename Arr_walk_along_line_point_location<Arrangement>::Halfedge_const_handle typename Arr_walk_along_line_point_location<Arrangement>::Halfedge_const_handle

View File

@ -1114,7 +1114,7 @@ public:
// model of this concept. // model of this concept.
// //
// The following implementation is inspired by // The following implementation is inspired by
// http://stackoverflow.com/a/11816999/1915421 // https://stackoverflow.com/a/11816999/1915421
template <typename T> template <typename T>
struct Void { struct Void {

View File

@ -183,7 +183,7 @@ protected:
/*! /*!
* Find the first halfedge around a given target vertex, when going clockwise * Find the first halfedge around a given target vertex, when going clockwise
* from "6 o'clock" around this vertex (when shooting up) or starting from * from "6 o'clock" around this vertex (when shooting up) or starting from
* "12 o'clock (when shooting down). * "12 o'clock" (when shooting down).
* \param v The given vertex. * \param v The given vertex.
* \param shoot_up If (true) we should start from "6 o'clock", * \param shoot_up If (true) we should start from "6 o'clock",
* if (false) we should start from "12 o'clock". * if (false) we should start from "12 o'clock".

View File

@ -164,7 +164,7 @@ enum Fig_depth
/*! /*!
* \class A class for writing geometric objects in a FIG format (version 3.2). * \class A class for writing geometric objects in a FIG format (version 3.2).
* For more details, see: http://www.xfig.org/userman/fig-format.html * For more details, see: https://mcj.sourceforge.net/
*/ */
template <class Kernel_> template <class Kernel_>
class Fig_stream class Fig_stream

View File

@ -74,7 +74,7 @@ int main(int argc, char** argv)
// Ad hoc property_map to store normals. Face_index_map is used to // Ad hoc property_map to store normals. Face_index_map is used to
// map face_descriptors to a contiguous range of indices. See // map face_descriptors to a contiguous range of indices. See
// http://www.boost.org/libs/property_map/doc/vector_property_map.html // https://www.boost.org/libs/property_map/doc/vector_property_map.html
// for details. // for details.
boost::vector_property_map<Vector, Face_index_map> boost::vector_property_map<Vector, Face_index_map>
normals(static_cast<unsigned>(num_faces(lcc)), get(CGAL::face_index, lcc)); normals(static_cast<unsigned>(num_faces(lcc)), get(CGAL::face_index, lcc));

View File

@ -79,7 +79,7 @@ int main(int argc, char** argv)
// Ad hoc property_map to store normals. Face_index_map is used to // Ad hoc property_map to store normals. Face_index_map is used to
// map face_descriptors to a contiguous range of indices. See // map face_descriptors to a contiguous range of indices. See
// http://www.boost.org/libs/property_map/doc/vector_property_map.html // https://www.boost.org/libs/property_map/doc/vector_property_map.html
// for details. // for details.
boost::vector_property_map<Vector, Face_index_map> boost::vector_property_map<Vector, Face_index_map>
normals(static_cast<unsigned>(num_faces(P)), get(CGAL::face_index, P)); normals(static_cast<unsigned>(num_faces(P)), get(CGAL::face_index, P));

View File

@ -43,6 +43,7 @@ join_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
halfedge_descriptor hop = opposite(h,g); halfedge_descriptor hop = opposite(h,g);
halfedge_descriptor hprev = prev(h, g), gprev = prev(hop, g); halfedge_descriptor hprev = prev(h, g), gprev = prev(hop, g);
@ -73,17 +74,17 @@ join_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
remove_edge(edge(h, g), g); remove_edge(edge(h, g), g);
return hprev; return hprev;
} }
} // namespace EulerImpl } // namespace EulerImpl
/// \endcond /// \endcond
namespace Euler { namespace Euler {
/// \ingroup PkgBGLEulerOperations /// \ingroup PkgBGLEulerOperations
/// @{ /// @{
/** /**
* joins the two vertices incident to `h`, (that is `source(h, g)` and * joins the two vertices incident to `h`, (that is `source(h, g)` and
* `target(h, g)`) and removes `source(h,g)`. Returns the predecessor * `target(h, g)`) and removes `source(h,g)`. Returns the predecessor
@ -117,6 +118,8 @@ join_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::vertex_descriptor vertex_descriptor; typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef Halfedge_around_target_iterator<Graph> halfedge_around_vertex_iterator; typedef Halfedge_around_target_iterator<Graph> halfedge_around_vertex_iterator;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
halfedge_descriptor hop = opposite(h, g) halfedge_descriptor hop = opposite(h, g)
, hprev = prev(hop, g) , hprev = prev(hop, g)
, gprev = prev(h, g) , gprev = prev(h, g)
@ -191,8 +194,9 @@ split_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
typename boost::graph_traits<Graph>::halfedge_descriptor h2, typename boost::graph_traits<Graph>::halfedge_descriptor h2,
Graph& g) Graph& g)
{ {
CGAL_assertion(h1 != h2); CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
CGAL_assertion(target(h1, g) == target(h2, g)); CGAL_precondition(h1 != h2);
CGAL_precondition(target(h1, g) == target(h2, g));
typename boost::graph_traits<Graph>::halfedge_descriptor typename boost::graph_traits<Graph>::halfedge_descriptor
hnew = halfedge(add_edge(g), g), hnew = halfedge(add_edge(g), g),
@ -226,8 +230,11 @@ split_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
template<typename Graph> template<typename Graph>
typename boost::graph_traits<Graph>::halfedge_descriptor typename boost::graph_traits<Graph>::halfedge_descriptor
split_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h, Graph& g) split_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h, Graph& g)
{ return opposite(split_vertex(prev(h,g), opposite(h,g),g), g); } {
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
return opposite(split_vertex(prev(h,g), opposite(h,g),g), g);
}
/** /**
* joins the two faces incident to `h` and `opposite(h,g)`. * joins the two faces incident to `h` and `opposite(h,g)`.
@ -260,8 +267,6 @@ join_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
return EulerImpl::join_face(h,g); return EulerImpl::join_face(h,g);
} }
/** /**
* splits the face incident to `h1` and `h2`. Creates the opposite * splits the face incident to `h1` and `h2`. Creates the opposite
* halfedges `h3` and `h4`, such that `next(h1,g) == h3` and `next(h2,g) == h4`. * halfedges `h3` and `h4`, such that `next(h1,g) == h3` and `next(h2,g) == h4`.
@ -290,6 +295,12 @@ split_face(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
typedef typename boost::graph_traits<Graph> Traits; typedef typename boost::graph_traits<Graph> Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
CGAL_precondition(h1 != h2);
CGAL_precondition(face(h1, g) == face(h2, g));
CGAL_precondition(next(h1, g) != h2 && next(h2, g) != h1);
halfedge_descriptor hnew = halfedge(add_edge(g), g); halfedge_descriptor hnew = halfedge(add_edge(g), g);
face_descriptor fnew = add_face(g); face_descriptor fnew = add_face(g);
internal::insert_tip( hnew, h2, g); internal::insert_tip( hnew, h2, g);
@ -298,6 +309,7 @@ split_face(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
internal::set_face_in_face_loop(opposite(hnew,g), fnew, g); internal::set_face_in_face_loop(opposite(hnew,g), fnew, g);
set_halfedge(face(hnew,g), hnew, g); set_halfedge(face(hnew,g), hnew, g);
set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g); set_halfedge(face(opposite(hnew,g),g), opposite(hnew,g), g);
return hnew; return hnew;
} }
@ -327,7 +339,9 @@ join_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
typedef typename boost::graph_traits<Graph> Traits; typedef typename boost::graph_traits<Graph> Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
CGAL_precondition( is_border(h1,g) || face(h1, g) != face(h2, g)); CGAL_precondition( is_border(h1,g) || face(h1, g) != face(h2, g));
if (! is_border(h1,g)) if (! is_border(h1,g))
remove_face(face(h1, g), g); remove_face(face(h1, g), g);
if (! is_border(h2,g)) if (! is_border(h2,g))
@ -401,6 +415,10 @@ split_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h1, g) &&
is_valid_halfedge_descriptor(h2, g) &&
is_valid_halfedge_descriptor(h3, g));
halfedge_descriptor h = h1, i = h2, j = h3; halfedge_descriptor h = h1, i = h2, j = h3;
CGAL_precondition(h != i); CGAL_precondition(h != i);
CGAL_precondition(h != j); CGAL_precondition(h != j);
@ -408,6 +426,7 @@ split_loop(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
CGAL_precondition(target(h,g) == target(opposite(i,g),g)); CGAL_precondition(target(h,g) == target(opposite(i,g),g));
CGAL_precondition(target(i,g) == target(opposite(j,g),g)); CGAL_precondition(target(i,g) == target(opposite(j,g),g));
CGAL_precondition(target(j,g) == target(opposite(h,g),g)); CGAL_precondition(target(j,g) == target(opposite(h,g),g));
// Create a copy of the triangle. // Create a copy of the triangle.
halfedge_descriptor hnew = internal::copy(h,g); halfedge_descriptor hnew = internal::copy(h,g);
halfedge_descriptor inew = internal::copy(i,g); halfedge_descriptor inew = internal::copy(i,g);
@ -505,7 +524,9 @@ void remove_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
CGAL_precondition(! is_border(h,g)); CGAL_precondition(! is_border(h,g));
face_descriptor f = face(h, g); face_descriptor f = face(h, g);
halfedge_descriptor end = h; halfedge_descriptor end = h;
@ -551,13 +572,15 @@ add_edge(typename boost::graph_traits<Graph>::vertex_descriptor s,
typename boost::graph_traits<Graph>::vertex_descriptor t, typename boost::graph_traits<Graph>::vertex_descriptor t,
Graph& g) Graph& g)
{ {
CGAL_precondition(is_valid_vertex_descriptor(s, g) && is_valid_vertex_descriptor(t, g));
typename boost::graph_traits<Graph>::edge_descriptor e = add_edge(g); typename boost::graph_traits<Graph>::edge_descriptor e = add_edge(g);
set_target(halfedge(e, g), t, g); set_target(halfedge(e, g), t, g);
set_target(opposite(halfedge(e, g), g), s, g); set_target(opposite(halfedge(e, g), g), s, g);
return e; return e;
} }
/** /**
* checks whether a new face defined by a range of vertices (identified by their descriptors, * checks whether a new face defined by a range of vertices (identified by their descriptors,
* `boost::graph_traits<Graph>::%vertex_descriptor`) can be added. * `boost::graph_traits<Graph>::%vertex_descriptor`) can be added.
@ -568,6 +591,9 @@ bool can_add_face(const VertexRange& vrange, const PMesh& sm)
typedef typename boost::graph_traits<PMesh>::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits<PMesh>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<PMesh>::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits<PMesh>::halfedge_descriptor halfedge_descriptor;
CGAL_precondition_code(for(vertex_descriptor v : vrange))
CGAL_precondition(is_valid_vertex_descriptor(v, sm));
std::vector<typename boost::graph_traits<PMesh>::vertex_descriptor> face(vrange.begin(), vrange.end()); std::vector<typename boost::graph_traits<PMesh>::vertex_descriptor> face(vrange.begin(), vrange.end());
std::size_t N = face.size(); std::size_t N = face.size();
@ -697,6 +723,9 @@ add_face(const VertexRange& vr, Graph& g)
typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor; typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor;
typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor; typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
CGAL_precondition_code(for(vertex_descriptor v : vr))
CGAL_precondition(is_valid_vertex_descriptor(v, g));
std::vector<vertex_descriptor> vertices(vr.begin(), vr.end()); // quick and dirty copy std::vector<vertex_descriptor> vertices(vr.begin(), vr.end()); // quick and dirty copy
unsigned int n = (unsigned int)vertices.size(); unsigned int n = (unsigned int)vertices.size();
//check that every vertex is unique //check that every vertex is unique
@ -1115,7 +1144,9 @@ void make_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
typedef Halfedge_around_face_iterator<Graph> halfedge_around_face_iterator; typedef Halfedge_around_face_iterator<Graph> halfedge_around_face_iterator;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
CGAL_precondition(!is_border(h, g)); CGAL_precondition(!is_border(h, g));
face_descriptor fd = face(h, g); face_descriptor fd = face(h, g);
halfedge_around_face_iterator hafib, hafie; halfedge_around_face_iterator hafib, hafie;
for(boost::tie(hafib, hafie) = halfedges_around_face(h, g); for(boost::tie(hafib, hafie) = halfedges_around_face(h, g);
@ -1139,6 +1170,9 @@ void fill_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
CGAL_precondition(is_border(h, g));
face_descriptor f = add_face(g); face_descriptor f = add_face(g);
for(halfedge_descriptor hd : halfedges_around_face(h,g)){ for(halfedge_descriptor hd : halfedges_around_face(h,g)){
set_face(hd, f,g); set_face(hd, f,g);
@ -1179,6 +1213,9 @@ add_center_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
CGAL_precondition(!is_border(h, g));
halfedge_descriptor hnew = halfedge(add_edge(g),g); halfedge_descriptor hnew = halfedge(add_edge(g),g);
vertex_descriptor vnew = add_vertex(g); vertex_descriptor vnew = add_vertex(g);
internal::close_tip(hnew, vnew, g); internal::close_tip(hnew, vnew, g);
@ -1236,6 +1273,8 @@ remove_center_vertex(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename boost::graph_traits<Graph> Traits; typedef typename boost::graph_traits<Graph> Traits;
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
// h points to the vertex that gets removed // h points to the vertex that gets removed
halfedge_descriptor h2 = opposite(next(h, g), g); halfedge_descriptor h2 = opposite(next(h, g), g);
halfedge_descriptor hret = prev(h, g); halfedge_descriptor hret = prev(h, g);
@ -1283,14 +1322,28 @@ add_vertex_and_face_to_border(typename boost::graph_traits<Graph>::halfedge_desc
typename boost::graph_traits<Graph>::halfedge_descriptor h2, typename boost::graph_traits<Graph>::halfedge_descriptor h2,
Graph& g) Graph& g)
{ {
typename boost::graph_traits<Graph>::vertex_descriptor v = add_vertex(g); typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typename boost::graph_traits<Graph>::face_descriptor f = add_face(g); typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typename boost::graph_traits<Graph>::edge_descriptor e1 = add_edge(g); typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor;
typename boost::graph_traits<Graph>::edge_descriptor e2 = add_edge(g); typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor;
typename boost::graph_traits<Graph>::halfedge_descriptor he1= halfedge(e1, g);
typename boost::graph_traits<Graph>::halfedge_descriptor he2= halfedge(e2, g); CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
typename boost::graph_traits<Graph>::halfedge_descriptor ohe1= opposite(he1, g); CGAL_precondition(is_border(h1, g) && is_border(h2, g));
typename boost::graph_traits<Graph>::halfedge_descriptor ohe2= opposite(he2, g); CGAL_precondition(h1 != h2);
CGAL_precondition_code(halfedge_descriptor h = h1;)
CGAL_precondition_code(const halfedge_descriptor done = h1;)
CGAL_precondition_code(do { if(h == h2) break; h = next(h, g); } while(h != done);)
CGAL_precondition(h != done);
vertex_descriptor v = add_vertex(g);
face_descriptor f = add_face(g);
edge_descriptor e1 = add_edge(g);
edge_descriptor e2 = add_edge(g);
halfedge_descriptor he1 = halfedge(e1, g);
halfedge_descriptor he2 = halfedge(e2, g);
halfedge_descriptor ohe1= opposite(he1, g);
halfedge_descriptor ohe2= opposite(he2, g);
set_next(ohe1, next(h1,g),g); set_next(ohe1, next(h1,g),g);
set_next(h1,he1,g); set_next(h1,he1,g);
@ -1340,6 +1393,7 @@ add_face_to_border(typename boost::graph_traits<Graph>::halfedge_descriptor h1,
typename boost::graph_traits<Graph>::halfedge_descriptor h2, typename boost::graph_traits<Graph>::halfedge_descriptor h2,
Graph& g) Graph& g)
{ {
CGAL_precondition(is_valid_halfedge_descriptor(h1, g) && is_valid_halfedge_descriptor(h2, g));
CGAL_precondition(is_border(h1,g) == true); CGAL_precondition(is_border(h1,g) == true);
CGAL_precondition(is_border(h2,g) == true); CGAL_precondition(is_border(h2,g) == true);
CGAL_precondition(h1 != h2); CGAL_precondition(h1 != h2);
@ -1409,6 +1463,8 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
typedef typename Traits::vertex_descriptor vertex_descriptor; typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
CGAL_precondition(is_valid_edge_descriptor(e, g));
halfedge_descriptor pq = halfedge(e,g); halfedge_descriptor pq = halfedge(e,g);
halfedge_descriptor qp = opposite(pq, g); halfedge_descriptor qp = opposite(pq, g);
halfedge_descriptor pt = opposite(prev(pq, g), g); halfedge_descriptor pt = opposite(prev(pq, g), g);
@ -1520,15 +1576,17 @@ collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor e,
template<typename Graph, typename EdgeIsConstrainedMap> template<typename Graph, typename EdgeIsConstrainedMap>
typename boost::graph_traits<Graph>::vertex_descriptor typename boost::graph_traits<Graph>::vertex_descriptor
collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1, collapse_edge(typename boost::graph_traits<Graph>::edge_descriptor v0v1,
Graph& g Graph& g,
, EdgeIsConstrainedMap Edge_is_constrained_map) EdgeIsConstrainedMap Edge_is_constrained_map)
{ {
typedef boost::graph_traits< Graph > Traits; typedef boost::graph_traits< Graph > Traits;
typedef typename Traits::vertex_descriptor vertex_descriptor; typedef typename Traits::vertex_descriptor vertex_descriptor;
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
CGAL_precondition(is_valid_edge_descriptor(v0v1, g));
CGAL_precondition(!get(Edge_is_constrained_map, v0v1));
halfedge_descriptor pq = halfedge(v0v1,g); halfedge_descriptor pq = halfedge(v0v1,g);
CGAL_assertion( !get(Edge_is_constrained_map,v0v1) );
halfedge_descriptor qp = opposite(pq,g); halfedge_descriptor qp = opposite(pq,g);
halfedge_descriptor pt = opposite(prev(pq,g),g); halfedge_descriptor pt = opposite(prev(pq,g),g);
@ -1666,6 +1724,8 @@ flip_edge(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
typedef typename Traits::face_descriptor face_descriptor; typedef typename Traits::face_descriptor face_descriptor;
CGAL_precondition(is_valid_halfedge_descriptor(h, g));
vertex_descriptor s = source(h,g); vertex_descriptor s = source(h,g);
vertex_descriptor t = target(h,g); vertex_descriptor t = target(h,g);
halfedge_descriptor nh = next(h,g), nnh = next(nh,g), oh = opposite(h,g), noh = next(oh,g), nnoh = next(noh,g); halfedge_descriptor nh = next(h,g), nnh = next(nh,g), oh = opposite(h,g), noh = next(oh,g), nnoh = next(noh,g);
@ -1706,6 +1766,8 @@ does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef CGAL::Halfedge_around_source_iterator<Graph> out_edge_iterator; typedef CGAL::Halfedge_around_source_iterator<Graph> out_edge_iterator;
CGAL_precondition(is_valid_edge_descriptor(e, g));
halfedge_descriptor v0_v1 = halfedge(e,g); halfedge_descriptor v0_v1 = halfedge(e,g);
halfedge_descriptor v1_v0 = opposite(v0_v1,g); halfedge_descriptor v1_v0 = opposite(v0_v1,g);
@ -1798,8 +1860,7 @@ does_satisfy_link_condition(typename boost::graph_traits<Graph>::edge_descriptor
#ifndef CGAL_NO_DEPRECATED_CODE #ifndef CGAL_NO_DEPRECATED_CODE
/// \cond SKIP_IN_MANUAL /// \cond SKIP_IN_MANUAL
template<typename Graph> template<typename Graph>
bool bool satisfies_link_condition(typename boost::graph_traits<Graph>::edge_descriptor e,
satisfies_link_condition(typename boost::graph_traits<Graph>::edge_descriptor e,
const Graph& g) const Graph& g)
{ {
return does_satisfy_link_condition(e, g); return does_satisfy_link_condition(e, g);
@ -1808,9 +1869,8 @@ bool
#endif #endif
/// @} /// @}
} // CGAL } // namespace Euler
} // CGAL
} // namespace CGAL
#endif /* CGAL_EULER_OPERATIONS_H */ #endif /* CGAL_EULER_OPERATIONS_H */

View File

@ -109,7 +109,7 @@ off_file_input( std::istream& is, Triangulation_data_structure_2<Vb,Fb>& tds, bo
tds.set_adjacency(fn, 2, inf_edge_map); tds.set_adjacency(fn, 2, inf_edge_map);
edge_map.erase(edge_map.begin()); edge_map.erase(edge_map.begin());
} }
CGAL_triangulation_assertion(inf_edge_map.empty()); CGAL_assertion(inf_edge_map.empty());
} }

View File

@ -195,6 +195,11 @@ make_quad(typename boost::graph_traits<Graph>::vertex_descriptor v0,
typename boost::graph_traits<Graph>::vertex_descriptor v3, typename boost::graph_traits<Graph>::vertex_descriptor v3,
Graph& g) Graph& g)
{ {
CGAL_precondition(is_valid_vertex_descriptor(v0, g) &&
is_valid_vertex_descriptor(v1, g) &&
is_valid_vertex_descriptor(v2, g) &&
is_valid_vertex_descriptor(v3, g));
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor; typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor;
halfedge_descriptor h0 = halfedge(add_edge(g), g); halfedge_descriptor h0 = halfedge(add_edge(g), g);

View File

@ -11,7 +11,7 @@
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_POLYMESH_ARRAYKERNELT_H
// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html // https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html
#include <OpenMesh/Core/IO/MeshIO.hh> #include <OpenMesh/Core/IO/MeshIO.hh>
#include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h> #include <CGAL/boost/graph/properties_PolyMesh_ArrayKernelT.h>
#include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh> #include <OpenMesh/Core/Mesh/PolyMesh_ArrayKernelT.hh>

View File

@ -11,7 +11,7 @@
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H #ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H #define CGAL_BOOST_GRAPH_GRAPH_TRAITS_TRIMESH_ARRAYKERNELT_H
// http://openmesh.org/Documentation/OpenMesh-Doc-Latest/classOpenMesh_1_1Concepts_1_1KernelT.html // https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-Doc-Latest/a02182.html
#include <OpenMesh/Core/IO/MeshIO.hh> #include <OpenMesh/Core/IO/MeshIO.hh>
#include <CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h> #include <CGAL/boost/graph/properties_TriMesh_ArrayKernelT.h>
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh> #include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>

File diff suppressed because it is too large Load Diff

View File

@ -11,14 +11,15 @@
#ifndef CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H #ifndef CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
#define CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H #define CGAL_BOOST_GRAPH_INTERNAL_HELPERS_H
#include <boost/graph/graph_traits.hpp>
#include <boost/optional.hpp>
#include <CGAL/iterator.h> #include <CGAL/iterator.h>
#include <CGAL/property_map.h> #include <CGAL/property_map.h>
#include <CGAL/boost/graph/iterator.h> #include <CGAL/boost/graph/iterator.h>
#include <CGAL/Named_function_parameters.h> #include <CGAL/Named_function_parameters.h>
#include <boost/iterator/function_output_iterator.hpp> #include <boost/iterator/function_output_iterator.hpp>
#include <tuple>
namespace CGAL { namespace CGAL {
// breaks a dependency loop between <CGAL/boost/graph/helpers.h> // breaks a dependency loop between <CGAL/boost/graph/helpers.h>
@ -133,7 +134,7 @@ std::size_t
exact_num_vertices(const Graph& g) exact_num_vertices(const Graph& g)
{ {
typename boost::graph_traits<Graph>::vertex_iterator beg, end; typename boost::graph_traits<Graph>::vertex_iterator beg, end;
boost::tie(beg,end) = vertices(g); std::tie(beg,end) = vertices(g);
return std::distance(beg,end); return std::distance(beg,end);
} }
@ -142,7 +143,7 @@ std::size_t
exact_num_halfedges(const Graph& g) exact_num_halfedges(const Graph& g)
{ {
typename boost::graph_traits<Graph>::halfedge_iterator beg, end; typename boost::graph_traits<Graph>::halfedge_iterator beg, end;
boost::tie(beg,end) = halfedges(g); std::tie(beg,end) = halfedges(g);
return std::distance(beg,end); return std::distance(beg,end);
} }
@ -151,7 +152,7 @@ std::size_t
exact_num_edges(const Graph& g) exact_num_edges(const Graph& g)
{ {
typename boost::graph_traits<Graph>::edge_iterator beg, end; typename boost::graph_traits<Graph>::edge_iterator beg, end;
boost::tie(beg,end) = edges(g); std::tie(beg,end) = edges(g);
return std::distance(beg,end); return std::distance(beg,end);
} }
@ -160,14 +161,14 @@ std::size_t
exact_num_faces(const Graph& g) exact_num_faces(const Graph& g)
{ {
typename boost::graph_traits<Graph>::face_iterator beg, end; typename boost::graph_traits<Graph>::face_iterator beg, end;
boost::tie(beg,end) = faces(g); std::tie(beg,end) = faces(g);
return std::distance(beg,end); return std::distance(beg,end);
} }
template<typename Graph> template<typename Graph>
bool bool
is_isolated(typename boost::graph_traits<Graph>::vertex_descriptor v, is_isolated(typename boost::graph_traits<Graph>::vertex_descriptor v,
Graph& g) const Graph& g)
{ {
return halfedge(v, g) == boost::graph_traits<Graph>::null_halfedge(); return halfedge(v, g) == boost::graph_traits<Graph>::null_halfedge();
} }

View File

@ -202,7 +202,7 @@ public:
: sm_(pm.sm_) : sm_(pm.sm_)
{} {}
reference operator[](key_type v) reference operator[](key_type v) const
{ {
#if defined(CGAL_USE_OM_POINTS) #if defined(CGAL_USE_OM_POINTS)
return sm_->point(v); return sm_->point(v);

View File

@ -207,13 +207,11 @@ struct Regularization_graph
prevent_unselection (prevent_unselection) prevent_unselection (prevent_unselection)
{ {
labels.reserve(num_faces(fg)); labels.reserve(num_faces(fg));
std::size_t nb_selected = 0;
for (fg_face_descriptor fd : faces(fg)) for (fg_face_descriptor fd : faces(fg))
{ {
if (get(is_selected_map,fd)) if (get(is_selected_map,fd))
{ {
labels.push_back(1); labels.push_back(1);
++ nb_selected;
} }
else else
labels.push_back(0); labels.push_back(0);
@ -486,7 +484,7 @@ reduce_face_selection(
\cgalParamNEnd \cgalParamNEnd
\cgalParamNBegin{prevent_unselection} \cgalParamNBegin{prevent_unselection}
\cgalParamDescription{Boolean used to indicate if selection can be only expanded or if it can also be shrinked.} \cgalParamDescription{Boolean used to indicate if selection can be only expanded or if it can also be shrunk.}
\cgalParamType{`bool`} \cgalParamType{`bool`}
\cgalParamDefault{`false`} \cgalParamDefault{`false`}
\cgalParamExtra{The geometric traits class must be compatible with the vertex point type.} \cgalParamExtra{The geometric traits class must be compatible with the vertex point type.}
@ -545,7 +543,7 @@ regularize_face_selection_borders(
(face_index_map)); (face_index_map));
for (mesh_face_descriptor fd : faces(mesh)) for (mesh_face_descriptor fd : faces(mesh))
put(is_selected, fd, graph.labels[get(face_index_map,fd)]); put(is_selected, fd, (graph.labels[get(face_index_map,fd)] != 0));
} }
/// \cond SKIP_IN_MANUAL /// \cond SKIP_IN_MANUAL

View File

@ -1,129 +0,0 @@
// Copyright (c) 2014 GeometryFactory (France). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : Andreas Fabri
#ifndef CGAL_BOOST_PARAMETER_H
#define CGAL_BOOST_PARAMETER_H
#include <CGAL/config.h>
#ifdef BOOST_PARAMETER_MAX_ARITY
# if (BOOST_PARAMETER_MAX_ARITY < 12)
# error "BOOST_PARAMETER_MAX_ARITY must be at least 12 for CGAL::Mesh_3"
# endif
#else
# define BOOST_PARAMETER_MAX_ARITY 12
#endif
#include <boost/parameter/name.hpp>
#if defined(__clang__) || defined(BOOST_GCC)
# define CGAL_IGNORE_UNUSED_VARIABLES \
_Pragma("GCC diagnostic ignored \"-Wunused-variable\"") \
_Pragma("GCC diagnostic ignored \"-Wunused-parameter\"")
#else
# define CGAL_IGNORE_UNUSED_VARIABLES
#endif
#if __has_warning("-Wunneeded-internal-declaration")
# define CGAL_IGNORE_UNUSED_INTERNAL_DECLARATION \
_Pragma("clang diagnostic ignored \"-Wunneeded-internal-declaration\"")
#else
# define CGAL_IGNORE_UNUSED_INTERNAL_DECLARATION
#endif
#define CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS \
CGAL_IGNORE_UNUSED_VARIABLES \
CGAL_IGNORE_UNUSED_INTERNAL_DECLARATION
namespace CGAL
{
namespace parameters
{
template <typename T>
struct Base
{
Base(T t) : t_(t) {}
T operator()() const { return t_; }
private:
T t_;
};
#define CGAL_BOOLEAN_PARAMETER(Class, function_true, function_false) \
struct Class : public Base<bool> { Class(bool b) : Base<bool>(b){} }; \
inline Class function_true() { return Class(true); } \
inline Class function_false() { return Class(false); }
#define CGAL_DOUBLE_PARAMETER(Class, function, precondition) \
struct Class : public Base<double> \
{ Class(double d) : Base<double>(d) { precondition(d); } }; \
inline Class function(double d) { return Class(d); }
// see <CGAL/config.h>
CGAL_PRAGMA_DIAG_PUSH
// see <CGAL/boost/parameter.h>
CGAL_IGNORE_BOOST_PARAMETER_NAME_WARNINGS
BOOST_PARAMETER_NAME( c3t3 )
BOOST_PARAMETER_NAME( domain )
BOOST_PARAMETER_NAME( criteria )
BOOST_PARAMETER_NAME( cdt )
BOOST_PARAMETER_NAME( (seeds_begin, tag) seeds_begin_)
BOOST_PARAMETER_NAME( (seeds_end, tag) seeds_end_)
BOOST_PARAMETER_NAME( (mark, tag) mark_)
BOOST_PARAMETER_NAME( (time_limit, tag) time_limit_ )
BOOST_PARAMETER_NAME( (convergence, tag) convergence_)
BOOST_PARAMETER_NAME( (max_iteration_number, tag) max_iteration_number_ )
BOOST_PARAMETER_NAME( (freeze_bound, tag) freeze_bound_)
BOOST_PARAMETER_NAME( (sliver_bound, tag) sliver_bound_)
BOOST_PARAMETER_NAME( (sliver_criterion, tag) sliver_criterion_)
BOOST_PARAMETER_NAME( (perturbation_vector, tag) perturbation_vector_)
BOOST_PARAMETER_NAME( (do_freeze, tag) do_freeze_)
BOOST_PARAMETER_NAME( (mesh_topology, tag) mesh_topology_)
BOOST_PARAMETER_NAME( (dump_after_init_prefix, tag ) dump_after_init_prefix_)
BOOST_PARAMETER_NAME( (dump_after_refine_surface_prefix, tag ) dump_after_refine_surface_prefix_)
BOOST_PARAMETER_NAME( (dump_after_refine_prefix, tag ) dump_after_refine_prefix_)
BOOST_PARAMETER_NAME( (dump_after_glob_opt_prefix, tag ) dump_after_glob_opt_prefix_)
BOOST_PARAMETER_NAME( (dump_after_perturb_prefix, tag ) dump_after_perturb_prefix_)
BOOST_PARAMETER_NAME( (dump_after_exude_prefix, tag ) dump_after_exude_prefix_)
BOOST_PARAMETER_NAME( (number_of_initial_points, tag) number_of_initial_points_)
BOOST_PARAMETER_NAME( (maximal_number_of_vertices, tag ) maximal_number_of_vertices_)
BOOST_PARAMETER_NAME( (nonlinear_growth_of_balls, tag ) nonlinear_growth_of_balls_)
BOOST_PARAMETER_NAME( (pointer_to_error_code, tag ) pointer_to_error_code_)
BOOST_PARAMETER_NAME( (pointer_to_stop_atomic_boolean, tag ) pointer_to_stop_atomic_boolean_)
// First used in <CGAL/Labeled_mesh_domain_3.h>
BOOST_PARAMETER_NAME( (function, tag ) function_)
BOOST_PARAMETER_NAME( (bounding_object, tag ) bounding_object_)
BOOST_PARAMETER_NAME( (relative_error_bound, tag ) relative_error_bound_)
BOOST_PARAMETER_NAME( (weights, tag) weights_)
BOOST_PARAMETER_NAME( (p_rng, tag ) p_rng_)
BOOST_PARAMETER_NAME( (null_subdomain_index, tag ) null_subdomain_index_)
BOOST_PARAMETER_NAME( (construct_surface_patch_index, tag ) construct_surface_patch_index_)
// First used in <CGAL/Gray_image_mesh_domain_3.h>
BOOST_PARAMETER_NAME( (image, tag ) image_)
BOOST_PARAMETER_NAME( (iso_value, tag) iso_value_)
BOOST_PARAMETER_NAME( (value_outside, tag) value_outside_)
BOOST_PARAMETER_NAME( (image_values_to_subdomain_indices, tag ) image_values_to_subdomain_indices_)
CGAL_PRAGMA_DIAG_POP
} // parameters
} // CGAL
#endif // CGAL_BOOST_PARAMETER_H

View File

@ -23,9 +23,9 @@ int main()
vertex_descriptor vs = CGAL::add_vertex(sm); vertex_descriptor vs = CGAL::add_vertex(sm);
std::array<vertex_descriptor,0> face0; std::array<vertex_descriptor,0> face0;
assert( ! CGAL::Euler::can_add_face(face0,sm) ); assert( ! CGAL::Euler::can_add_face(face0,sm) );
std::array<vertex_descriptor,1> face1; std::array<vertex_descriptor,1> face1 = { vp };
assert( ! CGAL::Euler::can_add_face(face1,sm) ); assert( ! CGAL::Euler::can_add_face(face1,sm) );
std::array<vertex_descriptor,2> face2; std::array<vertex_descriptor,2> face2 = { vp, vq };
assert( ! CGAL::Euler::can_add_face(face2,sm) ); assert( ! CGAL::Euler::can_add_face(face2,sm) );
std::array<vertex_descriptor,3> face = { vp, vq, vr }; std::array<vertex_descriptor,3> face = { vp, vq, vr };
@ -56,5 +56,7 @@ int main()
assert( ! CGAL::Euler::can_add_face(face,sm) ); assert( ! CGAL::Euler::can_add_face(face,sm) );
} }
std::cout << "Done" << std::endl;
return 0; return 0;
} }

View File

@ -1,10 +1,10 @@
# Created by the script cgal_create_cmake_script. # Created by the script cgal_create_cmake_script.
# This is the CMake script for compiling a CGAL application. # This is the CMake script for compiling a CGAL application.
project(Barycentric_coordinates_2_Examples)
cmake_minimum_required(VERSION 3.1...3.23) cmake_minimum_required(VERSION 3.1...3.23)
project(Barycentric_coordinates_2_Examples)
find_package(CGAL REQUIRED COMPONENTS Core) find_package(CGAL REQUIRED COMPONENTS Core)
create_single_source_cgal_program("segment_coordinates.cpp") create_single_source_cgal_program("segment_coordinates.cpp")

View File

@ -1,10 +1,10 @@
# Created by the script cgal_create_cmake_script. # Created by the script cgal_create_cmake_script.
# This is the CMake script for compiling a CGAL application. # This is the CMake script for compiling a CGAL application.
project(Barycentric_coordinates_2_Tests)
cmake_minimum_required(VERSION 3.1...3.23) cmake_minimum_required(VERSION 3.1...3.23)
project(Barycentric_coordinates_2_Tests)
find_package(CGAL REQUIRED COMPONENTS Core) find_package(CGAL REQUIRED COMPONENTS Core)
create_single_source_cgal_program("test_almost_degenerate_segment.cpp") create_single_source_cgal_program("test_almost_degenerate_segment.cpp")

View File

@ -58,7 +58,7 @@ public:
{} {}
/*! Constructor with traits object. */ /*! Constructor with traits object. */
Polygon_set_2 (Traits_2& tr) : Polygon_set_2 (const Traits_2& tr) :
Base(tr) Base(tr)
{} {}

View File

@ -432,7 +432,7 @@ OutputIterator connect_holes(const Polygon_with_holes_2<Kernel,
} else { } else {
/*the case where target() is a part of several holes, and next is a /*the case where target() is a part of several holes, and next is a
boundary of a hole that has been traversed. This requires boundary of a hole that has been traversed. This requires
to continue "traversal alongside all edges whose target is also to continue traversal alongside all edges whose target is also
curr->target() to keep looking for a hole that hasn't been traversed. curr->target() to keep looking for a hole that hasn't been traversed.
we do not insert the target to the output set to avoid duplication we do not insert the target to the output set to avoid duplication
with cases 2 and 3*/ with cases 2 and 3*/

View File

@ -20,12 +20,6 @@
\cgalPkgShortInfoEnd \cgalPkgShortInfoEnd
\cgalPkgDescriptionEnd \cgalPkgDescriptionEnd
\cgalCRPSection{Assertions}
The optimization code uses infix `OPTIMISATION` in the assertions,
e.g. defining the compiler flag
`CGAL_OPTIMISATION_NO_PRECONDITIONS` switches precondition
checking off, cf. Section \ref secchecks.
\cgalClassifedRefPages \cgalClassifedRefPages
@ -62,4 +56,3 @@ checking off, cf. Section \ref secchecks.
- `CGAL::Min_sphere_of_spheres_d<Traits>` - `CGAL::Min_sphere_of_spheres_d<Traits>`
- `MinSphereOfSpheresTraits` - `MinSphereOfSpheresTraits`
*/ */

View File

@ -12,7 +12,7 @@
// Note: whenever a comment refers to "Khachiyan's paper" then the // Note: whenever a comment refers to "Khachiyan's paper" then the
// paper "Rounding of polytopes in the real number model of // paper "Rounding of polytopes in the real number model of
// computation" is ment (Mathematics of Operations Research, Vol. 21, // computation" is meant (Mathematics of Operations Research, Vol. 21,
// No. 2, May 1996). Nontheless, most comments refer to the // No. 2, May 1996). Nontheless, most comments refer to the
// accompanying documentation sheet (and not to the above paper), see // accompanying documentation sheet (and not to the above paper), see
// the file(s) in documentation/. // the file(s) in documentation/.
@ -85,7 +85,7 @@ namespace CGAL {
// //
// Notice that (at almost all places in this code) whenever a // Notice that (at almost all places in this code) whenever a
// point "p" is mentioned in a comment then the embedded point is // point "p" is mentioned in a comment then the embedded point is
// ment in case (ii). // meant in case (ii).
const int d_P; // dimension of the input points const int d_P; // dimension of the input points
const int d; // dimension of the ambient space const int d; // dimension of the ambient space

View File

@ -12,7 +12,7 @@
// Note: whenever a comment refers to "Khachiyan's paper" then the // Note: whenever a comment refers to "Khachiyan's paper" then the
// paper "Rounding of polytopes in the real number model of // paper "Rounding of polytopes in the real number model of
// computation" is ment (Mathematics of Operations Research, Vol. 21, // computation" is meant (Mathematics of Operations Research, Vol. 21,
// No. 2, May 1996). Nontheless, most comments refer to the // No. 2, May 1996). Nontheless, most comments refer to the
// accompanying documentation sheet (and not to the above paper), see // accompanying documentation sheet (and not to the above paper), see
// the file(s) in documentation/. // the file(s) in documentation/.

View File

@ -325,7 +325,7 @@ public:
Support_point_iterator Support_point_iterator
support_points_begin() const { support_points_begin() const {
CGAL_optimisation_assertion_msg(number_of_points() >= 2, CGAL_assertion_msg(number_of_points() >= 2,
"support_points_begin: not enough points"); "support_points_begin: not enough points");
return Support_point_iterator( return Support_point_iterator(
solver->basic_original_variable_indices_begin(), solver->basic_original_variable_indices_begin(),
@ -334,7 +334,7 @@ public:
Support_point_iterator Support_point_iterator
support_points_end() const { support_points_end() const {
CGAL_optimisation_assertion_msg(number_of_points() >= 2, CGAL_assertion_msg(number_of_points() >= 2,
"support_points_begin: not enough points"); "support_points_begin: not enough points");
return Support_point_iterator( return Support_point_iterator(
solver->basic_original_variable_indices_end(), solver->basic_original_variable_indices_end(),
@ -401,27 +401,27 @@ public:
// NOTE: an implicit conversion from ET to RT must be available! // NOTE: an implicit conversion from ET to RT must be available!
Point Point
center( ) const center( ) const
{ CGAL_optimisation_precondition( ! is_empty()); { CGAL_precondition( ! is_empty());
return tco.construct_point_d_object()( ambient_dimension(), return tco.construct_point_d_object()( ambient_dimension(),
center_coordinates_begin(), center_coordinates_begin(),
center_coordinates_end()); } center_coordinates_end()); }
FT FT
squared_inner_radius( ) const squared_inner_radius( ) const
{ CGAL_optimisation_precondition( ! is_empty()); { CGAL_precondition( ! is_empty());
return FT( squared_inner_radius_numerator()) / return FT( squared_inner_radius_numerator()) /
FT( squared_radii_denominator()); } FT( squared_radii_denominator()); }
FT FT
squared_outer_radius( ) const squared_outer_radius( ) const
{ CGAL_optimisation_precondition( ! is_empty()); { CGAL_precondition( ! is_empty());
return FT( squared_outer_radius_numerator()) / return FT( squared_outer_radius_numerator()) /
FT( squared_radii_denominator()); } FT( squared_radii_denominator()); }
// predicates // predicates
CGAL::Bounded_side CGAL::Bounded_side
bounded_side( const Point& p) const bounded_side( const Point& p) const
{ CGAL_optimisation_precondition( { CGAL_precondition(
is_empty() || tco.access_dimension_d_object()( p) == d); is_empty() || tco.access_dimension_d_object()( p) == d);
ET sqr_d = sqr_dist( p); ET sqr_d = sqr_dist( p);
ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d]; ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
@ -431,7 +431,7 @@ public:
bool bool
has_on_bounded_side( const Point& p) const has_on_bounded_side( const Point& p) const
{ CGAL_optimisation_precondition( { CGAL_precondition(
is_empty() || tco.access_dimension_d_object()( p) == d); is_empty() || tco.access_dimension_d_object()( p) == d);
ET sqr_d = sqr_dist( p); ET sqr_d = sqr_dist( p);
ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d]; ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
@ -440,7 +440,7 @@ public:
bool bool
has_on_boundary( const Point& p) const has_on_boundary( const Point& p) const
{ CGAL_optimisation_precondition( { CGAL_precondition(
is_empty() || tco.access_dimension_d_object()( p) == d); is_empty() || tco.access_dimension_d_object()( p) == d);
ET sqr_d = sqr_dist( p); ET sqr_d = sqr_dist( p);
ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d]; ET h_p_sqr = da_coord(p)[d] * da_coord(p)[d];
@ -449,7 +449,7 @@ public:
bool bool
has_on_unbounded_side( const Point& p) const has_on_unbounded_side( const Point& p) const
{ CGAL_optimisation_precondition( { CGAL_precondition(
is_empty() || tco.access_dimension_d_object()( p) == d); is_empty() || tco.access_dimension_d_object()( p) == d);
ET sqr_d = sqr_dist( p); ET sqr_d = sqr_dist( p);
ET h_p_sqr(da_coord(p)[d]); ET h_p_sqr(da_coord(p)[d]);
@ -468,14 +468,14 @@ public:
{ if ( points.size() > 0) points.erase( points.begin(), points.end()); { if ( points.size() > 0) points.erase( points.begin(), points.end());
std::copy( first, last, std::back_inserter( points)); std::copy( first, last, std::back_inserter( points));
set_dimension(); set_dimension();
CGAL_optimisation_precondition_msg( check_dimension(), CGAL_precondition_msg( check_dimension(),
"Not all points have the same dimension."); "Not all points have the same dimension.");
compute_min_annulus(); } compute_min_annulus(); }
void void
insert( const Point& p) insert( const Point& p)
{ if ( is_empty()) d = tco.access_dimension_d_object()( p); { if ( is_empty()) d = tco.access_dimension_d_object()( p);
CGAL_optimisation_precondition( CGAL_precondition(
tco.access_dimension_d_object()( p) == d); tco.access_dimension_d_object()( p) == d);
points.push_back( p); points.push_back( p);
compute_min_annulus(); } compute_min_annulus(); }
@ -483,10 +483,10 @@ public:
template < class InputIterator > template < class InputIterator >
void void
insert( InputIterator first, InputIterator last) insert( InputIterator first, InputIterator last)
{ CGAL_optimisation_precondition_code( std::size_t old_n = points.size()); { CGAL_precondition_code( std::size_t old_n = points.size());
points.insert( points.end(), first, last); points.insert( points.end(), first, last);
set_dimension(); set_dimension();
CGAL_optimisation_precondition_msg( check_dimension( old_n), CGAL_precondition_msg( check_dimension( old_n),
"Not all points have the same dimension."); "Not all points have the same dimension.");
compute_min_annulus(); } compute_min_annulus(); }
@ -645,7 +645,7 @@ private:
options.set_pricing_strategy(pricing_strategy(NT())); options.set_pricing_strategy(pricing_strategy(NT()));
delete solver; delete solver;
solver = new Solver(lp, options); solver = new Solver(lp, options);
CGAL_optimisation_assertion(solver->status() == QP_OPTIMAL); CGAL_assertion(solver->status() == QP_OPTIMAL);
// compute center and squared radius // compute center and squared radius
ET sqr_sum = 0; ET sqr_sum = 0;
@ -829,7 +829,7 @@ operator << ( std::ostream& os,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -858,7 +858,7 @@ operator >> ( std::istream& is, CGAL::Min_annulus_d<Traits_>& min_annulus)
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!"); CGAL_assertion_msg( false, "CGAL::IO::mode invalid!");
break; } break; }
return( is); return( is);

View File

@ -191,7 +191,7 @@ class Min_circle_2 {
const Point& const Point&
support_point( std::size_t i) const support_point( std::size_t i) const
{ {
CGAL_optimisation_precondition(i < number_of_support_points()); CGAL_precondition(i < number_of_support_points());
return( support_points[ i]); return( support_points[ i]);
} }
// circle // circle
@ -256,7 +256,7 @@ class Min_circle_2 {
tco.circle.set( ); tco.circle.set( );
break; break;
default: default:
CGAL_optimisation_assertion( n_support_points <= 3 ); } CGAL_assertion( n_support_points <= 3 ); }
} }
void void
@ -334,7 +334,7 @@ class Min_circle_2 {
// initialize circle // initialize circle
tco.circle.set(); tco.circle.set();
CGAL_optimisation_postcondition( is_empty()); CGAL_postcondition( is_empty());
} }
// constructor for one point // constructor for one point
@ -349,7 +349,7 @@ class Min_circle_2 {
support_points[ 0] = p; support_points[ 0] = p;
tco.circle.set( p); tco.circle.set( p);
CGAL_optimisation_postcondition( is_degenerate()); CGAL_postcondition( is_degenerate());
} }
// constructor for two points // constructor for two points

View File

@ -293,7 +293,7 @@ operator << ( std::ostream& os,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -323,7 +323,7 @@ operator >> ( std::istream& is,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::mode invalid!"); "CGAL::IO::mode invalid!");
break; } break; }

View File

@ -332,7 +332,7 @@ operator << ( std::ostream& os,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -363,7 +363,7 @@ operator >> ( std::istream& is,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::mode invalid!"); "CGAL::IO::mode invalid!");
break; } break; }

View File

@ -60,7 +60,7 @@ operator << ( std::ostream& os,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -89,7 +89,7 @@ operator >> ( std::istream& is, CGAL::Min_circle_2<Traits_>& min_circle)
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!"); CGAL_assertion_msg( false, "CGAL::IO::mode invalid!");
break; } break; }
return( is); return( is);

View File

@ -11,7 +11,7 @@
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner // Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
// includes // includes
# include <CGAL/Optimisation/assertions.h> # include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -42,7 +42,7 @@ operator << ( std::ostream& os, const CGAL::Optimisation_circle_2<K_>& c)
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -79,7 +79,7 @@ operator >> ( std::istream& is, CGAL::Optimisation_circle_2<K_>& c)
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( is) invalid!"); "CGAL::IO::get_mode( is) invalid!");
break; } break; }

View File

@ -203,7 +203,7 @@ class Min_ellipse_2 {
const Point& const Point&
support_point( std::size_t i) const support_point( std::size_t i) const
{ {
CGAL_optimisation_precondition(i < number_of_support_points()); CGAL_precondition(i < number_of_support_points());
return( support_points[ i]); return( support_points[ i]);
} }
// ellipse // ellipse
@ -281,7 +281,7 @@ class Min_ellipse_2 {
tco.ellipse.set( ); tco.ellipse.set( );
break; break;
default: default:
CGAL_optimisation_assertion( ( n_support_points >= 0) && CGAL_assertion( ( n_support_points >= 0) &&
( n_support_points <= 5) ); } ( n_support_points <= 5) ); }
} }
@ -360,7 +360,7 @@ class Min_ellipse_2 {
// initialize ellipse // initialize ellipse
tco.ellipse.set(); tco.ellipse.set();
CGAL_optimisation_postcondition( is_empty()); CGAL_postcondition( is_empty());
} }
inline inline
@ -373,7 +373,7 @@ class Min_ellipse_2 {
// initialize ellipse // initialize ellipse
tco.ellipse.set(); tco.ellipse.set();
CGAL_optimisation_postcondition( is_empty()); CGAL_postcondition( is_empty());
} }
// constructor for one point // constructor for one point
@ -388,7 +388,7 @@ class Min_ellipse_2 {
support_points[ 0] = p; support_points[ 0] = p;
tco.ellipse.set( p); tco.ellipse.set( p);
CGAL_optimisation_postcondition( is_degenerate()); CGAL_postcondition( is_degenerate());
} }
// constructor for two points // constructor for two points
@ -409,7 +409,7 @@ class Min_ellipse_2 {
// compute me // compute me
me( points.end(), 0); me( points.end(), 0);
CGAL_optimisation_postcondition( is_degenerate()); CGAL_postcondition( is_degenerate());
} }
// constructor for three points // constructor for three points

View File

@ -18,7 +18,7 @@
// includes // includes
# include <CGAL/Cartesian/ConicCPA2.h> # include <CGAL/Cartesian/ConicCPA2.h>
# include <CGAL/Optimisation/assertions.h> # include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -235,7 +235,7 @@ class _Min_ellipse_2_adapterC2__Ellipse {
int tau_star = c.vol_derivative( dr, ds, dt, du, dv, dw); int tau_star = c.vol_derivative( dr, ds, dt, du, dv, dw);
return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } } return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } }
default: default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) && CGAL_assertion( ( n_boundary_points >= 0) &&
( n_boundary_points <= 5) ); } ( n_boundary_points <= 5) ); }
// keeps g++ happy // keeps g++ happy
return( CGAL::Bounded_side( 0)); return( CGAL::Bounded_side( 0));
@ -298,7 +298,7 @@ class _Min_ellipse_2_adapterC2__Ellipse {
|| ( ( conic1 == e.conic2) || ( ( conic1 == e.conic2)
&& ( conic2 == e.conic1))); && ( conic2 == e.conic1)));
default: default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) CGAL_assertion( ( n_boundary_points >= 0)
&& ( n_boundary_points <= 5)); } && ( n_boundary_points <= 5)); }
// keeps g++ happy // keeps g++ happy
return( false); return( false);
@ -341,7 +341,7 @@ operator << ( std::ostream& os,
case CGAL::IO::BINARY: case CGAL::IO::BINARY:
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -405,7 +405,7 @@ operator >> ( std::istream& is,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::mode invalid!"); "CGAL::IO::mode invalid!");
break; } break; }

View File

@ -18,7 +18,7 @@
// includes // includes
# include <CGAL/Homogeneous/ConicHPA2.h> # include <CGAL/Homogeneous/ConicHPA2.h>
# include <CGAL/Optimisation/assertions.h> # include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -243,7 +243,7 @@ class _Min_ellipse_2_adapterH2__Ellipse {
int tau_star = c.vol_derivative( dr, ds, dt, du, dv, dw); int tau_star = c.vol_derivative( dr, ds, dt, du, dv, dw);
return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } } return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } }
default: default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) && CGAL_assertion( ( n_boundary_points >= 0) &&
( n_boundary_points <= 5) ); } ( n_boundary_points <= 5) ); }
// keeps g++ happy // keeps g++ happy
return( CGAL::Bounded_side( 0)); return( CGAL::Bounded_side( 0));
@ -306,7 +306,7 @@ class _Min_ellipse_2_adapterH2__Ellipse {
|| ( ( conic1 == e.conic2) || ( ( conic1 == e.conic2)
&& ( conic2 == e.conic1))); && ( conic2 == e.conic1)));
default: default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) CGAL_assertion( ( n_boundary_points >= 0)
&& ( n_boundary_points <= 5)); } && ( n_boundary_points <= 5)); }
// keeps g++ happy // keeps g++ happy
return( false); return( false);
@ -349,7 +349,7 @@ operator << ( std::ostream& os,
case CGAL::IO::BINARY: case CGAL::IO::BINARY:
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -413,7 +413,7 @@ operator >> ( std::istream& is,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::mode invalid!"); "CGAL::IO::mode invalid!");
break; } break; }

View File

@ -60,7 +60,7 @@ operator << ( std::ostream& os,
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -89,7 +89,7 @@ operator >> ( std::istream& is, CGAL::Min_ellipse_2<Traits_>& min_ellipse)
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, "CGAL::IO::mode invalid!"); CGAL_assertion_msg( false, "CGAL::IO::mode invalid!");
break; } break; }
return( is); return( is);

View File

@ -17,7 +17,7 @@
#include <CGAL/Conic_2.h> #include <CGAL/Conic_2.h>
#include <CGAL/Optimisation/assertions.h> #include <CGAL/assertions.h>
#include <CGAL/Kernel/global_functions_2.h> #include <CGAL/Kernel/global_functions_2.h>
@ -131,7 +131,7 @@ class Optimisation_ellipse_2 {
set( const Point& p, const Point& q) set( const Point& p, const Point& q)
{ {
n_boundary_points = 2; n_boundary_points = 2;
CGAL_optimisation_precondition(boundary_point1 == p); CGAL_USE(p); CGAL_precondition(boundary_point1 == p); CGAL_USE(p);
boundary_point2 = q; boundary_point2 = q;
} }
@ -139,20 +139,20 @@ class Optimisation_ellipse_2 {
set( const Point& p1, const Point& p2, const Point& p3) set( const Point& p1, const Point& p2, const Point& p3)
{ {
n_boundary_points = 3; n_boundary_points = 3;
CGAL_optimisation_precondition(boundary_point1 == p1); CGAL_precondition(boundary_point1 == p1);
CGAL_optimisation_precondition(boundary_point2 == p2); CGAL_precondition(boundary_point2 == p2);
boundary_point3 = p3; boundary_point3 = p3;
helper_conic.set_ellipse( p1, p2, p3); helper_conic.set_ellipse( p1, p2, p3);
CGAL_optimisation_assertion(helper_conic.is_ellipse()); CGAL_assertion(helper_conic.is_ellipse());
} }
void void
set( const Point& p1, const Point& p2, const Point& p3, const Point& p4) set( const Point& p1, const Point& p2, const Point& p3, const Point& p4)
{ {
n_boundary_points = 4; n_boundary_points = 4;
CGAL_optimisation_precondition(boundary_point1 == p1); CGAL_precondition(boundary_point1 == p1);
CGAL_optimisation_precondition(boundary_point2 == p2); CGAL_precondition(boundary_point2 == p2);
CGAL_optimisation_precondition(boundary_point3 == p3); CGAL_precondition(boundary_point3 == p3);
boundary_point4 = p4; boundary_point4 = p4;
Conic::set_two_linepairs( p1, p2, p3, p4, conic1, conic2); Conic::set_two_linepairs( p1, p2, p3, p4, conic1, conic2);
@ -195,7 +195,7 @@ class Optimisation_ellipse_2 {
if (!helper_ellipse_set) { if (!helper_ellipse_set) {
helper_ellipse.set_ellipse( conic1, conic2); helper_ellipse.set_ellipse( conic1, conic2);
helper_ellipse.analyse(); helper_ellipse.analyse();
CGAL_optimisation_assertion (helper_ellipse.is_ellipse()); CGAL_assertion (helper_ellipse.is_ellipse());
helper_ellipse_set= true; helper_ellipse_set= true;
} }
} }
@ -211,14 +211,14 @@ class Optimisation_ellipse_2 {
// In that case, helper_conic is already correct, // In that case, helper_conic is already correct,
// but in general, this optimization is NOT valid. // but in general, this optimization is NOT valid.
n_boundary_points = 5; n_boundary_points = 5;
CGAL_optimisation_assertion(helper_conic.is_ellipse()); CGAL_assertion(helper_conic.is_ellipse());
// the following assertion is too strict if we run under // the following assertion is too strict if we run under
// double (which is sometimes the case, e.g. in demos) // double (which is sometimes the case, e.g. in demos)
// CGAL_optimisation_assertion(helper_conic.has_on_boundary(p5)); // CGAL_assertion(helper_conic.has_on_boundary(p5));
CGAL_optimisation_precondition(boundary_point1 == p1); CGAL_precondition(boundary_point1 == p1);
CGAL_optimisation_precondition(boundary_point2 == p2); CGAL_precondition(boundary_point2 == p2);
CGAL_optimisation_precondition(boundary_point3 == p3); CGAL_precondition(boundary_point3 == p3);
CGAL_optimisation_precondition(boundary_point4 == p4); CGAL_precondition(boundary_point4 == p4);
CGAL_USE(p1); CGAL_USE(p2); CGAL_USE(p3); CGAL_USE(p4); CGAL_USE(p1); CGAL_USE(p2); CGAL_USE(p3); CGAL_USE(p4);
boundary_point5 = p5; boundary_point5 = p5;
} }
@ -247,7 +247,7 @@ class Optimisation_ellipse_2 {
double &u, double &v, double &w) const double &u, double &v, double &w) const
{ {
// just like double_conic, but we only get the coefficients // just like double_conic, but we only get the coefficients
CGAL_optimisation_precondition( ! is_degenerate()); CGAL_precondition( ! is_degenerate());
if ( n_boundary_points == 4) { if ( n_boundary_points == 4) {
set_e_values(); set_e_values();
@ -297,7 +297,7 @@ class Optimisation_ellipse_2 {
|| ( ( conic1 == e.conic2) || ( ( conic1 == e.conic2)
&& ( conic2 == e.conic1))); && ( conic2 == e.conic1)));
default: default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) CGAL_assertion( ( n_boundary_points >= 0)
&& ( n_boundary_points <= 5)); } && ( n_boundary_points <= 5)); }
// keeps g++ happy // keeps g++ happy
return( false); return( false);
@ -343,7 +343,7 @@ class Optimisation_ellipse_2 {
helper_conic.vol_derivative( dr, ds, dt, du, dv, dw); helper_conic.vol_derivative( dr, ds, dt, du, dv, dw);
return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } } return( CGAL::Bounded_side( CGAL_NTS sign( tau_star))); } }
default: default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) && CGAL_assertion( ( n_boundary_points >= 0) &&
( n_boundary_points <= 5) ); } ( n_boundary_points <= 5) ); }
// keeps g++ happy // keeps g++ happy
return( CGAL::Bounded_side( 0)); return( CGAL::Bounded_side( 0));
@ -416,7 +416,7 @@ class Optimisation_ellipse_2 {
return (CGAL::ZERO == (c.vol_derivative(dr, ds, dt, du, dv, dw))); return (CGAL::ZERO == (c.vol_derivative(dr, ds, dt, du, dv, dw)));
} }
default: default:
CGAL_optimisation_assertion( ( n_boundary_points >= 0) && CGAL_assertion( ( n_boundary_points >= 0) &&
( n_boundary_points <= 5) ); ( n_boundary_points <= 5) );
return false; return false;
} }

View File

@ -43,7 +43,7 @@ operator << ( std::ostream& os, const CGAL::Optimisation_ellipse_2<K_>& e)
case CGAL::IO::BINARY: case CGAL::IO::BINARY:
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( os) invalid!"); "CGAL::IO::get_mode( os) invalid!");
break; } break; }
@ -106,7 +106,7 @@ operator >> ( std::istream& is, CGAL::Optimisation_ellipse_2<K_>& e)
break; break;
default: default:
CGAL_optimisation_assertion_msg( false, CGAL_assertion_msg( false,
"CGAL::IO::get_mode( is) invalid!"); "CGAL::IO::get_mode( is) invalid!");
break; } break; }

View File

@ -18,7 +18,7 @@
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/Optimisation/assertions.h> #include <CGAL/assertions.h>
#include <CGAL/Point_2.h> #include <CGAL/Point_2.h>
#include <CGAL/Direction_2.h> #include <CGAL/Direction_2.h>
#include <CGAL/Polygon_2.h> #include <CGAL/Polygon_2.h>
@ -303,36 +303,36 @@ public:
if (assign(tmp, tmpo)) { if (assign(tmp, tmpo)) {
*o++ = tmp; *o++ = tmp;
} else { } else {
CGAL_optimisation_assertion_code(bool test1 =) CGAL_assertion_code(bool test1 =)
assign(tmpl, tmpo); assign(tmpl, tmpo);
CGAL_optimisation_assertion(test1); CGAL_assertion(test1);
*o++ = r.p1; *o++ = r.p1;
} }
tmpo = isec(line(r.p3, r.d1), line(r.p2, r.d2)); tmpo = isec(line(r.p3, r.d1), line(r.p2, r.d2));
if (assign(tmp, tmpo)) { if (assign(tmp, tmpo)) {
*o++ = tmp; *o++ = tmp;
} else { } else {
CGAL_optimisation_assertion_code(bool test1 =) CGAL_assertion_code(bool test1 =)
assign(tmpl, tmpo); assign(tmpl, tmpo);
CGAL_optimisation_assertion(test1); CGAL_assertion(test1);
*o++ = r.p2; *o++ = r.p2;
} }
tmpo = isec(line(r.p3, r.d1), line(r.p4, r.d2)); tmpo = isec(line(r.p3, r.d1), line(r.p4, r.d2));
if (assign(tmp, tmpo)) { if (assign(tmp, tmpo)) {
*o++ = tmp; *o++ = tmp;
} else { } else {
CGAL_optimisation_assertion_code(bool test1 =) CGAL_assertion_code(bool test1 =)
assign(tmpl, tmpo); assign(tmpl, tmpo);
CGAL_optimisation_assertion(test1); CGAL_assertion(test1);
*o++ = r.p3; *o++ = r.p3;
} }
tmpo = isec(line(r.p1, r.d1), line(r.p4, r.d2)); tmpo = isec(line(r.p1, r.d1), line(r.p4, r.d2));
if (assign(tmp, tmpo)) { if (assign(tmp, tmpo)) {
*o++ = tmp; *o++ = tmp;
} else { } else {
CGAL_optimisation_assertion_code(bool test1 =) CGAL_assertion_code(bool test1 =)
assign(tmpl, tmpo); assign(tmpl, tmpo);
CGAL_optimisation_assertion(test1); CGAL_assertion(test1);
*o++ = r.p3; *o++ = r.p3;
} }
return o; return o;

View File

@ -26,7 +26,7 @@
# include <CGAL/basic.h> # include <CGAL/basic.h>
# include <CGAL/Optimisation/assertions.h> # include <CGAL/assertions.h>
# include <CGAL/Optimisation/basic.h> # include <CGAL/Optimisation/basic.h>
@ -110,7 +110,7 @@ public:
#endif #endif
if (points.size()>0) { if (points.size()>0) {
d = tco.access_dimension_d_object() (points.front()); d = tco.access_dimension_d_object() (points.front());
CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d)); CGAL_precondition ((d>=0) && all_points_have_dim(d));
ms_basis.get_sphere(Rep_tag()).set_size (d); ms_basis.get_sphere(Rep_tag()).set_size (d);
pivot_ms(); pivot_ms();
} }
@ -137,7 +137,7 @@ public:
#endif #endif
if (points.size()>0) { if (points.size()>0) {
d = tco.access_dimension_d_object() (points.front()); d = tco.access_dimension_d_object() (points.front());
CGAL_optimisation_precondition ((d>=0) && all_points_have_dim(d)); CGAL_precondition ((d>=0) && all_points_have_dim(d));
ms_basis.get_sphere(Rep_tag()).set_size (d); ms_basis.get_sphere(Rep_tag()).set_size (d);
pivot_ms(); pivot_ms();
} }
@ -211,13 +211,13 @@ public:
Point center () const Point center () const
{ {
CGAL_optimisation_precondition (!is_empty()); CGAL_precondition (!is_empty());
return ms_basis.get_sphere(Rep_tag()).center(); return ms_basis.get_sphere(Rep_tag()).center();
} }
FT squared_radius () const FT squared_radius () const
{ {
CGAL_optimisation_precondition (!is_empty()); CGAL_precondition (!is_empty());
return ms_basis.get_sphere(Rep_tag()).squared_radius(); return ms_basis.get_sphere(Rep_tag()).squared_radius();
} }
@ -227,7 +227,7 @@ public:
if (d == -1) if (d == -1)
return ON_UNBOUNDED_SIDE; return ON_UNBOUNDED_SIDE;
else { else {
CGAL_optimisation_precondition CGAL_precondition
(d == tco.access_dimension_d_object()(p)); (d == tco.access_dimension_d_object()(p));
return (Bounded_side return (Bounded_side
(-CGAL::sign (ms_basis.get_sphere(Rep_tag()).excess (p)))); (-CGAL::sign (ms_basis.get_sphere(Rep_tag()).excess (p))));
@ -239,7 +239,7 @@ public:
if (d == -1) if (d == -1)
return false; return false;
else { else {
CGAL_optimisation_precondition CGAL_precondition
(d == tco.access_dimension_d_object()(p)); (d == tco.access_dimension_d_object()(p));
return (CGAL_NTS is_negative (ms_basis.get_sphere(Rep_tag()).excess (p))); return (CGAL_NTS is_negative (ms_basis.get_sphere(Rep_tag()).excess (p)));
} }
@ -250,7 +250,7 @@ public:
if (d == -1) if (d == -1)
return true; return true;
else { else {
CGAL_optimisation_precondition CGAL_precondition
(d == tco.access_dimension_d_object()(p)); (d == tco.access_dimension_d_object()(p));
return (CGAL_NTS is_positive (ms_basis.get_sphere(Rep_tag()).excess (p))); return (CGAL_NTS is_positive (ms_basis.get_sphere(Rep_tag()).excess (p)));
} }
@ -261,7 +261,7 @@ public:
if (d == -1) if (d == -1)
return false; return false;
else { else {
CGAL_optimisation_precondition CGAL_precondition
(d == tco.access_dimension_d_object()(p)); (d == tco.access_dimension_d_object()(p));
return (CGAL_NTS is_zero (ms_basis.get_sphere(Rep_tag()).excess (p))); return (CGAL_NTS is_zero (ms_basis.get_sphere(Rep_tag()).excess (p)));
} }
@ -296,7 +296,7 @@ public:
support_end = points.begin(); support_end = points.begin();
if (points.size()>0) { if (points.size()>0) {
d = tco.access_dimension_d_object() (points.front()); d = tco.access_dimension_d_object() (points.front());
CGAL_optimisation_precondition ((d>=0) && all_points_have_dim (d)); CGAL_precondition ((d>=0) && all_points_have_dim (d));
ms_basis.get_sphere(Rep_tag()).set_size (d); ms_basis.get_sphere(Rep_tag()).set_size (d);
pivot_ms(); pivot_ms();
} else { } else {
@ -310,7 +310,7 @@ public:
if (has_on_unbounded_side (p)) { if (has_on_unbounded_side (p)) {
if (is_empty()) { if (is_empty()) {
d = tco.access_dimension_d_object() (p); d = tco.access_dimension_d_object() (p);
CGAL_optimisation_precondition (d>=0); CGAL_precondition (d>=0);
ms_basis.get_sphere(Rep_tag()).set_size (d); ms_basis.get_sphere(Rep_tag()).set_size (d);
} }
// ensure precondition of pivot_ms // ensure precondition of pivot_ms

View File

@ -62,7 +62,7 @@ operator << ( std::ostream& os, const Min_sphere_d<Traits>& min_sphere)
break; break;
default: default:
CGAL_optimisation_assertion_msg CGAL_assertion_msg
( false, "IO::get_mode( os) invalid!"); ( false, "IO::get_mode( os) invalid!");
break; } break; }
@ -93,7 +93,7 @@ operator >> ( std::istream& is, Min_sphere_d<Traits>& min_sphere)
} break; } break;
default: default:
CGAL_optimisation_assertion_msg( false, "IO::mode invalid!"); CGAL_assertion_msg( false, "IO::mode invalid!");
break; break;
} }

View File

@ -42,7 +42,7 @@ class Optimisation_sphere_d<Cartesian_tag, FT, RT, PT, Traits>;
#include <CGAL/Optimisation/basic.h> #include <CGAL/Optimisation/basic.h>
#include <CGAL/Optimisation/assertions.h> #include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -188,7 +188,7 @@ class Optimisation_sphere_d<Cartesian_tag, FT, RT, PT, Traits>;
// compute z // compute z
FT z = FT_(2)*v_basis[m+1] - prod(v,x,m+1); FT z = FT_(2)*v_basis[m+1] - prod(v,x,m+1);
CGAL_optimisation_assertion (!CGAL_NTS is_zero (z)); CGAL_assertion (!CGAL_NTS is_zero (z));
FT inv_z = FT_(1)/z; FT inv_z = FT_(1)/z;
// set up A^{-1}_{B^m} // set up A^{-1}_{B^m}
@ -461,7 +461,7 @@ class Optimisation_sphere_d<Cartesian_tag, FT, RT, PT, Traits>;
// compute \tilde{z} // compute \tilde{z}
RT old_denom = denom[m-1]; RT old_denom = denom[m-1];
RT z = old_denom*RT_(2)*sqr_q_m - prod(v,x,m+1); RT z = old_denom*RT_(2)*sqr_q_m - prod(v,x,m+1);
CGAL_optimisation_assertion (!CGAL_NTS is_zero (z)); CGAL_assertion (!CGAL_NTS is_zero (z));
// set up \tilde{A}^{-1}_{B^m} // set up \tilde{A}^{-1}_{B^m}
RT** M = inv[m-1]; // \tilde{A}^{-1}_B, old matrix RT** M = inv[m-1]; // \tilde{A}^{-1}_B, old matrix
@ -503,7 +503,7 @@ class Optimisation_sphere_d<Cartesian_tag, FT, RT, PT, Traits>;
// get h_p // get h_p
RT h_p = *(i++); RT h_p = *(i++);
CGAL_optimisation_precondition (!CGAL_NTS is_zero (h_p)); CGAL_precondition (!CGAL_NTS is_zero (h_p));
// compute (h_p h D)^2 (c-p)^2 // compute (h_p h D)^2 (c-p)^2
RT sqr_dist(RT(0)); RT sqr_dist(RT(0));

View File

@ -42,7 +42,7 @@ namespace CGAL_MINIBALL_NAMESPACE {
{ {
// That constant is embedded in an inline static function, to // That constant is embedded in an inline static function, to
// workaround a bug of g++>=4.1 // workaround a bug of g++>=4.1
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912
// g++ does not like const floating expression when -frounding-math // g++ does not like const floating expression when -frounding-math
// is used. // is used.
static double result() { static double result() {
@ -55,7 +55,7 @@ namespace CGAL_MINIBALL_NAMESPACE {
{ {
// That constant is embedded in an inline static function, to // That constant is embedded in an inline static function, to
// workaround a bug of g++>=4.1 // workaround a bug of g++>=4.1
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912
// g++ does not like const floating expression when -frounding-math // g++ does not like const floating expression when -frounding-math
// is used. // is used.
static float result() { static float result() {
@ -68,7 +68,7 @@ namespace CGAL_MINIBALL_NAMESPACE {
{ {
// That constant is embedded in an inline static function, to // That constant is embedded in an inline static function, to
// workaround a bug of g++>=4.1 // workaround a bug of g++>=4.1
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912
// g++ does not like const floating expression when -frounding-math // g++ does not like const floating expression when -frounding-math
// is used. // is used.
static double result() { static double result() {
@ -81,7 +81,7 @@ namespace CGAL_MINIBALL_NAMESPACE {
{ {
// That constant is embedded in an inline static function, to // That constant is embedded in an inline static function, to
// workaround a bug of g++>=4.1 // workaround a bug of g++>=4.1
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36912
// g++ does not like const floating expression when -frounding-math // g++ does not like const floating expression when -frounding-math
// is used. // is used.
static float result() { static float result() {

View File

@ -20,7 +20,7 @@
#include <CGAL/Iso_rectangle_2.h> #include <CGAL/Iso_rectangle_2.h>
#include <CGAL/basic_constructions_2.h> #include <CGAL/basic_constructions_2.h>
#include <CGAL/pierce_rectangles_2.h> #include <CGAL/pierce_rectangles_2.h>
#include <CGAL/Optimisation/assertions.h> #include <CGAL/assertions.h>
namespace CGAL { namespace CGAL {
@ -228,21 +228,21 @@ struct Rectangular_p_center_matrix_search_traits_2 {
bool operator()(FT v) bool operator()(FT v)
{ {
CGAL_optimisation_assertion(ld.size() == ld_size); CGAL_assertion(ld.size() == ld_size);
ld.r = v / FT(2); ld.r = v / FT(2);
bool ok; bool ok;
pf(ld, Wastebasket< Point_2 >(), ok); pf(ld, Wastebasket< Point_2 >(), ok);
CGAL_optimisation_assertion(ld.size() == ld_size); CGAL_assertion(ld.size() == ld_size);
return ok; return ok;
} }
template < class OutputIterator > template < class OutputIterator >
OutputIterator operator()(FT v, OutputIterator o, bool& ok) OutputIterator operator()(FT v, OutputIterator o, bool& ok)
{ {
CGAL_optimisation_assertion(ld.size() == ld_size); CGAL_assertion(ld.size() == ld_size);
ld.r = v / FT(2); ld.r = v / FT(2);
OutputIterator n = pf(ld, o, ok); OutputIterator n = pf(ld, o, ok);
CGAL_optimisation_assertion(ld.size() == ld_size); CGAL_assertion(ld.size() == ld_size);
return n; //pf(ld, o, ok); return n; //pf(ld, o, ok);
} }
@ -250,7 +250,7 @@ protected:
// data members: // data members:
LD ld; LD ld;
PiercingFunction pf; PiercingFunction pf;
CGAL_optimisation_assertion_code(typename LD::size_type ld_size;) CGAL_assertion_code(typename LD::size_type ld_size;)
// copying this would be too inefficient // copying this would be too inefficient
Rectangular_p_center_matrix_search_traits_2( Rectangular_p_center_matrix_search_traits_2(

View File

@ -18,7 +18,7 @@
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/Optimisation/assertions.h> #include <CGAL/assertions.h>
#include <iterator> #include <iterator>
#include <functional> #include <functional>
@ -346,8 +346,8 @@ min_rectangle_2(
{ {
typedef Optimisation::Min_quadrilateral_traits_wrapper<BTraits> Traits; typedef Optimisation::Min_quadrilateral_traits_wrapper<BTraits> Traits;
Traits t(bt); Traits t(bt);
CGAL_optimisation_expensive_precondition(is_convex_2(f, l, t)); CGAL_expensive_precondition(is_convex_2(f, l, t));
CGAL_optimisation_expensive_precondition( CGAL_expensive_precondition(
orientation_2(f, l, t) == COUNTERCLOCKWISE); orientation_2(f, l, t) == COUNTERCLOCKWISE);
// check for trivial cases // check for trivial cases
@ -395,7 +395,7 @@ min_rectangle_2(
int yet_to_finish = 0; int yet_to_finish = 0;
for (int i1 = 0; i1 < 4; ++i1) { for (int i1 = 0; i1 < 4; ++i1) {
CGAL_optimisation_assertion(limit[i1] != l); CGAL_assertion(limit[i1] != l);
if (curr[i1] != limit[i1]) if (curr[i1] != limit[i1])
++yet_to_finish; ++yet_to_finish;
} }
@ -448,7 +448,7 @@ min_parallelogram_2(ForwardIterator f,
{ {
typedef Optimisation::Min_quadrilateral_traits_wrapper<BTraits> Traits; typedef Optimisation::Min_quadrilateral_traits_wrapper<BTraits> Traits;
Traits t(bt); Traits t(bt);
CGAL_optimisation_expensive_precondition(is_convex_2(f, l, t)); CGAL_expensive_precondition(is_convex_2(f, l, t));
// types from the traits class // types from the traits class
typedef typename Traits::Direction_2 Direction_2; typedef typename Traits::Direction_2 Direction_2;
@ -630,7 +630,7 @@ min_strip_2(ForwardIterator f,
{ {
typedef Optimisation::Min_quadrilateral_traits_wrapper<BTraits> Traits; typedef Optimisation::Min_quadrilateral_traits_wrapper<BTraits> Traits;
Traits t(bt); Traits t(bt);
CGAL_optimisation_expensive_precondition(is_convex_2(f, l, t)); CGAL_expensive_precondition(is_convex_2(f, l, t));
// types from the traits class // types from the traits class
typedef typename Traits::Direction_2 Direction_2; typedef typename Traits::Direction_2 Direction_2;

View File

@ -16,7 +16,7 @@
#include <CGAL/license/Bounding_volumes.h> #include <CGAL/license/Bounding_volumes.h>
#include <CGAL/Optimisation/assertions.h> #include <CGAL/assertions.h>
#include <CGAL/circulator.h> #include <CGAL/circulator.h>
#include <CGAL/algorithm.h> #include <CGAL/algorithm.h>
#include <algorithm> #include <algorithm>
@ -75,7 +75,7 @@ struct Loc_domain {
void void
update(int j, Citerator i) update(int j, Citerator i)
{ {
CGAL_optimisation_precondition(j >= 0 && j < 4); CGAL_precondition(j >= 0 && j < 4);
if (j < 2) if (j < 2)
if (j == 0) { if (j == 0) {
if (traits.less_x_2_object()(*i, minx)) minx = *i; if (traits.less_x_2_object()(*i, minx)) minx = *i;
@ -106,9 +106,9 @@ struct Loc_domain {
maxy(pts.front()), maxy(pts.front()),
traits(t) traits(t)
{ {
CGAL_optimisation_precondition(b != e); CGAL_precondition(b != e);
Iterator i = pts.begin(); Iterator i = pts.begin();
CGAL_optimisation_assertion(i != pts.end()); CGAL_assertion(i != pts.end());
while (++i != pts.end()) { while (++i != pts.end()) {
if (traits.less_x_2_object()(*i, minx)) minx = *i; if (traits.less_x_2_object()(*i, minx)) minx = *i;
if (traits.less_x_2_object()(maxx, *i)) maxx = *i; if (traits.less_x_2_object()(maxx, *i)) maxx = *i;
@ -124,7 +124,7 @@ struct Loc_domain {
operator[](int i) const operator[](int i) const
// return corner points (0 <-> bottom-left, 1 <-> bottom-right) // return corner points (0 <-> bottom-left, 1 <-> bottom-right)
{ {
CGAL_optimisation_precondition(i >= 0 && i < 4); CGAL_precondition(i >= 0 && i < 4);
if (i == 0) if (i == 0)
return traits.construct_point_2_above_right_implicit_point_2_object()( return traits.construct_point_2_above_right_implicit_point_2_object()(
minx, miny, r); minx, miny, r);
@ -142,7 +142,7 @@ struct Loc_domain {
extreme(int i) const extreme(int i) const
// return extreme points (0 <-> left, 1 <-> bottom) // return extreme points (0 <-> left, 1 <-> bottom)
{ {
CGAL_optimisation_precondition(i >= 0 && i < 4); CGAL_precondition(i >= 0 && i < 4);
if (i > 1) return i == 2 ? maxx : maxy; if (i > 1) return i == 2 ? maxx : maxy;
return i == 0 ? minx : miny; return i == 0 ? minx : miny;
} }
@ -151,7 +151,7 @@ struct Loc_domain {
extreme(int i) extreme(int i)
// return extreme points (0 <-> left, 1 <-> bottom) // return extreme points (0 <-> left, 1 <-> bottom)
{ {
CGAL_optimisation_precondition(i >= 0 && i < 4); CGAL_precondition(i >= 0 && i < 4);
if (i > 1) return i == 2 ? maxx : maxy; if (i > 1) return i == 2 ? maxx : maxy;
return i == 0 ? minx : miny; return i == 0 ? minx : miny;
} }
@ -177,13 +177,13 @@ struct Loc_domain {
void void
check() const { check() const {
CGAL_optimisation_expensive_assertion_code( CGAL_expensive_assertion_code(
Iterator i = pts.begin(); Iterator i = pts.begin();
do { do {
CGAL_optimisation_assertion(!traits.less_x_2_object()(*i, minx)); CGAL_assertion(!traits.less_x_2_object()(*i, minx));
CGAL_optimisation_assertion(!traits.less_x_2_object()(maxx, *i)); CGAL_assertion(!traits.less_x_2_object()(maxx, *i));
CGAL_optimisation_assertion(!traits.less_y_2_object()(*i, miny)); CGAL_assertion(!traits.less_y_2_object()(*i, miny));
CGAL_optimisation_assertion(!traits.less_y_2_object()(maxy, *i)); CGAL_assertion(!traits.less_y_2_object()(maxy, *i));
} while (++i != end); } while (++i != end);
) )
} }
@ -463,7 +463,7 @@ inline OutputIterator
two_cover_points( two_cover_points(
InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t) InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t)
{ {
CGAL_optimisation_precondition(f != l); CGAL_precondition(f != l);
// compute location domain: // compute location domain:
Loc_domain< Traits > d(f, l, t); Loc_domain< Traits > d(f, l, t);
@ -475,7 +475,7 @@ inline OutputIterator
three_cover_points( three_cover_points(
InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t) InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t)
{ {
CGAL_optimisation_precondition(f != l); CGAL_precondition(f != l);
// compute location domain: // compute location domain:
Loc_domain< Traits > d(f, l, t); Loc_domain< Traits > d(f, l, t);
@ -487,7 +487,7 @@ inline OutputIterator
four_cover_points( four_cover_points(
InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t) InputIC f, InputIC l, OutputIterator o, bool& ok, const Traits& t)
{ {
CGAL_optimisation_precondition(f != l); CGAL_precondition(f != l);
// compute location domain: // compute location domain:
Loc_domain< Traits > d(f, l, t); Loc_domain< Traits > d(f, l, t);
@ -562,7 +562,7 @@ three_cover_points(
using std::less; using std::less;
using std::iter_swap; using std::iter_swap;
CGAL_optimisation_precondition(!d.empty()); CGAL_precondition(!d.empty());
// typedefs: // typedefs:
typedef typename Traits::Point_2 Point_2; typedef typename Traits::Point_2 Point_2;
@ -583,7 +583,7 @@ three_cover_points(
// are all points already covered? // are all points already covered?
if (i == d.end()) { if (i == d.end()) {
CGAL_optimisation_assertion(k == 0); CGAL_assertion(k == 0);
*o++ = d[0]; *o++ = d[0];
ok = true; ok = true;
return o; return o;
@ -620,11 +620,11 @@ three_cover_points(
// check disjoint for two-pierceability: // check disjoint for two-pierceability:
CGAL_optimisation_expensive_assertion( CGAL_expensive_assertion(
save_end == find_if(d.end(), save_end, save_end == find_if(d.end(), save_end,
[&d, &dist, &corner](const Point_2& p) [&d, &dist, &corner](const Point_2& p)
{ return d.r < dist(corner, p); })); { return d.r < dist(corner, p); }));
CGAL_optimisation_expensive_assertion( CGAL_expensive_assertion(
d.end() == find_if(d.begin(), d.end(), d.end() == find_if(d.begin(), d.end(),
[&d,&dist, &corner](const Point_2& p) [&d,&dist, &corner](const Point_2& p)
{ return d.r >= dist(corner, p); })); { return d.r >= dist(corner, p); }));
@ -721,7 +721,7 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok)
// are all points already covered? // are all points already covered?
if (i == d.end()) { if (i == d.end()) {
CGAL_optimisation_assertion(k == 0); CGAL_assertion(k == 0);
*o++ = d[0]; *o++ = d[0];
ok = true; ok = true;
return o; return o;
@ -758,11 +758,11 @@ four_cover_points(Staircases< Traits >& d, OutputIterator o, bool& ok)
// check disjoint for two-pierceability: // check disjoint for two-pierceability:
CGAL_optimisation_expensive_assertion( CGAL_expensive_assertion(
save_end == find_if(d.end(), save_end, save_end == find_if(d.end(), save_end,
[&d,&dist,&corner](const Point_2& p) [&d,&dist,&corner](const Point_2& p)
{ return d.r < dist(corner, p); })); { return d.r < dist(corner, p); }));
CGAL_optimisation_expensive_assertion( CGAL_expensive_assertion(
d.end() == find_if(d.begin(), d.end(), d.end() == find_if(d.begin(), d.end(),
[&d,&dist,&corner](const Point_2& p) [&d,&dist,&corner](const Point_2& p)
{ return d.r >= dist(corner, p); })); { return d.r >= dist(corner, p); }));

View File

@ -17,7 +17,7 @@
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/Optimisation/assertions.h> #include <CGAL/assertions.h>
#include <CGAL/algorithm.h> #include <CGAL/algorithm.h>
#include <CGAL/Rectangular_p_center_traits_2.h> #include <CGAL/Rectangular_p_center_traits_2.h>
#include <algorithm> #include <algorithm>
@ -965,7 +965,7 @@ rectangular_3_center_2_type2(
(Q_r_empty || op.compute_y_distance(q_r, Q_r) <= op.delta()(*m))) { (Q_r_empty || op.compute_y_distance(q_r, Q_r) <= op.delta()(*m))) {
boost::function1<bool,FT> boost::function1<bool,FT>
greater_delta_m = boost::bind(less< FT >(), op.delta()(*m)); greater_delta_m = boost::bind(less< FT >(), op.delta()(*m));
CGAL_optimisation_assertion_code(RandomAccessIterator iii =) CGAL_assertion_code(RandomAccessIterator iii =)
find_if(e, find_if(e,
l, l,
boost::bind(logical_and< bool >(), boost::bind(logical_and< bool >(),
@ -973,7 +973,7 @@ rectangular_3_center_2_type2(
boost::bind(op.distance(), q_t, _1)), boost::bind(op.distance(), q_t, _1)),
boost::bind(greater_delta_m, boost::bind(greater_delta_m,
boost::bind(op.distance(), q_r, _1)))); boost::bind(op.distance(), q_r, _1))));
CGAL_optimisation_assertion(iii == l); CGAL_assertion(iii == l);
} }
// check whether the points in [f,s) are covered // check whether the points in [f,s) are covered
{ {
@ -985,7 +985,7 @@ rectangular_3_center_2_type2(
boost::bind(le_delta_m, boost::bind(op.distance(), q_t, _1))); boost::bind(le_delta_m, boost::bind(op.distance(), q_t, _1)));
iii = partition(iii, s, iii = partition(iii, s,
boost::bind(le_delta_m, boost::bind(op.distance(), q_r, _1))); boost::bind(le_delta_m, boost::bind(op.distance(), q_r, _1)));
CGAL_optimisation_assertion(iii == s); CGAL_assertion(iii == s);
} }
#endif // CGAL_3COVER_CHECK #endif // CGAL_3COVER_CHECK
@ -1052,7 +1052,7 @@ rectangular_3_center_2_type2(
} }
// step (e) [not enough points in G] // step (e) [not enough points in G]
CGAL_optimisation_assertion(b1 - (m + 1) >= 5 * cutoff); CGAL_assertion(b1 - (m + 1) >= 5 * cutoff);
// compute the four cutting lines for R // compute the four cutting lines for R
std::nth_element(m + 1, m + 1 + cutoff, b1, less_x_2); std::nth_element(m + 1, m + 1 + cutoff, b1, less_x_2);
@ -1113,7 +1113,7 @@ rectangular_3_center_2_type2(
// now s_b corresponds to the first moment in [s, m+1) // now s_b corresponds to the first moment in [s, m+1)
// where q_t and q_r cover B // where q_t and q_r cover B
CGAL_optimisation_assertion_code(bool loopcheck = false;) CGAL_assertion_code(bool loopcheck = false;)
CGAL_3CENTER_REPEAT_CHECK: CGAL_3CENTER_REPEAT_CHECK:
// place q_t and q_r // place q_t and q_r
q_t = op.place_x_square(q_t_afap, r, op.delta()(*s_b)); q_t = op.place_x_square(q_t_afap, r, op.delta()(*s_b));
@ -1142,9 +1142,9 @@ CGAL_3CENTER_REPEAT_CHECK:
// in degenerate situations it can happen that the number of // in degenerate situations it can happen that the number of
// points in R is too small => decrease radius and check again // points in R is too small => decrease radius and check again
--s_b; --s_b;
CGAL_optimisation_assertion(!loopcheck); CGAL_assertion(!loopcheck);
CGAL_optimisation_assertion(s != s_b); CGAL_assertion(s != s_b);
CGAL_optimisation_assertion_code(loopcheck = true;) CGAL_assertion_code(loopcheck = true;)
goto CGAL_3CENTER_REPEAT_CHECK; goto CGAL_3CENTER_REPEAT_CHECK;
} }
s = b1; s = b1;
@ -1166,7 +1166,7 @@ CGAL_3CENTER_REPEAT_CHECK:
// we still have a covering // we still have a covering
if (s_b == s) { if (s_b == s) {
CGAL_optimisation_expensive_assertion_code( CGAL_expensive_assertion_code(
std::vector< Point > tmppts(f, l); std::vector< Point > tmppts(f, l);
RandomAccessIterator ii = RandomAccessIterator ii =
partition(tmppts.begin(), tmppts.end(), partition(tmppts.begin(), tmppts.end(),
@ -1174,9 +1174,9 @@ CGAL_3CENTER_REPEAT_CHECK:
IP tmppos = min_max_element(ii, tmppts.end(), IP tmppos = min_max_element(ii, tmppts.end(),
op.compare_x(), op.compare_y()); op.compare_x(), op.compare_y());
) )
CGAL_optimisation_expensive_assertion( CGAL_expensive_assertion(
!op.compare_x()(*tmppos.first, q_t)); !op.compare_x()(*tmppos.first, q_t));
CGAL_optimisation_expensive_assertion( CGAL_expensive_assertion(
!op.compare_y()(q_r, *tmppos.second)); !op.compare_y()(q_r, *tmppos.second));
// we are done // we are done
@ -1219,7 +1219,7 @@ CGAL_3CENTER_REPEAT_CHECK:
[&op, s_b](const Point& p){ return op.delta()(*s_b) != op.delta()(p); }); [&op, s_b](const Point& p){ return op.delta()(*s_b) != op.delta()(p); });
rho_max = op.delta()(*s_b); rho_max = op.delta()(*s_b);
q_t_at_rho_max = q_t, q_r_at_rho_max = q_r; q_t_at_rho_max = q_t, q_r_at_rho_max = q_r;
CGAL_optimisation_assertion(op.delta()(*next) < op.delta()(*s_b)); CGAL_assertion(op.delta()(*next) < op.delta()(*s_b));
q_t_afap = op.update_x_square(q_t_afap, *s_b); q_t_afap = op.update_x_square(q_t_afap, *s_b);
q_r_afap = op.update_y_square(q_r_afap, *s_b); q_r_afap = op.update_y_square(q_r_afap, *s_b);
q_t = op.place_x_square(q_t_afap, r, op.delta()(*next)); q_t = op.place_x_square(q_t_afap, r, op.delta()(*next));
@ -1255,7 +1255,7 @@ CGAL_3CENTER_REPEAT_CHECK:
} }
CGAL_optimisation_assertion(b3 - b1 >= cutoff); CGAL_assertion(b3 - b1 >= cutoff);
e = b1; e = b1;
// adjust Q_t // adjust Q_t
if (b1 != b2) { if (b1 != b2) {
@ -1299,7 +1299,7 @@ CGAL_3CENTER_REPEAT_CHECK:
rho_max = max BOOST_PREVENT_MACRO_SUBSTITUTION (op.compute_x_distance(q_t, Q_t), rho_max = max BOOST_PREVENT_MACRO_SUBSTITUTION (op.compute_x_distance(q_t, Q_t),
op.compute_y_distance(q_r, Q_r)); op.compute_y_distance(q_r, Q_r));
#ifndef CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST #ifndef CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST
CGAL_optimisation_assertion(rho_max <= rad); CGAL_assertion(rho_max <= rad);
#endif // ! CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST #endif // ! CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST
rad = rho_max; rad = rho_max;
*o++ = op.construct_corner_square(r, rad / FT(2)); *o++ = op.construct_corner_square(r, rad / FT(2));
@ -1307,7 +1307,7 @@ CGAL_3CENTER_REPEAT_CHECK:
*o++ = op.construct_y_square(q_r, rad / FT(2)); *o++ = op.construct_y_square(q_r, rad / FT(2));
return o; return o;
} }
CGAL_optimisation_assertion(s != e); CGAL_assertion(s != e);
// find the first diameter where covering is possible // find the first diameter where covering is possible
for (;;) { for (;;) {
@ -1324,7 +1324,7 @@ CGAL_3CENTER_REPEAT_CHECK:
// try the next possible diameter value // try the next possible diameter value
FT try_rho = op.delta()(*t); FT try_rho = op.delta()(*t);
CGAL_optimisation_assertion(t == s || try_rho < rho_max); CGAL_assertion(t == s || try_rho < rho_max);
q_t = op.place_x_square(q_t_afap, r, try_rho); q_t = op.place_x_square(q_t_afap, r, try_rho);
q_r = op.place_y_square(q_r_afap, r, try_rho); q_r = op.place_y_square(q_r_afap, r, try_rho);
@ -1370,8 +1370,8 @@ CGAL_3CENTER_REPEAT_CHECK:
// - q_r_at_rho_max is the corr. position of q_r. // - q_r_at_rho_max is the corr. position of q_r.
// try rho_min // try rho_min
CGAL_optimisation_assertion(rho_min <= rho_max); CGAL_assertion(rho_min <= rho_max);
CGAL_optimisation_assertion(rho_min >= 0); CGAL_assertion(rho_min >= 0);
FT rad_2 = q_t_q_r_cover_at_rho_min; FT rad_2 = q_t_q_r_cover_at_rho_min;
if (s_at_rho_min != e_at_rho_min) { if (s_at_rho_min != e_at_rho_min) {
auto mydist = [&q_t_at_rho_min, &q_r_at_rho_min, &op](const Point& p) auto mydist = [&q_t_at_rho_min, &q_r_at_rho_min, &op](const Point& p)
@ -1384,7 +1384,7 @@ CGAL_3CENTER_REPEAT_CHECK:
[&mydist](const Point& p1, const Point& p2) [&mydist](const Point& p1, const Point& p2)
{ return mydist(p1) < mydist(p2); }))); { return mydist(p1) < mydist(p2); })));
} }
CGAL_optimisation_assertion(rad_2 == 0 || rad_2 > rho_min); CGAL_assertion(rad_2 == 0 || rad_2 > rho_min);
// if a covering with rho == 0 is possible, // if a covering with rho == 0 is possible,
// it will be catched in the type1 functions // it will be catched in the type1 functions
@ -1397,7 +1397,7 @@ CGAL_3CENTER_REPEAT_CHECK:
q_t = q_t_at_rho_min, q_r = q_r_at_rho_min; q_t = q_t_at_rho_min, q_r = q_r_at_rho_min;
#ifndef CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST #ifndef CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST
CGAL_optimisation_assertion(rad_2 <= rad); CGAL_assertion(rad_2 <= rad);
#endif // ! CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST #endif // ! CGAL_3COVER_NO_CHECK_OPTIMUM_FIRST
rad = rad_2; rad = rad_2;
*o++ = op.construct_corner_square(r, rad / FT(2)); *o++ = op.construct_corner_square(r, rad / FT(2));
@ -1414,7 +1414,7 @@ rectangular_3_center_2(
typename Traits::FT& r, typename Traits::FT& r,
Traits& t) Traits& t)
{ {
CGAL_optimisation_precondition(f != l); CGAL_precondition(f != l);
typedef typename Traits::FT FT; typedef typename Traits::FT FT;
typedef typename Traits::Point_2 Point; typedef typename Traits::Point_2 Point;
typedef typename Traits::Iso_rectangle_2 Rectangle; typedef typename Traits::Iso_rectangle_2 Rectangle;

View File

@ -72,8 +72,8 @@ public:
Value Value
operator()( int r, int c) const operator()( int r, int c) const
{ {
CGAL_optimisation_precondition( r >= 0 && r < number_of_rows()); CGAL_precondition( r >= 0 && r < number_of_rows());
CGAL_optimisation_precondition( c >= 0 && c < number_of_columns()); CGAL_precondition( c >= 0 && c < number_of_columns());
return Base::operator()( r, number_of_columns() - 1 - c); return Base::operator()( r, number_of_columns() - 1 - c);
} }
}; };
@ -145,7 +145,7 @@ rectangular_p_center_2_binary_search(
// -------------- // --------------
// //
{ {
CGAL_optimisation_precondition( f != l); CGAL_precondition( f != l);
// typedefs: // typedefs:
typedef typename Traits::FT FT; typedef typename Traits::FT FT;
@ -171,7 +171,7 @@ rectangular_p_center_2_binary_search(
c_diffs.push_back( CGAL_NTS abs( i->x() - j->x())); c_diffs.push_back( CGAL_NTS abs( i->x() - j->x()));
c_diffs.push_back( CGAL_NTS abs( i->y() - j->y())); c_diffs.push_back( CGAL_NTS abs( i->y() - j->y()));
} }
CGAL_optimisation_assertion( CGAL_assertion(
c_diffs.size() == pierce_it.number_of_points() * c_diffs.size() == pierce_it.number_of_points() *
(pierce_it.number_of_points() - 1)); (pierce_it.number_of_points() - 1));
@ -195,12 +195,12 @@ rectangular_p_center_2_binary_search(
b = c + 1; b = c + 1;
} }
} // while ( e > b) } // while ( e > b)
CGAL_optimisation_assertion( e == b); CGAL_assertion( e == b);
// return the result: // return the result:
r = c_diffs[e]; r = c_diffs[e];
OutputIterator o_return( pierce_it( r, o, ok)); OutputIterator o_return( pierce_it( r, o, ok));
CGAL_optimisation_assertion( ok); CGAL_assertion( ok);
return o_return; return o_return;
} // rectangular_p_center_2_binary_search( ... ) } // rectangular_p_center_2_binary_search( ... )
@ -221,7 +221,7 @@ rectangular_p_center_2_matrix_search(
const MatrixOperator& mop) const MatrixOperator& mop)
{ {
std::size_t number_of_points( iterator_distance( f, l)); std::size_t number_of_points( iterator_distance( f, l));
CGAL_optimisation_precondition( number_of_points > 0); CGAL_precondition( number_of_points > 0);
using std::minus; using std::minus;
using std::sort; using std::sort;
@ -296,7 +296,7 @@ rectangular_p_center_2_matrix_search(
// return result: // return result:
OutputIterator o_return(pierce_it(r, o, ok)); OutputIterator o_return(pierce_it(r, o, ok));
CGAL_optimisation_assertion(ok); CGAL_assertion(ok);
return o_return; return o_return;
} // P_center_matrix_search } // P_center_matrix_search
@ -341,7 +341,7 @@ rectangular_p_center_matrix_search_2(
FT& r, FT& r,
int p) int p)
{ {
CGAL_optimisation_precondition(p >= 2 && p < 5); CGAL_precondition(p >= 2 && p < 5);
typename std::iterator_traits<ForwardIterator>::value_type::R t; typename std::iterator_traits<ForwardIterator>::value_type::R t;
if (p == 2) if (p == 2)
return rectangular_p_center_2_matrix_search( return rectangular_p_center_2_matrix_search(
@ -401,7 +401,7 @@ rectangular_p_center_2(ForwardIterator f,
int p, int p,
Traits& t) Traits& t)
{ {
CGAL_optimisation_precondition(p >= 2 && p < 5); CGAL_precondition(p >= 2 && p < 5);
r=0; r=0;
if ( !internal::is_distance_greater_than_p(f,l,p) ) return std::copy(f,l,o); if ( !internal::is_distance_greater_than_p(f,l,p) ) return std::copy(f,l,o);
@ -422,7 +422,7 @@ rectangular_p_center_2(ForwardIterator f,
FT& r, FT& r,
int p) int p)
{ {
CGAL_optimisation_precondition(p >= 2 && p < 5); CGAL_precondition(p >= 2 && p < 5);
typedef typename typedef typename
std::iterator_traits< ForwardIterator >::value_type::R R; std::iterator_traits< ForwardIterator >::value_type::R R;
Rectangular_p_center_default_traits_2< R > t; Rectangular_p_center_default_traits_2< R > t;

View File

@ -14,7 +14,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -14,7 +14,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -23,7 +23,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$
@ -1102,7 +1102,7 @@ std::istream& BigFloatRep :: operator >>(std::istream& i) {
if (c == '.') if (c == '.')
d = 1; d = 1;
// Chen Li: fix a bug -- the sign of exponent can not happen before // Chen Li: fix a bug -- the sign of exponent can not happen before
// the character "e" appears! It must follow the "e' actually. // the character "e" appears! It must follow the "e" actually.
// if (e || c == '-' || c == '+') s = 1; // if (e || c == '-' || c == '+') s = 1;
if (e) if (e)
s = 1; s = 1;

View File

@ -14,7 +14,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -14,7 +14,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -15,7 +15,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -14,7 +14,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -15,7 +15,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -17,7 +17,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -14,7 +14,7 @@
* Chen Li <chenli@cs.nyu.edu> * Chen Li <chenli@cs.nyu.edu>
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -11,7 +11,7 @@
* Zilin Du <zilin@cs.nyu.edu> * Zilin Du <zilin@cs.nyu.edu>
* Chee Yap <yap@cs.nyu.edu> * Chee Yap <yap@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -18,7 +18,7 @@
* Sylvain Pion <pion@cs.nyu.edu> * Sylvain Pion <pion@cs.nyu.edu>
* Vikram Sharma<sharma@cs.nyu.edu> * Vikram Sharma<sharma@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$

View File

@ -18,7 +18,7 @@
* Sylvain Pion <pion@cs.nyu.edu> * Sylvain Pion <pion@cs.nyu.edu>
* Vikram Sharma<sharma@cs.nyu.edu> * Vikram Sharma<sharma@cs.nyu.edu>
* *
* WWW URL: http://cs.nyu.edu/exact/ * WWW URL: https://cs.nyu.edu/exact/
* Email: exact@cs.nyu.edu * Email: exact@cs.nyu.edu
* *
* $URL$ * $URL$
@ -1340,7 +1340,7 @@ inline int ExprRep::getExactSign() {
} }
// Chee, 7/17/02: degreeBound() function is now // Chee, 7/17/02: degreeBound() function is now
// taken out of "computeExactFlags() // taken out of "computeExactFlags()"
inline int ExprRep::getSign() { inline int ExprRep::getSign() {
if (ffVal.isOK()) if (ffVal.isOK())
return ffVal.sign(); return ffVal.sign();

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