ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/linregr.h
(Generate patch)

Comparing ray/src/common/linregr.h (file contents):
Revision 2.1 by greg, Tue Nov 12 16:55:45 1991 UTC vs.
Revision 2.5 by schorsch, Fri Jun 6 16:38:47 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1991 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   * Header file for linear regression calculation.
4   */
5 + #ifndef _RAD_LINEGR_H_
6 + #define _RAD_LINEGR_H_
7 + #ifdef __cplusplus
8 + extern "C" {
9 + #endif
10  
11 + #include "copyright.h"
12 +
13   typedef struct {
14          double  xs, ys, xxs, yys, xys;
15          int     n;
# Line 15 | Line 19 | typedef struct {
19          double  slope, intercept, correlation;
20   } LRLIN;
21  
18 extern double   sqrt();
19
22   #define lrpoint(x,y,l)  ((l)->xs+=(x),(l)->ys+=(y),(l)->xxs+=(x)*(x), \
23                          (l)->yys+=(y)*(y),(l)->xys+=(x)*(y),++(l)->n)
24  
# Line 26 | Line 28 | extern double  sqrt();
28   #define lryvar(l)       (((l)->yys-(l)->ys*(l)->ys/(l)->n)/(l)->n)
29   #define lrxdev(l)       sqrt(((l)->xxs-(l)->xs*(l)->xs/(l)->n)/((l)->n-1))
30   #define lrydev(l)       sqrt(((l)->yys-(l)->ys*(l)->ys/(l)->n)/((l)->n-1))
31 +
32 +
33 + extern void     lrclear(LRSUM *l);
34 + extern int      flrpoint(double x, double y, LRSUM *l);
35 + extern int      lrfit(LRLIN *r, LRSUM *l);
36 +
37 +
38 + #ifdef __cplusplus
39 + }
40 + #endif
41 + #endif /* _RAD_LINEGR_H_ */
42 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines