[GRASS-SVN] r38961 - in grass/branches/develbranch_6: include lib/external/ccmath

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Sep 3 17:44:00 EDT 2009


Author: huhabla
Date: 2009-09-03 17:43:59 -0400 (Thu, 03 Sep 2009)
New Revision: 38961

Removed:
   grass/branches/develbranch_6/lib/external/ccmath/ccmath_grass.h
Modified:
   grass/branches/develbranch_6/include/gmath.h
   grass/branches/develbranch_6/lib/external/ccmath/Makefile
Log:
Adding missing function prototypes to gmath.h.
Handling of ccmath.h and ccmath_grass.h changed.


Modified: grass/branches/develbranch_6/include/gmath.h
===================================================================
--- grass/branches/develbranch_6/include/gmath.h	2009-09-03 20:21:50 UTC (rev 38960)
+++ grass/branches/develbranch_6/include/gmath.h	2009-09-03 21:43:59 UTC (rev 38961)
@@ -38,12 +38,12 @@
 int fft(int, double *[2], int, int, int);
 int fft2(int, double (*)[2], int, int, int);
 /* gauss.c */
-float gauss(int);
+double G_math_rand_gauss(int, double);
 /* max_pow2.c */
 long max_pow2 (long n);
 long min_pow2 (long n);
 /* rand1.c */
-float rand1(int);
+float G_math_rand(int);
 /* del2g.c */
 int del2g(double *[2], int, double);
 /* getg.c */
@@ -52,8 +52,12 @@
 int G_math_egvorder(double *, double **, long);
 /* mult.c */
 int G_math_complex_mult (double *v1[2], int size1, double *v2[2], int size2, double *v3[2], int size3);
+/* lu.c*/
+int G_ludcmp(double **, int, int *, double *);
+void G_lubksb(double **a, int n, int *indx, double b[]);
 
 
+
 /* *************************************************************** */
 /* ***** WRAPPER FOR CCMATH FUNCTIONS USED IN GRASS ************** */
 /* *************************************************************** */

Modified: grass/branches/develbranch_6/lib/external/ccmath/Makefile
===================================================================
--- grass/branches/develbranch_6/lib/external/ccmath/Makefile	2009-09-03 20:21:50 UTC (rev 38960)
+++ grass/branches/develbranch_6/lib/external/ccmath/Makefile	2009-09-03 21:43:59 UTC (rev 38961)
@@ -8,8 +8,8 @@
 default: $(ARCH_INCDIR)/ccmath_grass.h
 	$(MAKE) lib
 
-$(ARCH_INCDIR)/ccmath_grass.h: ccmath_grass.h
-	$(INSTALL_DATA) ccmath_grass.h $(ARCH_INCDIR)/ccmath_grass.h
+$(ARCH_INCDIR)/ccmath_grass.h: ccmath.h
+	$(INSTALL_DATA) ccmath.h $(ARCH_INCDIR)/ccmath_grass.h
 
 #doxygen:
 DOXNAME=ccmath

Deleted: grass/branches/develbranch_6/lib/external/ccmath/ccmath_grass.h
===================================================================
--- grass/branches/develbranch_6/lib/external/ccmath/ccmath_grass.h	2009-09-03 20:21:50 UTC (rev 38960)
+++ grass/branches/develbranch_6/lib/external/ccmath/ccmath_grass.h	2009-09-03 21:43:59 UTC (rev 38961)
@@ -1,190 +0,0 @@
-/*  ccmath.h    CCMATH mathematics library source code.
- *
- *  Copyright (C)  2000   Daniel A. Atkinson    All rights reserved.
- *  This code may be redistributed under the terms of the GNU library
- *  public license (LGPL). ( See the lgpl.license file for details.)
- *
- * Modified by Soeren gebbert 2009/01/08.
- *
- * \attention Do not include this header file directly. Use the gmath.h file which
- * includes ccmath_grass_wrapper.h header file, to wrap the function names.
- * ------------------------------------------------------------------------
- */
-/*
-                               CCM
-
-                Numerical Analysis Toolkit Header File
-                      ELF Shared Library Version
-*/
-               /* Required for Shared Library */
-#ifndef _CCMATH_H_
-#define _CCMATH_H_
-#define XMATH 1
-
-          /* Define File Pointers and Standard Library */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
-               /* Definitions of Types */
-
-#ifndef NULL
-#define NULL ((void *)0
-#endif
-
-               /* Complex Types */
-
-#ifndef CPX
-struct complex {double re,im;};
-typedef struct complex Cpx;
-#define CPX  1
-#endif
-
-/*   Linear Algebra     */
-
-
- /* Real Linear Systems */
-
-
-     int minv(double *a,int n) ;
-
-     int psinv(double *v,int n) ;
-
-     int ruinv(double *a,int n) ;
-
-     int solv(double *a,double *b,int n) ;
-
-     int solvps(double *s,double *x,int n) ;
-
-     int solvru(double *a,double *b,int n) ;
-
-     void solvtd(double *a,double *b,double *c,double *x,int m) ;
-
-     void eigenvect(double *a,double *eval,int n) ; /*temporary commented out to avoid conflicts with the existing
-							eigen implementation of gmath lib. Soeren gebbert 10.08.2009*/
-
-     void eigval(double *a,double *eval,int n) ;
-
-     double evmax(double *a,double *u,int n) ;
-
-     int svdval(double *d,double *a,int m,int n) ;
-
-     int sv2val(double *d,double *a,int m,int n) ;
-
-     int svduv(double *d,double *a,double *u,int m,double *v,int n) ;
-
-     int sv2uv(double *d,double *a,double *u,int m,double *v,int n) ;
-
-     int svdu1v(double *d,double *a,int m,double *v,int n) ;
-
-     int sv2u1v(double *d,double *a,int m,double *v,int n) ;
-
-     void mmul(double *mat,double *a,double *b,int n) ;
-
-     void rmmult(double *mat,double *a,double *b,int m,int k,int n) ;
-
-     void vmul(double *vp,double *mat,double *v,int n) ;
-
-     double vnrm(double *u,double *v,int n) ;
-     
-     void matprt(double *a,int n,int m,char *fmt) ;
-
-     void fmatprt(FILE *fp,double *a,int n,int m,char *fmt) ;
-
-     void trnm(double *a,int n) ;
-
-     void mattr(double *a,double *b,int m,int n) ;
-
-     void otrma(double *at,double *u,double *a,int n) ;
-
-     void otrsm(double *st,double *u,double *s0,int n) ;
-
-     void mcopy(double *a,double *b,int m) ;
-
-     void ortho(double *evc,int n) ;
-
-     void smgen(double *a,double *eval,double *evec,int n) ;
-
-   /* utility routines for real symmertic eigensystems */
-
-     void house(double *a,double *d,double *ud,int n) ;
-
-     void housev(double *a,double *d,double *ud,int n) ;
-
-     int qreval(double *eval,double *ud,int n) ;
-
-     int qrevec(double *eval,double *evec,double *dp,int n) ;
-
-   /* utility routines for singular value decomposition */
-
-     int qrbdi(double *d, double *e,int n) ;
-
-     int qrbdv(double *d, double *e,double *u,int m,double *v,int n) ;
-
-     int qrbdu1(double *d, double *e,double *u,int m,double *v,int n) ;
-
-     void ldumat(double *a,double *u,int m,int n) ;
-
-     void ldvmat(double *a,double *v,int n) ;
-
-     void atou1(double *a,int m,int n) ;
-
-     void atovm(double *v,int n) ;
-
-
- /* Complex Matrix Algebra */
-
-
-     int cminv(Cpx *a,int n) ;
-
-     int csolv(Cpx *a,Cpx *b,int n) ;
-
-     void heigvec(Cpx *a,double *eval,int n) ;
-
-     void heigval(Cpx *a,double *eval,int n) ;
-
-     double hevmax(Cpx *a,Cpx *u,int n) ;
-
-     void cmmul(Cpx *c,Cpx *a,Cpx *b,int n) ;
-
-     void cmmult(Cpx *c,Cpx *a,Cpx *b,int m,int k,int n) ;
-
-     void cvmul(Cpx *vp,Cpx *mat,Cpx *v,int n) ;
-
-     Cpx cvnrm(Cpx *u,Cpx *v,int n) ;
-
-     void cmprt(Cpx *a,int n,int m,char *fmt) ;
-
-     void trncm(Cpx *a,int n) ;
-
-     void hconj(Cpx *u,int n) ;
-
-     void cmattr(Cpx *a,Cpx *b,int m,int n) ;
-
-     void utrncm(Cpx *at,Cpx *u,Cpx *a,int n) ;
-
-     void utrnhm(Cpx *ht,Cpx *u,Cpx *h0,int n) ;
-
-     void cmcpy(Cpx *a,Cpx *b,int n) ;
-
-     void unitary(Cpx *u,int n) ;
-
-     void hmgen(Cpx *h,double *eval,Cpx *u,int n) ;
-
-
-   /* utility routines for hermitian eigen problems */
-
-     void chouse(Cpx *a,double *d,double *ud,int n) ;
-
-     void chousv(Cpx *a,double *d,double *ud,int n) ;
-
-     void qrecvc(double *eval,Cpx *evec,double *ud,int n) ;
-
-     /* Simulation support */
-
-     double unfl() ;
-
-     void setunfl(unsigned int seed) ;
-
-#endif



More information about the grass-commit mailing list