distance_two_points: Distance between spline and spline perturbated by two points

View source: R/monotonicity-contraints.R

distance_two_pointsR Documentation

Distance between spline and spline perturbated by two points

Description

These functions calculate the distance between:

  • A first spline characterized by two points.

  • A second set of three splines characterized by the same two points, plus two additional points between the first two.

They also calculate the derivative of that distance with respect to the coordinates of the additionals points.

Usage

distance_two_points(
  x0,
  x1,
  y0,
  y1,
  s0,
  s1,
  a0,
  a1,
  x_new1,
  y_new1,
  s_new1,
  a_new1,
  y_ini1,
  s_ini1,
  a_ini1,
  x_new2,
  y_new2,
  s_new2,
  a_new2,
  y_ini2,
  s_ini2,
  a_ini2
)

Arguments

x0

Lower bound of the interval.

x1

Upper bound of the interval.

y0

Value of the first spline at x0.

y1

Value of the first spline at x1.

s0

Slope of the first spline at x0.

s1

Slope of the first spline at x1.

a0

Second derivative of the first spline at x0.

a1

Second derivative of the first spline at x1.

x_new1

The position of the first additional point.

y_new1

The value of the second spline at the first additional point.

s_new1

The slope of the second spline at the first additional point.

a_new1

The second derivative of the second spline at the first additional point.

y_ini1

The value of the first spline at x_new1.

s_ini1

The slope of the first spline at x_new1.

a_ini1

The second derivative of the first spline at x_new1.

x_new2

The position of the second additional point.

y_new2

The value of the second spline at the second additional point.

s_new2

The slope of the second spline at the second additional point.

a_new2

The second derivative of the second spline at the second additional point.

y_ini2

The value of the first spline at x_new2.

s_ini2

The slope of the first spline at x_new2.

a_ini2

The second derivative of the first spline at x_new2.

Author(s)

Thomas Blanchet, Juliette Fournier, Thomas Piketty


thomasblanchet/gpinter documentation built on Nov. 29, 2022, 4:32 a.m.