]> git.mxchange.org Git - flightgear.git/blobdiff - DEM/leastsqs.cxx
Removed zlib support.
[flightgear.git] / DEM / leastsqs.cxx
index 7414fa628c17457bd528fbf15a50068e82e10d68..a97581de4b8d02e0b6b585f894747fae2872534d 100644 (file)
@@ -1,26 +1,26 @@
-/* leastsqs.c -- Implements a simple linear least squares best fit routine
- *
- * Written by Curtis Olson, started September 1997.
- *
- * Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- * (Log is kept at end of this file)
- */
+// leastsqs.c -- Implements a simple linear least squares best fit routine
+//
+// Written by Curtis Olson, started September 1997.
+//
+// Copyright (C) 1997  Curtis L. Olson  - curt@infoplane.com
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+// (Log is kept at end of this file)
+//
 
 
 #include <stdio.h>
@@ -81,7 +81,7 @@ double least_squares_error(double *x, double *y, int n, double m, double b) {
     for ( i = 0; i < n; i++ ) {
        error = y[i] - (m * x[i] + b);
        sum += error * error;
-       /* printf("%.2f %.2f\n", error, sum); */
+       // printf("%.2f %.2f\n", error, sum);
     }
 
     return ( sum / (double)n );
@@ -111,14 +111,16 @@ double least_squares_max_error(double *x, double *y, int n, double m, double b){
 }
 
 
-/* $Log$
-/* Revision 1.1  1998/04/08 22:57:24  curt
-/* Adopted Gnu automake/autoconf system.
-/*
- * Revision 1.1  1998/03/19 02:54:47  curt
- * Reorganized into a class lib called fgDEM.
- *
- * Revision 1.1  1997/10/13 17:02:35  curt
- * Initial revision.
- *
- */
+// $Log$
+// Revision 1.2  1998/04/21 17:03:41  curt
+// Prepairing for C++ integration.
+//
+// Revision 1.1  1998/04/08 22:57:24  curt
+// Adopted Gnu automake/autoconf system.
+//
+// Revision 1.1  1998/03/19 02:54:47  curt
+// Reorganized into a class lib called fgDEM.
+//
+// Revision 1.1  1997/10/13 17:02:35  curt
+// Initial revision.
+//