Changeset 35274


Ignore:
Timestamp:
Jan 7, 2009, 11:27:36 AM (16 years ago)
Author:
glynn
Message:

Various files have moved from lib/gis to lib/gmath:

Update gisdefs.h and gmath.h accordingly
Update clients accordingly
Generalise eigen(), remove local version from i.smap

Location:
grass/trunk
Files:
1 deleted
17 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/imagery/i.gensigset/invert.c

    r32526 r35274  
    11#include <grass/gis.h>
     2#include <grass/gmath.h>
    23
    34int invert(
  • grass/trunk/imagery/i.gensigset/subcluster.c

    r34870 r35274  
    44#include <grass/imagery.h>
    55#include <grass/glocale.h>
     6#include <grass/gmath.h>
    67#include "local_proto.h"
    78
  • grass/trunk/imagery/i.smap/bouman.h

    r34872 r35274  
    5454double solve(double (*)(double), double, double, double, int *);
    5555
    56 /* Subroutine in eigen.c */
    57 int eigen(double **, double *, int);
    58 
    5956/* Subroutine in invert.c */
    6057int invert(double **, int);
  • grass/trunk/imagery/i.smap/invert.c

    r34871 r35274  
    11#include <math.h>
    22#include <grass/gis.h>
     3#include <grass/gmath.h>
    34
    45int invert(
  • grass/trunk/imagery/i.smap/model.c

    r34871 r35274  
    22#include <grass/glocale.h>
    33#include <grass/imagery.h>
     4#include <grass/gmath.h>
    45#include "bouman.h"
    56#include "region.h"
     
    4344
    4445            /* Test for positive definite matrix */
    45             eigen(SubS->Rinv, lambda, nbands);
     46            eigen(SubS->Rinv, NULL, lambda, nbands);
    4647            for (b1 = 0; b1 < nbands; b1++) {
    4748                if (lambda[b1] <= 0.0)
  • grass/trunk/include/gisdefs.h

    r34748 r35274  
    394394int G_counter_next(struct Counter *);
    395395
    396 /* dalloc.c */
    397 double *G_alloc_vector(size_t);
    398 double **G_alloc_matrix(int, int);
    399 float *G_alloc_fvector(size_t);
    400 float **G_alloc_fmatrix(int, int);
    401 void G_free_vector(double *);
    402 void G_free_matrix(double **);
    403 void G_free_fvector(float *);
    404 void G_free_fmatrix(float **);
    405 
    406396/* date.c */
    407397const char *G_date(void);
     
    430420/* done_msg.c */
    431421void G_done_msg(const char *, ...) __attribute__ ((format(printf, 1, 2)));
    432 
    433 /* eigen_tools.c */
    434 int G_tqli(double[], double[], int, double **);
    435 void G_tred2(double **, int, double[], double[]);
    436422
    437423/* endian.c */
     
    652638const char *G__home(void);
    653639
    654 /* ialloc.c */
    655 int *G_alloc_ivector(size_t);
    656 int **G_alloc_imatrix(int, int);
    657 void G_free_ivector(int *);
    658 void G_free_imatrix(int **);
    659 
    660640/* index.c */
    661641char *G_index(const char *, int);
     
    740720void G_ls(const char *, FILE *);
    741721void G_ls_format(char **, int, int, FILE *);
    742 
    743 /* lu.c */
    744 int G_ludcmp(double **, int, int *, double *);
    745 void G_lubksb(double **, int, int *, double[]);
    746722
    747723/* mach_name.c */
     
    10981074char *G_squeeze(char *);
    10991075
    1100 /* svd.c */
    1101 int G_svdcmp(double **, int, int, double *, double **);
    1102 int G_svbksb(double **, double[], double **, int, int, double[], double[]);
    1103 int G_svelim(double *, int);
    1104 
    11051076/* system.c */
    11061077int G_system(const char *);
  • grass/trunk/include/gmath.h

    r32526 r35274  
    6969         int size3);
    7070
     71/* dalloc.c */
     72double *G_alloc_vector(size_t);
     73double **G_alloc_matrix(int, int);
     74float *G_alloc_fvector(size_t);
     75float **G_alloc_fmatrix(int, int);
     76void G_free_vector(double *);
     77void G_free_matrix(double **);
     78void G_free_fvector(float *);
     79void G_free_fmatrix(float **);
     80
     81/* eigen_tools.c */
     82int G_tqli(double[], double[], int, double **);
     83void G_tred2(double **, int, double[], double[]);
     84
     85/* ialloc.c */
     86int *G_alloc_ivector(size_t);
     87int **G_alloc_imatrix(int, int);
     88void G_free_ivector(int *);
     89void G_free_imatrix(int **);
     90
     91/* lu.c */
     92int G_ludcmp(double **, int, int *, double *);
     93void G_lubksb(double **, int, int *, double[]);
     94
     95/* svd.c */
     96int G_svdcmp(double **, int, int, double *, double **);
     97int G_svbksb(double **, double[], double **, int, int, double[], double[]);
     98int G_svelim(double *, int);
     99
    71100#endif /* GMATH_H_ */
  • grass/trunk/lib/gmath/eigen.c

    r32526 r35274  
    4444
    4545    /* Returns eigenvectors */
    46     for (i = 0; i < n; i++)
    47         for (j = 0; j < n; j++)
    48             Vectors[i][j] = a[i][j];
     46    if (Vectors)
     47        for (i = 0; i < n; i++)
     48            for (j = 0; j < n; j++)
     49                Vectors[i][j] = a[i][j];
    4950
    5051    G_free_matrix(a);
  • grass/trunk/lib/gmath/lu.c

    r32526 r35274  
    11#include <math.h>
    22#include <grass/gis.h>
     3#include <grass/gmath.h>
    34
    45
  • grass/trunk/lib/gmath/svd.c

    r32526 r35274  
     1#include <math.h>
    12#include <grass/gis.h>
    2 #include <math.h>
     3#include <grass/gmath.h>
    34
    45static double at, bt, ct;
  • grass/trunk/lib/rst/interp_float/matrix.c

    r32526 r35274  
    2626#include <grass/gis.h>
    2727#include <grass/interpf.h>
     28#include <grass/gmath.h>
    2829
    2930int IL_matrix_create(struct interp_params *params, struct triple *points,       /* points for interpolation */
  • grass/trunk/lib/rst/interp_float/ressegm2d.c

    r32526 r35274  
    2424#include <grass/gis.h>
    2525#include <grass/interpf.h>
     26#include <grass/gmath.h>
    2627
    2728static int input_data(struct interp_params *,
  • grass/trunk/lib/rst/interp_float/segmen2d.c

    r32585 r35274  
    99#include <grass/gis.h>
    1010#include <grass/glocale.h>
    11 
    1211#include <grass/interpf.h>
     12#include <grass/gmath.h>
    1313
    1414static double smallest_segment(struct multtree *, int);
  • grass/trunk/raster/r.param.scale/process.c

    r32586 r35274  
    1717#include <grass/gis.h>
    1818#include <grass/glocale.h>
     19#include <grass/gmath.h>
    1920#include "param.h"
    2021#include "nrutil.h"
  • grass/trunk/raster/r.resamp.rst/main.c

    r34460 r35274  
    4343#include <grass/interpf.h>
    4444#include <grass/glocale.h>
     45#include <grass/gmath.h>
    4546
    4647static double /* pargr */ ns_res, ew_res, inp_ew_res, inp_ns_res;
  • grass/trunk/vector/lidar/lidarlib/PolimiFunct.h

    r33769 r35274  
    2121#define _POLIMIFUNCT_H_
    2222
     23#include <grass/config.h>
    2324#include <grass/gis.h>
    2425#include <grass/Vect.h>
    2526#include <grass/dbmi.h>
    2627#include <grass/glocale.h>
    27 #include <grass/config.h>
    28 
     28#include <grass/gmath.h>
    2929
    3030/*----------------------------------------------------------------------------------------------------------*/
  • grass/trunk/vector/v.surf.rst/main.c

    r34654 r35274  
    4545#include "surf.h"
    4646#include <grass/dataquad.h>
     47#include <grass/gmath.h>
    4748
    4849
Note: See TracChangeset for help on using the changeset viewer.