Commit Graph

160 Commits

Author SHA1 Message Date
Simon Giraudot f4610bc844 Update PCA functions with diagonalize_traits typenames 2015-10-01 16:31:25 +02:00
Simon Giraudot a4f242a0cc Replace Internal_diagonalize_traits by Diagonalize_traits + corrections in Concepts/Models 2015-09-16 11:41:26 +02:00
Simon Giraudot 03b186c6df Simplify code (avoid useless data copy) 2015-09-07 08:30:57 +02:00
Simon Giraudot 0d600f5490 Replace VCM by Diagonalize for consistency 2015-09-07 08:18:43 +02:00
Simon Giraudot e3ce17eb0a Update doc of PCA in accordance with Solver interface 2015-09-01 12:40:10 +02:00
Simon Giraudot 0875fa17ff Wrapper to automatically use Eigen_diagonalize if Eigen is available or Internal_diagonalize otherwise 2015-08-31 10:01:01 +02:00
Simon Giraudot bb0d1c7b32 Removed unused eigen_symmetric API files 2015-08-31 09:32:15 +02:00
Simon Giraudot 28e5432c16 Renaming 'VCM' to 'diagonalize' 2015-08-31 08:30:01 +02:00
Simon Giraudot 792f6bd203 Clean old eigen.h API 2015-08-26 11:29:52 +02:00
Simon Giraudot 1328261e60 Propagating change of API from eigen_symmetric to new Internal_vcm_traits to PCA 3D functions. 2015-08-26 11:21:53 +02:00
Simon Giraudot 7ed34cd138 Propagating change of API from eigen_symmetric to new Internal_vcm_traits to PCA 2D functions. 2015-08-25 17:33:24 +02:00
Simon Giraudot 942907957d Move eigen files from PCA (note: this is internal code from CGAL that should be replaced by Eigen) 2015-08-20 16:11:33 +02:00
andrew morton 21295f07aa Use CGAL::sqrt() rather than std::sqrt() 2015-04-08 10:53:30 -07:00
Laurent Rineau 04ad0af983 Trivial bug-fix: use FT(n) instead of (FT)n.0
In our concepts, (FT)0.0 and (FT)1.0 (conversion from doubles) are not
always allowed, but the construction of an FT from an integer is in the
concept FieldNumberType (because it refines IntegralDomainWithoutDivision,
that refines FromIntConstructible).

The testsuite of PCA passes on my machine, and the bug "fix" is trivial.
Approved for CGAL-4.3 by the Release Manager.
2013-09-25 15:11:05 +02:00
Andreas Fabri 6c547e5663 Mainly added includes 2013-09-13 22:24:30 +02:00
Andreas Fabri 557c593aff undo of switching to vector and multipass_distance 2013-09-11 16:20:04 +02:00
Andreas Fabri a07b6620e4 class..method() -> class.method() 2013-08-29 07:11:28 +02:00
Andreas Fabri 8855eb54c3 Performance Improvements
- changed Cartesian to Simple_cartesian in the examples
- changed list to vector in the code
- removed unnecessary includes
- introduced multipass_distance
2013-08-26 14:36:09 +02:00
Laurent Rineau c6c8fd9d62 Fix #includes of <CGAL/PCA_util.h> 2013-04-29 14:59:23 +02:00
Philipp Möller 1adf441b18 Convert all CRLF files to LF 2012-12-03 18:44:24 +01:00
Laurent Rineau b6acb44b19 Fix mixed eol styles introduced by the licenses change scripts 2012-08-02 12:48:04 +00:00
Laurent Rineau db194534c7 First big patch to fix -Wunused-local-typedefs
-Wunused-local-typedefs is a new warning flag of gcc-4.7, and it will enabled
 by -Wall since gcc-4.8 (not yet released).

The fix is a big set of removals of unused typedefs (or comments, or moves,
depending on the context).
2012-08-01 13:29:16 +00:00
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Laurent Rineau 506f2f0127 Fix typos in "This file is part of CGAL..." 2012-01-13 16:14:28 +00:00
Sébastien Loriot 91a5327fa8 change LGPLv2 -> LGPLv3 2011-10-10 13:48:25 +00:00
Andreas Fabri 9ab4d521d1 Use CGAL::abs instead of fabs 2011-02-16 14:22:59 +00:00
Marc Glisse 237177a92e Remove work-around that is now hopefully useless 2011-01-18 11:40:03 +00:00
Marc Glisse b44bb0322c Prevent instantiation of centroid on non-iterator types 2011-01-18 11:37:03 +00:00
Marc Glisse 84594e6b71 This should be fixed properly, but in the mean time, add clang to the workaround. 2010-10-27 10:07:09 +00:00
Laurent Rineau 9277a77b72 Fix all svn:keywords in */include/ 2010-10-04 11:00:27 +00:00
Andreas Fabri b495e013b5 0.0 -> FT(0) in order to quiet VC++ 2010-09-27 07:47:24 +00:00
Stéphane Tayeb 13c142a657 Fix VC++ workaround (tested with MSVS2005) 2010-06-11 07:41:10 +00:00
Sébastien Loriot 52317dd49f add python script (replace_CGAL_NAMESPACE.py) to replace CGAL_BEGIN_NAMESPACE and CGAL_END_NAMESPACE
by namespace CGAL { and } //namespace CGAL. in all .h and .cpp files
in a directory.
Apply it to all packages in the trunk
Remove macro definition from the config.h file.
2010-06-09 07:37:13 +00:00
Stéphane Tayeb bd968201c3 Try another workaround for VC++ and Intel compiler (CGAL::centroid). Add a call of overloaded CGAL::centroid function in test-suite. 2010-06-08 15:28:21 +00:00
Laurent Rineau d0b71dd3de Merged revisions 56567,56628 via svnmerge from
svn+ssh://lrineau@scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.6-branch

........
  r56567 | stayeb | 2010-06-04 10:42:30 +0200 (Fri, 04 Jun 2010) | 1 line
  
  Add a call to other overloads of centroid function.
........
  r56628 | spion | 2010-06-07 17:39:28 +0200 (Mon, 07 Jun 2010) | 2 lines
  
  Try again another version of the workaround for VC++.
........
2010-06-07 16:10:57 +00:00
Laurent Rineau a06cc18fe9 Merged revisions 56562 via svnmerge from
svn+ssh://lrineau@scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.6-branch

........
  r56562 | stayeb | 2010-06-03 17:30:14 +0200 (Thu, 03 Jun 2010) | 1 line
  
  Bug fix: ungeneralize a template function (avoids wrong template function instanciation).
........
2010-06-03 15:41:24 +00:00
Laurent Rineau 83912b2952 Massive fix of svn:keywords properties, and $URL$ keyword. 2009-10-20 08:59:26 +00:00
Pierre Alliez 62a1be0732 rename CGALi to internal 2009-09-17 09:19:21 +00:00
Pierre Alliez 7df5cac015 PCA: undo recent change - there was no bug 2009-09-11 07:13:29 +00:00
Pierre Alliez 82aaae94c1 fix pca bug 2009-09-10 14:29:47 +00:00
Sylvain Pion 8573fe26ce Rename CGALi to internal. 2009-08-24 17:10:04 +00:00
Pierre Alliez 9b7d5c7e06 PCA: one bug fix pointed out by ENPC.
one little fix in doc
2009-07-02 11:13:32 +00:00
Pierre Alliez f9a2279974 PCA: fix degenerate cases and doc. 2009-02-27 12:57:44 +00:00
Pierre Alliez 587fcabfa5 PCA: removed unnecessary assertion 2008-12-08 16:09:09 +00:00
Pierre Alliez 6fa7586137 Reconstruction: added a menu smoothing (still empty) 2008-04-22 15:11:23 +00:00
Pierre Alliez 282f4e8730 PCA: fix capitalization 2008-04-18 10:09:45 +00:00
Sylvain Pion 2f4e459d75 Some updates to the things that moved to the CGAL::Access namespace. 2008-04-17 21:04:05 +00:00
Sylvain Pion 39dc525fa0 updates to uses of Iso_box 2008-04-17 20:53:36 +00:00
Sylvain Pion 55d538b335 "Ambient" is not spelled "Ambiant" in English... 2008-04-17 10:13:31 +00:00
Sylvain Pion ddb28c5e79 Missing includes. 2008-04-15 17:44:53 +00:00
Sylvain Pion 07e470978e We have 4 overloads of centroid() now working:
centroid(begin, end)
centroid(begin, end, dim_tag)
centroid(begin, end, kernel)
centroid(begin, end, kernel, dim_tag)
2008-04-15 15:58:11 +00:00
Sylvain Pion 4477a9d986 Updates after the new d-dim stuff changes. 2008-04-15 13:53:58 +00:00
Sylvain Pion 2389cdcc1e Dimension detecting stuff rewrite.
There is now Ambiant_dimension and Feature_dimension.
The handling of the dynamic dimension case is now done by having
the di,ension tag as the first thing provided, with the integral
constant value available only when it makes sense (INT_MAX no longer needed).
2008-04-13 12:38:48 +00:00
Sylvain Pion 02e543a294 Add Dimension<T, K> whose nested "value" is the dimension of the ambiant
space.  A special constant CGAL::Dynamic_dimension (equal to INT_MAX)
indicates the case where the dimension is only known at run time.
2008-04-11 21:03:22 +00:00
Sylvain Pion 73738c8a19 Replace PCA_dimension_0_tag and similar by the kernel's Dimension_tag<dim>. 2008-04-11 19:41:37 +00:00
Sylvain Pion 680971bbef Typo centriod -> centroid. 2008-04-11 13:37:47 +00:00
Pierre Alliez 73365ae5d3 PCA: fixed pow -> std::pow 2008-03-28 08:52:23 +00:00
Pierre Alliez f3c10f6817 PCA: fix spelling issues 2008-02-12 10:30:52 +00:00
Pierre Alliez 7daaaebc06 PCA: two kernel test for 2D point sets 2008-02-11 11:44:08 +00:00
Pierre Alliez c56158d568 PCA: removed some warnings (used level 4 on MS .NET)
I think some will remain due to other parts of CGAL
Next step will be to parameterize the test suite with several Kernels
2008-02-11 11:36:43 +00:00
Pierre Alliez 0e7254aa26 PCA: another attempt at removing a bug in cuboids 2008-02-07 08:20:24 +00:00
Pierre Alliez f8ed9cdfa6 PCA: tried fixing a bug for cuboids_3
started fixing some issues with various kernels (well, at least float and double Cartesian to start with)
2008-02-06 20:35:10 +00:00
Pierre Alliez fcf1551ba9 PCA: removed some warnings for the test suite. 2008-02-04 06:26:58 +00:00
Sylvain Pion 0ab13872cc remove undesired typename 2008-01-25 21:30:33 +00:00
Pierre Alliez 013183aeef PCA: Corrected one bug for cuboids (dimension 0 tag)
removed a default tag
2008-01-21 21:53:21 +00:00
Pierre Alliez 11474e52d7 PCA: fix examples 2008-01-21 20:25:53 +00:00
Pierre Alliez 049d70ad6f PCA: cleanup examples and little fix 2008-01-19 19:57:18 +00:00
Pierre Alliez ee9d4197c8 PCA: examples now compile fine one Windows 2008-01-18 08:45:15 +00:00
Pierre Alliez dd79ec1fdf PCA: the test suit works fine on Windows 2008-01-17 13:55:43 +00:00
Pierre Alliez bb5f479966 PCA: fix compilation issues due to dimension tags
improve test suite in 3D
2008-01-17 13:20:42 +00:00
Pierre Alliez d88923b47c PCA: renamed example file for tetrahedra
started cleaning up the examples codes
2008-01-16 20:28:47 +00:00
Pierre Alliez e02cb6172a PCA: simplified interface in 3D 2008-01-16 16:41:58 +00:00
Pierre Alliez 60a8f120e3 replaced util.h by PCA_util.h in two files 2007-11-12 10:19:11 +00:00
Pierre Alliez 6074092936 PCA: I am trying to allow specifying a default tag. 2007-11-10 15:57:16 +00:00
Pierre Alliez d1925200a0 PCA: massaging of the templates in order to provide default tag - does not compile yet. 2007-11-07 13:07:02 +00:00
Pierre Alliez 189e9469df renamed one file in PCA (tetrahedra) 2007-11-06 21:17:50 +00:00
Pierre Alliez 3b9168d8ab started cleaning up PCA on arbitrary objects - I need to work a few more hours before the next release. 2007-11-06 21:14:40 +00:00
Ankit Gupta 0c408aeee2 Final Changes to PCA Package; Updated Test Suite!
A    Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2.cpp
A    Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3.cpp
A    Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp
A    Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_spheres_3.cpp
A    Principal_component_analysis/test/Principal_component_analysis/fitting_segments_3.cpp
M    Principal_component_analysis/test/Principal_component_analysis/fitting_rectangles_2.cpp
A    Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_tetrahedrons_3.cpp
A    Principal_component_analysis/test/Principal_component_analysis/fitting_triangles_2.cpp
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedrons_3.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h
M    Principal_component_analysis/include/CGAL/centroid.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h
M    Principal_component_analysis/include/CGAL/util.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h
M    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_spheres_3.cpp
2007-07-25 12:46:19 +00:00
Ankit Gupta 2aa37cfc1b M Principal_component_analysis/include/CGAL/centroid.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h
M    Principal_component_analysis/demo/Principal_component_analysis/linear_least_squares_fitting.cpp

Made modifications to remove compilation errors.
2007-06-06 12:38:23 +00:00
Ankit Gupta 9584e4e0af Added PCA for 3d. Also added tags for dimensions 0,1,2 and 3.
A    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedrons_3.h
A    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_spheres_3.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_2.h
M    Principal_component_analysis/include/CGAL/centroid.h
A    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_points_3.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_3.h
M    Principal_component_analysis/include/CGAL/util.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_circles_2.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h
A    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_3.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_rectangles_2.h
A    Principal_component_analysis/include/CGAL/PCA_tags.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h
A    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h
A    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_cuboids_3.h
D    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_segments.cpp
D    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_rectangles.cpp
D    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_triangles.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_spheres_3.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_points_2.cpp
M    Principal_component_analysis/examples/Principal_component_analysis/centroid.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_points_3.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_circles_2.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_ankit.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_segments_2.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_segments_3.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_rectangles_2.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_2.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_cuboids_3.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp
D    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting.cpp
D    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_circles.cpp
A    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_tetrahedrons_3.cpp
2007-05-30 10:07:56 +00:00
Ankit Gupta 0606474ec1 Minor changes + test cases 2007-05-21 09:56:44 +00:00
Ankit Gupta 3227f23c44 Updated Documentation + Minor Changes 2007-05-15 17:17:53 +00:00
Ankit Gupta 6ac54fe521 Added PCA for rectangles and example 2007-05-15 13:49:45 +00:00
Ankit Gupta 17c08b6f43 Fixed eigen_2.h 2007-05-15 13:23:15 +00:00
Ankit Gupta f387436d7a Adding a few more files 2007-05-15 10:11:40 +00:00
Ankit Gupta 56053b5ecf Added PCA for circles and an example for it. Also modified the linear least squares fitting function by adding an optional boolean argument to specify whether we want a non-standard-geometry or not. eg: disk or circle etc. 2007-05-15 10:09:30 +00:00
Ankit Gupta eae6cef440 A Principal_component_analysis/include/CGAL/util.h 2007-05-14 13:31:40 +00:00
Ankit Gupta b8088b9574 M Principal_component_analysis/include/CGAL/linear_least_squares_fitting_2.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_segments_2.h
M    Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h
M    Principal_component_analysis/include/CGAL/centroid.h
M    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_segments.cpp
M    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting_triangles.cpp
M    Principal_component_analysis/examples/Principal_component_analysis/linear_least_squares_fitting.cpp
2007-05-14 13:30:26 +00:00
Pierre Alliez cc674499b0 doc update 2007-05-14 12:34:25 +00:00
Pierre Alliez 28287a8d19 massaging 2007-05-14 12:18:58 +00:00
Pierre Alliez 805937a752 renamed a few files 2007-05-14 11:47:14 +00:00
Pierre Alliez 6f4b6ccd53 notation issues 2007-05-14 11:46:09 +00:00
Ankit Gupta 6cd1a670f8 A CGAL/linear_least_squares_fitting_circles.h 2007-05-14 08:27:12 +00:00
Ankit Gupta 92ad068512 Why i did this silly change 2007-05-14 08:24:35 +00:00
Sylvain Pion 0e27d02b4c Add missing SVN keywords. 2007-04-03 15:15:30 +00:00
Andreas Fabri 85319cd807 removed unused parameters 2007-03-17 09:15:02 +00:00
Andreas Fabri 7451656a2d remove unused parameter 2007-03-16 10:32:04 +00:00
Pierre Alliez 04826e29aa tests performed for points on a line in 2D
Doc: added definitions, did many fixes.
IMPORTANT: sylvain: double-check the definitions, and precise the dimension and types available for each of your function.

important change: I suggest to rename the function bounding_box to axis_aligned_bounding_box (min case later you will hack on the general one).
2006-03-16 22:52:57 +00:00
Pierre Alliez 5af27d0125 fixed eigen_2 directly (all symmetric positive definite matrices have in theorie real and positive eigenvalues). 2006-03-14 21:06:22 +00:00
Pierre Alliez 4eb5dbd763 fixed a case where an eigen value is negative due to numerical issues (floating point numbers are terrible). 2006-03-14 19:08:47 +00:00