= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
package torch
-
torch.core
-
-
torch.toplevel
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val create : (float * float) list -> t
create vs
creates a linear interpolation function using vs
as knots. vs
is a list of pairs (x, y)
, has to be sorted by x
and cannot have two elements with the same x
.
val eval : t -> float -> float
eval t x
returns the linear interpolation value of t
at x
. If t
was built from (x1, y1)
to (xn, yn)
. If x
is below x1
, the returned value is y1
. If x
is above xn
, the returned value is yn
. If x
is between too knots, linear interpolation is used.