[GRASS-SVN] r64254 - grass-addons/grass7/imagery/i.spec.sam

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 20 06:43:50 PST 2015


Author: ychemin
Date: 2015-01-20 06:43:49 -0800 (Tue, 20 Jan 2015)
New Revision: 64254

Removed:
   grass-addons/grass7/imagery/i.spec.sam/err.h
   grass-addons/grass7/imagery/i.spec.sam/machine.h
   grass-addons/grass7/imagery/i.spec.sam/matrix.h
   grass-addons/grass7/imagery/i.spec.sam/matrix2.h
   grass-addons/grass7/imagery/i.spec.sam/meminfo.h
Modified:
   grass-addons/grass7/imagery/i.spec.sam/Makefile
   grass-addons/grass7/imagery/i.spec.sam/main.c
   grass-addons/grass7/imagery/i.spec.sam/open.c
   grass-addons/grass7/imagery/i.spec.sam/spec_angle.c
Log:
fixed by linking to meschach library directly (Ubuntu: libmeschach)

Modified: grass-addons/grass7/imagery/i.spec.sam/Makefile
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/Makefile	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/Makefile	2015-01-20 14:43:49 UTC (rev 64254)
@@ -2,11 +2,10 @@
 
 PGM = i.spec.sam
 
-EXTRALIB = meschach.a
-LIBES     = $(IMAGERYLIB) $(GMATHLIB) $(RASTERLIB) $(GISLIB)  
+LIBES     = $(IMAGERYLIB) $(GMATHLIB) $(RASTERLIB) $(GISLIB) -lmeschach
 DEPENDENCIES= $(IMAGERYDEP) $(GMATHDEP) $(RASTERDEP) $(GISDEP)
 
-EXTRA_INC =  $(VECT_INC) $(PROJINC)
+EXTRA_INC =  -I/usr/include/meschach
 
 include $(MODULE_TOPDIR)/include/Make/Module.make
 

Deleted: grass-addons/grass7/imagery/i.spec.sam/err.h
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/err.h	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/err.h	2015-01-20 14:43:49 UTC (rev 64254)
@@ -1,183 +0,0 @@
-
-/**************************************************************************
-**
-** Copyright (C) 1993 David E. Stewart & Zbigniew Leyk, all rights reserved.
-**
-**			     Meschach Library
-** 
-** This Meschach Library is provided "as is" without any express 
-** or implied warranty of any kind with respect to this software. 
-** In particular the authors shall not be liable for any direct, 
-** indirect, special, incidental or consequential damages arising 
-** in any way from use of the software.
-** 
-** Everyone is granted permission to copy, modify and redistribute this
-** Meschach Library, provided:
-**  1.  All copies contain this copyright notice.
-**  2.  All modified copies shall carry a notice stating who
-**      made the last modification and the date of such modification.
-**  3.  No charge is made for this software or works derived from it.  
-**      This clause shall not be construed as constraining other software
-**      distributed on the same medium as this software, nor is a
-**      distribution fee considered a charge.
-**
-***************************************************************************/
-
-
-/* err.h  28/09/1993 */
-
-/*  RCS id: $Id: err.h,v 1.2 1995/01/30 14:48:05 des Exp $  */
-
-
-#ifndef ERRHEADER
-#define ERRHEADER
-
-
-#include        <setjmp.h>
-#include        "machine.h"
-
-/* Error recovery */
-
-extern	jmp_buf	restart;
-
-
-/* max. # of error lists */
-#define ERR_LIST_MAX_LEN   10
-
-/* main error functions */
-#ifndef ANSI_C
-extern	int ev_err();			/* main error handler */
-extern	int set_err_flag();		/* for different ways of handling
-                                                errors, returns old value */
-extern  int count_errs();		/* to avoid "too many errors" */
-extern  int err_list_attach();		/* for attaching a list of errors */
-extern  int err_is_list_attached();	/* checking if a list is attached */
-extern  int err_list_free();		/* freeing a list of errors */
-
-#else  /* ANSI_C */
-
-extern	int ev_err(char *,int,int,char *,int);  /* main error handler */
-extern	int set_err_flag(int flag);         /* for different ways of handling
-                                                errors, returns old value */
-extern  int count_errs(int true_false);     /* to avoid "too many errors" */
-extern  int err_list_attach(int list_num, int list_len,
-	       char **err_ptr,int warn);  /* for attaching a list of errors */
-extern  int err_is_list_attached(int list_num);  /* checking if a list 
-						    is attached */
-extern  int err_list_free(int list_num);   /* freeing a list of errors */
-
-#endif
-
-
-/* error(E_TYPE,"myfunc") raises error type E_TYPE for function my_func() */
-#define	error(err_num,fn_name)	ev_err(__FILE__,err_num,__LINE__,fn_name,0)
-
-/* warning(WARN_TYPE,"myfunc") raises warning type WARN_TYPE for 
-   function my_func() */
-#define warning(err_num,fn_name) ev_err(__FILE__,err_num,__LINE__,fn_name,1) 
-
-
-/* error flags */
-#define	EF_EXIT		0	/* exit on error */
-#define	EF_ABORT	1	/* abort (dump core) on error */
-#define	EF_JUMP		2	/* jump on error */
-#define	EF_SILENT	3	/* jump, but don't print message */
-#define	ERREXIT()	set_err_flag(EF_EXIT)
-#define	ERRABORT()	set_err_flag(EF_ABORT)
-/* don't print message */
-#define	SILENTERR()	if ( ! setjmp(restart) ) set_err_flag(EF_SILENT)
-/* return here on error */
-#define	ON_ERROR()	if ( ! setjmp(restart) ) set_err_flag(EF_JUMP)
-
-
-/* error types */
-#define	E_UNKNOWN	0
-#define	E_SIZES		1
-#define	E_BOUNDS	2
-#define	E_MEM		3
-#define	E_SING		4
-#define	E_POSDEF	5
-#define	E_FORMAT	6
-#define	E_INPUT		7
-#define	E_NULL		8
-#define	E_SQUARE	9
-#define	E_RANGE		10
-#define	E_INSITU2	11
-#define	E_INSITU	12
-#define	E_ITER		13
-#define	E_CONV		14
-#define	E_START		15
-#define	E_SIGNAL	16
-#define	E_INTERN	17
-#define	E_EOF		18
-#define E_SHARED_VECS   19
-#define E_NEG           20
-#define E_OVERWRITE     21
-#define E_BREAKDOWN     22
-
-/* warning types */
-#define WARN_UNKNOWN     	0
-#define WARN_WRONG_TYPE 	1
-#define WARN_NO_MARK		2
-#define WARN_RES_LESS_0         3
-#define WARN_SHARED_VEC		4
-
-
-/* error catching macros */
-
-/* execute err_part if error errnum is raised while executing ok_part */
-#define	catch(errnum,ok_part,err_part)	\
-	{	jmp_buf _save;	int _err_num, _old_flag; \
-		_old_flag = set_err_flag(EF_SILENT); \
-		MEM_COPY(restart,_save,sizeof(jmp_buf)); \
-		if ( (_err_num=setjmp(restart)) == 0 ) \
-		{	ok_part; \
-			set_err_flag(_old_flag); \
-			MEM_COPY(_save,restart,sizeof(jmp_buf));	} \
-		else if ( _err_num == errnum ) \
-		{	set_err_flag(_old_flag);  \
-			MEM_COPY(_save,restart,sizeof(jmp_buf)); \
-			err_part;	} \
-		else {	set_err_flag(_old_flag); \
-			MEM_COPY(_save,restart,sizeof(jmp_buf)); \
-			error(_err_num,"catch"); \
-		} \
-	}
-
-
-/* execute err_part if any error raised while executing ok_part */
-#define	catchall(ok_part,err_part) \
-	{	jmp_buf _save;	int _err_num, _old_flag; \
-		_old_flag = set_err_flag(EF_SILENT); \
-		MEM_COPY(restart,_save,sizeof(jmp_buf)); \
-		if ( (_err_num=setjmp(restart)) == 0 ) \
-		{	ok_part; \
-			set_err_flag(_old_flag); \
-			MEM_COPY(_save,restart,sizeof(jmp_buf));	} \
-		else \
-		{	set_err_flag(_old_flag);  \
-			MEM_COPY(_save,restart,sizeof(jmp_buf)); \
-			err_part;	} \
-	}
-
-
-/* print message if error raised while executing ok_part,
-                then re-raise error to trace calls */
-#define	tracecatch(ok_part,function) \
-	{	jmp_buf _save;	int _err_num, _old_flag; \
-		_old_flag = set_err_flag(EF_JUMP); \
-		MEM_COPY(restart,_save,sizeof(jmp_buf)); \
-		if ( (_err_num=setjmp(restart)) == 0 ) \
-		{	ok_part; \
-			set_err_flag(_old_flag); \
-			MEM_COPY(_save,restart,sizeof(jmp_buf));	} \
-		else \
-		{	set_err_flag(_old_flag);  \
-			MEM_COPY(_save,restart,sizeof(jmp_buf)); \
-			error(_err_num,function);	} \
-	}
-
-
-
-#endif   /* ERRHEADER */
-

Deleted: grass-addons/grass7/imagery/i.spec.sam/machine.h
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/machine.h	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/machine.h	2015-01-20 14:43:49 UTC (rev 64254)
@@ -1,193 +0,0 @@
-/* machine.h.  Generated automatically by configure.  */
-/* Any machine specific stuff goes here */
-/* Add details necessary for your own installation here! */
-
-/* This is for use with "configure" -- if you are not using configure
-	then use machine.van for the "vanilla" version of machine.h */
-
-/* Note special macros: ANSI_C (ANSI C syntax)
-			SEGMENTED (segmented memory machine e.g. MS-DOS)
-			MALLOCDECL (declared if malloc() etc have
-					been declared) */
-
-/* #undef const */
-
-/* #undef MALLOCDECL */
-#define NOT_SEGMENTED 1
-/* #undef HAVE_COMPLEX_H */
-#define HAVE_MALLOC_H 1
-#define STDC_HEADERS 1
-#define HAVE_BCOPY 1
-#define HAVE_BZERO 1
-#define CHAR0ISDBL0 1
-/* #undef WORDS_BIGENDIAN */
-#define U_INT_DEF 1
-#define VARARGS 1
-
-
-/* for basic or larger versions */
-#define COMPLEX 1
-#define SPARSE 1
-
-/* for loop unrolling */
-/* #undef VUNROLL */
-/* #undef MUNROLL */
-
-/* for segmented memory */
-#ifndef NOT_SEGMENTED
-#define	SEGMENTED
-#endif
-
-/* if the system has malloc.h */
-#ifdef HAVE_MALLOC_H
-#define	MALLOCDECL	1
-#include	<malloc.h>
-#endif
-
-/* any compiler should have this header */
-/* if not, change it */
-#include        <stdio.h>
-
-
-/* Check for ANSI C memmove and memset */
-#ifdef STDC_HEADERS
-
-/* standard copy & zero functions */
-#define	MEM_COPY(from,to,size)	memmove((to),(from),(size))
-#define	MEM_ZERO(where,size)	memset((where),'\0',(size))
-
-#ifndef ANSI_C
-#define ANSI_C 1
-#endif
-
-#endif
-
-/* standard headers */
-#ifdef ANSI_C
-#include	<stdlib.h>
-#include	<stddef.h>
-#include	<string.h>
-#include	<float.h>
-#endif
-
-
-/* if have bcopy & bzero and no alternatives yet known, use them */
-#ifdef HAVE_BCOPY
-#ifndef MEM_COPY
-/* nonstandard copy function */
-#define	MEM_COPY(from,to,size)	bcopy((char *)(from),(char *)(to),(int)(size))
-#endif
-#endif
-
-#ifdef HAVE_BZERO
-#ifndef MEM_ZERO
-/* nonstandard zero function */
-#define	MEM_ZERO(where,size)	bzero((char *)(where),(int)(size))
-#endif
-#endif
-
-/* if the system has complex.h */
-#ifdef HAVE_COMPLEX_H
-#include	<complex.h>
-#endif
-
-/* If prototypes are available & ANSI_C not yet defined, then define it,
-	but don't include any header files as the proper ANSI C headers
-        aren't here */
-#define HAVE_PROTOTYPES 1
-#ifdef HAVE_PROTOTYPES
-#ifndef ANSI_C
-#define ANSI_C  1
-#endif
-#endif
-
-/* floating point precision */
-
-/* you can choose single, double or long double (if available) precision */
-
-#define FLOAT 		1
-#define DOUBLE 		2
-#define LONG_DOUBLE 	3
-
-/* #undef REAL_FLT */
-/* #undef REAL_DBL */
-
-/* if nothing is defined, choose double precision */
-#ifndef REAL_DBL
-#ifndef REAL_FLT
-#define REAL_DBL 1
-#endif
-#endif
-
-/* single precision */
-#ifdef REAL_FLT
-#define  RReal float
-#define  LongReal float
-#define REAL FLOAT
-#define LONGREAL FLOAT
-#endif
-
-/* double precision */
-#ifdef REAL_DBL
-#define RReal double
-#define LongReal double
-#define REAL DOUBLE
-#define LONGREAL DOUBLE
-#endif
-
-
-/* machine epsilon or unit roundoff error */
-/* This is correct on most IEEE Real precision systems */
-#ifdef DBL_EPSILON
-#if REAL == DOUBLE
-#define	MACHEPS	DBL_EPSILON
-#elif REAL == FLOAT
-#define	MACHEPS	FLT_EPSILON
-#elif REAL == LONGDOUBLE
-#define MACHEPS LDBL_EPSILON
-#endif
-#endif
-
-#define F_MACHEPS 1.19209e-07
-#define D_MACHEPS 2.22045e-16
-
-#ifndef MACHEPS
-#if REAL == DOUBLE
-#define	MACHEPS	D_MACHEPS
-#elif REAL == FLOAT  
-#define MACHEPS F_MACHEPS
-#elif REAL == LONGDOUBLE
-#define MACHEPS D_MACHEPS
-#endif
-#endif
-
-/* #undef M_MACHEPS */
-
-/********************
-#ifdef DBL_EPSILON
-#define	MACHEPS	DBL_EPSILON
-#endif
-#ifdef M_MACHEPS
-#ifndef MACHEPS
-#define MACHEPS	M_MACHEPS
-#endif
-#endif
-********************/
-
-#define	M_MAX_INT 2147483647
-#ifdef	M_MAX_INT
-#ifndef MAX_RAND
-#define	MAX_RAND ((double)(M_MAX_INT))
-#endif
-#endif
-
-/* for non-ANSI systems */
-#ifndef HUGE_VAL
-#define HUGE_VAL HUGE
-#endif
-
-
-#ifdef ANSI_C
-extern	int	isatty(int);
-#endif
-

Modified: grass-addons/grass7/imagery/i.spec.sam/main.c
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/main.c	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/main.c	2015-01-20 14:43:49 UTC (rev 64254)
@@ -15,17 +15,15 @@
  *
  ********************************************************************/
              
-#include "global.h"
 #include <stdio.h>
 #include <strings.h>
 #include <math.h>
-#include "matrix.h"
-#include "matrix2.h"
-#include "local_proto.h"
-#include "grass/raster.h"
-#include "grass/vector.h"
-#include "grass/glocale.h"
 #include "grass/gis.h"
+#include "grass/raster.h"
+#include "local_proto.h"
+#include "global.h"
+#include <meschach/matrix.h>
+#include <meschach/matrix2.h>
 
 MAT *A;
 VEC *b, *Avector;

Deleted: grass-addons/grass7/imagery/i.spec.sam/matrix.h
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/matrix.h	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/matrix.h	2015-01-20 14:43:49 UTC (rev 64254)
@@ -1,665 +0,0 @@
-
-/**************************************************************************
-**
-** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved.
-**
-**			     Meschach Library
-** 
-** This Meschach Library is provided "as is" without any express 
-** or implied warranty of any kind with respect to this software. 
-** In particular the authors shall not be liable for any direct, 
-** indirect, special, incidental or consequential damages arising 
-** in any way from use of the software.
-** 
-** Everyone is granted permission to copy, modify and redistribute this
-** Meschach Library, provided:
-**  1.  All copies contain this copyright notice.
-**  2.  All modified copies shall carry a notice stating who
-**      made the last modification and the date of such modification.
-**  3.  No charge is made for this software or works derived from it.  
-**      This clause shall not be construed as constraining other software
-**      distributed on the same medium as this software, nor is a
-**      distribution fee considered a charge.
-**
-***************************************************************************/
-
-
-/*
-		Type definitions for general purpose maths package
-*/
-
-#ifndef	MATRIXH
-
-/* RCS id: $Id: matrix.h,v 1.18 1994/04/16 00:33:37 des Exp $ */
-
-#define	MATRIXH	
-
-#include	"machine.h"
-#include        "err.h"
-#include 	"meminfo.h"
-
-/* unsigned integer type */
-#ifndef U_INT_DEF
-typedef	unsigned int	u_int;
-#define U_INT_DEF
-#endif
-
-/* vector definition */
-typedef	struct	{
-		u_int	dim, max_dim;
-		RReal	*ve;
-		} VEC;
-
-/* matrix definition */
-typedef	struct	{
-		u_int	m, n;
-		u_int	max_m, max_n, max_size;
-		RReal	**me,*base;	/* base is base of alloc'd mem */
-		} MAT;
-
-/* band matrix definition */
-typedef struct {
-               MAT   *mat;       /* matrix */
-               int   lb,ub;    /* lower and upper bandwidth */
-               } BAND;
-
-
-/* permutation definition */
-typedef	struct	{
-		u_int	size, max_size, *pe;
-		} PERM;
-
-/* integer vector definition */
-typedef struct	{
-		u_int	dim, max_dim;
-		int	*ive;
-	        } IVEC;
-
-
-#ifndef MALLOCDECL
-#ifndef ANSI_C
-extern	char	*malloc(), *calloc(), *realloc();
-#else
-extern	void	*malloc(size_t),
-		*calloc(size_t,size_t),
-		*realloc(void *,size_t);
-#endif
-#endif
-
-#ifndef ANSI_C
-extern void m_version();
-#else
-void	m_version( void );
-#endif
-
-#ifndef ANSI_C
-/* allocate one object of given type */
-#define	NEW(type)	((type *)calloc(1,sizeof(type)))
-
-/* allocate num objects of given type */
-#define	NEW_A(num,type)	((type *)calloc((unsigned)(num),sizeof(type)))
-
- /* re-allocate arry to have num objects of the given type */
-#define	RENEW(var,num,type) \
-    ((var)=(type *)((var) ? \
-		    realloc((char *)(var),(unsigned)(num)*sizeof(type)) : \
-		    calloc((unsigned)(num),sizeof(type))))
-
-#define	MEMCOPY(from,to,n_items,type) \
-    MEM_COPY((char *)(from),(char *)(to),(unsigned)(n_items)*sizeof(type))
-
-#else
-/* allocate one object of given type */
-#define	NEW(type)	((type *)calloc((size_t)1,(size_t)sizeof(type)))
-
-/* allocate num objects of given type */
-#define	NEW_A(num,type)	((type *)calloc((size_t)(num),(size_t)sizeof(type)))
-
- /* re-allocate arry to have num objects of the given type */
-#define	RENEW(var,num,type) \
-    ((var)=(type *)((var) ? \
-		    realloc((char *)(var),(size_t)((num)*sizeof(type))) : \
-		    calloc((size_t)(num),(size_t)sizeof(type))))
-
-#define	MEMCOPY(from,to,n_items,type) \
- MEM_COPY((char *)(from),(char *)(to),(unsigned)(n_items)*sizeof(type))
-
-#endif
-
-/* type independent min and max operations */
-#ifndef max
-#define	max(a,b)	((a) > (b) ? (a) : (b))
-#endif
-#ifndef min
-#define	min(a,b)	((a) > (b) ? (b) : (a))
-#endif
-
-
-#undef TRUE
-#define	TRUE	1
-#undef FALSE
-#define	FALSE	0
-
-
-/* for input routines */
-#define MAXLINE 81
-
-
-/* Dynamic memory allocation */
-
-/* Should use M_FREE/V_FREE/PX_FREE in programs instead of m/v/px_free()
-   as this is considerably safer -- also provides a simple type check ! */
-
-#ifndef ANSI_C
-
-extern	VEC *v_get(), *v_resize();
-extern	MAT *m_get(), *m_resize();
-extern	PERM *px_get(), *px_resize();
-extern	IVEC *iv_get(), *iv_resize();
-extern	int m_free(),v_free();
-extern  int px_free();
-extern  int iv_free();
-extern  BAND *bd_get(), *bd_resize();
-extern  int bd_free();
-
-#else
-
-/* get/resize vector to given dimension */
-extern	VEC *v_get(int), *v_resize(VEC *,int);
-/* get/resize matrix to be m x n */
-extern	MAT *m_get(int,int), *m_resize(MAT *,int,int);
-/* get/resize permutation to have the given size */
-extern	PERM *px_get(int), *px_resize(PERM *,int);
-/* get/resize an integer vector to given dimension */
-extern	IVEC *iv_get(int), *iv_resize(IVEC *,int);
-/* get/resize a band matrix to given dimension */
-extern  BAND *bd_get(int,int,int), *bd_resize(BAND *,int,int,int);
-
-/* free (de-allocate) (band) matrices, vectors, permutations and 
-   integer vectors */
-extern  int iv_free(IVEC *);
-extern	int m_free(MAT *),v_free(VEC *),px_free(PERM *);
-extern  int bd_free(BAND *);
-
-#endif
-
-
-/* MACROS */
-
-/* macros that also check types and sets pointers to NULL */
-#define	M_FREE(mat)	( m_free(mat),	(mat)=(MAT *)NULL )
-#define V_FREE(vec)	( v_free(vec),	(vec)=(VEC *)NULL )
-#define	PX_FREE(px)	( px_free(px),	(px)=(PERM *)NULL )
-#define	IV_FREE(iv)	( iv_free(iv),	(iv)=(IVEC *)NULL )
-
-#define MAXDIM  	2001
-
-
-/* Entry level access to data structures */
-#ifdef DEBUG
-
-/* returns x[i] */
-#define	v_entry(x,i)	(((i) < 0 || (i) >= (x)->dim) ? \
-			 error(E_BOUNDS,"v_entry"), 0.0 : (x)->ve[i] )
-
-/* x[i] <- val */
-#define	v_set_val(x,i,val) ((x)->ve[i] = ((i) < 0 || (i) >= (x)->dim) ? \
-			    error(E_BOUNDS,"v_set_val"), 0.0 : (val))
-
-/* x[i] <- x[i] + val */
-#define	v_add_val(x,i,val) ((x)->ve[i] += ((i) < 0 || (i) >= (x)->dim) ? \
-			    error(E_BOUNDS,"v_add_val"), 0.0 : (val))
-
-/* x[i] <- x[i] - val */
-#define	v_sub_val(x,i,val) ((x)->ve[i] -= ((i) < 0 || (i) >= (x)->dim) ? \
-			    error(E_BOUNDS,"v_sub_val"), 0.0 : (val))
-
-/* returns A[i][j] */
-#define	m_entry(A,i,j)	(((i) < 0 || (i) >= (A)->m || \
-			  (j) < 0 || (j) >= (A)->n) ? \
-			 error(E_BOUNDS,"m_entry"), 0.0 : (A)->me[i][j] )
-
-/* A[i][j] <- val */
-#define	m_set_val(A,i,j,val) ((A)->me[i][j] = ((i) < 0 || (i) >= (A)->m || \
-					       (j) < 0 || (j) >= (A)->n) ? \
-			      error(E_BOUNDS,"m_set_val"), 0.0 : (val) )
-
-/* A[i][j] <- A[i][j] + val */
-#define	m_add_val(A,i,j,val) ((A)->me[i][j] += ((i) < 0 || (i) >= (A)->m || \
-						(j) < 0 || (j) >= (A)->n) ? \
-			      error(E_BOUNDS,"m_add_val"), 0.0 : (val) )
-
-/* A[i][j] <- A[i][j] - val */
-#define	m_sub_val(A,i,j,val) ((A)->me[i][j] -= ((i) < 0 || (i) >= (A)->m || \
-						(j) < 0 || (j) >= (A)->n) ? \
-			      error(E_BOUNDS,"m_sub_val"), 0.0 : (val) )
-#else
-
-/* returns x[i] */
-#define	v_entry(x,i)		((x)->ve[i])
-
-/* x[i] <- val */
-#define	v_set_val(x,i,val)	((x)->ve[i]  = (val))
-
-/* x[i] <- x[i] + val */
-#define	v_add_val(x,i,val)	((x)->ve[i] += (val))
-
- /* x[i] <- x[i] - val */
-#define	v_sub_val(x,i,val)	((x)->ve[i] -= (val))
-
-/* returns A[i][j] */
-#define	m_entry(A,i,j)		((A)->me[i][j])
-
-/* A[i][j] <- val */
-#define	m_set_val(A,i,j,val)	((A)->me[i][j]  = (val) )
-
-/* A[i][j] <- A[i][j] + val */
-#define	m_add_val(A,i,j,val)	((A)->me[i][j] += (val) )
-
-/* A[i][j] <- A[i][j] - val */
-#define	m_sub_val(A,i,j,val)	((A)->me[i][j] -= (val) )
-
-#endif
-
-
-/* I/O routines */
-#ifndef ANSI_C
-
-extern	void v_foutput(),m_foutput(),px_foutput();
-extern  void iv_foutput();
-extern	VEC *v_finput();
-extern	MAT *m_finput();
-extern	PERM *px_finput();
-extern	IVEC *iv_finput();
-extern	int fy_or_n(), fin_int(), yn_dflt(), skipjunk();
-extern	double fin_double();
-
-#else
-
-/* print x on file fp */
-void v_foutput(FILE *fp,VEC *x),
-       /* print A on file fp */
-	m_foutput(FILE *fp,MAT *A),
-       /* print px on file fp */
-	px_foutput(FILE *fp,PERM *px);
-/* print ix on file fp */
-void iv_foutput(FILE *fp,IVEC *ix);
-
-/* Note: if out is NULL, then returned object is newly allocated;
-        Also: if out is not NULL, then that size is assumed */
-
-/* read in vector from fp */
-VEC *v_finput(FILE *fp,VEC *out);
-/* read in matrix from fp */
-MAT *m_finput(FILE *fp,MAT *out);
-/* read in permutation from fp */
-PERM *px_finput(FILE *fp,PERM *out);
-/* read in int vector from fp */
-IVEC *iv_finput(FILE *fp,IVEC *out);
-
-/* fy_or_n -- yes-or-no to question in string s
-        -- question written to stderr, input from fp 
-        -- if fp is NOT a tty then return y_n_dflt */
-int fy_or_n(FILE *fp,char *s);
-
-/* yn_dflt -- sets the value of y_n_dflt to val */
-int yn_dflt(int val);
-
-/* fin_int -- return integer read from file/stream fp
-        -- prompt s on stderr if fp is a tty
-        -- check that x lies between low and high: re-prompt if
-                fp is a tty, error exit otherwise
-        -- ignore check if low > high           */
-int fin_int(FILE *fp,char *s,int low,int high);
-
-/* fin_double -- return double read from file/stream fp
-        -- prompt s on stderr if fp is a tty
-        -- check that x lies between low and high: re-prompt if
-                fp is a tty, error exit otherwise
-        -- ignore check if low > high           */
-double fin_double(FILE *fp,char *s,double low,double high);
-
-/* it skips white spaces and strings of the form #....\n
-   Here .... is a comment string */
-int skipjunk(FILE *fp);
-
-#endif
-
-
-/* MACROS */
-
-/* macros to use stdout and stdin instead of explicit fp */
-#define	v_output(vec)	v_foutput(stdout,vec)
-#define	v_input(vec)	v_finput(stdin,vec)
-#define	m_output(mat)	m_foutput(stdout,mat)
-#define	m_input(mat)	m_finput(stdin,mat)
-#define	px_output(px)	px_foutput(stdout,px)
-#define	px_input(px)	px_finput(stdin,px)
-#define	iv_output(iv)	iv_foutput(stdout,iv)
-#define	iv_input(iv)	iv_finput(stdin,iv)
-
-/* general purpose input routine; skips comments # ... \n */
-#define	finput(fp,prompt,fmt,var) \
-	( ( isatty(fileno(fp)) ? fprintf(stderr,prompt) : skipjunk(fp) ), \
-							fscanf(fp,fmt,var) )
-#define	input(prompt,fmt,var)	finput(stdin,prompt,fmt,var)
-#define	fprompter(fp,prompt) \
-	( isatty(fileno(fp)) ? fprintf(stderr,prompt) : skipjunk(fp) )
-#define	prompter(prompt)	fprompter(stdin,prompt)
-#define	y_or_n(s)	fy_or_n(stdin,s)
-#define	in_int(s,lo,hi)	fin_int(stdin,s,lo,hi)
-#define	in_double(s,lo,hi)	fin_double(stdin,s,lo,hi)
-
-/* Copying routines */
-#ifndef ANSI_C
-extern	MAT	*_m_copy(), *m_move(), *vm_move();
-extern	VEC	*_v_copy(), *v_move(), *mv_move();
-extern	PERM	*px_copy();
-extern	IVEC	*iv_copy(), *iv_move();
-extern  BAND    *bd_copy();
-
-#else
-
-/* copy in to out starting at out[i0][j0] */
-extern	MAT	*_m_copy(MAT *in,MAT *out,u_int i0,u_int j0),
-		* m_move(MAT *in, int, int, int, int, MAT *out, int, int),
-		*vm_move(VEC *in, int, MAT *out, int, int, int, int);
-/* copy in to out starting at out[i0] */
-extern	VEC	*_v_copy(VEC *in,VEC *out,u_int i0),
-		* v_move(VEC *in, int, int, VEC *out, int),
-		*mv_move(MAT *in, int, int, int, int, VEC *out, int);
-extern	PERM	*px_copy(PERM *in,PERM *out);
-extern	IVEC	*iv_copy(IVEC *in,IVEC *out),
-		*iv_move(IVEC *in, int, int, IVEC *out, int);
-extern  BAND    *bd_copy(BAND *in,BAND *out);
-
-#endif
-
-
-/* MACROS */
-#define	m_copy(in,out)	_m_copy(in,out,0,0)
-#define	v_copy(in,out)	_v_copy(in,out,0)
-
-
-/* Initialisation routines -- to be zero, ones, random or identity */
-#ifndef ANSI_C
-extern	VEC     *v_zero(), *v_rand(), *v_ones();
-extern	MAT     *m_zero(), *m_ident(), *m_rand(), *m_ones();
-extern	PERM    *px_ident();
-extern  IVEC    *iv_zero();
-#else
-extern	VEC     *v_zero(VEC *), *v_rand(VEC *), *v_ones(VEC *);
-extern	MAT     *m_zero(MAT *), *m_ident(MAT *), *m_rand(MAT *),
-						*m_ones(MAT *);
-extern	PERM    *px_ident(PERM *);
-extern  IVEC    *iv_zero(IVEC *);
-#endif
-
-/* Basic vector operations */
-#ifndef ANSI_C
-extern	VEC *sv_mlt(), *mv_mlt(), *vm_mlt(), *v_add(), *v_sub(),
-		*px_vec(), *pxinv_vec(), *v_mltadd(), *v_map(), *_v_map(),
-		*v_lincomb(), *v_linlist();
-extern	double	v_min(), v_max(), v_sum();
-extern	VEC	*v_star(), *v_slash(), *v_sort();
-extern	double _in_prod(), __ip__();
-extern	void	__mltadd__(), __add__(), __sub__(), 
-                __smlt__(), __zero__();
-#else
-
-extern	VEC	*sv_mlt(double,VEC *,VEC *),	/* out <- s.x */
-		*mv_mlt(MAT *,VEC *,VEC *),	/* out <- A.x */
-		*vm_mlt(MAT *,VEC *,VEC *),	/* out^T <- x^T.A */
-		*v_add(VEC *,VEC *,VEC *), 	/* out <- x + y */
-                *v_sub(VEC *,VEC *,VEC *),	/* out <- x - y */
-		*px_vec(PERM *,VEC *,VEC *),	/* out <- P.x */
-		*pxinv_vec(PERM *,VEC *,VEC *),	  /* out <- P^{-1}.x */
-		*v_mltadd(VEC *,VEC *,double,VEC *),   /* out <- x + s.y */
-#ifdef PROTOTYPES_IN_STRUCT
-		*v_map(double (*f)(double),VEC *,VEC *),  
-                                                 /* out[i] <- f(x[i]) */
-		*_v_map(double (*f)(void *,double),void *,VEC *,VEC *),
-#else
-		*v_map(double (*f)(),VEC *,VEC *), /* out[i] <- f(x[i]) */
-		*_v_map(double (*f)(),void *,VEC *,VEC *),
-#endif
-		*v_lincomb(int,VEC **,RReal *,VEC *),   
-                                                 /* out <- sum_i s[i].x[i] */
-                *v_linlist(VEC *out,VEC *v1,double a1,...);
-                                              /* out <- s1.x1 + s2.x2 + ... */
-
-/* returns min_j x[j] (== x[i]) */
-extern	double	v_min(VEC *, int *), 
-     /* returns max_j x[j] (== x[i]) */		
-        v_max(VEC *, int *), 
-        /* returns sum_i x[i] */
-        v_sum(VEC *);
-
-/* Hadamard product: out[i] <- x[i].y[i] */
-extern	VEC	*v_star(VEC *, VEC *, VEC *),
-                 /* out[i] <- x[i] / y[i] */
-		*v_slash(VEC *, VEC *, VEC *),
-               /* sorts x, and sets order so that sorted x[i] = x[order[i]] */ 
-		*v_sort(VEC *, PERM *);
-
-/* returns inner product starting at component i0 */
-extern	double	_in_prod(VEC *x,VEC *y,u_int i0), 
-                /* returns sum_{i=0}^{len-1} x[i].y[i] */
-                __ip__(RReal *,RReal *,int);
-
-/* see v_mltadd(), v_add(), v_sub() and v_zero() */
-extern	void	__mltadd__(RReal *,RReal *,double,int),
-		__add__(RReal *,RReal *,RReal *,int),
-		__sub__(RReal *,RReal *,RReal *,int),
-                __smlt__(RReal *,double,RReal *,int),
-		__zero__(RReal *,int);
-
-#endif
-
-
-/* MACRO */
-/* usual way of computing the inner product */
-#define	in_prod(a,b)	_in_prod(a,b,0)
-
-/* Norms */
-/* scaled vector norms -- scale == NULL implies unscaled */
-#ifndef ANSI_C
-
-extern	double	_v_norm1(), _v_norm2(), _v_norm_inf(),
-		m_norm1(), m_norm_inf(), m_norm_frob();
-
-#else
-               /* returns sum_i |x[i]/scale[i]| */
-extern	double	_v_norm1(VEC *x,VEC *scale),   
-               /* returns (scaled) Euclidean norm */
-                _v_norm2(VEC *x,VEC *scale),
-               /* returns max_i |x[i]/scale[i]| */
-		_v_norm_inf(VEC *x,VEC *scale);
-
-/* unscaled matrix norms */
-extern double m_norm1(MAT *A), m_norm_inf(MAT *A), m_norm_frob(MAT *A);
-
-#endif
-
-
-/* MACROS */
-/* unscaled vector norms */
-#define	v_norm1(x)	_v_norm1(x,VNULL)
-#define	v_norm2(x)	_v_norm2(x,VNULL)
-#define	v_norm_inf(x)	_v_norm_inf(x,VNULL)
-
-/* Basic matrix operations */
-#ifndef ANSI_C
-
-extern	MAT *sm_mlt(), *m_mlt(), *mmtr_mlt(), *mtrm_mlt(), *m_add(), *m_sub(),
-		*sub_mat(), *m_transp(), *ms_mltadd();
-
-extern   BAND *bd_transp();
-extern	MAT *px_rows(), *px_cols(), *swap_rows(), *swap_cols(),
-             *_set_row(), *_set_col();
-extern	VEC *get_row(), *get_col(), *sub_vec(),
-		*mv_mltadd(), *vm_mltadd();
-
-#else
-
-extern	MAT	*sm_mlt(double s,MAT *A,MAT *out), 	/* out <- s.A */
-		*m_mlt(MAT *A,MAT *B,MAT *out),	/* out <- A.B */
-		*mmtr_mlt(MAT *A,MAT *B,MAT *out),	/* out <- A.B^T */
-		*mtrm_mlt(MAT *A,MAT *B,MAT *out),	/* out <- A^T.B */
-		*m_add(MAT *A,MAT *B,MAT *out),	/* out <- A + B */
-		*m_sub(MAT *A,MAT *B,MAT *out),	/* out <- A - B */
-		*sub_mat(MAT *A,u_int,u_int,u_int,u_int,MAT *out),
-		*m_transp(MAT *A,MAT *out),		/* out <- A^T */
-                /* out <- A + s.B */ 
-		*ms_mltadd(MAT *A,MAT *B,double s,MAT *out);   
-
-
-extern  BAND    *bd_transp(BAND *in, BAND *out);   /* out <- A^T */
-extern	MAT	*px_rows(PERM *px,MAT *A,MAT *out),	/* out <- P.A */
-		*px_cols(PERM *px,MAT *A,MAT *out),	/* out <- A.P^T */
-		*swap_rows(MAT *,int,int,int,int),
-		*swap_cols(MAT *,int,int,int,int),
-                 /* A[i][j] <- out[j], j >= j0 */
-		*_set_col(MAT *A,u_int i,VEC *out,u_int j0),
-                 /* A[i][j] <- out[i], i >= i0 */
-		*_set_row(MAT *A,u_int j,VEC *out,u_int i0);
-
-extern	VEC	*get_row(MAT *,u_int,VEC *),
-		*get_col(MAT *,u_int,VEC *),
-		*sub_vec(VEC *,int,int,VEC *),
-                   /* out <- x + s.A.y */
-		*mv_mltadd(VEC *x,VEC *y,MAT *A,double s,VEC *out),
-                  /* out^T <- x^T + s.y^T.A */
-		*vm_mltadd(VEC *x,VEC *y,MAT *A,double s,VEC *out);
-#endif
-
-
-/* MACROS */
-/* row i of A <- vec */
-#define	set_row(mat,row,vec)	_set_row(mat,row,vec,0) 
-/* col j of A <- vec */
-#define	set_col(mat,col,vec)	_set_col(mat,col,vec,0)
-
-
-/* Basic permutation operations */
-#ifndef ANSI_C
-
-extern	PERM *px_mlt(), *px_inv(), *px_transp();
-extern	int  px_sign();
-
-#else
-
-extern	PERM	*px_mlt(PERM *px1,PERM *px2,PERM *out),	/* out <- px1.px2 */
-		*px_inv(PERM *px,PERM *out),	/* out <- px^{-1} */
-                 /* swap px[i] and px[j] */
-		*px_transp(PERM *px,u_int i,u_int j);
-
-     /* returns sign(px) = +1 if px product of even # transpositions
-                           -1 if ps product of odd  # transpositions */
-extern	int	px_sign(PERM *);
-
-#endif
-
-
-/* Basic integer vector operations */
-#ifndef ANSI_C
-
-extern	IVEC	*iv_add(), *iv_sub(), *iv_sort();
-
-#else
-
-extern	IVEC	*iv_add(IVEC *ix,IVEC *iy,IVEC *out),  /* out <- ix + iy */
-		*iv_sub(IVEC *ix,IVEC *iy,IVEC *out),  /* out <- ix - iy */
-        /* sorts ix & sets order so that sorted ix[i] = old ix[order[i]] */
-		*iv_sort(IVEC *ix, PERM *order);
-
-#endif
-
-
-/* miscellaneous functions */
-
-#ifndef ANSI_C
-
-extern	double	square(), cube(), mrand();
-extern	void	smrand(), mrandlist();
-extern  void    m_dump(), px_dump(), v_dump(), iv_dump();
-extern MAT *band2mat();
-extern BAND *mat2band();
-
-#else
-
-double	square(double x), 	/* returns x^2 */
-  cube(double x), 		/* returns x^3 */
-  mrand(void);                  /* returns random # in [0,1) */
-
-void	smrand(int seed),            /* seeds mrand() */
-  mrandlist(RReal *x, int len);       /* generates len random numbers */
-
-void    m_dump(FILE *fp,MAT *a), px_dump(FILE *,PERM *px),
-        v_dump(FILE *fp,VEC *x), iv_dump(FILE *fp, IVEC *ix);
-
-MAT *band2mat(BAND *bA, MAT *A);
-BAND *mat2band(MAT *A, int lb,int ub, BAND *bA);
-
-#endif
-
-
-/* miscellaneous constants */
-#define	VNULL	((VEC *)NULL)
-#define	MNULL	((MAT *)NULL)
-#define	PNULL	((PERM *)NULL)
-#define	IVNULL	((IVEC *)NULL)
-#define BDNULL  ((BAND *)NULL)
-
-
-
-/* varying number of arguments */
-
-#ifdef ANSI_C
-#include <stdarg.h>
-
-/* prototypes */
-
-int v_get_vars(int dim,...);
-int iv_get_vars(int dim,...);
-int m_get_vars(int m,int n,...);
-int px_get_vars(int dim,...);
-
-int v_resize_vars(int new_dim,...);
-int iv_resize_vars(int new_dim,...);
-int m_resize_vars(int m,int n,...);
-int px_resize_vars(int new_dim,...);
-
-int v_free_vars(VEC **,...);
-int iv_free_vars(IVEC **,...);
-int px_free_vars(PERM **,...);
-int m_free_vars(MAT **,...);
-
-#elif VARARGS
-/* old varargs is used */
-
-#include  <varargs.h>
-
-/* prototypes */
-
-int v_get_vars();
-int iv_get_vars();
-int m_get_vars();
-int px_get_vars();
-
-int v_resize_vars();
-int iv_resize_vars();
-int m_resize_vars();
-int px_resize_vars();
-
-int v_free_vars();
-int iv_free_vars();
-int px_free_vars();
-int m_free_vars();
-
-#endif
-
-
-#endif
-
-

Deleted: grass-addons/grass7/imagery/i.spec.sam/matrix2.h
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/matrix2.h	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/matrix2.h	2015-01-20 14:43:49 UTC (rev 64254)
@@ -1,229 +0,0 @@
-
-/**************************************************************************
-**
-** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved.
-**
-**			     Meschach Library
-** 
-** This Meschach Library is provided "as is" without any express 
-** or implied warranty of any kind with respect to this software. 
-** In particular the authors shall not be liable for any direct, 
-** indirect, special, incidental or consequential damages arising 
-** in any way from use of the software.
-** 
-** Everyone is granted permission to copy, modify and redistribute this
-** Meschach Library, provided:
-**  1.  All copies contain this copyright notice.
-**  2.  All modified copies shall carry a notice stating who
-**      made the last modification and the date of such modification.
-**  3.  No charge is made for this software or works derived from it.  
-**      This clause shall not be construed as constraining other software
-**      distributed on the same medium as this software, nor is a
-**      distribution fee considered a charge.
-**
-***************************************************************************/
-
-
-/*
-	Header file for ``matrix2.a'' library file
-*/
-
-
-#ifndef MATRIX2H
-#define MATRIX2H
-
-#include "matrix.h"
-
-/* Unless otherwise specified, factorisation routines overwrite the
-   matrix that is being factorised */
-
-#ifndef ANSI_C
-
-extern	MAT	*BKPfactor(), *CHfactor(), *LUfactor(), *QRfactor(),
-		*QRCPfactor(), *LDLfactor(), *Hfactor(), *MCHfactor(),
-		*m_inverse();
-extern	double	LUcondest(), QRcondest();
-extern	MAT	*makeQ(), *makeR(), *makeHQ(), *makeH();
-extern	MAT	*LDLupdate(), *QRupdate();
-
-extern	VEC	*BKPsolve(), *CHsolve(), *LUsolve(), *_Qsolve(), *QRsolve(),
-		*LDLsolve(), *Usolve(), *Lsolve(), *Dsolve(), *LTsolve(),
-		*UTsolve(), *LUTsolve(), *QRCPsolve();
-
-extern  BAND    *bdLUfactor(), *bdLDLfactor();
-extern  VEC     *bdLUsolve(), *bdLDLsolve();
-
-extern	VEC	*hhvec();
-extern	VEC	*hhtrvec();
-extern	MAT	*hhtrrows();
-extern	MAT	*hhtrcols();
-
-extern	void	givens();
-extern	VEC	*rot_vec();	/* in situ */
-extern	MAT	*rot_rows();	/* in situ */
-extern	MAT	*rot_cols();	/* in situ */
-
-
-/* eigenvalue routines */
-extern	VEC	*trieig(), *symmeig();
-extern	MAT	*schur();
-extern	void	schur_evals();
-extern	MAT	*schur_vecs();
-
-/* singular value decomposition */
-extern	VEC	*bisvd(), *svd();
-
-/* matrix powers and exponent */
-MAT  *_m_pow();
-MAT  *m_pow();
-MAT  *m_exp(), *_m_exp();
-MAT  *m_poly();
-
-/* FFT */
-void fft();
-void ifft();
-
-
-#else
-
-                 /* forms Bunch-Kaufman-Parlett factorisation for
-                        symmetric indefinite matrices */
-extern	MAT	*BKPfactor(MAT *A,PERM *pivot,PERM *blocks),
-                 /* Cholesky factorisation of A
-                        (symmetric, positive definite) */
-		*CHfactor(MAT *A),
-                /* LU factorisation of A (with partial pivoting) */ 
-                *LUfactor(MAT *A,PERM *pivot),
-                /* QR factorisation of A; need dim(diag) >= # rows of A */
-		*QRfactor(MAT *A,VEC *diag),
-                /* QR factorisation of A with column pivoting */
-		*QRCPfactor(MAT *A,VEC *diag,PERM *pivot),
-                /* L.D.L^T factorisation of A */
-		*LDLfactor(MAT *A), 
-                /* Hessenberg factorisation of A -- for schur() */
-                *Hfactor(MAT *A,VEC *diag1,VEC *diag2),
-                /* modified Cholesky factorisation of A;
-                        actually factors A+D, D diagonal with no
-                        diagonal entry in the factor < sqrt(tol) */
-                *MCHfactor(MAT *A,double tol),
-		*m_inverse(MAT *A,MAT *out);
-
-                /* returns condition estimate for A after LUfactor() */
-extern	double	LUcondest(MAT *A,PERM *pivot),
-                /* returns condition estimate for Q after QRfactor() */
-                QRcondest(MAT *A);
-
-/* Note: The make..() and ..update() routines assume that the factorisation
-        has already been carried out */
-
-     /* Qout is the "Q" (orthongonal) matrix from QR factorisation */
-extern	MAT	*makeQ(MAT *A,VEC *diag,MAT *Qout),
-                /* Rout is the "R" (upper triangular) matrix
-                        from QR factorisation */
-		*makeR(MAT *A,MAT *Rout),
-                /* Qout is orthogonal matrix in Hessenberg factorisation */
-		*makeHQ(MAT *A,VEC *diag1,VEC *diag2,MAT *Qout),
-                /* Hout is the Hessenberg matrix in Hessenberg factorisation */
-		*makeH(MAT *A,MAT *Hout);
-
-                /* updates L.D.L^T factorisation for A <- A + alpha.u.u^T */
-extern	MAT	*LDLupdate(MAT *A,VEC *u,double alpha),
-                /* updates QR factorisation for QR <- Q.(R+u.v^T)
-		   Note: we need explicit Q & R matrices,
-                        from makeQ() and makeR() */
-		*QRupdate(MAT *Q,MAT *R,VEC *u,VEC *v);
-
-/* Solve routines assume that the corresponding factorisation routine
-        has already been applied to the matrix along with auxiliary
-        objects (such as pivot permutations)
-
-        These solve the system A.x = b,
-        except for LUTsolve and QRTsolve which solve the transposed system
-                                A^T.x. = b.
-        If x is NULL on entry, then it is created.
-*/
-
-extern	VEC	*BKPsolve(MAT *A,PERM *pivot,PERM *blocks,VEC *b,VEC *x),
-		*CHsolve(MAT *A,VEC *b,VEC *x),
-		*LDLsolve(MAT *A,VEC *b,VEC *x),
-		*LUsolve(MAT *A,PERM *pivot,VEC *b,VEC *x),
-		*_Qsolve(MAT *A,VEC *,VEC *,VEC *, VEC *),
-		*QRsolve(MAT *A,VEC *,VEC *b,VEC *x),
-    		*QRTsolve(MAT *A,VEC *,VEC *b,VEC *x),
-
-
-     /* Triangular equations solve routines;
-        U for upper triangular, L for lower traingular, D for diagonal
-        if diag_val == 0.0 use that values in the matrix */
-
-		*Usolve(MAT *A,VEC *b,VEC *x,double diag_val),
-		*Lsolve(MAT *A,VEC *b,VEC *x,double diag_val),
-		*Dsolve(MAT *A,VEC *b,VEC *x),
-		*LTsolve(MAT *A,VEC *b,VEC *x,double diag_val),
-		*UTsolve(MAT *A,VEC *b,VEC *x,double diag_val),
-                *LUTsolve(MAT *A,PERM *,VEC *,VEC *),
-                *QRCPsolve(MAT *QR,VEC *diag,PERM *pivot,VEC *b,VEC *x);
-
-extern  BAND    *bdLUfactor(BAND *A,PERM *pivot),
-                *bdLDLfactor(BAND *A);
-extern  VEC     *bdLUsolve(BAND *A,PERM *pivot,VEC *b,VEC *x),
-                *bdLDLsolve(BAND *A,VEC *b,VEC *x);
-
-
-
-extern	VEC	*hhvec(VEC *,u_int,RReal *,VEC *,RReal *);
-extern	VEC	*hhtrvec(VEC *,double,u_int,VEC *,VEC *);
-extern	MAT	*hhtrrows(MAT *,u_int,u_int,VEC *,double);
-extern	MAT	*hhtrcols(MAT *,u_int,u_int,VEC *,double);
-
-extern	void	givens(double,double,RReal *,RReal *);
-extern	VEC	*rot_vec(VEC *,u_int,u_int,double,double,VEC *); /* in situ */
-extern	MAT	*rot_rows(MAT *,u_int,u_int,double,double,MAT *); /* in situ */
-extern	MAT	*rot_cols(MAT *,u_int,u_int,double,double,MAT *); /* in situ */
-
-
-/* eigenvalue routines */
-
-               /* compute eigenvalues of tridiagonal matrix
-                  with diagonal entries a[i], super & sub diagonal entries
-                  b[i]; eigenvectors stored in Q (if not NULL) */
-extern	VEC	*trieig(VEC *a,VEC *b,MAT *Q),
-                 /* sets out to be vector of eigenvectors; eigenvectors
-                   stored in Q (if not NULL). A is unchanged */
-		*symmeig(MAT *A,MAT *Q,VEC *out);
-
-               /* computes real Schur form = Q^T.A.Q */
-extern	MAT	*schur(MAT *A,MAT *Q);
-         /* computes real and imaginary parts of the eigenvalues
-                        of A after schur() */
-extern	void	schur_evals(MAT *A,VEC *re_part,VEC *im_part);
-          /* computes real and imaginary parts of the eigenvectors
-                        of A after schur() */
-extern	MAT	*schur_vecs(MAT *T,MAT *Q,MAT *X_re,MAT *X_im);
-
-
-/* singular value decomposition */
-
-        /* computes singular values of bi-diagonal matrix with
-                   diagonal entries a[i] and superdiagonal entries b[i];
-                   singular vectors stored in U and V (if not NULL) */
-VEC	*bisvd(VEC *a,VEC *b,MAT *U,MAT *V),
-               /* sets out to be vector of singular values;
-                   singular vectors stored in U and V */
-	*svd(MAT *A,MAT *U,MAT *V,VEC *out);
-
-/* matrix powers and exponent */
-MAT  *_m_pow(MAT *,int,MAT *,MAT *);
-MAT  *m_pow(MAT *,int, MAT *);
-MAT  *m_exp(MAT *,double,MAT *);
-MAT  *_m_exp(MAT *,double,MAT *,int *,int *);
-MAT  *m_poly(MAT *,VEC *,MAT *);
-
-/* FFT */
-void fft(VEC *,VEC *);
-void ifft(VEC *,VEC *);
-
-#endif
-
-
-#endif

Deleted: grass-addons/grass7/imagery/i.spec.sam/meminfo.h
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/meminfo.h	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/meminfo.h	2015-01-20 14:43:49 UTC (rev 64254)
@@ -1,155 +0,0 @@
-
-/**************************************************************************
-**
-** Copyright (C) 1993 David E. Steward & Zbigniew Leyk, all rights reserved.
-**
-**			     Meschach Library
-** 
-** This Meschach Library is provided "as is" without any express 
-** or implied warranty of any kind with respect to this software. 
-** In particular the authors shall not be liable for any direct, 
-** indirect, special, incidental or consequential damages arising 
-** in any way from use of the software.
-** 
-** Everyone is granted permission to copy, modify and redistribute this
-** Meschach Library, provided:
-**  1.  All copies contain this copyright notice.
-**  2.  All modified copies shall carry a notice stating who
-**      made the last modification and the date of such modification.
-**  3.  No charge is made for this software or works derived from it.  
-**      This clause shall not be construed as constraining other software
-**      distributed on the same medium as this software, nor is a
-**      distribution fee considered a charge.
-**
-***************************************************************************/
-
-
-/* meminfo.h  26/08/93 */
-/* changed  11/12/93 */
-
-
-#ifndef MEM_INFOH
-#define MEM_INFOH
-
-
-
-/* for hash table in mem_stat.c */
-/* Note: the hash size should be a prime, or at very least odd */
-#define MEM_HASHSIZE         509
-#define MEM_HASHSIZE_FILE    "meminfo.h"
-
-
-/* default: memory information is off */
-/* set it to 1 if you want it all the time */
-#define MEM_SWITCH_ON_DEF	0
-
-
-/* available standard types */
-#define TYPE_NULL              (-1)
-#define TYPE_MAT    	        0
-#define TYPE_BAND               1
-#define TYPE_PERM		2
-#define TYPE_VEC		3
-#define TYPE_IVEC		4
-
-#ifdef SPARSE
-#define TYPE_ITER		5
-#define TYPE_SPROW              6
-#define TYPE_SPMAT		7
-#endif
-
-#ifdef COMPLEX
-#ifdef SPARSE
-#define TYPE_ZVEC		8
-#define TYPE_ZMAT		9
-#else
-#define TYPE_ZVEC		5
-#define TYPE_ZMAT		6
-#endif
-#endif
-
-/* structure for memory information */
-typedef struct {
-   long bytes;       /* # of allocated bytes for each type (summary) */
-   int  numvar;      /* # of allocated variables for each type */
-} MEM_ARRAY;
-
-
-
-#ifdef ANSI_C
-
-int  mem_info_is_on(void);
-int mem_info_on(int sw);
-
-long mem_info_bytes(int type,int list);
-int mem_info_numvar(int type,int list);
-void mem_info_file(FILE * fp,int list);
-
-void mem_bytes_list(int type,int old_size,int new_size,
-		       int list);
-void mem_numvar_list(int type, int num, int list);
-
-int mem_stat_reg_list(void **var,int type,int list);
-int mem_stat_mark(int mark);
-int mem_stat_free_list(int mark,int list);
-int mem_stat_show_mark(void);
-void mem_stat_dump(FILE *fp,int list);
-int mem_attach_list(int list,int ntypes,char *type_names[],
-	int (*free_funcs[])(), MEM_ARRAY info_sum[]);
-int mem_free_vars(int list);
-int mem_is_list_attached(int list);
-void mem_dump_list(FILE *fp,int list);
-int mem_stat_reg_vars(int list,int type,...);
-
-#else
-int mem_info_is_on();
-int mem_info_on();
-
-long mem_info_bytes();
-int mem_info_numvar();
-void mem_info_file();
-
-void mem_bytes_list();
-void mem_numvar_list();
-
-int mem_stat_reg_list();
-int mem_stat_mark();
-int mem_stat_free_list();
-int mem_stat_show_mark();
-void mem_stat_dump();
-int mem_attach_list();
-int mem_free_vars();
-int mem_is_list_attached();
-void mem_dump_list();
-int mem_stat_reg_vars();
-
-#endif 
-
-/* macros */
-
-#define mem_info()   mem_info_file(stdout,0)
-
-#define mem_stat_reg(var,type)  mem_stat_reg_list((void **)var,type,0)
-#define MEM_STAT_REG(var,type)  mem_stat_reg_list((void **)&(var),type,0)
-#define mem_stat_free(mark)   mem_stat_free_list(mark,0)
-
-#define mem_bytes(type,old_size,new_size)  \
-  mem_bytes_list(type,old_size,new_size,0)
-
-#define mem_numvar(type,num) mem_numvar_list(type,num,0)
-
-
-/* internal type */
-
-typedef struct {
-   char **type_names;        /* array of names of types (strings) */
-   int  (**free_funcs)();    /* array of functions for releasing types */
-   unsigned ntypes;          /* max number of types */
-   MEM_ARRAY *info_sum;      /* local array for keeping track of memory */
-} MEM_CONNECT;
-
-/* max number of lists of types */
-#define MEM_CONNECT_MAX_LISTS    5
-
-
-#endif

Modified: grass-addons/grass7/imagery/i.spec.sam/open.c
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/open.c	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/open.c	2015-01-20 14:43:49 UTC (rev 64254)
@@ -18,7 +18,7 @@
 #include <math.h>
 #include <grass/gis.h>
 #include <grass/raster.h>
-#include "matrix.h"
+#include <meschach/matrix.h>
 
 int open_files()
 {

Modified: grass-addons/grass7/imagery/i.spec.sam/spec_angle.c
===================================================================
--- grass-addons/grass7/imagery/i.spec.sam/spec_angle.c	2015-01-20 13:29:52 UTC (rev 64253)
+++ grass-addons/grass7/imagery/i.spec.sam/spec_angle.c	2015-01-20 14:43:49 UTC (rev 64254)
@@ -20,7 +20,7 @@
 
 #include <stdio.h>
 #include <math.h>
-#include "matrix.h"
+#include <meschach/matrix.h>
 #include "global.h"
 
 



More information about the grass-commit mailing list