TABLE OF CONTENTS


CcurveUpdate/UpdateCurveX [ Functions ]

NAME

    UpdateCurveX --- change an X value of a CCurve structure

FUNCTION

Changes theCurve->X[i] to x, and updates Y[i] accordingly

SYNOPSIS

1516 void UpdateCurveX(curveP theCurve, double x, int i)

INPUTS

    theCurve      a CCurve structure
    x             double, to replace theCurve->X[i]
    i             index between 0 and theCurve->nx

SOURCE

1520 {
1521     if(theCurve->isHazard) Rprintf("Error: using UpdateCurveX on hazard.");
1522     // copy x into theCurve
1523     theCurve->X[i] = x;
1524     // re-evaluate the curve basis and values
1525     UpdateSplineBasis(theCurve, i, 0, theCurve->nj);
1526     EvalSpline(theCurve,i);
1527     EvalParametric(theCurve,i);
1528 }