// Copyright (c) 2005 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you may redistribute it under // the terms of the Q Public License version 1.0. // See the file LICENSE.QPL distributed with CGAL. // // Licensees holding a valid commercial license may use this file in // accordance with the commercial license agreement provided with the software. // // 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: svn+ssh://gankit@scm.gforge.inria.fr/svn/cgal/trunk/Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles.h $ // $Id: linear_least_squares_fitting_2.h 37882 2007-04-03 15:15:30Z spion $ // // Author(s) : Pierre Alliez and Sylvain Pion and Ankit Gupta #ifndef CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H #define CGAL_LINEAR_LEAST_SQUARES_FITTING_UTIL_H #include #include #include CGAL_BEGIN_NAMESPACE namespace CGALi { // Initialize a matrix in n dimension by an array or numbers template typename CGAL::Linear_algebraCd::Matrix init_Matrix(int n, typename K::FT entries[]) { CGAL_assertion(n>1); // the dimension > 1 typedef typename CGAL::Linear_algebraCd::Matrix Matrix; Matrix ret(n); for(int i=0;i