merge from next

This commit is contained in:
Laurent Rineau 2011-10-20 16:04:32 +00:00
commit cfd37935cf
16 changed files with 126 additions and 86 deletions

View File

@ -1622,7 +1622,7 @@ protected:
const Integer _four = 4;
Algebraic xs[2];
Algebraic *xs_end;
int n_xs;
std::size_t n_xs;
Nt_traits nt_traits;
xs_end = nt_traits.solve_quadratic_equation (_t*_t - _four*_r*_s,
@ -1634,7 +1634,7 @@ protected:
// Find the y-coordinates of the vertical tangency points.
Algebraic ys[2];
Algebraic *ys_end;
int n_ys;
std::size_t n_ys;
if (CGAL::sign (_t) == ZERO)
{
@ -1705,7 +1705,7 @@ protected:
// (t*y + u)^2 - 4*r*(s*y^2 + v*y + w) = 0
const Integer _two = 2;
const Integer _four = 4;
int n;
std::size_t n;
Algebraic ys[2];
Algebraic *ys_end;
Nt_traits nt_traits;

View File

@ -38,7 +38,8 @@ namespace CGAL {
* \return The number of distinct roots found.
*/
template <class Nt_traits>
int _compute_resultant_roots (Nt_traits& nt_traits,
std::size_t
_compute_resultant_roots (Nt_traits& nt_traits,
const typename Nt_traits::Integer& r1,
const typename Nt_traits::Integer& s1,
const typename Nt_traits::Integer& t1,
@ -179,7 +180,8 @@ int _compute_resultant_roots (Nt_traits& nt_traits,
* \return The number of distinct roots found.
*/
template <class Nt_traits>
int _compute_resultant_roots (Nt_traits& nt_traits,
std::size_t
_compute_resultant_roots (Nt_traits& nt_traits,
const typename Nt_traits::Algebraic& r,
const typename Nt_traits::Algebraic& s,
const typename Nt_traits::Algebraic& t,

View File

@ -1853,9 +1853,9 @@ private:
const int deg2 = ((arc._info & DEGREE_MASK) == DEGREE_1) ? 1 : 2;
Nt_traits nt_traits;
Algebraic xs[4];
int n_xs = 0;
std::size_t n_xs = 0;
Algebraic ys[4];
int n_ys = 0;
std::size_t n_ys = 0;
if (arc._is_special_segment())
{

View File

@ -539,7 +539,7 @@ private:
}
/*! Find the given object in the given bucket. */
Bucket_iterator _find_in_bucket (int index,
Bucket_iterator _find_in_bucket (std::size_t index,
const value_type& val) const
{
Bucket& my_bucket = const_cast<Bucket&>(buckets[index]);

View File

@ -55,7 +55,7 @@ void make_x_monotone (CurveInputIter begin, CurveInputIter end,
const Traits * tr)
{
// Split the input curves into x-monotone objects.
unsigned int num_of_curves = std::distance(begin, end);
std::size_t num_of_curves = std::distance(begin, end);
std::vector<Object> object_vec;
CurveInputIter iter;

View File

@ -186,8 +186,8 @@ run_trapped_test()
else
run_test $1 $2 $3 $4 $5 $6 &
WPID=$!
trap "kill -9 $WPID" INT
(sleep 1200; kill -9 $WPID) > /dev/null 2>&1 &
trap "kill -HUP $WPID" INT
(sleep 1200; kill -HUP $WPID) > /dev/null 2>&1 &
SPID=$!
wait $WPID > /dev/null 2>&1
# RES=$?

View File

@ -18,6 +18,9 @@
// Author(s) : Susan Hert
//
#include <CGAL/config.h>
#ifdef CGAL_USE_GEOMVIEW
#include <CGAL/Homogeneous.h>
#include <CGAL/point_generators_3.h>
@ -31,8 +34,6 @@
#include <vector>
#include <cassert>
#ifdef CGAL_USE_GEOMVIEW
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>
typedef leda_integer RT;
@ -89,6 +90,7 @@ int main ()
#else
#include <iostream>
int main() {
std::cerr <<
"This demo requires geomview, which is not present on this platform\n";

View File

@ -17,7 +17,9 @@
//
// Author(s) : Susan Hert
#include <CGAL/config.h>
#ifdef CGAL_USE_GEOMVIEW
#include <CGAL/Homogeneous.h>
#include <CGAL/point_generators_3.h>
@ -28,8 +30,6 @@
#include <CGAL/IO/Geomview_stream.h>
#include <CGAL/IO/Polyhedron_geomview_ostream.h>
#ifdef CGAL_USE_GEOMVIEW
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>
typedef leda_integer RT;
@ -128,6 +128,8 @@ int main(int argc, char* argv[])
#else
#include <iostream>
int main() {
std::cerr <<
"This demo requires geomview, which is not present on this platform\n";

View File

@ -17,7 +17,12 @@
//
// Author(s) : Michael Seel <seel@mpi-sb.mpg.de>
#include <CGAL/basic.h>
#include <iostream>
#include <string>
#include <cstdlib>
#if !defined(_MSC_VER)
#include <CGAL/Homogeneous.h>
#include <CGAL/Convex_hull_d_traits_3.h>
#include <CGAL/Convex_hull_d.h>
@ -27,11 +32,6 @@
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Convex_hull_d_to_polyhedron_3.h>
#include <CGAL/IO/Polyhedron_geomview_ostream.h>
#include <iostream>
#include <string>
#include <cstdlib>
#if !defined(_MSC_VER)
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>

View File

@ -17,7 +17,12 @@
//
// Author(s) : Michael Seel <seel@mpi-sb.mpg.de>
#include <CGAL/basic.h>
#include <iostream>
#include <string>
#include <cstdlib>
#if !defined(_MSC_VER)
#include <CGAL/Homogeneous_d.h>
#include <CGAL/Convex_hull_d.h>
#include <CGAL/random_selection.h>
@ -26,11 +31,6 @@
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Convex_hull_d_to_polyhedron_3.h>
#include <CGAL/IO/Polyhedron_geomview_ostream.h>
#include <iostream>
#include <string>
#include <cstdlib>
#if !defined(_MSC_VER)
#ifdef CGAL_USE_LEDA
#include <CGAL/leda_integer.h>

View File

@ -19,7 +19,6 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/IO/Geomview_stream.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/aff_transformation_tags.h>

View File

@ -21,6 +21,11 @@
#include <string>
#include <CGAL/config.h>
#if defined(BOOST_MSVC)
# pragma warning(disable:4244) // int to float conversion warning
#endif
#include <CGAL/intersections.h>
#include <CGAL/Cartesian.h>

View File

@ -427,8 +427,8 @@ fill_matrix(InputIterator begin, InputIterator end,
M.set(line_count, k*(k+1)/2+i,
std::pow(x,static_cast<double>(k-i))
* std::pow(y,static_cast<double>(i))
/( fact(i) *
fact(k-i)
/( fact(static_cast<unsigned int>(i)) *
fact(static_cast<unsigned int>(k-i))
*std::pow(this->preconditionning,static_cast<double>(k))));
}
}

View File

@ -1,2 +1,3 @@
unique_sqrt_extension-sloriot
global_function_solve_1-hemmer
Generator-removed_deprecated-odevil

View File

@ -149,7 +149,7 @@ int main()
q.push(&data[0]+i);
}
for (std::size_t i=0;i<10;++i){
for (unsigned int i=0;i<10;++i){
data[i].second=9-i;
q.update(&data[0]+i,true);
CGAL_assertion(q.top()->first==i);
@ -169,14 +169,14 @@ int main()
q.push(&data[0]+i);
}
for (std::size_t i=0;i<9;++i){
for (unsigned int i=0;i<9;++i){
data[i].second=10+i;
q.update(&data[0]+i,true);
CGAL_assertion(q.top()->first==i+1);
}
//revert order
for (std::size_t i=0;i<10;++i){
for (unsigned int i=0;i<10;++i){
data[9-i].second=i;
q.update(&data[0]+9-i,true);
CGAL_assertion(q.top()->first==9);

View File

@ -58,7 +58,7 @@ EOF
if [ "${TYPE}" = "demo" ] ; then
target_name="${PROJECT}_${TYPE}"
for file in `ls *.C *.cpp 2>/dev/null | sort` ; do
for file in `ls "$SOURCE_DIR"*.C "$SOURCE_DIR"*.cpp 2>/dev/null | sort` ; do
all="$all $file"
done
cat <<'EOF'
@ -87,16 +87,16 @@ EOF
EOF
if [ -d ../../include ] ; then
echo ' include_directories (BEFORE ../../include)'
if [ -d "${SOURCE_DIR}../../include" ] ; then
echo " include_directories (BEFORE \"${SOURCE_DIR}../../include\")"
echo
fi
if [ -d ../include ] ; then
echo ' include_directories (BEFORE ../include)'
if [ -d "${SOURCE_DIR}../include" ] ; then
echo " include_directories (BEFORE \"${SOURCE_DIR}../include\")"
echo
fi
if [ -d include ] ; then
echo ' include_directories (BEFORE include)'
if [ -d "${SOURCE_DIR}include" ] ; then
echo " include_directories (BEFORE \"${SOURCE_DIR}include\")"
echo
fi
cat <<EOF
@ -132,20 +132,20 @@ if ( CGAL_FOUND )
include( CGAL_CreateSingleSourceCGALProgram )
EOF
if [ -d ../../include ] ; then
echo ' include_directories (BEFORE ../../include)'
if [ -d "${SOURCE_DIR}../../include" ] ; then
echo " include_directories (BEFORE \"${SOURCE_DIR}../../include\")"
echo
fi
if [ -d ../include ] ; then
echo ' include_directories (BEFORE ../include)'
if [ -d "${SOURCE_DIR}../include" ] ; then
echo " include_directories (BEFORE \"${SOURCE_DIR}../include\")"
echo
fi
if [ -d include ] ; then
echo ' include_directories (BEFORE include)'
if [ -d "${SOURCE_DIR}include" ] ; then
echo " include_directories (BEFORE \"${SOURCE_DIR}include\")"
echo
fi
for file in `ls *.C *.cpp 2>/dev/null | sort` ; do
for file in `ls "$SOURCE_DIR"*.C "$SOURCE_DIR"*.cpp 2>/dev/null | sort` ; do
# Create an executable for each cpp that contains a function "main()"
BASE=`basename $file .C`
BASE=`basename $BASE .cpp`
@ -173,34 +173,63 @@ EOF
usage()
{
echo "Usage: cgal_create_cmake_script [TYPE]"
echo "Usage: cgal_create_cmake_script [TYPE] [--source_dir <source directory>]"
echo
echo " TYPE must be any of example, demo or test."
echo " Default is example."
echo " Create a CMakeLists.txt file in the current working directory."
echo
echo " TYPE must be any of example, demo or test. The default is example."
echo
echo " If the option --source_dir is specified with a directory, the "
echo " CMakeLists.txt uses source files from that directory, otherwise "
echo " the source directory is supposed to be the current directory."
}
SOURCE_DIR=
case $# in
0) TYPE="example";;
1) TYPE=$1;;
*) usage
exit 1
while [ $1 ]; do
case "$1" in
-h|-help|--h|--help)
usage; exit
;;
example)
if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
;;
demo)
if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
;;
test)
if [ -z "$TYPE" ]; then TYPE=$1; shift; else usage; exit 1; fi
;;
--source_dir)
if [ -d "$2" ]; then
SOURCE_DIR=$2;
shift;
shift;
else
if [ -z "$2" ]; then
echo "Error: you must specify a directory after the --source_dir option!"
echo
else
echo "Error: \"$2\" is not a directory!"
echo
fi
usage; exit 1;
fi
;;
*)
echo "Unknown option: $1"
usage; exit 1
;;
esac
if [ "${TYPE}" = "example" -o "${TYPE}" = "demo" -o "${TYPE}" = "test" ]; then
ok='y'
fi
if [ -z "$ok" ]; then
echo "Invalid type: ${TYPE}. Valid values are example, demo or test"
exit 1
fi
done
OUTPUTFILE=CMakeLists.txt
if [ -n "$SOURCE_DIR" ]; then
PROJECT=`basename $SOURCE_DIR`
SOURCE_DIR=$SOURCE_DIR/
else
PROJECT=`basename $PWD`
fi
if [ -f ${OUTPUTFILE} ] ; then
echo "moving $OUTPUTFILE to ${OUTPUTFILE}.bak ..."