/* QuadraticExtremum gives you the extremum (either minimum or maximum) of the quadratic that passes through the three points x0y0,x1y1,x2y2 */ inline double QuadraticExtremum( double x0,double y0, double x1,double y1, double x2,double y2) { // warning : this form is pretty but it's numerically very bad // when the three points are near each other double s2 = x2*x2; double s1 = x1*x1; double s0 = x0*x0; double numer = y0*(s1-s2) + y1*(s2-s0) + y2*(s0-s1); double denom = y0*(x1-x2) + y1*(x2-x0) + y2*(x0-x1); double ret = 0.5 * numer / denom; return ret; }
1/05/2011
01-05-11 - QuadraticExtremum
In today's story I do someone's homework for them :
Subscribe to:
Post Comments (Atom)
old rants
-
▼
2011
(134)
-
▼
January
(12)
- 01-19-11 - Good practices
- 01-18-11 - Hadamard
- 01-17-11 - ImDiff Release
- 01-12-11 - ImDiff Sample Run and JXR test
- 01-10-11 - Perceptual Metrics
- 01-10-11 - Perceptual Results - PDI
- 01-10-11 - Perceptual Results - mysoup
- 01-10-11 - Perceptual Results - Moses
- 01-10-11 - Perceptual Metrics Warmup - x264 Settings
- 01-10-11 - Perceptual Metrics Warmup - JPEG Settings
- 01-05-11 - QuadraticExtremum
- 01-05-11 - Golden 1d Searches
-
▼
January
(12)
No comments:
Post a Comment