From f05e75b3f74999d0ee9e9d60192fefeca91f9f86 Mon Sep 17 00:00:00 2001 From: Marc Pouget Date: Thu, 15 Feb 2007 16:38:52 +0000 Subject: [PATCH] details --- Jet_fitting_3/examples/Jet_fitting_3/README | 3 +- .../CGAL/Lapack/Linear_algebra_lapack.h | 41 ++++++++++++++----- .../include/CGAL/Monge_via_jet_fitting.h | 3 ++ 3 files changed, 34 insertions(+), 13 deletions(-) diff --git a/Jet_fitting_3/examples/Jet_fitting_3/README b/Jet_fitting_3/examples/Jet_fitting_3/README index 656c1bf10a8..af85cafb38e 100644 --- a/Jet_fitting_3/examples/Jet_fitting_3/README +++ b/Jet_fitting_3/examples/Jet_fitting_3/README @@ -1,13 +1,12 @@ To compile, you need support for lapack - Program blind_1pt --------------------- takes as input a which is a xyz text file it compute the fitting for this single entry and it outputs results in the file and on the standard std::cout -Usage is : main , " +Usage is : blind_1pt , " in_points are sampled on 0.1(x²+2y²) diff --git a/Jet_fitting_3/include/CGAL/Lapack/Linear_algebra_lapack.h b/Jet_fitting_3/include/CGAL/Lapack/Linear_algebra_lapack.h index 205c4e2a5c5..d66aa15a1f6 100644 --- a/Jet_fitting_3/include/CGAL/Lapack/Linear_algebra_lapack.h +++ b/Jet_fitting_3/include/CGAL/Lapack/Linear_algebra_lapack.h @@ -1,3 +1,6 @@ +// Copyright (c) 2007 INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA. +// 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. @@ -15,19 +18,35 @@ #ifndef CGAL_LAPACK_H #define CGAL_LAPACK_H -#ifdef CGAL_USE_F2C -#define my_dgelss dgelss_ -#else -#define my_dgelss dgelss -#endif - extern "C" { -int my_dgelss(int *m, int *n, int *nrhs, - double *a, int *lda, double *b, int *ldb, double * - s, double *rcond, int *rank, double *work, int *lwork, - int *info); +int dgelss(int *m, int *n, int *nrhs, + double *a, int *lda, double *b, int *ldb, double * + s, double *rcond, int *rank, double *work, int *lwork, + int *info); +int dgelss_(int *m, int *n, int *nrhs, + double *a, int *lda, double *b, int *ldb, double * + s, double *rcond, int *rank, double *work, int *lwork, + int *info); } +namespace CGAL { namespace LAPACK { + +inline +int dgelss(int *m, int *n, int *nrhs, + double *a, int *lda, double *b, int *ldb, double * + s, double *rcond, int *rank, double *work, int *lwork, + int *info) +{ +#ifdef CGAL_USE_F2C + return dgelss_(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info); +#else + return dgelss(m, n, nrhs, a, lda, b, ldb, s, rcond, rank, work, lwork, info); +#endif +} + +} } + + namespace CGAL { ////////////////////////class Lapack_vector///////////////////// @@ -112,7 +131,7 @@ public: FT rcond = -1; - my_dgelss(&m, &n, &nrhs, M.matrix(), &lda, B.vector(), &ldb, sing_values, + LAPACK::dgelss(&m, &n, &nrhs, M.matrix(), &lda, B.vector(), &ldb, sing_values, &rcond, &rank, work, &lwork, &info); assert(info==0); diff --git a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h index 367e33ac25b..6c885a8af37 100644 --- a/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h +++ b/Jet_fitting_3/include/CGAL/Monge_via_jet_fitting.h @@ -1,3 +1,6 @@ +// Copyright (c) 2007 INRIA Sophia-Antipolis (France), INRIA Lorraine LORIA. +// 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.