mirror of https://github.com/CGAL/cgal
merge master
This commit is contained in:
commit
dbd56de018
|
|
@ -0,0 +1,6 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
name: remove_labels
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [synchronize]
|
||||
workflow_dispatch:
|
||||
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."
|
||||
})
|
||||
|
|
@ -4,12 +4,19 @@ on:
|
|||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
pull-requests: write # to create comment
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v3
|
||||
- uses: actions/github-script@v6
|
||||
id: get_round
|
||||
with:
|
||||
result-encoding: string
|
||||
|
|
@ -31,7 +38,7 @@ jobs:
|
|||
}
|
||||
}
|
||||
return 'stop'
|
||||
- uses: actions/github-script@v3
|
||||
- uses: actions/github-script@v6
|
||||
if: steps.get_round.outputs.result != 'stop'
|
||||
id: get_pr_number
|
||||
with:
|
||||
|
|
@ -40,15 +47,26 @@ jobs:
|
|||
//get pullrequest url
|
||||
const pr_number = context.payload.issue.number
|
||||
return pr_number
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- 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
|
||||
name: "checkout branch"
|
||||
if: steps.get_round.outputs.result != 'stop'
|
||||
with:
|
||||
repository: ${{ github.repository }}
|
||||
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
|
||||
token: ${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}
|
||||
fetch-depth: 2
|
||||
|
||||
repository: ${{ github.repository }}
|
||||
ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge
|
||||
fetch-depth: 2
|
||||
|
||||
- name: install dependencies
|
||||
if: steps.get_round.outputs.result != 'stop'
|
||||
|
|
@ -56,7 +74,7 @@ jobs:
|
|||
set -x
|
||||
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
|
||||
sudo pip install lxml
|
||||
sudo pip install 'pyquery==1.4.1' # it seems to be the last py2 compatible version
|
||||
sudo pip install pyquery
|
||||
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_8_13_patched/doxygen
|
||||
sudo mv doxygen_exe /usr/bin/doxygen
|
||||
sudo chmod +x /usr/bin/doxygen
|
||||
|
|
@ -83,14 +101,17 @@ jobs:
|
|||
#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)
|
||||
if [ "$LIST_OF_PKGS" = "" ]; then
|
||||
echo "::set-output name=DoxygenError::No package affected."
|
||||
echo "DoxygenError=No package affected." >> $GITHUB_OUTPUT
|
||||
exit 1
|
||||
fi
|
||||
cd build_doc && make -j2 doc
|
||||
make -j2 doc_with_postprocessing 2>tmp.log
|
||||
if [ -s tmp.log ]; then
|
||||
content=`cat ./tmp.log`
|
||||
echo "::set-output name=DoxygenError::$(cat tmp.log)"
|
||||
delimiter="$(openssl rand -hex 8)"
|
||||
echo "DoxygenError<<${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||
cat tmp.log >> "${GITHUB_OUTPUT}"
|
||||
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||
exit 1
|
||||
fi
|
||||
cd ..
|
||||
|
|
@ -110,12 +131,12 @@ jobs:
|
|||
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
|
||||
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
|
||||
fi
|
||||
|
||||
- name: Post address
|
||||
uses: actions/github-script@v3
|
||||
uses: actions/github-script@v6
|
||||
if: ${{ success() && steps.get_round.outputs.result != 'stop' }}
|
||||
with:
|
||||
script: |
|
||||
|
|
@ -123,7 +144,7 @@ jobs:
|
|||
const id = tmp_round.indexOf(":");
|
||||
const round = tmp_round.substring(0,id);
|
||||
const address = "The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/"+round+"/Manual/index.html"
|
||||
github.issues.createComment({
|
||||
github.rest.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
issue_number: ${{ github.event.issue.number }},
|
||||
|
|
@ -131,13 +152,16 @@ jobs:
|
|||
});
|
||||
|
||||
- name: Post error
|
||||
uses: actions/github-script@v3
|
||||
env:
|
||||
ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}}
|
||||
uses: actions/github-script@v6
|
||||
if: ${{ failure() && steps.get_round.outputs.result != 'stop' }}
|
||||
with:
|
||||
script: |
|
||||
const error = "${{steps.build_and_run.outputs.DoxygenError}}"
|
||||
const msg = "There was an error while building the doc: \n"+error
|
||||
github.issues.createComment({
|
||||
const error = process.env.ERRORMSG
|
||||
const job_url = `${context.serverUrl}/CGAL/cgal/actions/runs/${context.runId}`
|
||||
const msg = "There was an error while building the doc: \n"+error + "\n" + job_url
|
||||
github.rest.issues.createComment({
|
||||
owner: "CGAL",
|
||||
repo: "cgal",
|
||||
issue_number: ${{ github.event.issue.number }},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
name: CMake Test Merge Branch
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -8,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: |
|
||||
.github/install.sh
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
name: CMake Testsuite
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
cmake-testsuite:
|
||||
|
|
@ -8,7 +11,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: sudo apt-get install -y libboost-dev libboost-program-options-dev libmpfr-dev libeigen3-dev
|
||||
- name: configure all
|
||||
|
|
@ -22,7 +25,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: sudo bash -e .github/install.sh
|
||||
- name: configure all
|
||||
|
|
|
|||
|
|
@ -2,20 +2,25 @@ name: Documentation Removal
|
|||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, removed]
|
||||
types: [closed, removed, workflow_dispatch]
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
permissions:
|
||||
contents: write # for Git to git push
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: delete directory
|
||||
run: |
|
||||
set -x
|
||||
git config --global user.email "cgal@geometryfactory.com"
|
||||
git config --global user.name "cgaltest"
|
||||
git clone https://maxGimeno:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git --depth=5
|
||||
git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git
|
||||
PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])")
|
||||
cd cgal.github.io/
|
||||
egrep -v " ${PR_NUMBER}\." index.html > tmp.html || true
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
name: Test Polyhedron Demo
|
||||
|
||||
on: [push, pull_request]
|
||||
on: [push, pull_request,workflow_dispatch]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
batch_1:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: .github/install.sh
|
||||
- name: run1
|
||||
|
|
@ -14,7 +17,7 @@ jobs:
|
|||
batch_2:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: .github/install.sh
|
||||
- name: run2
|
||||
|
|
@ -22,7 +25,7 @@ jobs:
|
|||
batch_3:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: .github/install.sh
|
||||
- name: run3
|
||||
|
|
@ -30,7 +33,7 @@ jobs:
|
|||
batch_4:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.0.0
|
||||
- uses: actions/checkout@v3
|
||||
- name: install dependencies
|
||||
run: .github/install.sh
|
||||
- name: run4
|
||||
|
|
|
|||
|
|
@ -3,13 +3,18 @@ name: Filter Testsuite
|
|||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
jobs:
|
||||
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')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v3
|
||||
- uses: actions/github-script@v6
|
||||
id: get_label
|
||||
with:
|
||||
result-encoding: string
|
||||
|
|
@ -58,7 +63,7 @@ jobs:
|
|||
ssh ${HOST} "${PATH_TO_SCRIPT}/run_testsuite_from_branch_name.sh $USER_NAME $BRANCH_NAME $BASE $PR_NUMBER"
|
||||
done
|
||||
- name: Post address
|
||||
uses: actions/github-script@v3
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const address = "Testsuite launched. Results will appear on the following page: https://cgal.geometryfactory.com/~cgaltest/test_suite/TESTRESULTS/index.shtml "
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: 24px;
|
||||
border-spacing: 0;
|
||||
border-bottom: 2px solid black;
|
||||
border-top: 2px solid black;
|
||||
}
|
||||
table th {
|
||||
padding: 3px 10px;
|
||||
background-color: white;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid black;
|
||||
}
|
||||
table td {
|
||||
padding: 3px 10px;
|
||||
border-top: none;
|
||||
border-left: none;
|
||||
border-bottom: none;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
table tr.odd {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
table tr.even {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
name: List workflow last run
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 10 * * 1"
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
jobs:
|
||||
list_workflow:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
messages: ${{ steps.cat_output.outputs.message }}
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: run script
|
||||
run: |
|
||||
chmod +x ./Scripts/developer_scripts/list_cgal_workflows_last_run.sh
|
||||
./Scripts/developer_scripts/list_cgal_workflows_last_run.sh > output.md
|
||||
- name: convert markdown to html
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y pandoc
|
||||
pandoc -f markdown -t html --self-contained --css=.github/workflows/list_workflow_last_run.css -o output.html output.md
|
||||
- name: set_output
|
||||
id: cat_output
|
||||
run: |
|
||||
delimiter="$(openssl rand -hex 8)"
|
||||
echo "message<<${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||
echo "Subject:List workflow run \nContent-Type: text/html; charset=\"UTF-8\"\n" >> "${GITHUB_OUTPUT}"
|
||||
echo "<html><body>" >> "${GITHUB_OUTPUT}"
|
||||
cat output.html >> "${GITHUB_OUTPUT}"
|
||||
echo "</body></html>" >> "${GITHUB_OUTPUT}"
|
||||
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
|
||||
call_send_email:
|
||||
needs: list_workflow
|
||||
uses: ./.github/workflows/send_email.yml
|
||||
with:
|
||||
message: ${{needs.list_workflow.outputs.messages}}
|
||||
secrets:
|
||||
email: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_TO }}
|
||||
private_key: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_PRIVATE_KEY }}
|
||||
user: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_USER }}
|
||||
host: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_HOST }}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
name: Send Email using SSH
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
message:
|
||||
description: 'Message to send'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
email:
|
||||
required: true
|
||||
private_key:
|
||||
required: true
|
||||
user:
|
||||
required: true
|
||||
host:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
send_email:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: install ssh keys
|
||||
run: |
|
||||
install -m 600 -D /dev/null ~/.ssh/id_rsa
|
||||
echo "${{ secrets.private_key }}" > ~/.ssh/id_rsa
|
||||
ssh-keyscan -H ${{ secrets.host }} > ~/.ssh/known_hosts
|
||||
- name: send email via ssh
|
||||
run: |
|
||||
echo -e '${{ inputs.message }}' | ssh ${{ secrets.user }}@${{ secrets.host }} "/sbin/sendmail -t ${{ secrets.email }}"
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
name: Wiki Notification
|
||||
|
||||
on: gollum
|
||||
|
||||
jobs:
|
||||
prepare_email:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
messages: ${{ steps.set-result.outputs.result }}
|
||||
steps:
|
||||
- name: get informations and prepare email
|
||||
uses: actions/github-script@v6
|
||||
id: set-result
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
const payload = context.payload;
|
||||
const actor = payload.sender;
|
||||
const pages = payload.pages;
|
||||
let messages = "Subject:Updates to CGAL Wiki \nContent-Type: text/html\n";
|
||||
messages += "<html><body>";
|
||||
messages += `<p>The following CGAL Wiki page were modified by <a href="${actor.html_url}">"${actor.login}"</a>:</p><ul>\n`
|
||||
for (const page of pages){
|
||||
messages += `<li><a href="${page.html_url}">${page.title}</a> (link to <a href="${page.html_url}/_compare/${page.sha}%5E...${page.sha}">the diff</a>)</li>\n`;
|
||||
}
|
||||
messages += "</ul></body></html>";
|
||||
console.log( messages );
|
||||
return messages;
|
||||
call_send_email:
|
||||
needs: prepare_email
|
||||
uses: ./.github/workflows/send_email.yml
|
||||
with:
|
||||
message: ${{needs.prepare_email.outputs.messages}}
|
||||
secrets:
|
||||
email: ${{ secrets.CGAL_SEND_WIKI_EMAIL_TO }}
|
||||
private_key: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_PRIVATE_KEY }}
|
||||
user: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_USER }}
|
||||
host: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_HOST }}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
/*/*/*/build
|
||||
/*/*/*/VC*
|
||||
/*/*/*/GCC
|
||||
.vscode
|
||||
AABB_tree/demo/AABB_tree/AABB_demo
|
||||
AABB_tree/demo/AABB_tree/Makefile
|
||||
AABB_tree/examples/AABB_tree/*.kdev*
|
||||
|
|
|
|||
|
|
@ -6,12 +6,14 @@ project(AABB_traits_benchmark)
|
|||
|
||||
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
||||
|
||||
# google benchmark
|
||||
find_package(benchmark)
|
||||
|
||||
if (benchmark_FOUND)
|
||||
create_single_source_cgal_program("tree_creation.cpp")
|
||||
target_link_libraries(tree_creation benchmark::benchmark)
|
||||
endif()
|
||||
create_single_source_cgal_program("test.cpp")
|
||||
create_single_source_cgal_program("tree_construction.cpp")
|
||||
|
||||
# google benchmark
|
||||
find_package(benchmark QUIET)
|
||||
if(benchmark_FOUND)
|
||||
create_single_source_cgal_program("tree_creation.cpp")
|
||||
target_link_libraries(tree_creation benchmark::benchmark)
|
||||
else()
|
||||
message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ project(AABB_tree_Demo)
|
|||
|
||||
# Find includes in corresponding build directories
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
# Instruct CMake to run moc automatically when needed.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
if(NOT POLICY CMP0070 AND POLICY CMP0053)
|
||||
|
|
@ -31,10 +32,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
|||
|
||||
include(AddFileDependencies)
|
||||
|
||||
qt5_generate_moc("MainWindow.h"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
|
||||
add_file_dependencies(MainWindow_moc.cpp
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
|
||||
qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
|
||||
add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
|
||||
|
||||
qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
|
||||
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")
|
||||
|
|
@ -62,8 +61,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
|||
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
|
||||
cgal_add_compilation_test(AABB_demo)
|
||||
|
||||
else(CGAL_Qt5_FOUND
|
||||
AND Qt5_FOUND)
|
||||
else(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||
|
||||
set(AABB_MISSING_DEPS "")
|
||||
|
||||
|
|
@ -75,11 +73,6 @@ else(CGAL_Qt5_FOUND
|
|||
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
|
||||
endif()
|
||||
|
||||
message(
|
||||
STATUS
|
||||
"NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled."
|
||||
)
|
||||
message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.")
|
||||
|
||||
endif(
|
||||
CGAL_Qt5_FOUND
|
||||
AND Qt5_FOUND)
|
||||
endif(CGAL_Qt5_FOUND AND Qt5_FOUND)
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ void Scene::compute_elements(int mode)
|
|||
pos_points.push_back(p.z());
|
||||
}
|
||||
}
|
||||
//The Segements
|
||||
//The segments
|
||||
{
|
||||
std::list<Segment>::iterator sit;
|
||||
for(sit = m_segments.begin(); sit != m_segments.end(); sit++)
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
<body>
|
||||
<h2>AABB Tree Demo</h2>
|
||||
<p>Copyright ©2009
|
||||
<a href="http://www-sop.inria.fr/">INRIA Sophia Antipolis - Mediterranee<a/></p>
|
||||
<p>This application illustrates the AABB tree component
|
||||
<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
|
||||
of <a href="https://www.cgal.org/">CGAL</a>, applied to polyhedron
|
||||
facets and edges.</p>
|
||||
<p>See also the following chapters of the manual:
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ typedef unspecified_type Construct_projected_point_3;
|
|||
/*!
|
||||
A functor object to compare the distance of two points wrt a third one. Provides the operator:
|
||||
|
||||
`CGAL::Comparision_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`,
|
||||
`CGAL::Comparison_result operator()(const Point_3& p1, const Point_3& p2, const Point_3& p3)`,
|
||||
|
||||
which compares the distance between `p1 and `p2`, and between `p2` and `p3`.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
\cgalPkgDescriptionBegin{3D Fast Intersection and Distance Computation,PkgAABBTree}
|
||||
\cgalPkgPicture{aabb-teaser-thumb.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, Camille Wormser}
|
||||
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, and Camille Wormser}
|
||||
\cgalPkgDesc{The AABB (axis-aligned bounding box) tree component offers a static data structure and algorithms to perform efficient intersection and distance queries on sets of finite 3D geometric objects.}
|
||||
\cgalPkgManuals{Chapter_3D_Fast_Intersection_and_Distance_Computation,PkgAABBTreeRef}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -390,7 +390,7 @@ query and location of query in space.
|
|||
number of primitive data (greater than 2M faces in our experiments)
|
||||
however we noticed that it is not necessary (and sometimes even
|
||||
slower) to use all reference points when constructing the
|
||||
KD-tree. In these cases we recommend to specify trough the function
|
||||
KD-tree. In these cases we recommend to specify through the function
|
||||
` AABB_tree::accelerate_distance_queries()` fewer reference
|
||||
points (typically not more than 100K) evenly distributed over the
|
||||
input primitives.
|
||||
|
|
|
|||
|
|
@ -23,9 +23,8 @@
|
|||
|
||||
#include <iterator>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <CGAL/is_iterator.h>
|
||||
#include <CGAL/type_traits/is_iterator.h>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
#include <CGAL/Default.h>
|
||||
|
|
|
|||
|
|
@ -26,8 +26,7 @@
|
|||
#define CGAL_REPLACEMENT_HEADER "<CGAL/AABB_halfedge_graph_segment_primitive.h>"
|
||||
#include <CGAL/Installation/internal/deprecation_warning.h>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -80,9 +79,9 @@ namespace CGAL {
|
|||
: m_halfedge_handle(*ptr) { };
|
||||
template <class Iterator>
|
||||
AABB_polyhedron_segment_primitive( Iterator it,
|
||||
typename boost::enable_if<
|
||||
boost::is_same<Id,typename Iterator::value_type>
|
||||
>::type* =0
|
||||
std::enable_if_t<
|
||||
std::is_same<Id,typename Iterator::value_type>::value
|
||||
>* =0
|
||||
) : m_halfedge_handle(*it) { }
|
||||
|
||||
AABB_polyhedron_segment_primitive(const Self& primitive)
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@
|
|||
#define CGAL_REPLACEMENT_HEADER "<CGAL/AABB_face_graph_triangle_primitive.h>"
|
||||
#include <CGAL/Installation/internal/deprecation_warning.h>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace CGAL {
|
||||
/// \ingroup PkgAABBTreeRef
|
||||
|
|
@ -76,9 +75,9 @@ namespace CGAL {
|
|||
: m_facet_handle(*ptr) { };
|
||||
template <class Iterator>
|
||||
AABB_polyhedron_triangle_primitive( Iterator it,
|
||||
typename boost::enable_if<
|
||||
boost::is_same<Id,typename Iterator::value_type>
|
||||
>::type* =0
|
||||
std::enable_if_t<
|
||||
std::is_same<Id,typename Iterator::value_type>::value
|
||||
>* =0
|
||||
) : m_facet_handle(*it) { }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ public:
|
|||
/// Point query type.
|
||||
typedef typename GeomTraits::Point_3 Point_3;
|
||||
|
||||
/// additionnal types for the search tree, required by the RangeSearchTraits concept
|
||||
/// additional types for the search tree, required by the RangeSearchTraits concept
|
||||
/// \bug This is not documented for now in the AABBTraits concept.
|
||||
typedef typename GeomTraits::Iso_cuboid_3 Iso_cuboid_3;
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ public:
|
|||
* @param beyond iterator on beyond element
|
||||
* @param bbox the bounding box of [first,beyond[
|
||||
*
|
||||
* Sorts the range defined by [first,beyond[. Sort is achieved on bbox longuest
|
||||
* Sorts the range defined by [first,beyond[. Sort is achieved on bbox longest
|
||||
* axis, using the comparison function `<dim>_less_than` (dim in {x,y,z})
|
||||
*/
|
||||
class Split_primitives
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
|
||||
|
||||
#include <functional>
|
||||
#include <type_traits>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/variant/apply_visitor.hpp>
|
||||
# if defined(BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
|
|
@ -201,7 +201,7 @@ template<typename Ray, typename SkipFunctor>
|
|||
boost::optional< typename AABB_tree<AABBTraits>::template Intersection_and_primitive_id<Ray>::Type >
|
||||
AABB_tree<AABBTraits>::first_intersection(const Ray& query,
|
||||
const SkipFunctor& skip) const {
|
||||
CGAL_static_assertion_msg((boost::is_same<Ray, typename AABBTraits::Ray_3>::value),
|
||||
CGAL_static_assertion_msg((std::is_same<Ray, typename AABBTraits::Ray_3>::value),
|
||||
"Ray and Ray_3 must be the same type");
|
||||
|
||||
switch(size()) // copy-paste from AABB_tree::traversal
|
||||
|
|
|
|||
|
|
@ -143,18 +143,18 @@ struct AABB_covered_triangle_tree_traits
|
|||
|
||||
// Primitive ID --> box vector pos --> Bounding Box
|
||||
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
|
||||
using BPM = CGAL::Property_map_binder<IDPM, BPMB>;
|
||||
using BPM = CGAL::Compose_property_map<IDPM, BPMB>;
|
||||
|
||||
// Primitive ID --> point vector pos --> Reference Point
|
||||
using RPPMB = internal::Vector_property_map<Point>;
|
||||
using RPPM = CGAL::Property_map_binder<IDPM, RPPMB>;
|
||||
using RPPM = CGAL::Compose_property_map<IDPM, RPPMB>;
|
||||
|
||||
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
|
||||
// The vector of data has size nf, but the vector of datum pos has size tree.size()
|
||||
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
|
||||
using DPPM = CGAL::Property_map_binder<IDPM, DPPMB>; // PID --> Datum pos
|
||||
using DPPM = CGAL::Compose_property_map<IDPM, DPPMB>; // PID --> Datum pos
|
||||
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
|
||||
using DPM = CGAL::Property_map_binder<DPPM, DPMB>; // PID --> Datum
|
||||
using DPM = CGAL::Compose_property_map<DPPM, DPMB>; // PID --> Datum
|
||||
|
||||
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
|
||||
CGAL::Tag_true /*external pmaps*/,
|
||||
|
|
@ -207,7 +207,7 @@ public:
|
|||
: Base(traits),
|
||||
m_sq_length(square(max_length)),
|
||||
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
|
||||
m_dpm(DPPM(m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||
m_dpm(DPPM(Default(), m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
|
||||
{
|
||||
initialize_tree_property_maps();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,8 +18,7 @@
|
|||
|
||||
#include <CGAL/disable_warnings.h>
|
||||
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
namespace CGAL {
|
||||
// \ingroup PkgAABBTreeRef
|
||||
|
|
@ -68,9 +67,9 @@ namespace CGAL {
|
|||
: m_facet(*ptr) { }
|
||||
template <class Iterator>
|
||||
AABB_triangulation_3_triangle_primitive( Iterator it,
|
||||
typename boost::enable_if<
|
||||
boost::is_same<Id,typename Iterator::value_type>
|
||||
>::type* =0
|
||||
std::enable_if_t<
|
||||
std::is_same<Id,typename Iterator::value_type>::value
|
||||
>* =0
|
||||
) : m_facet(*it) { }
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -527,7 +527,6 @@ private:
|
|||
{
|
||||
CGAL::Timer timer;
|
||||
timer.start();
|
||||
int nb_test = 0;
|
||||
while ( timer.time() < duration )
|
||||
{
|
||||
Point a = random_point_in<K>(m_tree.bbox());
|
||||
|
|
@ -539,8 +538,6 @@ private:
|
|||
test(segment, m_polyhedron, m_tree, m_naive);
|
||||
test(ray, m_polyhedron, m_tree, m_naive);
|
||||
test(line, m_polyhedron, m_tree, m_naive);
|
||||
|
||||
++nb_test;
|
||||
}
|
||||
timer.stop();
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ std::tuple<std::size_t, std::size_t, std::size_t, long> test(const char* name) {
|
|||
tu = std::make_tuple(intersect(lines.begin(), lines.end(), tree, counter),
|
||||
intersect(rays.begin(), rays.end(), tree, counter),
|
||||
intersect(segments.begin(), segments.end(), tree, counter),
|
||||
// cant use counter here
|
||||
// can't use counter here
|
||||
0);
|
||||
std::get<3>(tu) = counter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
\cgalPkgDescriptionBegin{Advancing Front Surface Reconstruction,PkgAdvancingFrontSurfaceReconstruction}
|
||||
\cgalPkgPicture{afsr-detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Tran Kai Frank Da, David Cohen-Steiner}
|
||||
\cgalPkgAuthors{Tran Kai Frank Da and David Cohen-Steiner}
|
||||
\cgalPkgDesc{This package provides a greedy algorithm for surface reconstruction from an
|
||||
unorganized point set. Starting from a seed facet, a piecewise linear
|
||||
surface is grown by adding Delaunay triangles one by one. The most
|
||||
|
|
|
|||
|
|
@ -370,19 +370,19 @@ namespace CGAL {
|
|||
coord_type K, min_K;
|
||||
const coord_type eps;
|
||||
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_BIS;
|
||||
const criteria NOT_VALID_CANDIDATE;
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//Pour une visu correcte
|
||||
//pour retenir les facettes selectionnees
|
||||
// For a correct visualization
|
||||
// to retain the selected facets
|
||||
int _vh_number;
|
||||
int _facet_number;
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
//Pour le post traitement
|
||||
// For post-processing
|
||||
mutable int _postprocessing_counter;
|
||||
int _size_before_postprocessing;
|
||||
|
||||
|
|
@ -501,9 +501,8 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// pour gerer certaines aretes interieures: a savoir celle encore connectee au
|
||||
// bord (en fait seule, les aretes interieures reliant 2 bords nous
|
||||
// interressent...)
|
||||
// to handle certain interior edges, meaning those still connected to the boundary
|
||||
// (actually, only the interior edges linking two boundaries are relevant)
|
||||
|
||||
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()))&&
|
||||
(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()){
|
||||
extend2_timer.start();
|
||||
|
|
@ -1068,9 +1067,8 @@ namespace CGAL {
|
|||
|
||||
//---------------------------------------------------------------------
|
||||
bool is_interior_edge(const Edge_like& key) const
|
||||
// pour gerer certaines aretes interieures: a savoir celle encore connectee au
|
||||
// bord (en fait seule, les aretes interieures reliant 2 bords nous
|
||||
// interressent...)
|
||||
// to handle certain interior edges, meaning those still connected to the boundary
|
||||
// (actually, only the interior edges linking two boundaries are relevant)
|
||||
{
|
||||
return (is_interior_edge(key.first, key.second)||
|
||||
is_interior_edge(key.second, key.first));
|
||||
|
|
@ -1299,7 +1297,6 @@ namespace CGAL {
|
|||
#ifdef AFSR_LAZY
|
||||
value = lazy_squared_radius(cc);
|
||||
#else
|
||||
// qualified with CGAL, to avoid a compilation error with clang
|
||||
if(volume(pp0, pp1, pp2, pp3) != 0){
|
||||
value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3);
|
||||
} else {
|
||||
|
|
@ -1337,7 +1334,6 @@ namespace CGAL {
|
|||
{
|
||||
value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V;
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
Radius_edge_type
|
||||
|
|
@ -1425,8 +1421,7 @@ namespace CGAL {
|
|||
P2Pn = construct_vector(p2, pn);
|
||||
v2 = construct_cross_product(P2P1,P2Pn);
|
||||
|
||||
//pas necessaire de normer pour un bon echantillon:
|
||||
// on peut alors tester v1*v2 >= 0
|
||||
// no need to normalize for a correct sampling: one can then test v1*v2 >= 0
|
||||
norm = sqrt(norm1 * compute_scalar_product(v2,v2));
|
||||
pscal = v1*v2;
|
||||
// check if the triangle will produce a sliver on the surface
|
||||
|
|
@ -1437,7 +1432,8 @@ namespace CGAL {
|
|||
if (tmp < min_valueA)
|
||||
{
|
||||
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
|
||||
// whose cosinus is smaller than -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
|
||||
{
|
||||
min_facet = Facet(c, i); // !!! sans aucune signification....
|
||||
value = NOT_VALID_CANDIDATE; // Attention a ne pas inserer dans PQ
|
||||
min_facet = Facet(c, i); // !!! without any meaning....
|
||||
value = NOT_VALID_CANDIDATE; // Do not insert in the PQ
|
||||
}
|
||||
else
|
||||
{
|
||||
min_facet = min_facetA;
|
||||
|
||||
//si on considere seulement la pliure value appartient a [0, 2]
|
||||
//value = coord_type(1) - min_valueP;
|
||||
|
||||
// si la pliure est bonne on note suivant le alpha sinon on prend en compte la
|
||||
// pliure seule... pour discriminer entre les bons slivers...
|
||||
// si on veut discriminer les facettes de bonnes pliures plus finement
|
||||
// alors -(1+1/min_valueA) app a [-inf, -1]
|
||||
// -min_valueP app a [-1, 1]
|
||||
// If we only consider the fold value belongs to [0, 2]
|
||||
// value = coord_type(1) - min_valueP;
|
||||
|
||||
// If the fold is OK, we rate based on the alpha value. Otherwise, take only the fold into account
|
||||
// to discriminate between good slivers.
|
||||
//
|
||||
// If we wish to discriminate the facets with good folds more finely,
|
||||
// then:
|
||||
// -(1+1/min_valueA) is within [-inf, -1]
|
||||
// -min_valueP is within [-1, 1]
|
||||
//
|
||||
if (min_valueP > COS_BETA)
|
||||
value = -(coord_type(1) + coord_type(1)/min_valueA);
|
||||
else
|
||||
{
|
||||
//on refuse une trop grande non-uniformite
|
||||
// reject overly non-uniform values
|
||||
coord_type tmp = priority (*this, c, i);
|
||||
if (min_valueA <= K * tmp)
|
||||
value = - min_valueP;
|
||||
else
|
||||
{
|
||||
value = STANDBY_CANDIDATE; // tres mauvais candidat mauvaise pliure
|
||||
// + grand alpha... a traiter plus tard....
|
||||
min_K =
|
||||
(std::min)(min_K,
|
||||
min_valueA/tmp);
|
||||
value = STANDBY_CANDIDATE; // extremely bad candidate, bad fold + large alpha; handle later
|
||||
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
|
||||
test_merge(const Edge_like& ordered_key, const Border_elt& result,
|
||||
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));
|
||||
|
||||
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))
|
||||
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);
|
||||
|
||||
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),
|
||||
is_border_el2 = is_border_elt(ordered_el2, result2);
|
||||
|
|
@ -1782,8 +1777,7 @@ namespace CGAL {
|
|||
return FINAL_CASE;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
//on peut alors marquer v1 et on pourrait essayer de merger
|
||||
//sans faire de calcul inutile???
|
||||
// we can then mark v1 and could try to merge without any useless computation???
|
||||
if (is_border_el1)
|
||||
{
|
||||
Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
|
||||
|
|
@ -1796,7 +1790,7 @@ namespace CGAL {
|
|||
return EAR_CASE;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
//idem pour v2
|
||||
//idem for v2
|
||||
if (is_border_el2)
|
||||
{
|
||||
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
|
||||
// may be such as one vh has 2 successorson the same border...
|
||||
{
|
||||
// a ce niveau on peut tester si le recollement se fait en
|
||||
// maintenant la compatibilite d'orientation des bords (pour
|
||||
// surface orientable...) ou si elle est brisee...
|
||||
// at this level, we can test if glueing can be done while keeping
|
||||
// compatible orientations for the borders (for an orientable surface...)
|
||||
// or if it is broken
|
||||
Edge_incident_facet edge_Ifacet_1(Edge(c, i, edge_Efacet.first.second),
|
||||
edge_Efacet.second);
|
||||
Edge_incident_facet edge_Ifacet_2(Edge(c, i, edge_Efacet.first.third),
|
||||
|
|
@ -1884,8 +1878,8 @@ namespace CGAL {
|
|||
Border_elt result_ear2;
|
||||
|
||||
Edge_like ear1_e, ear2_e;
|
||||
// pour maintenir la reconstruction d'une surface orientable :
|
||||
// on verifie que les bords se recollent dans des sens opposes
|
||||
// to preserve the reconstruction of an orientable surface, we check that
|
||||
// borders glue to one another in opposite directions
|
||||
if (ordered_key.first==v1)
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
//maintient la surface orientable
|
||||
// preserves orientability of the surface
|
||||
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 ear1_valid(false), ear2_valid(false);
|
||||
|
|
@ -1931,8 +1925,7 @@ namespace CGAL {
|
|||
{
|
||||
Validation_case res = validate(ear1, e1.first);
|
||||
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
|
||||
std::cerr << "+++probleme de recollement : cas "
|
||||
<< res << std::endl;
|
||||
std::cerr << "+++issue in glueing: case " << res << std::endl;
|
||||
e2 = compute_value(edge_Ifacet_2);
|
||||
|
||||
if (ordered_key.first == v1)
|
||||
|
|
@ -1948,8 +1941,7 @@ namespace CGAL {
|
|||
{
|
||||
Validation_case res = validate(ear2, e2.first);
|
||||
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
|
||||
std::cerr << "+++probleme de recollement : cas "
|
||||
<< res << std::endl;
|
||||
std::cerr << "+++issue in glueing : case " << res << std::endl;
|
||||
e1 = compute_value(edge_Ifacet_1);
|
||||
|
||||
if (ordered_key.first == v1)
|
||||
|
|
@ -1962,25 +1954,23 @@ namespace CGAL {
|
|||
_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)
|
||||
{
|
||||
Validation_case res = validate(ear1, e1.first);
|
||||
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
|
||||
std::cerr << "+++probleme de recollement : cas "
|
||||
<< res << std::endl;
|
||||
std::cerr << "+++issue in glueing: case " << res << std::endl;
|
||||
}
|
||||
if (ear2_valid)
|
||||
{
|
||||
Validation_case res = validate(ear2, e2.first);
|
||||
if (!((res == EAR_CASE)||(res == FINAL_CASE)))
|
||||
std::cerr << "+++probleme de recollement : cas "
|
||||
<< res << std::endl;
|
||||
std::cerr << "+++issue in glueing : case " << 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)
|
||||
{
|
||||
_ordered_border.insert(Radius_ptr_type(e1.first, p1));
|
||||
|
|
@ -2020,7 +2010,7 @@ namespace CGAL {
|
|||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -2042,8 +2032,8 @@ namespace CGAL {
|
|||
void
|
||||
extend()
|
||||
{
|
||||
// initilisation de la variable globale K: qualite d'echantillonnage requise
|
||||
K = K_init; // valeur d'initialisation de K pour commencer prudemment...
|
||||
// Initialize the global variable K: required sampling quality
|
||||
K = K_init; // initial value of K to start carefully
|
||||
coord_type K_prev = K;
|
||||
|
||||
Vertex_handle v1, v2;
|
||||
|
|
@ -2052,7 +2042,7 @@ namespace CGAL {
|
|||
}
|
||||
do
|
||||
{
|
||||
min_K = infinity(); // pour retenir le prochain K necessaire pour progresser...
|
||||
min_K = infinity(); // to store the next K required to progress
|
||||
do
|
||||
{
|
||||
|
||||
|
|
@ -2095,7 +2085,7 @@ namespace CGAL {
|
|||
{
|
||||
new_candidate = compute_value(mem_Ifacet);
|
||||
if ((new_candidate != mem_e_it))
|
||||
// &&(new_candidate.first < NOT_VALID_CANDIDATE))
|
||||
// &&(new_candidate.first < NOT_VALID_CANDIDATE))
|
||||
{
|
||||
IO_edge_type* pnew =
|
||||
set_again_border_elt(key_tmp.first, key_tmp.second,
|
||||
|
|
@ -2111,8 +2101,7 @@ namespace CGAL {
|
|||
(_ordered_border.begin()->first < STANDBY_CANDIDATE_BIS));
|
||||
K_prev = K;
|
||||
K += (std::max)(K_step, min_K - K + eps);
|
||||
// on augmente progressivement le K mais on a deja rempli sans
|
||||
// faire des betises auparavant...
|
||||
// Progressively increase K, but having already filled without issue beforehand
|
||||
}
|
||||
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
|
||||
// de mettre a jour les valeurs rajoutees pour les cellules a la main...
|
||||
|
||||
// In theory, if the cell allocator were properly made, one would not need to manually update
|
||||
// the values added for the cells
|
||||
void
|
||||
re_init_for_free_cells_cache(const Vertex_handle& vh)
|
||||
{
|
||||
|
|
@ -2152,9 +2140,8 @@ namespace CGAL {
|
|||
int index = c->index(vh);
|
||||
Cell_handle neigh = c->neighbor(index);
|
||||
int n_ind = neigh->index(c);
|
||||
neigh->set_smallest_radius(n_ind, -1); // pour obliger le recalcul
|
||||
// si c est selectionnee c'est qu'elle est aussi le mem_IFacet renvoye par
|
||||
// compute_value... donc a swapper aussi
|
||||
neigh->set_smallest_radius(n_ind, -1); // forces recomputation
|
||||
// if c is selected, then it is also the mem_IFacet returned by compute_value... so to be swapped too
|
||||
if (c->is_selected_facet(index))
|
||||
{
|
||||
int fn = c->facet_number(index);
|
||||
|
|
@ -2214,8 +2201,8 @@ namespace CGAL {
|
|||
circ = next(circ);
|
||||
}
|
||||
while(circ.first.first != c);
|
||||
// si on passe par la, alors y a eu un probleme....
|
||||
std::cerr << "+++probleme dans la MAJ avant remove..." << std::endl;
|
||||
// if we are here, something went wrong
|
||||
std::cerr << "+++issue in the update before removal..." << std::endl;
|
||||
return Facet(c, start.second);
|
||||
}
|
||||
|
||||
|
|
@ -2237,7 +2224,7 @@ namespace CGAL {
|
|||
ordered_map_erase(border_elt.second.first.first,
|
||||
border_IO_elt(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);
|
||||
bool while_cond(true);
|
||||
do
|
||||
|
|
@ -2266,14 +2253,14 @@ namespace CGAL {
|
|||
{
|
||||
ordered_map_erase(result.first.first, border_IO_elt(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);
|
||||
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_succ, vh_int);
|
||||
|
||||
|
|
@ -2304,16 +2291,16 @@ namespace CGAL {
|
|||
bool
|
||||
create_singularity(const Vertex_handle& vh)
|
||||
{
|
||||
// Pour reperer le cas de triangle isole
|
||||
// To detect the isolated triangle case
|
||||
if (vh->is_on_border())
|
||||
{
|
||||
// vh sommet 0
|
||||
// vh vertex 0
|
||||
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());
|
||||
Vertex_handle vh_2 = border_elt.first;// sommet 2
|
||||
Vertex_handle vh_2 = border_elt.first;// vertex 2
|
||||
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;
|
||||
int 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;
|
||||
T.incident_vertices(vh, std::back_inserter(vh_list));
|
||||
|
||||
|
|
@ -2402,9 +2389,9 @@ namespace CGAL {
|
|||
|
||||
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);
|
||||
for(Finite_vertices_iterator v_it = T.finite_vertices_begin();
|
||||
|
|
@ -2445,7 +2432,7 @@ namespace CGAL {
|
|||
|
||||
std::size_t itmp, L_v_size_mem;
|
||||
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))
|
||||
{
|
||||
{
|
||||
|
|
@ -2460,7 +2447,7 @@ namespace CGAL {
|
|||
}
|
||||
#ifdef VERBOSE
|
||||
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
|
||||
re_compute_values();
|
||||
|
|
@ -2469,7 +2456,7 @@ namespace CGAL {
|
|||
postprocess_timer.stop();
|
||||
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())||
|
||||
((_size_before_postprocessing - T.number_of_vertices()) >
|
||||
.1 * _size_before_postprocessing)||
|
||||
|
|
@ -2479,7 +2466,6 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
min_K = infinity();
|
||||
// fin--
|
||||
// if (_postprocessing_counter < 5)
|
||||
// return true;
|
||||
postprocess_timer.stop();
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ namespace CGAL {
|
|||
else
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ typedef unspecified_type Type;
|
|||
/*!
|
||||
Tag indicating whether the associated type is real embeddable.
|
||||
|
||||
This is either \link Tag_true `Tag_true`\endlink or \link Tag_false `Tag_false`\endlink.
|
||||
This is either \link CGAL::Tag_true `Tag_true`\endlink or \link CGAL::Tag_false `Tag_false`\endlink.
|
||||
*/
|
||||
typedef unspecified_type Is_real_embeddable;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ int main(){
|
|||
typedef FT::Numerator_type Numerator_type;
|
||||
typedef FT::Denominator_type Denominator_type;
|
||||
|
||||
CGAL_static_assertion((boost::is_same<Numerator_type,CGAL::Gmpz>::value));
|
||||
CGAL_static_assertion((boost::is_same<Denominator_type,CGAL::Gmpz>::value));
|
||||
CGAL_static_assertion((std::is_same<Numerator_type,CGAL::Gmpz>::value));
|
||||
CGAL_static_assertion((std::is_same<Denominator_type,CGAL::Gmpz>::value));
|
||||
|
||||
Numerator_type numerator;
|
||||
Denominator_type denominator;
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ class Algebraic_structure_traits_base< Type_,
|
|||
typedef typename CT::Type Coercion_type_NT1_NT2;
|
||||
CGAL_USE_TYPE(Coercion_type_NT1_NT2);
|
||||
CGAL_static_assertion((
|
||||
::boost::is_same<Coercion_type_NT1_NT2 , Type >::value));
|
||||
::std::is_same<Coercion_type_NT1_NT2 , Type >::value));
|
||||
|
||||
typename Coercion_traits< NT1, NT2 >::Cast cast;
|
||||
operator()( cast(x), cast(y), q, r );
|
||||
|
|
|
|||
|
|
@ -23,19 +23,19 @@
|
|||
#define CGAL_COERCION_TRAITS_H 1
|
||||
|
||||
#include <iterator>
|
||||
#include <type_traits>
|
||||
|
||||
#include <CGAL/boost/iterator/transform_iterator.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <CGAL/tags.h>
|
||||
|
||||
// Makro to define an additional operator for binary functors which takes
|
||||
// Macro to define an additional operator for binary functors which takes
|
||||
// two number types as parameters that are interoperable with the
|
||||
// number type
|
||||
#define CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR_WITH_RT( NT, Result_type ) \
|
||||
template < class CT_Type_1, class CT_Type_2 > \
|
||||
Result_type operator()( const CT_Type_1& x, const CT_Type_2& y ) const { \
|
||||
CGAL_static_assertion((::boost::is_same< \
|
||||
CGAL_static_assertion((::std::is_same< \
|
||||
typename Coercion_traits< CT_Type_1, CT_Type_2 >::Type, NT \
|
||||
>::value)); \
|
||||
\
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class Parens_as_product_tag {};
|
|||
|
||||
/*! \ingroup NiX_io_parens
|
||||
* \brief decides whether this number requires parentheses
|
||||
* in case it appears within a produkt.
|
||||
* in case it appears within a product.
|
||||
*/
|
||||
template <class NT>
|
||||
struct Needs_parens_as_product{
|
||||
|
|
@ -37,7 +37,7 @@ struct Needs_parens_as_product{
|
|||
|
||||
/*! \ingroup NiX_io_parens
|
||||
* \brief decides whether this number requires parentheses
|
||||
* in case it appears within a produkt.
|
||||
* in case it appears within a product.
|
||||
*/
|
||||
template <class NT>
|
||||
inline bool needs_parens_as_product(const NT& x){
|
||||
|
|
|
|||
|
|
@ -21,7 +21,8 @@
|
|||
#include <CGAL/number_type_basic.h>
|
||||
#include <CGAL/Fraction_traits.h>
|
||||
#include <CGAL/is_convertible.h>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
@ -79,11 +80,11 @@ public:
|
|||
{ return make_rational(x.first, x.second); }
|
||||
|
||||
template<class N,class D>
|
||||
Rational make_rational(const N& n, const D& d,typename boost::enable_if_c<is_implicit_convertible<N,RT>::value&&is_implicit_convertible<D,RT>::value,int>::type=0) const
|
||||
Rational make_rational(const N& n, const D& d,std::enable_if_t<is_implicit_convertible<N,RT>::value&&is_implicit_convertible<D,RT>::value,int> = 0) const
|
||||
{ return Compose()(n,d); }
|
||||
|
||||
template<class N,class D>
|
||||
Rational make_rational(const N& n, const D& d,typename boost::enable_if_c<!is_implicit_convertible<N,RT>::value||!is_implicit_convertible<D,RT>::value,int>::type=0) const
|
||||
Rational make_rational(const N& n, const D& d,std::enable_if_t<!is_implicit_convertible<N,RT>::value||!is_implicit_convertible<D,RT>::value,int> = 0) const
|
||||
{ return n/d; } // Assume that n or d is already a fraction
|
||||
};
|
||||
}// namespace internal
|
||||
|
|
@ -92,9 +93,9 @@ public:
|
|||
template <class T>
|
||||
class Rational_traits
|
||||
: public internal::Rational_traits_base<T,
|
||||
::boost::is_same<typename Fraction_traits<T>::Is_fraction,Tag_true>::value
|
||||
::std::is_same<typename Fraction_traits<T>::Is_fraction,Tag_true>::value
|
||||
&&
|
||||
::boost::is_same<
|
||||
::std::is_same<
|
||||
typename Fraction_traits<T>::Numerator_type,
|
||||
typename Fraction_traits<T>::Denominator_type
|
||||
>::value >
|
||||
|
|
|
|||
|
|
@ -85,13 +85,13 @@ public:
|
|||
|
||||
// determine extractable scalar factor
|
||||
Scalar operator () (const NT& a) {
|
||||
CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value));
|
||||
CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value));
|
||||
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
||||
return scalar_factor(a, SAT());
|
||||
}
|
||||
// determine extractable scalar factor
|
||||
Scalar operator () (const NT& a, const Scalar& d) {
|
||||
CGAL_static_assertion(( ::boost::is_same< NT,Scalar >::value));
|
||||
CGAL_static_assertion(( ::std::is_same< NT,Scalar >::value));
|
||||
typedef typename Algebraic_structure_traits<NT>::Algebraic_category SAT;
|
||||
return scalar_factor(a,d,SAT());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
template <typename AdaptableFunctor, typename ResultType>
|
||||
void check_result_type(AdaptableFunctor, ResultType){
|
||||
typedef typename AdaptableFunctor::result_type result_type;
|
||||
CGAL_static_assertion((::boost::is_same<result_type,ResultType>::value));
|
||||
CGAL_static_assertion((::std::is_same<result_type,ResultType>::value));
|
||||
CGAL_USE_TYPE(result_type);
|
||||
}
|
||||
// check nothing for CGAL::Null_functor
|
||||
|
|
@ -123,11 +123,11 @@ void test_algebraic_structure_intern( const CGAL::Integral_domain_tag& ) {
|
|||
|
||||
using CGAL::Null_functor;
|
||||
CGAL_static_assertion(
|
||||
(!::boost::is_same< Integral_division, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Divides, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Is_zero, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Is_one, Null_functor >::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Square, Null_functor >::value));
|
||||
(!::std::is_same< Integral_division, Null_functor >::value));
|
||||
CGAL_static_assertion((!::std::is_same< Divides, Null_functor >::value));
|
||||
CGAL_static_assertion((!::std::is_same< Is_zero, Null_functor >::value));
|
||||
CGAL_static_assertion((!::std::is_same< Is_one, Null_functor >::value));
|
||||
CGAL_static_assertion((!::std::is_same< Square, Null_functor >::value));
|
||||
|
||||
// functor
|
||||
const Is_zero is_zero = Is_zero();
|
||||
|
|
@ -206,7 +206,7 @@ void test_algebraic_structure_intern(
|
|||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
using CGAL::Null_functor;
|
||||
CGAL_static_assertion((!::boost::is_same< Gcd, Null_functor>::value));
|
||||
CGAL_static_assertion((!::std::is_same< Gcd, Null_functor>::value));
|
||||
|
||||
const Gcd gcd = Gcd();
|
||||
assert( gcd( AS ( 0), AS ( 0)) == unit_normal( AS (0) ) );
|
||||
|
|
@ -268,9 +268,9 @@ void test_algebraic_structure_intern( const CGAL::Euclidean_ring_tag&) {
|
|||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
using CGAL::Null_functor;
|
||||
CGAL_static_assertion((!::boost::is_same< Div, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Mod, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Div_mod, Null_functor>::value));
|
||||
CGAL_static_assertion((!::std::is_same< Div, Null_functor>::value));
|
||||
CGAL_static_assertion((!::std::is_same< Mod, Null_functor>::value));
|
||||
CGAL_static_assertion((!::std::is_same< Div_mod, Null_functor>::value));
|
||||
|
||||
const Div div=Div();
|
||||
const Mod mod=Mod();
|
||||
|
|
@ -387,7 +387,7 @@ void test_algebraic_structure_intern( const CGAL::Field_with_sqrt_tag& ) {
|
|||
|
||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
CGAL_static_assertion((!::boost::is_same< Sqrt, Null_functor>::value));
|
||||
CGAL_static_assertion((!::std::is_same< Sqrt, Null_functor>::value));
|
||||
const Sqrt sqrt =Sqrt();
|
||||
AS a(4);
|
||||
|
||||
|
|
@ -614,10 +614,10 @@ class Test_is_square {
|
|||
CGAL_USE_TYPE(Second_argument_type);
|
||||
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS , First_argument_type>::value));
|
||||
( ::std::is_same< AS , First_argument_type>::value));
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS& , Second_argument_type>::value));
|
||||
//CGAL_static_assertion(( ::boost::is_same< bool , Result_type>::value));
|
||||
( ::std::is_same< AS& , Second_argument_type>::value));
|
||||
//CGAL_static_assertion(( ::std::is_same< bool , Result_type>::value));
|
||||
bool b = Result_type(true); CGAL_USE(b);
|
||||
|
||||
AS test_number = AS(3)*AS(3);
|
||||
|
|
@ -649,8 +649,8 @@ public:
|
|||
typedef typename Sqrt::result_type Result_type;
|
||||
CGAL_USE_TYPE(Argument_type);
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
CGAL_static_assertion(( ::boost::is_same< AS , Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same< AS , Result_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same< AS , Argument_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same< AS , Result_type>::value));
|
||||
typedef Algebraic_structure_traits<AS> AST;
|
||||
typedef typename AST::Is_exact Is_exact;
|
||||
assert( !Is_exact::value || AS (3) == sqrt( AS (9)));
|
||||
|
|
@ -676,11 +676,11 @@ public:
|
|||
CGAL_USE_TYPE(Second_argument_type);
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same<int, First_argument_type>::value));
|
||||
( ::std::is_same<int, First_argument_type>::value));
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS , Second_argument_type>::value));
|
||||
( ::std::is_same< AS , Second_argument_type>::value));
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< AS , Result_type>::value));
|
||||
( ::std::is_same< AS , Result_type>::value));
|
||||
AS epsilon(1);
|
||||
assert( test_equality_epsilon( AS (2),
|
||||
root( 4, AS (16) ), epsilon ) );
|
||||
|
|
@ -803,7 +803,7 @@ void test_algebraic_structure(){
|
|||
typedef CGAL::Algebraic_structure_traits< AS > AST;
|
||||
CGAL_SNAP_AST_FUNCTORS(AST);
|
||||
|
||||
CGAL_static_assertion((::boost::is_same<AS,typename AST::Type>::value));
|
||||
CGAL_static_assertion((::std::is_same<AS,typename AST::Type>::value));
|
||||
|
||||
typedef typename AST::Boolean Boolean;
|
||||
assert(!Boolean());
|
||||
|
|
@ -817,13 +817,13 @@ void test_algebraic_structure(){
|
|||
using CGAL::Null_functor;
|
||||
// Test for desired exactness
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same< typename AST::Is_exact, Is_exact >::value));
|
||||
( ::std::is_same< typename AST::Is_exact, Is_exact >::value));
|
||||
|
||||
CGAL_static_assertion(( ::boost::is_convertible< Tag,
|
||||
Integral_domain_without_division_tag >::value ));
|
||||
CGAL_static_assertion(( ::boost::is_same< Tag, Algebraic_category>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Simplify, Null_functor>::value));
|
||||
CGAL_static_assertion((!::boost::is_same< Unit_part, Null_functor>::value));
|
||||
CGAL_static_assertion(( ::std::is_same< Tag, Algebraic_category>::value));
|
||||
CGAL_static_assertion((!::std::is_same< Simplify, Null_functor>::value));
|
||||
CGAL_static_assertion((!::std::is_same< Unit_part, Null_functor>::value));
|
||||
const Simplify simplify=Simplify();;
|
||||
const Unit_part unit_part= Unit_part();
|
||||
|
||||
|
|
@ -944,7 +944,7 @@ void test_algebraic_structure( const AS & a, const AS & b, const AS & c) {
|
|||
typedef CGAL::Algebraic_structure_traits<AS> AST;
|
||||
typedef typename AST::Is_numerical_sensitive Is_numerical_sensitive;
|
||||
CGAL_static_assertion(
|
||||
!(::boost::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
|
||||
!(::std::is_same<Is_numerical_sensitive, CGAL::Null_tag>::value));
|
||||
CGAL_USE_TYPE(Is_numerical_sensitive);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -327,8 +327,8 @@ void test_implicit_interoperable_one_way() {
|
|||
typedef typename CT::Are_implicit_interoperable Are_implicit_interoperable;
|
||||
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||
assert((::boost::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||
(::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||
assert((::std::is_same<Are_implicit_interoperable, CGAL::Tag_true>::value));
|
||||
|
||||
typename CGAL::Real_embeddable_traits<C>::Is_real_embeddable is_real_embeddable;
|
||||
test_implicit_interoperable_for_real_embeddable<A,B>(is_real_embeddable);
|
||||
|
|
@ -346,9 +346,9 @@ void test_explicit_interoperable_one_way(){
|
|||
typedef typename CT::Cast Cast;
|
||||
typedef typename Cast::result_type result_type;
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<result_type,Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((::boost::is_same<Type,RT>::value));
|
||||
CGAL_static_assertion((::std::is_same<result_type,Type>::value));
|
||||
CGAL_static_assertion((::std::is_same< typename CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion((::std::is_same<Type,RT>::value));
|
||||
typename CT::Cast cast;
|
||||
|
||||
A a(3);
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ void test_fraction_traits(){
|
|||
typedef typename FT::Compose Compose;
|
||||
|
||||
CGAL_USE_TYPE(Is_fraction);
|
||||
CGAL_static_assertion( (::boost::is_same<Type,T>::value));
|
||||
CGAL_static_assertion( (::boost::is_same<Is_fraction,Tag_true>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Common_factor,Null_functor>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Decompose,Null_functor>::value));
|
||||
CGAL_static_assertion(!(::boost::is_same<Compose,Null_functor>::value));
|
||||
CGAL_static_assertion( (::std::is_same<Type,T>::value));
|
||||
CGAL_static_assertion( (::std::is_same<Is_fraction,Tag_true>::value));
|
||||
CGAL_static_assertion(!(::std::is_same<Common_factor,Null_functor>::value));
|
||||
CGAL_static_assertion(!(::std::is_same<Decompose,Null_functor>::value));
|
||||
CGAL_static_assertion(!(::std::is_same<Compose,Null_functor>::value));
|
||||
|
||||
|
||||
// Decompose
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ void test_rational_traits(){
|
|||
|
||||
typedef Rational_traits<Rational> Rational_traits;
|
||||
typedef typename Rational_traits::RT RT;
|
||||
CGAL_static_assertion((::boost::is_same<RT,RT>::value));
|
||||
CGAL_static_assertion((::std::is_same<RT,RT>::value));
|
||||
|
||||
assert( Rational_traits().numerator(x) == RT(7));
|
||||
assert( Rational_traits().denominator(x) == RT(2));
|
||||
|
|
@ -39,7 +39,7 @@ void test_rational_traits(){
|
|||
assert( Rational_traits().make_rational(std::make_pair(x,x)) == Rational(1));
|
||||
assert( Rational_traits().make_rational(std::make_pair(7,RT(2))) == x);
|
||||
|
||||
// gloabal function to_rational
|
||||
// global function to_rational
|
||||
x = CGAL::to_rational<Rational>(3.5);
|
||||
assert( x == Rational(7)/Rational(2));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ namespace CGAL {
|
|||
void operator() (const ToDouble& to_double) {
|
||||
typedef typename ToDouble::argument_type Argument_type;
|
||||
typedef typename ToDouble::result_type Result_type;
|
||||
CGAL_static_assertion(( ::boost::is_same<Type, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value));
|
||||
CGAL_USE_TYPE(Argument_type);
|
||||
CGAL_static_assertion(( ::boost::is_same<double, Result_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<double, Result_type>::value));
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
assert(42.0 == to_double(Type(42)));
|
||||
}
|
||||
|
|
@ -71,9 +71,9 @@ namespace CGAL {
|
|||
typedef typename To_interval::argument_type Argument_type;
|
||||
typedef typename To_interval::result_type Result_type;
|
||||
typedef std::pair<double,double> Interval_type;
|
||||
CGAL_static_assertion(( ::boost::is_same<Type, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<Type, Argument_type>::value));
|
||||
CGAL_USE_TYPE(Argument_type);
|
||||
CGAL_static_assertion(( ::boost::is_same<Interval_type, Result_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<Interval_type, Result_type>::value));
|
||||
CGAL_USE_TYPE(Result_type); CGAL_USE_TYPE(Interval_type);
|
||||
|
||||
// assert(NiX::in(42.0,to_Interval(Type(42))));
|
||||
|
|
@ -84,7 +84,7 @@ namespace CGAL {
|
|||
assert(to_interval(Type(42)).first > 41.99);
|
||||
assert(to_interval(Type(42)).second < 42.01);
|
||||
|
||||
// test neagtive numbers as well to catch obvious sign
|
||||
// test negative numbers as well to catch obvious sign
|
||||
// errors
|
||||
assert( -42.0 >= to_interval( -Type(42) ).first );
|
||||
assert( -42.0 <= to_interval( -Type(42) ).second );
|
||||
|
|
@ -139,7 +139,7 @@ void test_real_embeddable() {
|
|||
CGAL_SNAP_RET_FUNCTORS(RET);
|
||||
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
||||
using CGAL::Tag_true;
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_real_embeddable, Tag_true>::value));
|
||||
CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_true>::value));
|
||||
CGAL_USE_TYPE(Is_real_embeddable);
|
||||
|
||||
typedef typename RET::Boolean Boolean;
|
||||
|
|
@ -246,7 +246,7 @@ void test_not_real_embeddable() {
|
|||
typedef CGAL::Real_embeddable_traits<Type> RET;
|
||||
typedef typename RET::Is_real_embeddable Is_real_embeddable;
|
||||
using CGAL::Tag_false;
|
||||
CGAL_static_assertion(( ::boost::is_same< Is_real_embeddable, Tag_false>::value));
|
||||
CGAL_static_assertion(( ::std::is_same< Is_real_embeddable, Tag_false>::value));
|
||||
CGAL_USE_TYPE(Is_real_embeddable);
|
||||
}
|
||||
|
||||
|
|
@ -254,13 +254,13 @@ void test_not_real_embeddable() {
|
|||
//template <class Type, class CeilLog2Abs>
|
||||
//void test_rounded_log2_abs(Type zero, CGAL::Null_functor, CeilLog2Abs) {
|
||||
// typedef CGAL::Null_functor Null_functor;
|
||||
// CGAL_static_assertion(( ::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
// CGAL_static_assertion(( ::std::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
//}
|
||||
//
|
||||
//template <class Type, class FloorLog2Abs, class CeilLog2Abs>
|
||||
//void test_rounded_log2_abs(Type zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
||||
// typedef CGAL::Null_functor Null_functor;
|
||||
// CGAL_static_assertion((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
// CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
//
|
||||
// assert( fl_log(Type( 7)) == 2 );
|
||||
// assert( cl_log(Type( 7)) == 3 );
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ template< class Number_type >
|
|||
inline
|
||||
// select a Is_zero functor
|
||||
typename boost::mpl::if_c<
|
||||
::boost::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero,
|
||||
::std::is_same< typename Algebraic_structure_traits< Number_type >::Is_zero,
|
||||
Null_functor >::value ,
|
||||
typename Real_embeddable_traits< Number_type >::Is_zero,
|
||||
typename Algebraic_structure_traits< Number_type >::Is_zero
|
||||
|
|
@ -204,7 +204,7 @@ is_zero( const Number_type& x ) {
|
|||
// We take the Algebraic_structure_traits<>::Is_zero functor by default. If it
|
||||
// is not available, we take the Real_embeddable_traits functor
|
||||
typename ::boost::mpl::if_c<
|
||||
::boost::is_same<
|
||||
::std::is_same<
|
||||
typename Algebraic_structure_traits< Number_type >::Is_zero,
|
||||
Null_functor >::value ,
|
||||
typename Real_embeddable_traits< Number_type >::Is_zero,
|
||||
|
|
|
|||
|
|
@ -9,21 +9,21 @@ int main(){
|
|||
|
||||
typedef AET::Type Type;
|
||||
CGAL_USE_TYPE(Type);
|
||||
CGAL_static_assertion((::boost::is_same<int,Type>::value));
|
||||
CGAL_static_assertion((::std::is_same<int,Type>::value));
|
||||
|
||||
typedef AET::Is_extended Is_extended;
|
||||
CGAL_USE_TYPE(Is_extended);
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<CGAL::Tag_false,Is_extended>::value));
|
||||
(::std::is_same<CGAL::Tag_false,Is_extended>::value));
|
||||
|
||||
typedef AET::Normalization_factor Normalization_factor;
|
||||
{
|
||||
typedef Normalization_factor::argument_type argument_type;
|
||||
CGAL_USE_TYPE(argument_type);
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,int>::value));
|
||||
CGAL_static_assertion((::std::is_same<argument_type,int>::value));
|
||||
typedef Normalization_factor::result_type result_type;
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<result_type,int>::value));
|
||||
CGAL_static_assertion((::std::is_same<result_type,int>::value));
|
||||
Normalization_factor nfac;
|
||||
assert(nfac(3)==1);
|
||||
}
|
||||
|
|
@ -31,10 +31,10 @@ int main(){
|
|||
{
|
||||
typedef DFAI::argument_type argument_type;
|
||||
CGAL_USE_TYPE(argument_type);
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,int>::value));
|
||||
CGAL_static_assertion((::std::is_same<argument_type,int>::value));
|
||||
typedef DFAI::result_type result_type;
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<result_type,int>::value));
|
||||
CGAL_static_assertion((::std::is_same<result_type,int>::value));
|
||||
DFAI dfai;
|
||||
assert(dfai(3)==1);
|
||||
}
|
||||
|
|
@ -45,21 +45,21 @@ int main(){
|
|||
|
||||
typedef AET::Type Type;
|
||||
CGAL_USE_TYPE(Type);
|
||||
CGAL_static_assertion((::boost::is_same<EXT,Type>::value));
|
||||
CGAL_static_assertion((::std::is_same<EXT,Type>::value));
|
||||
|
||||
typedef AET::Is_extended Is_extended;
|
||||
CGAL_USE_TYPE(Is_extended);
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<CGAL::Tag_true,Is_extended>::value));
|
||||
(::std::is_same<CGAL::Tag_true,Is_extended>::value));
|
||||
|
||||
typedef AET::Normalization_factor Normalization_factor;
|
||||
{
|
||||
typedef Normalization_factor::argument_type argument_type;
|
||||
CGAL_USE_TYPE(argument_type);
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,EXT>::value));
|
||||
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value));
|
||||
typedef Normalization_factor::result_type result_type;
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<result_type,EXT>::value));
|
||||
CGAL_static_assertion((::std::is_same<result_type,EXT>::value));
|
||||
Normalization_factor nfac;
|
||||
assert(nfac(EXT(3))==1);
|
||||
assert(nfac(EXT(3,0,5))==1);
|
||||
|
|
@ -69,10 +69,10 @@ int main(){
|
|||
{
|
||||
typedef DFAI::argument_type argument_type;
|
||||
CGAL_USE_TYPE(argument_type);
|
||||
CGAL_static_assertion((::boost::is_same<argument_type,EXT>::value));
|
||||
CGAL_static_assertion((::std::is_same<argument_type,EXT>::value));
|
||||
typedef DFAI::result_type result_type;
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<result_type,EXT>::value));
|
||||
CGAL_static_assertion((::std::is_same<result_type,EXT>::value));
|
||||
DFAI dfai;
|
||||
assert(dfai(EXT(3))==1);
|
||||
assert(dfai(EXT(3,0,5))==1);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
typedef AST::NAME NAME; \
|
||||
CGAL_USE_TYPE(NAME); \
|
||||
CGAL_static_assertion( \
|
||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
(::std::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
|
@ -16,19 +16,19 @@ int main(){
|
|||
|
||||
typedef AST::Type Type;
|
||||
CGAL_USE_TYPE(Type);
|
||||
CGAL_static_assertion((::boost::is_same<void,Type>::value));
|
||||
CGAL_static_assertion((::std::is_same<void,Type>::value));
|
||||
|
||||
typedef AST::Algebraic_category Algebraic_category;
|
||||
CGAL_USE_TYPE(Algebraic_category);
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<CGAL::Null_tag,Algebraic_category>::value));
|
||||
(::std::is_same<CGAL::Null_tag,Algebraic_category>::value));
|
||||
|
||||
typedef AST::Is_exact Is_exact;
|
||||
CGAL_USE_TYPE(Is_exact);
|
||||
CGAL_static_assertion((::boost::is_same<CGAL::Null_tag,Is_exact>::value));
|
||||
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_exact>::value));
|
||||
typedef AST::Is_numerical_sensitive Is_sensitive;
|
||||
CGAL_USE_TYPE(Is_sensitive);
|
||||
CGAL_static_assertion((::boost::is_same<CGAL::Null_tag,Is_sensitive>::value));
|
||||
CGAL_static_assertion((::std::is_same<CGAL::Null_tag,Is_sensitive>::value));
|
||||
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Simplify);
|
||||
CGAL_IS_AST_NULL_FUNCTOR ( Unit_part);
|
||||
|
|
|
|||
|
|
@ -6,22 +6,22 @@ int main(){
|
|||
{
|
||||
typedef CGAL::Coercion_traits<int,int> CT;
|
||||
CGAL_USE_TYPE(CT);
|
||||
CGAL_static_assertion(( boost::is_same<CT::Type,int>::value));
|
||||
CGAL_static_assertion(( std::is_same<CT::Type,int>::value));
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_true>::value));
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_true>::value));
|
||||
assert( 5 == CT::Cast()(5));
|
||||
}
|
||||
{
|
||||
typedef CGAL::Coercion_traits<CGAL::Tag_true,CGAL::Tag_false> CT;
|
||||
CGAL_USE_TYPE(CT);
|
||||
// CGAL_static_assertion(( boost::is_same<CT::Type,CGAL::Null_type>::value));
|
||||
// CGAL_static_assertion(( std::is_same<CT::Type,CGAL::Null_type>::value));
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||
( std::is_same<CT::Are_implicit_interoperable,CGAL::Tag_false>::value));
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||
( std::is_same<CT::Are_explicit_interoperable,CGAL::Tag_false>::value));
|
||||
CGAL_static_assertion(
|
||||
( boost::is_same<CT::Cast,CGAL::Null_functor>::value));
|
||||
( std::is_same<CT::Cast,CGAL::Null_functor>::value));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
typedef RET::NAME NAME; \
|
||||
CGAL_USE_TYPE(NAME); \
|
||||
CGAL_static_assertion( \
|
||||
(::boost::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
(::std::is_same<CGAL::Null_functor,NAME>::value)); \
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
|
@ -16,11 +16,11 @@ int main(){
|
|||
|
||||
typedef RET::Type Type;
|
||||
CGAL_USE_TYPE(Type);
|
||||
CGAL_static_assertion((::boost::is_same<void,Type>::value));
|
||||
CGAL_static_assertion((::std::is_same<void,Type>::value));
|
||||
|
||||
typedef RET::Is_real_embeddable Is_real_embeddable;
|
||||
CGAL_USE_TYPE(Is_real_embeddable);
|
||||
CGAL_static_assertion((::boost::is_same<CGAL::Tag_false,Is_real_embeddable>::value));
|
||||
CGAL_static_assertion((::std::is_same<CGAL::Tag_false,Is_real_embeddable>::value));
|
||||
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Abs);
|
||||
CGAL_IS_RET_NULL_FUNCTOR(Sgn);
|
||||
|
|
|
|||
|
|
@ -7,33 +7,33 @@
|
|||
int main(){
|
||||
typedef CGAL::Scalar_factor_traits<int> SFT;
|
||||
CGAL_USE_TYPE(SFT);
|
||||
CGAL_static_assertion((::boost::is_same<int, SFT::Type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<int, SFT::Scalar>::value));
|
||||
CGAL_static_assertion((::std::is_same<int, SFT::Type>::value));
|
||||
CGAL_static_assertion((::std::is_same<int, SFT::Scalar>::value));
|
||||
|
||||
typedef SFT::Scalar_factor Scalar_factor;
|
||||
{
|
||||
typedef Scalar_factor::result_type result_type;
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<int, result_type>::value));
|
||||
CGAL_static_assertion((::std::is_same<int, result_type>::value));
|
||||
|
||||
typedef Scalar_factor::argument_type argument_type;
|
||||
CGAL_USE_TYPE(argument_type);
|
||||
CGAL_static_assertion((::boost::is_same<int, argument_type>::value));
|
||||
CGAL_static_assertion((::std::is_same<int, argument_type>::value));
|
||||
}
|
||||
typedef SFT::Scalar_div Scalar_div;
|
||||
{
|
||||
typedef Scalar_div::result_type result_type;
|
||||
CGAL_USE_TYPE(result_type);
|
||||
CGAL_static_assertion((::boost::is_same<void, result_type>::value));
|
||||
CGAL_static_assertion((::std::is_same<void, result_type>::value));
|
||||
|
||||
typedef Scalar_div::first_argument_type first_argument_type;
|
||||
CGAL_USE_TYPE(first_argument_type);
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<int&, first_argument_type>::value));
|
||||
(::std::is_same<int&, first_argument_type>::value));
|
||||
typedef Scalar_div::second_argument_type second_argument_type;
|
||||
CGAL_USE_TYPE(second_argument_type);
|
||||
CGAL_static_assertion(
|
||||
(::boost::is_same<int, second_argument_type>::value));
|
||||
(::std::is_same<int, second_argument_type>::value));
|
||||
}
|
||||
|
||||
int i;
|
||||
|
|
|
|||
|
|
@ -4,15 +4,13 @@ project(Algebraic_kernel_d_Examples)
|
|||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
||||
find_package(MPFI QUIET)
|
||||
|
||||
if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
|
||||
include(${MPFI_USE_FILE})
|
||||
include(CGAL_VersionUtils)
|
||||
create_single_source_cgal_program("Compare_1.cpp")
|
||||
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
|
||||
create_single_source_cgal_program("Isolate_1.cpp")
|
||||
create_single_source_cgal_program("Sign_at_1.cpp")
|
||||
create_single_source_cgal_program("Solve_1.cpp")
|
||||
else()
|
||||
message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.")
|
||||
message("NOTICE: This project requires the MPFI library and GMP support, and will not be compiled.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@
|
|||
#define CGAL_ALGEBRAIC_CURVE_KERNEL_D_2_H
|
||||
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <CGAL/iterator.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
|
|
@ -73,7 +73,7 @@ namespace CGAL {
|
|||
* in turn required by the \c CurvedKernelViaAnalysis_2 concept
|
||||
* (see the documentation of the corresponding package). Therefore,
|
||||
* 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).
|
||||
*
|
||||
* \b Algebraic_curve_kernel_2 is a template class, and needs a model
|
||||
|
|
@ -481,16 +481,16 @@ public:
|
|||
Curve_analysis_2 _construct_defining_polynomial_from(Bound b) const {
|
||||
typedef CGAL::Fraction_traits<Bound> FT;
|
||||
// We rely on the fact that the Bound is a fraction
|
||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction,
|
||||
CGAL::Tag_true>::value));
|
||||
typedef typename FT::Numerator_type Numerator;
|
||||
typedef typename FT::Denominator_type Denominator;
|
||||
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
CGAL_static_assertion((::std::is_same
|
||||
<Coefficient,
|
||||
typename Num_coercion::Type>::value));
|
||||
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
CGAL_static_assertion((::std::is_same
|
||||
<Coefficient,
|
||||
typename Denom_coercion::Type>::value));
|
||||
typename Num_coercion::Cast num_cast;
|
||||
|
|
@ -840,7 +840,7 @@ public:
|
|||
} else {
|
||||
// more work! We should not assume that each
|
||||
// roots[i].first has f or g as defining polynomial, because
|
||||
// the representation might have been simplifed
|
||||
// the representation might have been simplified
|
||||
|
||||
// Here's the safe way: Take the simpler of the curves
|
||||
// (but the one without vertical component!)
|
||||
|
|
@ -922,7 +922,7 @@ public:
|
|||
*
|
||||
* \attention{This method returns the y-coordinate in isolating interval
|
||||
* representation. Calculating such a representation is usually a time-
|
||||
* consuming taks, since it is against the "y-per-x"-view that we take
|
||||
* consuming task, since it is against the "y-per-x"-view that we take
|
||||
* in our kernel. Therefore, it is recommended, if possible,
|
||||
* to use the functors
|
||||
* \c Approximate_absolute_y_2 and \c Approximate_relative_y_2 that
|
||||
|
|
@ -2541,16 +2541,16 @@ public:
|
|||
Polynomial_1 operator() (const Polynomial_2& f, Bound b) const {
|
||||
typedef CGAL::Fraction_traits<Bound> FT;
|
||||
// We rely on the fact that the Bound is a fraction
|
||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction,
|
||||
CGAL::Tag_true>::value));
|
||||
typedef typename FT::Numerator_type Numerator;
|
||||
typedef typename FT::Denominator_type Denominator;
|
||||
typedef CGAL::Coercion_traits<Numerator,Coefficient> Num_coercion;
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
CGAL_static_assertion((::std::is_same
|
||||
<Coefficient,
|
||||
typename Num_coercion::Type>::value));
|
||||
typedef CGAL::Coercion_traits<Denominator,Coefficient> Denom_coercion;
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
CGAL_static_assertion((::std::is_same
|
||||
<Coefficient,
|
||||
typename Denom_coercion::Type>::value));
|
||||
typename Num_coercion::Cast num_cast;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class Algebraic_real_d_1 :
|
|||
|
||||
// currently Rational is the only supported Bound type.
|
||||
CGAL_static_assertion(
|
||||
( ::boost::is_same <Rational_,
|
||||
( ::std::is_same <Rational_,
|
||||
typename Get_arithmetic_kernel<Coefficient_>::Arithmetic_kernel::Rational>::value));
|
||||
|
||||
|
||||
|
|
@ -579,7 +579,7 @@ struct Coercion_traits<
|
|||
typedef Type result_type;
|
||||
Type operator()(const Type& a) const { return a; }
|
||||
Type operator()(const Coefficient& a) const {
|
||||
static const bool b = boost::is_same<Rational,typename CTCR::Type>::value;
|
||||
static const bool b = std::is_same<Rational,typename CTCR::Type>::value;
|
||||
return (*this)(a,Boolean_tag<b>());
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace internal {
|
|||
* @Unpublished{abbott-quadratic,
|
||||
* author = {John Abbott},
|
||||
* 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
|
||||
and Algebraic Computation (ISSAC 2006)}
|
||||
* }
|
||||
|
|
@ -494,7 +494,7 @@ public:
|
|||
}
|
||||
}
|
||||
};
|
||||
} // namepace internal
|
||||
} // namespace internal
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace internal {
|
|||
// sign_at_low_ = polynomial_.evaluate(low_)
|
||||
// x is the only root of polynomial_ in the open interval ]low_,high_[
|
||||
// low_ != x != high
|
||||
// ******************* EXEPTION *******************
|
||||
// ******************* EXCEPTION *******************
|
||||
// x is rational: in this case low=high=x
|
||||
|
||||
template< class Coefficient_, class Rational_>
|
||||
|
|
@ -135,7 +135,7 @@ protected:
|
|||
|
||||
// interval_option left out
|
||||
|
||||
// trys to set rational if degree is 1
|
||||
// tries to set rational if degree is 1
|
||||
typedef typename CGAL::Coercion_traits< Coefficient, Rational >::Type RET;
|
||||
set_rational(RET());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace internal {
|
|||
// sign_at_low_ = polynomial_.evaluate(low_)
|
||||
// x is the only root of polynomial_ in the open interval ]low_,high_[
|
||||
// low_ != x != high
|
||||
// ******************* EXEPTION *******************
|
||||
// ******************* EXCEPTION *******************
|
||||
// x is rational: in this case low=high=x
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1217,7 +1217,7 @@ public:
|
|||
*
|
||||
* The polynomial \c f must have exactly \c m real roots, counted without
|
||||
* multiplicity, and the degree of <tt>gcd(f,f')</tt> must be \c k. In this
|
||||
* case, the constructor either isolates the real roots of \c f sucessfully
|
||||
* case, the constructor either isolates the real roots of \c f successfully
|
||||
* or a Non_generic_position_exception is thrown. Such an exception
|
||||
* certainly occurs if \c f has more than one multiple real root. If \c f
|
||||
* has at most one multiple root over the complex numbers, the roots are
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ private:
|
|||
Integer_vector coeff_; // wrt [lower_, upper_], approximate
|
||||
int min_var_, max_var_;
|
||||
bool coeff_update_delayed_;
|
||||
// "state data" (copied en bloc by .copy_state_from())
|
||||
// "state data" (copied en block by .copy_state_from())
|
||||
long subdepth_bound_, subdepth_current_;
|
||||
long log_eps_; // $q - p$
|
||||
long log_C_eps_; // $q - p + 4n$
|
||||
|
|
|
|||
|
|
@ -534,7 +534,7 @@ private:
|
|||
long log_bdry_den_;
|
||||
Integer_vector coeff_; // wrt [lower_, upper_], approximate
|
||||
int min_var_, max_var_;
|
||||
// "state data" (copied en bloc by .copy_state_from())
|
||||
// "state data" (copied en block by .copy_state_from())
|
||||
long subdiv_tries_, subdiv_fails_;
|
||||
long recdepth_;
|
||||
long log_sep_, delta_log_sep_, log_eps_, log_C_eps_;
|
||||
|
|
@ -737,7 +737,7 @@ public:
|
|||
<b>Supplying a traits class</b>
|
||||
|
||||
This class is actually a class template.
|
||||
To use it, you need to instanciate it with a traits class
|
||||
To use it, you need to instantiate it with a traits class
|
||||
that defines the following three types and the various
|
||||
functors on them listed below.
|
||||
- \c Coefficient: The type of coefficients supplied
|
||||
|
|
@ -750,7 +750,7 @@ public:
|
|||
- \c Bound: \c lower() and \c upper() return
|
||||
interval boundaries in this type. Must be \c Assignable.
|
||||
The canonical choice is \c NiX::Exact_float_number<Integer>.
|
||||
If you never instanciate \c lower() and \c upper()
|
||||
If you never instantiate \c lower() and \c upper()
|
||||
(maybe use \c boundaries() instead), you might be lucky
|
||||
and get away with typedef'ing this to \c void.
|
||||
|
||||
|
|
@ -773,7 +773,7 @@ public:
|
|||
- \c Lower_bound_log2_abs: A \c UnaryFunction with signature
|
||||
<tt>long l = Lower_bound_log2_abs()(Coefficient x)</tt>.
|
||||
The result \c l must be a lower bound to log<sub>2</sub>(|<i>x</i>|).
|
||||
If \c Coefficient posesses \c NiX::NT_traits::Floor_log2_abs,
|
||||
If \c Coefficient possesses \c NiX::NT_traits::Floor_log2_abs,
|
||||
you can simply use that.
|
||||
- \c lower_bound_log2_abs_object(): A \c const member function
|
||||
taking no arguments and returning a function object
|
||||
|
|
|
|||
|
|
@ -20,13 +20,12 @@
|
|||
#include <vector>
|
||||
#include <set>
|
||||
#include <map>
|
||||
#include <type_traits>
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/type_traits/is_base_of.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/logical.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
|
@ -482,7 +481,7 @@ public:
|
|||
* \c internal::Zero_resultant_exception<Polynomial_2>,
|
||||
* instead of performing a shear.
|
||||
*
|
||||
* \Todo Currently the defualt strategy has been changed to SHEAR_STRATEGY
|
||||
* \Todo Currently the default strategy has been changed to SHEAR_STRATEGY
|
||||
* because there exist a problem if vertical asymtotes are present at
|
||||
* the rational x-coordinate.
|
||||
*/
|
||||
|
|
@ -1168,7 +1167,7 @@ public:
|
|||
|
||||
/*!
|
||||
* \brief returns the status line for the interval
|
||||
* preceeding the <tt>i</tt>th event
|
||||
* preceding the <tt>i</tt>th event
|
||||
*
|
||||
* Returns a status line for a reference x-coordinate of the <tt>i</tt>th
|
||||
* interval of the curve. If called multiple times for the same <tt>i</tt>,
|
||||
|
|
@ -1828,7 +1827,7 @@ private:
|
|||
static_cast<size_type>(lcoeff_roots.size()) &&
|
||||
event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
|
||||
// We have a root of the leading coefficient
|
||||
// of the primitve polynomial
|
||||
// of the primitive polynomial
|
||||
curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
|
||||
curr_event.mult_of_prim_lcoeff_root
|
||||
= lcoeff_mults[curr_lcoeff_index];
|
||||
|
|
@ -1868,7 +1867,7 @@ private:
|
|||
static_cast<size_type>(lcoeff_roots.size()) &&
|
||||
event_values[i]==lcoeff_roots[curr_lcoeff_index]) {
|
||||
// We have a root of the leading coefficient
|
||||
// of the primitve polynomial
|
||||
// of the primitive polynomial
|
||||
curr_event.index_of_prim_lcoeff_root = curr_lcoeff_index;
|
||||
curr_event.mult_of_prim_lcoeff_root
|
||||
= lcoeff_mults[curr_lcoeff_index];
|
||||
|
|
|
|||
|
|
@ -328,7 +328,7 @@ private:
|
|||
return false;
|
||||
return (P[0] != Coeff__(0) && P.evaluate(Coeff__(1)) != Coeff__(0));
|
||||
}
|
||||
//! Descartes algoritm to determine isolating intervals for the roots
|
||||
//! Descartes algorithm to determine isolating intervals for the roots
|
||||
//! lying in the interval (0,1).
|
||||
// The parameters $(i,D)$ describe the interval $(i/2^D, (i+1)/2^D)$.
|
||||
// Here $0\leq i < 2^D$.
|
||||
|
|
@ -389,7 +389,7 @@ private:
|
|||
}
|
||||
|
||||
|
||||
//! Strong Descartes algoritm to determine isolating intervals for the
|
||||
//! Strong Descartes algorithm to determine isolating intervals for the
|
||||
//! roots lying in the interval (0,1), where the first
|
||||
//! derivative have no sign change. \pre $P$ has only one root in the
|
||||
//! interval given by $(i,D)$.
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ public:
|
|||
* curve.
|
||||
*
|
||||
* Additionally, the \c id of the event line to be created has to be
|
||||
* specfied, and
|
||||
* specified, and
|
||||
* the number of arcs that are entering from the left and leaving to the
|
||||
* right are needed. Furthermore, the flag \c root_of_resultant tells
|
||||
* whether \c alpha is a root of the resultant of the specified curve, and
|
||||
|
|
@ -314,7 +314,7 @@ protected:
|
|||
*
|
||||
* If the first elements in the sequence are known to be zero,
|
||||
* \c first_elements_zero can be set accordingly. The zero test is then
|
||||
* ommitted for that leading elements.
|
||||
* omitted for that leading elements.
|
||||
*/
|
||||
template<typename InputIterator>
|
||||
std::pair<int,int> compute_mk(Algebraic_real_1 alpha,
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace CGAL {
|
|||
|
||||
namespace internal {
|
||||
|
||||
// Don't define default, results in more convinient compiler messages
|
||||
// Don't define default, results in more convenient compiler messages
|
||||
template< class Type > class Float_traits;
|
||||
// {
|
||||
// public:
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace internal {
|
|||
// TODO: Implement array in source code file
|
||||
// extern const signed char floor_log2_4bit[16]; // see src/floor_log2_4bit.C
|
||||
|
||||
// Don't define default, results in more convinient compiler messages
|
||||
// Don't define default, results in more convenient compiler messages
|
||||
template< class Type > class Real_embeddable_extension;
|
||||
// {
|
||||
// public:
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ public:
|
|||
}
|
||||
|
||||
/*!\brief
|
||||
* constructs from a given represenation
|
||||
* constructs from a given representation
|
||||
*/
|
||||
Status_line_CA_1(Rep rep) :
|
||||
Base(rep) {
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ public:
|
|||
|
||||
protected:
|
||||
/*!\brief
|
||||
* constructs from a given represenation
|
||||
* constructs from a given representation
|
||||
*/
|
||||
Status_line_CPA_1(Rep rep) :
|
||||
Base(rep) {
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ public:
|
|||
}
|
||||
|
||||
/*!\brief
|
||||
* constructs a point from a given represenation
|
||||
* constructs a point from a given representation
|
||||
*/
|
||||
Xy_coordinate_2(Rep rep) :
|
||||
Base(rep) {
|
||||
|
|
@ -254,7 +254,7 @@ public:
|
|||
/*!
|
||||
* \brief y-coordinate of this point
|
||||
*
|
||||
* Note: In general, this method results in a extremly large polynomial
|
||||
* Note: In general, this method results in a extremely large polynomial
|
||||
* for the y-coordinate. It is recommended to use it carefully,
|
||||
* and using get_approximation_y() instead whenever approximations suffice.
|
||||
*/
|
||||
|
|
@ -762,7 +762,7 @@ std::istream& operator >> (
|
|||
|
||||
is >> arcno;
|
||||
|
||||
// read the ")
|
||||
// read the ")"
|
||||
swallow(is, ')');
|
||||
|
||||
pt = Xy_coordinate_2(x, curve, arcno);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ template<typename AlgebraicKernel_1> typename AlgebraicKernel_1::Bound
|
|||
}
|
||||
|
||||
/*!
|
||||
* \brief finds a Rational value rightt of an Algebraic real alpha
|
||||
* \brief finds a Rational value right of an Algebraic real alpha
|
||||
*/
|
||||
template<typename AlgebraicKernel_1> typename AlgebraicKernel_1::Bound
|
||||
bound_right_of(const AlgebraicKernel_1* kernel,
|
||||
|
|
@ -187,7 +187,7 @@ template<typename AlgebraicKernel_1,
|
|||
InputIterator end,
|
||||
OutputIterator output) {
|
||||
CGAL_static_assertion
|
||||
((::boost::is_same
|
||||
((::std::is_same
|
||||
<typename AlgebraicKernel_1::Algebraic_real_1,
|
||||
typename std::iterator_traits<InputIterator>::value_type >::value));
|
||||
|
||||
|
|
@ -224,12 +224,12 @@ template<typename Poly_coer_1,typename Polynomial_1>
|
|||
void cast_back_utcf(const Poly_coer_1& p,Polynomial_1& q) {
|
||||
// We can assume that both template arguments are polynomial types
|
||||
typedef CGAL::Fraction_traits<Poly_coer_1> FT;
|
||||
CGAL_static_assertion((::boost::is_same<typename FT::Is_fraction,
|
||||
CGAL_static_assertion((::std::is_same<typename FT::Is_fraction,
|
||||
CGAL::Tag_true>::value));
|
||||
typedef typename FT::Numerator_type Numerator;
|
||||
typedef typename FT::Denominator_type Denominator;
|
||||
typedef CGAL::Coercion_traits<Numerator,Polynomial_1> Num_coercion;
|
||||
CGAL_static_assertion((::boost::is_same
|
||||
CGAL_static_assertion((::std::is_same
|
||||
<Polynomial_1,
|
||||
typename Num_coercion::Type>::value));
|
||||
Numerator p_num;
|
||||
|
|
|
|||
|
|
@ -87,10 +87,10 @@
|
|||
* (i.e., vertical cusps, isolated points on arcs), and usual regular points.
|
||||
* The candidate point on each status line can be checked for being singular
|
||||
* using this flag. This gives additional information but increases
|
||||
* compuation time
|
||||
* computation time
|
||||
*
|
||||
* WARNING: Currently, the status line does not store the additional
|
||||
* information whether a point is singluar or not.
|
||||
* information whether a point is singular or not.
|
||||
* Therefore, there is currently no reasons to set this flag. It is still
|
||||
* contained for possible further extension of the status line.
|
||||
*/
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
/**
|
||||
* The algorithm can also handle non-y-regular curves without shearing,
|
||||
* in case that the resultant multiplicity at vertical asymptotes is one.
|
||||
* This special treatement can be switched off by setting this flag.
|
||||
* This special treatment can be switched off by setting this flag.
|
||||
* It is not recommended to do this because of efficiency
|
||||
*/
|
||||
#ifndef CGAL_ACK_SHEAR_ALL_NOT_Y_REGULAR_CURVES
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
void operator()( Type& t, int rel_prec ) const {
|
||||
// If t is zero, we can refine the interval to
|
||||
// infinite precission
|
||||
// infinite precision
|
||||
if( CGAL::is_zero( t ) ) {
|
||||
t = Type(0);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace RS_AK1{
|
|||
// Refiner_()(const Polynomial_&,Bound_&,Bound_&,int p);
|
||||
//
|
||||
// The fourth template argument is a comparator, a function object that
|
||||
// receives the polynomials and bounds defining two algebraic numbres and
|
||||
// receives the polynomials and bounds defining two algebraic numbers and
|
||||
// just compares them, returning a CGAL::Comparison_result. The signature
|
||||
// of a comparator must be:
|
||||
// CGAL::Comparison_result
|
||||
|
|
|
|||
|
|
@ -29,8 +29,7 @@
|
|||
// the version of MPFR is one of those buggy versions, abort the compilation
|
||||
// and instruct the user to update MPFR or don't use RS3.
|
||||
#ifdef CGAL_USE_RS3
|
||||
#include <boost/static_assert.hpp>
|
||||
BOOST_STATIC_ASSERT_MSG(
|
||||
static_assert(
|
||||
MPFR_VERSION_MAJOR!=3 ||
|
||||
MPFR_VERSION_MINOR!=1 ||
|
||||
MPFR_VERSION_PATCHLEVEL<3 || MPFR_VERSION_PATCHLEVEL>6,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include <CGAL/Gmpfi.h>
|
||||
#include <CGAL/Polynomial_traits_d.h>
|
||||
#include "exact_signat_1.h"
|
||||
//#include <boost/mpl/assert.hpp>
|
||||
#include <gmp.h>
|
||||
|
||||
namespace CGAL{
|
||||
|
|
@ -40,7 +39,7 @@ Signat_1<Polynomial_,Bound_>::operator()(const Bound_ &x)const{
|
|||
//typedef Algebraic_structure_traits<Bound> AStraits;
|
||||
// This generic signat works only when Bound_ is an exact type. For
|
||||
// non-exact types, an implementation must be provided.
|
||||
//BOOST_MPL_ASSERT((boost::is_same<AStraits::Is_exact,Tag_true>));
|
||||
//static_assert(std::is_same<AStraits::Is_exact,Tag_true>::value);
|
||||
int d=Degree()(pol);
|
||||
Bound h(pol[d]);
|
||||
for(int i=1;i<=d;++i)
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// code coverage test for Algebraic_curve_kernel_2
|
||||
|
||||
#define CGAL_ACK_DEBUG_FLAG 0
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// Test of Algebraic_kernel
|
||||
|
||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// Test of Algebraic_kernel
|
||||
|
||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// Test of Algebraic_kernel
|
||||
|
||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// Test of Algebraic_kernel
|
||||
|
||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// Test of Algebraic_kernel
|
||||
|
||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// Test of Algebraic_kernel
|
||||
|
||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Sebastian Limbach <slimbach@mpi-inf.mpg.de>
|
||||
// Michael Hemmer <hemmer@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// Test of Algebraic_kernel
|
||||
|
||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// code coverage test for Algebraic_curve_kernel_2
|
||||
|
||||
// #define CGAL_ACK_DEBUG_FLAG 1
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) :
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||
// they may be wrong now.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) :
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||
// they may be wrong now.
|
||||
|
||||
|
|
|
|||
|
|
@ -4,48 +4,33 @@ project(Algebraic_kernel_d_Tests)
|
|||
# CGAL and its components
|
||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||
|
||||
find_package(RS3 QUIET)
|
||||
|
||||
find_package(MPFI QUIET)
|
||||
if(MPFI_FOUND)
|
||||
message(STATUS "Found MPFI")
|
||||
include(${MPFI_USE_FILE})
|
||||
endif()
|
||||
|
||||
find_package(RS3 QUIET)
|
||||
if(RS3_FOUND)
|
||||
message(STATUS "Found RS3")
|
||||
include(${RS3_USE_FILE})
|
||||
endif()
|
||||
|
||||
# Boost and its components
|
||||
find_package(Boost)
|
||||
|
||||
if(NOT Boost_FOUND)
|
||||
|
||||
message(
|
||||
STATUS "This project requires the Boost library, and will not be compiled.")
|
||||
|
||||
return()
|
||||
|
||||
endif()
|
||||
|
||||
# include for local directory
|
||||
include_directories(BEFORE include)
|
||||
|
||||
# Creating entries for all .cpp/.C files with "main" routine
|
||||
# ##########################################################
|
||||
|
||||
create_single_source_cgal_program("cyclic.cpp")
|
||||
create_single_source_cgal_program("Descartes.cpp")
|
||||
|
||||
if(NOT CGAL_DISABLE_GMP)
|
||||
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
|
||||
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
|
||||
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
||||
create_single_source_cgal_program(
|
||||
"Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
|
||||
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
|
||||
|
|
@ -54,14 +39,13 @@ if(NOT CGAL_DISABLE_GMP)
|
|||
create_single_source_cgal_program("Curve_analysis_2.cpp")
|
||||
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
|
||||
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
|
||||
|
||||
if(RS_FOUND)
|
||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
|
||||
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
|
||||
else()
|
||||
message(
|
||||
STATUS
|
||||
"NOTICE: Some tests require the RS library, and will not be compiled.")
|
||||
message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.")
|
||||
message(STATUS "NOTICE: Some tests require GMP support, and will not be compiled.")
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/config.h>
|
||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/config.h>
|
||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) :
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||
// they may be wrong now.
|
||||
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
typedef typename Floor::result_type Result_type;
|
||||
CGAL_USE_TYPE(Argument_type);
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<Integer, Result_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<Integer, Result_type>::value));
|
||||
assert(Integer(42) == floor(NT(42)));
|
||||
assert(Integer(-42) == floor(NT(-42)));
|
||||
}
|
||||
|
|
@ -59,8 +59,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
typedef typename Floor_log2_abs::result_type Result_type;
|
||||
CGAL_USE_TYPE(Argument_type);
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<long, Result_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<long, Result_type>::value));
|
||||
|
||||
assert(long(0) == floor_log2_abs(NT(1)));
|
||||
assert(long(0) == floor_log2_abs(NT(-1)));
|
||||
|
|
@ -86,8 +86,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
typedef typename Ceil::result_type Result_type;
|
||||
CGAL_USE_TYPE(Argument_type);
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<Integer, Result_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<Integer, Result_type>::value));
|
||||
assert(Integer(42) == ceil(NT(42)));
|
||||
assert(Integer(-42) == ceil(NT(-42)));
|
||||
}
|
||||
|
|
@ -98,8 +98,8 @@ void test_real_embeddable_extension(const NT_&){
|
|||
typedef typename Ceil_log2_abs::result_type Result_type;
|
||||
CGAL_USE_TYPE(Argument_type);
|
||||
CGAL_USE_TYPE(Result_type);
|
||||
CGAL_static_assertion(( ::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::boost::is_same<long, Result_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion(( ::std::is_same<long, Result_type>::value));
|
||||
|
||||
assert(long(0) == ceil_log2_abs(NT(1)));
|
||||
assert(long(0) == ceil_log2_abs(NT(-1)));
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
// TODO: Add licence
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL:$
|
||||
// $Id: $
|
||||
//
|
||||
//
|
||||
// Author(s) : Michael Kerber <mkerber@mpi-inf.mpg.de>
|
||||
//
|
||||
// ============================================================================
|
||||
|
||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||
|
||||
#include <vector>
|
||||
|
|
|
|||
|
|
@ -62,18 +62,18 @@ void test_algebraic_curve_kernel_2() {
|
|||
|
||||
typedef AlgebraicCurveKernel_2 AK_2;
|
||||
|
||||
/* CGAL_static_assertion( (::boost::is_same<
|
||||
/* CGAL_static_assertion( (::std::is_same<
|
||||
Algebraic_real_1, typename AK::Algebraic_real_1 >::value) );
|
||||
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
CGAL_static_assertion((::std::is_same<
|
||||
Isolator,
|
||||
typename AK::Isolator >::value) );
|
||||
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
CGAL_static_assertion((::std::is_same<
|
||||
Coefficient,
|
||||
typename AK::Coefficient >::value));
|
||||
|
||||
CGAL_static_assertion((::boost::is_same<
|
||||
CGAL_static_assertion((::std::is_same<
|
||||
Polynomial_1,
|
||||
typename AK::Polynomial_1 >::value));*/
|
||||
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
typedef typename Name::result_type RT_; \
|
||||
CGAL_USE_TYPE(AT_); \
|
||||
CGAL_USE_TYPE(RT_); \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT,AT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<AT,AT_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
||||
{ \
|
||||
|
|
@ -120,9 +120,9 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
|
|||
CGAL_USE_TYPE(AT1_); \
|
||||
CGAL_USE_TYPE(AT2_); \
|
||||
CGAL_USE_TYPE(RT_); \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT1,AT1_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT2,AT2_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<AT1,AT1_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<AT2,AT2_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
|
||||
// TODO: missing check for Construct_algebraic_real_1
|
||||
|
|
|
|||
|
|
@ -93,8 +93,8 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
|||
typedef typename Name::result_type RT_; \
|
||||
CGAL_USE_TYPE(AT_); \
|
||||
CGAL_USE_TYPE(RT_); \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT,AT_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<AT,AT_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
#define CGAL_CHECK_BFUNCTION(Name,AT1,AT2,RT) \
|
||||
{ \
|
||||
|
|
@ -104,13 +104,13 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
|||
CGAL_USE_TYPE(AT1_); \
|
||||
CGAL_USE_TYPE(AT2_); \
|
||||
CGAL_USE_TYPE(RT_); \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT1,AT1_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<AT2,AT2_>::value));} \
|
||||
{CGAL_static_assertion(( ::boost::is_same<RT,RT_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<AT1,AT1_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<AT2,AT2_>::value));} \
|
||||
{CGAL_static_assertion(( ::std::is_same<RT,RT_>::value));} \
|
||||
}
|
||||
|
||||
|
||||
CGAL_static_assertion(( ::boost::is_same
|
||||
CGAL_static_assertion(( ::std::is_same
|
||||
<Algebraic_real_2,
|
||||
typename Construct_algebraic_real_2::result_type>
|
||||
::value));
|
||||
|
|
@ -118,7 +118,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
|||
CGAL_CHECK_UFUNCTION(Make_square_free_2,Polynomial_2,Polynomial_2);
|
||||
// TODO: missing check for Square_free_factorize_2
|
||||
CGAL_CHECK_BFUNCTION(Is_coprime_2,Polynomial_2,Polynomial_2,bool);
|
||||
CGAL_static_assertion(( ::boost::is_same
|
||||
CGAL_static_assertion(( ::std::is_same
|
||||
<bool,typename Make_coprime_2::result_type>::value));
|
||||
CGAL_CHECK_BFUNCTION(Number_of_solutions_2,Polynomial_2,Polynomial_2,
|
||||
size_type);
|
||||
|
|
@ -128,7 +128,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
|
|||
CGAL_CHECK_UFUNCTION(Compute_polynomial_y_2,Algebraic_real_2,Polynomial_1);
|
||||
CGAL_CHECK_BFUNCTION(Isolate_x_2,Algebraic_real_2,Polynomial_1,BInterval);
|
||||
CGAL_CHECK_BFUNCTION(Isolate_y_2,Algebraic_real_2,Polynomial_1,BInterval);
|
||||
CGAL_static_assertion(( ::boost::is_same
|
||||
CGAL_static_assertion(( ::std::is_same
|
||||
< BArray,typename Isolate_2::result_type>::value));
|
||||
CGAL_CHECK_BFUNCTION(Sign_at_2,Polynomial_2,Algebraic_real_2,Sign);
|
||||
CGAL_CHECK_BFUNCTION(Is_zero_at_2,Polynomial_2,Algebraic_real_2,bool);
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ namespace internal {
|
|||
void operator() (ToDouble to_double) {
|
||||
typedef typename ToDouble::argument_type Argument_type;
|
||||
typedef typename ToDouble::result_type Result_type;
|
||||
CGAL_static_assertion((::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same<double, Result_type>::value));
|
||||
CGAL_static_assertion((::std::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion((::std::is_same<double, Result_type>::value));
|
||||
assert(42.0 == to_double(NT(42)));
|
||||
}
|
||||
};
|
||||
|
|
@ -59,8 +59,8 @@ namespace internal {
|
|||
void operator() (ToInterval to_Interval) {
|
||||
typedef typename ToInterval::argument_type Argument_type;
|
||||
typedef typename ToInterval::result_type Result_type;
|
||||
CGAL_static_assertion((::boost::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion((::boost::is_same< typename Argument_type::Interval, Result_type>::value));
|
||||
CGAL_static_assertion((::std::is_same<NT, Argument_type>::value));
|
||||
CGAL_static_assertion((::std::is_same< typename Argument_type::Interval, Result_type>::value));
|
||||
|
||||
// TODO: NiX::in not available!?
|
||||
//assert(NiX::in(42.0,to_Interval(NT(42))));
|
||||
|
|
@ -99,7 +99,7 @@ void test_real_comparable() {
|
|||
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
||||
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
||||
using ::CGAL::Tag_true;
|
||||
CGAL_static_assertion((::boost::is_same< Is_real_comparable, Tag_true>::value));
|
||||
CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_true>::value));
|
||||
typename Traits::Compare compare;
|
||||
typename Traits::Sign sign;
|
||||
typename Traits::Abs abs;
|
||||
|
|
@ -168,20 +168,20 @@ void test_not_real_comparable() {
|
|||
typedef CGAL::Real_embeddable_traits<NT> Traits;
|
||||
typedef typename Traits::Is_real_embeddable Is_real_comparable;
|
||||
using ::CGAL::Tag_false;
|
||||
CGAL_static_assertion((::boost::is_same< Is_real_comparable, Tag_false>::value));
|
||||
CGAL_static_assertion((::std::is_same< Is_real_comparable, Tag_false>::value));
|
||||
}
|
||||
|
||||
|
||||
template <class NT, class CeilLog2Abs>
|
||||
void test_rounded_log2_abs(NT zero, ::CGAL::Null_functor, CeilLog2Abs) {
|
||||
typedef ::CGAL::Null_functor Nulltype;
|
||||
CGAL_static_assertion((::boost::is_same< CeilLog2Abs, Nulltype>::value));
|
||||
CGAL_static_assertion((::std::is_same< CeilLog2Abs, Nulltype>::value));
|
||||
}
|
||||
|
||||
template <class NT, class FloorLog2Abs, class CeilLog2Abs>
|
||||
void test_rounded_log2_abs(NT zero, FloorLog2Abs fl_log, CeilLog2Abs cl_log) {
|
||||
typedef ::CGAL::Null_functor Null_functor;
|
||||
CGAL_static_assertion((!::boost::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
CGAL_static_assertion((!::std::is_same< CeilLog2Abs, Null_functor>::value));
|
||||
|
||||
assert( fl_log(NT( 7)) == 2 );
|
||||
assert( cl_log(NT( 7)) == 3 );
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ void test_real_root_isolator() {
|
|||
assert( n == number_of_roots);
|
||||
}{
|
||||
//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);
|
||||
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));
|
||||
}{
|
||||
//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 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));
|
||||
}{
|
||||
//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
|
||||
|
||||
NT z(0);
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@
|
|||
|
||||
|
||||
#include <iostream>
|
||||
#include <type_traits>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
#include <CGAL/Root_of_traits.h>
|
||||
#include <CGAL/Handle_for.h>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace CGAL {
|
|||
typedef typename AK::Polynomial_1_3 Polynomial_1_3;
|
||||
// The degenerated cases are 2 tangent spheres
|
||||
// os 2 non-intersecting spheres
|
||||
// beacause we cannot have infinitely many solutions
|
||||
// because we cannot have infinitely many solutions
|
||||
if(e1 == e2) {
|
||||
if(tangent<AK>(e1,e3)) {
|
||||
Polynomial_1_3 p = plane_from_2_spheres<AK>(e1,e3);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ how to convert from the camouflaged `CGAL::Point_3` to the two-dimensional point
|
|||
of `CGAL::Simple_cartesian<NT>`. In this case, a partial specialization of `Cartesian_converter`
|
||||
must be provided by the user. An example of such specialization is given in the example
|
||||
\ref Alpha_shapes_2/ex_alpha_projection_traits.cpp "ex_alpha_projection_traits.cpp".
|
||||
<li>The tag `ExactAlphaComparisonTag` cannot be used in conjonction with periodic triangulations.
|
||||
<li>The tag `ExactAlphaComparisonTag` cannot be used in conjunction with periodic triangulations.
|
||||
When the tag `ExactAlphaComparisonTag` is set to \link Tag_true `Tag_true`\endlink,
|
||||
the evaluations of predicates such as `Side_of_oriented_circle_2` are done lazily.
|
||||
Consequently, the predicates store pointers to the geometrical positions of the
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
\cgalPkgDescriptionBegin{2D Alpha Shapes,PkgAlphaShapes2}
|
||||
\cgalPkgPicture{alpha-detail.png}
|
||||
\cgalPkgSummaryBegin
|
||||
\cgalPkgAuthors{Tran Kai Frank Da}
|
||||
\cgalPkgAuthor{Tran Kai Frank Da}
|
||||
\cgalPkgDesc{This package offers a data structure encoding the whole family of alpha-complexes related to a given 2D Delaunay or regular triangulation. In particular, the data structure allows to retrieve the alpha-complex for any alpha value, the whole spectrum of critical alpha values and a filtration on the triangulation faces (this filtration is based on the first alpha value for which each face is included on the alpha-complex).}
|
||||
\cgalPkgManuals{Chapter_2D_Alpha_Shapes,PkgAlphaShapes2Ref}
|
||||
\cgalPkgSummaryEnd
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/basic.h>
|
||||
#include <CGAL/triangulation_assertions.h>
|
||||
#include <CGAL/Unique_hash_map.h>
|
||||
#include <CGAL/utility.h>
|
||||
|
||||
|
|
@ -58,13 +57,13 @@ public:
|
|||
typedef typename Dt::Geom_traits Gt;
|
||||
typedef typename Dt::Triangulation_data_structure Tds;
|
||||
|
||||
// The Exact Comparison Tag cannot be used in conjonction with periodic triangulations
|
||||
// The Exact Comparison Tag cannot be used in conjunction with periodic triangulations
|
||||
// because the periodic triangulations' point() function returns a temporary
|
||||
// value while the lazy predicate evaluations that are used when the Exact tag
|
||||
// is set to true rely on a permanent and safe access to the points.
|
||||
CGAL_static_assertion(
|
||||
(boost::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
|
||||
(boost::is_same<typename Dt::Periodic_tag, Tag_false>::value));
|
||||
(std::is_same<ExactAlphaComparisonTag, Tag_false>::value) ||
|
||||
(std::is_same<typename Dt::Periodic_tag, Tag_false>::value));
|
||||
|
||||
typedef typename internal::Alpha_nt_selector_2<
|
||||
Gt, ExactAlphaComparisonTag, typename Dt::Weighted_tag>::Type_of_alpha Type_of_alpha;
|
||||
|
|
@ -77,8 +76,8 @@ public:
|
|||
typedef Type_of_alpha FT;
|
||||
|
||||
// check that simplices are correctly instantiated
|
||||
CGAL_static_assertion( (boost::is_same<NT, typename Dt::Face::NT>::value) );
|
||||
CGAL_static_assertion( (boost::is_same<NT, typename Dt::Vertex::NT>::value) );
|
||||
CGAL_static_assertion( (std::is_same<NT, typename Dt::Face::NT>::value) );
|
||||
CGAL_static_assertion( (std::is_same<NT, typename Dt::Vertex::NT>::value) );
|
||||
|
||||
typedef typename Dt::Point Point;
|
||||
|
||||
|
|
@ -433,7 +432,7 @@ public:
|
|||
private:
|
||||
|
||||
// the dynamic version is not yet implemented
|
||||
// desactivate the triangulation member functions
|
||||
// deactivate the triangulation member functions
|
||||
Vertex_handle insert(const Point& p);
|
||||
// Inserts point `p' in the alpha shape and returns the
|
||||
// corresponding vertex of the underlying Delaunay triangulation.
|
||||
|
|
@ -745,7 +744,7 @@ private:
|
|||
//---------------------------------------------------------------------
|
||||
|
||||
private:
|
||||
// prevent default copy constructor and default assigment
|
||||
// prevent default copy constructor and default assignment
|
||||
|
||||
Alpha_shape_2(const Alpha_shape_2& A);
|
||||
|
||||
|
|
@ -849,7 +848,7 @@ Alpha_shape_2<Dt,EACT>::initialize_interval_edge_map()
|
|||
{
|
||||
// both faces are infinite by definition unattached
|
||||
// the edge is finite by construction
|
||||
CGAL_triangulation_precondition((is_infinite(pNeighbor)
|
||||
CGAL_precondition((is_infinite(pNeighbor)
|
||||
&& is_infinite(pFace)));
|
||||
interval = make_triple(squared_radius(pFace, i),
|
||||
Infinity,
|
||||
|
|
@ -859,7 +858,7 @@ Alpha_shape_2<Dt,EACT>::initialize_interval_edge_map()
|
|||
else
|
||||
{ // is_infinite(pNeighbor)
|
||||
|
||||
CGAL_triangulation_precondition((is_infinite(pNeighbor)
|
||||
CGAL_precondition((is_infinite(pNeighbor)
|
||||
&& !is_infinite(pFace)));
|
||||
if (is_attached(pFace, i))
|
||||
interval = make_triple(UNDEFINED,
|
||||
|
|
@ -1109,7 +1108,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_vertex_list()const {
|
|||
// which might be infinity
|
||||
// write the vertex
|
||||
v = (*vertex_alpha_it).second;
|
||||
CGAL_triangulation_assertion((classify(v) == REGULAR));
|
||||
CGAL_assertion((classify(v) == REGULAR));
|
||||
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)
|
||||
{
|
||||
v = (*vertex_alpha_it).second;
|
||||
CGAL_triangulation_assertion((classify(v) == SINGULAR));
|
||||
CGAL_assertion((classify(v) == SINGULAR));
|
||||
|
||||
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;
|
||||
|
||||
CGAL_triangulation_assertion(pInterval->second != Infinity);
|
||||
CGAL_assertion(pInterval->second != Infinity);
|
||||
// since this happens only for convex hull of dimension 2
|
||||
// thus singular
|
||||
|
||||
|
|
@ -1171,9 +1170,9 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
|
|||
// and alpha is smaller than the upper boundary
|
||||
// which might be infinity
|
||||
// visualize the boundary
|
||||
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second)
|
||||
== REGULAR));
|
||||
CGAL_assertion((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second)
|
||||
== REGULAR));
|
||||
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second));
|
||||
}
|
||||
|
|
@ -1191,7 +1190,7 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
|
|||
|
||||
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
|
||||
// thus singular
|
||||
|
||||
|
|
@ -1203,9 +1202,9 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
|
|||
// and alpha is smaller than the upper boundary
|
||||
// which might be infinity
|
||||
// visualize the boundary
|
||||
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second)
|
||||
== REGULAR));
|
||||
CGAL_assertion((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second)
|
||||
== REGULAR));
|
||||
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second));
|
||||
}
|
||||
|
|
@ -1219,12 +1218,12 @@ Alpha_shape_2<Dt,EACT>::update_alpha_shape_edges_list() const
|
|||
// if alpha is smaller than the upper boundary
|
||||
// which might be infinity
|
||||
// visualize the boundary
|
||||
CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second)
|
||||
== REGULAR)
|
||||
|| (classify((*edge_alpha_it).second.first,
|
||||
CGAL_assertion(((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second)
|
||||
== SINGULAR)));
|
||||
== REGULAR)
|
||||
|| (classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second)
|
||||
== SINGULAR)));
|
||||
Alpha_shape_edges_list.push_back(Edge((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second));
|
||||
}
|
||||
|
|
@ -1324,7 +1323,7 @@ Alpha_shape_2<Dt,EACT>::number_of_solid_components(const Type_of_alpha& alpha) c
|
|||
++face_it)
|
||||
{
|
||||
Face_handle pFace = face_it;
|
||||
CGAL_triangulation_postcondition( pFace != nullptr);
|
||||
CGAL_postcondition( pFace != nullptr);
|
||||
|
||||
if (classify(pFace, alpha) == INTERIOR){
|
||||
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++)
|
||||
{
|
||||
pNeighbor = fh->neighbor(i);
|
||||
CGAL_triangulation_assertion(pNeighbor != nullptr);
|
||||
CGAL_assertion(pNeighbor != nullptr);
|
||||
if (classify(pNeighbor, alpha) == INTERIOR){
|
||||
Data& data = marked_face_set[pNeighbor];
|
||||
if(data == false){
|
||||
|
|
@ -1436,7 +1435,7 @@ template < class Dt, class EACT >
|
|||
typename Alpha_shape_2<Dt,EACT>::Type_of_alpha
|
||||
Alpha_shape_2<Dt,EACT>::find_alpha_solid() const
|
||||
{
|
||||
// compute the minumum alpha such that all data points
|
||||
// compute the minimum alpha such that all data points
|
||||
// are either on the boundary or in the interior
|
||||
// not necessarily connected
|
||||
// starting point for searching
|
||||
|
|
@ -1514,7 +1513,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
|
|||
// write the vertex
|
||||
|
||||
v = (*vertex_alpha_it).second;
|
||||
CGAL_triangulation_assertion((classify(v) ==
|
||||
CGAL_assertion((classify(v) ==
|
||||
Alpha_shape_2<Dt,EACT>::REGULAR));
|
||||
// if we used Edelsbrunner and Muecke's definition
|
||||
// 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;
|
||||
|
||||
CGAL_triangulation_assertion(pInterval->second != Infinity);
|
||||
CGAL_assertion(pInterval->second != Infinity);
|
||||
// since this happens only for convex hull of dimension 1
|
||||
// thus singular
|
||||
|
||||
|
|
@ -1563,11 +1562,11 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
|
|||
f = pNeighbor;
|
||||
}
|
||||
|
||||
CGAL_triangulation_assertion((classify(f) ==
|
||||
Alpha_shape_2<Dt,EACT>::INTERIOR));
|
||||
CGAL_assertion((classify(f) ==
|
||||
Alpha_shape_2<Dt,EACT>::INTERIOR));
|
||||
|
||||
CGAL_triangulation_assertion((classify(f, i) ==
|
||||
Alpha_shape_2<Dt,EACT>::REGULAR));
|
||||
CGAL_assertion((classify(f, i) ==
|
||||
Alpha_shape_2<Dt,EACT>::REGULAR));
|
||||
|
||||
os << V[f->vertex(f->ccw(i))] << ' '
|
||||
<< V[f->vertex(f->cw(i))] << std::endl;
|
||||
|
|
@ -1595,8 +1594,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
|
|||
// write the vertex
|
||||
|
||||
v = (*vertex_alpha_it).second;
|
||||
CGAL_triangulation_assertion((classify(v) ==
|
||||
Alpha_shape_2<Dt,EACT>::REGULAR));
|
||||
CGAL_assertion((classify(v) == Alpha_shape_2<Dt,EACT>::REGULAR));
|
||||
V[v] = number_of_vertices++;
|
||||
os << v->point() << std::endl;
|
||||
}
|
||||
|
|
@ -1608,8 +1606,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
|
|||
++vertex_alpha_it)
|
||||
{
|
||||
v = (*vertex_alpha_it).second;
|
||||
CGAL_triangulation_assertion((classify(v) ==
|
||||
Alpha_shape_2<Dt,EACT>::SINGULAR));
|
||||
CGAL_assertion((classify(v) == Alpha_shape_2<Dt,EACT>::SINGULAR));
|
||||
|
||||
V[v] = number_of_vertices++;
|
||||
os << v->point() << std::endl;
|
||||
|
|
@ -1652,7 +1649,7 @@ Alpha_shape_2<Dt,EACT>::op_ostream(std::ostream& os) const
|
|||
if (pInterval->second != Infinity &&
|
||||
pInterval->second <= get_alpha())
|
||||
{
|
||||
CGAL_triangulation_assertion((classify(f, i) ==
|
||||
CGAL_assertion((classify(f, i) ==
|
||||
Alpha_shape_2<Dt,EACT>::REGULAR));
|
||||
// assure that all vertices are in ccw order
|
||||
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;
|
||||
}
|
||||
|
||||
CGAL_triangulation_assertion((classify(f) ==
|
||||
CGAL_assertion((classify(f) ==
|
||||
Alpha_shape_2<Dt,EACT>::INTERIOR));
|
||||
|
||||
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
|
||||
if (pInterval->first != UNDEFINED)
|
||||
{
|
||||
CGAL_triangulation_assertion((classify(f, i) ==
|
||||
CGAL_assertion((classify(f, i) ==
|
||||
Alpha_shape_2<Dt,EACT>::SINGULAR));
|
||||
os << V[f->vertex(f->ccw(i))] << ' '
|
||||
<< V[f->vertex(f->cw(i))] << std::endl;
|
||||
|
|
@ -1739,7 +1736,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
|
|||
// which might be infinity
|
||||
// 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) ==
|
||||
REGULAR));
|
||||
|
||||
|
|
@ -1769,7 +1766,7 @@ Alpha_shape_2<Dt,EACT>::Output ()
|
|||
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
|
||||
// thus singular
|
||||
|
||||
|
|
@ -1782,9 +1779,9 @@ Alpha_shape_2<Dt,EACT>::Output ()
|
|||
// which might be infinity
|
||||
// visualize the boundary
|
||||
|
||||
CGAL_triangulation_assertion((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second) ==
|
||||
REGULAR));
|
||||
CGAL_assertion((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second) ==
|
||||
REGULAR));
|
||||
L.push_back((this->segment((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second))
|
||||
.source());
|
||||
|
|
@ -1802,12 +1799,12 @@ Alpha_shape_2<Dt,EACT>::Output ()
|
|||
// which might be infinity
|
||||
// visualize the boundary
|
||||
|
||||
CGAL_triangulation_assertion(((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second) ==
|
||||
REGULAR) ||
|
||||
(classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second) ==
|
||||
SINGULAR)));
|
||||
CGAL_assertion(((classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second) ==
|
||||
REGULAR) ||
|
||||
(classify((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second) ==
|
||||
SINGULAR)));
|
||||
L.push_back((this->segment((*edge_alpha_it).second.first,
|
||||
(*edge_alpha_it).second.second))
|
||||
.source());
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue