<s>
In	O
the	O
mathematical	O
field	O
of	O
numerical	B-General_Concept
analysis	I-General_Concept
,	O
monotone	B-Algorithm
cubic	I-Algorithm
interpolation	I-Algorithm
is	O
a	O
variant	O
of	O
cubic	B-Algorithm
interpolation	I-Algorithm
that	O
preserves	O
monotonicity	O
of	O
the	O
data	B-General_Concept
set	I-General_Concept
being	O
interpolated	O
.	O
</s>
<s>
Monotonicity	O
is	O
preserved	O
by	O
linear	O
interpolation	O
but	O
not	O
guaranteed	O
by	O
cubic	B-Algorithm
interpolation	I-Algorithm
.	O
</s>
<s>
Monotone	O
interpolation	O
can	O
be	O
accomplished	O
using	O
cubic	B-Algorithm
Hermite	I-Algorithm
spline	I-Algorithm
with	O
the	O
tangents	O
modified	O
to	O
ensure	O
the	O
monotonicity	O
of	O
the	O
resulting	O
Hermite	O
spline	O
.	O
</s>
<s>
To	O
prevent	O
overshoot	B-Algorithm
and	O
ensure	O
monotonicity	O
,	O
at	O
least	O
one	O
of	O
the	O
following	O
three	O
conditions	O
must	O
be	O
met	O
:	O
</s>
<s>
After	O
the	O
preprocessing	O
above	O
,	O
evaluation	O
of	O
the	O
interpolated	O
spline	O
is	O
equivalent	O
to	O
cubic	B-Algorithm
Hermite	I-Algorithm
spline	I-Algorithm
,	O
using	O
the	O
data	O
,	O
,	O
and	O
for	O
.	O
</s>
<s>
where	O
are	O
the	O
basis	O
functions	O
for	O
the	O
cubic	B-Algorithm
Hermite	I-Algorithm
spline	I-Algorithm
.	O
</s>
<s>
The	O
following	O
JavaScript	B-Language
implementation	O
takes	O
a	O
data	B-General_Concept
set	I-General_Concept
and	O
produces	O
a	O
monotone	B-Algorithm
cubic	I-Algorithm
spline	I-Algorithm
interpolant	O
function	O
:	O
</s>
