void nresid(double* first, double* last, double val, double n)
Replaces the elements in [first, last) with thier deviations from val raised to the n-th power.
Parameters:
first | Beginning iterator for the container of elements. |
---|---|
last | Ending iterator for the container of elements. |
val | Pivot value. |
n | Power |
Returns:
On return, the elements of [first, last) are replaced with thier residuals.
Usage:
double x[] = {1.0, 2.0, 3.0, 4.0}; nresid(x, x + 4, 2.5, 2.0);
Header:
#include "residual.h"