@@ -41,9 +41,10 @@ struct LinearInterpolationIntInv{uType, tType, itpType, T} <:
41
41
extrapolation_right:: ExtrapolationType.T
42
42
iguesser:: Guesser{tType}
43
43
itp:: itpType
44
- function LinearInterpolationIntInv (u, t, A)
44
+ function LinearInterpolationIntInv (u, t, A, extrapolation_left = A. extrapolation_left,
45
+ extrapolation_right = A. extrapolation_right)
45
46
new {typeof(u), typeof(t), typeof(A), eltype(u)} (
46
- u, t, A . extrapolation_left, A . extrapolation_right, Guesser (t), A)
47
+ u, t, extrapolation_left, extrapolation_right, Guesser (t), A)
47
48
end
48
49
end
49
50
@@ -57,9 +58,13 @@ function get_I(A::AbstractInterpolation)
57
58
I
58
59
end
59
60
60
- function invert_integral (A:: LinearInterpolation{<:AbstractVector{<:Number}} )
61
+ function invert_integral (A:: LinearInterpolation{<:AbstractVector{<:Number}} ,
62
+ extrapolation_left:: ExtrapolationType.T = A. extrapolation_left,
63
+ extrapolation_right:: ExtrapolationType.T = A. extrapolation_right)
61
64
! invertible_integral (A) && throw (IntegralNotInvertibleError ())
62
- return LinearInterpolationIntInv (A. t, get_I (A), A)
65
+
66
+ return LinearInterpolationIntInv (
67
+ A. t, get_I (A), A, extrapolation_left, extrapolation_right)
63
68
end
64
69
65
70
function _interpolate (
@@ -92,9 +97,11 @@ struct ConstantInterpolationIntInv{uType, tType, itpType, T} <:
92
97
extrapolation_right:: ExtrapolationType.T
93
98
iguesser:: Guesser{tType}
94
99
itp:: itpType
95
- function ConstantInterpolationIntInv (u, t, A)
100
+ function ConstantInterpolationIntInv (
101
+ u, t, A, extrapolation_left = A. extrapolation_left,
102
+ extrapolation_right = A. extrapolation_right)
96
103
new {typeof(u), typeof(t), typeof(A), eltype(u)} (
97
- u, t, A . extrapolation_left, A . extrapolation_right, Guesser (t), A
104
+ u, t, extrapolation_left, extrapolation_right, Guesser (t), A
98
105
)
99
106
end
100
107
end
@@ -103,9 +110,12 @@ function invertible_integral(A::ConstantInterpolation{<:AbstractVector{<:Number}
103
110
return all (A. u .> 0 )
104
111
end
105
112
106
- function invert_integral (A:: ConstantInterpolation{<:AbstractVector{<:Number}} )
113
+ function invert_integral (A:: ConstantInterpolation{<:AbstractVector{<:Number}} ,
114
+ extrapolation_left:: ExtrapolationType.T = A. extrapolation_left,
115
+ extrapolation_right:: ExtrapolationType.T = A. extrapolation_right)
107
116
! invertible_integral (A) && throw (IntegralNotInvertibleError ())
108
- return ConstantInterpolationIntInv (A. t, get_I (A), A)
117
+ return ConstantInterpolationIntInv (
118
+ A. t, get_I (A), A, extrapolation_left, extrapolation_right)
109
119
end
110
120
111
121
function _interpolate (
0 commit comments