ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/normcomp.cal
Revision: 1.3
Committed: Mon Jun 10 13:56:52 2019 UTC (4 years, 11 months ago) by greg
Branch: MAIN
CVS Tags: rad5R3
Changes since 1.2: +1 -4 lines
Log Message:
Added max() and min() as .cal library functions

File Contents

# User Rev Content
1 greg 1.3 { RCSid $Id: normcomp.cal,v 1.2 2018/11/21 18:10:45 greg Exp $ }
2 greg 1.1 {
3     Compute overlap between two normal distribution functions,
4     defined by mean1, mean2, stdev1 and stdev2.
5    
6     2/10/95 Greg Ward
7    
8     relies on gauss.cal and norm.cal
9     }
10     Z1(u) = Z((u - mean1)/stdev1) / stdev1;
11     Z2(u) = Z((u - mean2)/stdev2) / stdev2;
12    
13     f(u) = min(Z1(u),Z2(u));
14    
15     xmin = min(mean1-3*stdev1, mean2-3*stdev2);
16     xmax = max(mean1+3*stdev1, mean2+3*stdev2);