mir-algorithm ~master (2021-09-24T13:11:04Z)
Dub
Repo
Lagrange
mir
interpolate
polynomial
@
optmath
struct
Lagrange (
T
uint
maxAdditionalFunctions
= 0
X
=
T
)
if
(
isFloatingPoint
!
T
&&
maxAdditionalFunctions
< 16
) {
Slice
!(
RCI
!(
immutable
X
))
_grid
;
RCArray
!(
immutable
T
)
_inversedBarycentricWeights
;
RCArray
!
T
[
maxAdditionalFunctions
+
1
]
_normalizedValues
;
T
[
maxAdditionalFunctions
+
1
]
_asums
;
@
safe
pure @
nogc
extern (
D
)
@
optmath
enum
uint
derivativeOrder
;
this
(Slice!(RCI!(immutable X)) grid, RCArray!T values, RCArray!(immutable T) inversedBarycentricWeights);
this
(Slice!(RCI!(immutable X)) grid, RCArray!T values);
Lagrange
lightConst
();
Lagrange
lightImmutable
();
const
(
Slice
!(
RCI
!(
immutable
X
)))
grid
[@property getter];
immutable
(
X
)[]
gridScopeView
[@property getter];
const
(
RCArray
!(
immutable
T
))
inversedBarycentricWeights
[@property getter];
const
(
RCArray
!
T
)[
maxAdditionalFunctions
+
1
]
normalizedValues
[@property getter];
const
(
T
)[
maxAdditionalFunctions
+
1
]
asums
[@property getter];
size_t
intervalCount
[@property getter];
template
opCall
(uint derivative = 0)
;
alias
withDerivative
=
opCall
!
1
;
alias
withTwoDerivatives
=
opCall
!
2
;
}
Constructors
this
this
(Slice!(RCI!(immutable X)) grid, RCArray!T values, RCArray!(immutable T) inversedBarycentricWeights)
Complexity:
O(N)
this
this
(Slice!(RCI!(immutable X)) grid, RCArray!T values)
Complexity:
O(N^^2)
Members
Aliases
withDerivative
alias
withDerivative
=
opCall
!
1
withTwoDerivatives
alias
withTwoDerivatives
=
opCall
!
2
Functions
lightConst
Lagrange
lightConst
()
lightImmutable
Lagrange
lightImmutable
()
Properties
asums
const
(
T
)[
maxAdditionalFunctions
+
1
]
asums
[@property getter]
grid
const
(
Slice
!(
RCI
!(
immutable
X
)))
grid
[@property getter]
gridScopeView
immutable
(
X
)[]
gridScopeView
[@property getter]
intervalCount
size_t
intervalCount
[@property getter]
inversedBarycentricWeights
const
(
RCArray
!(
immutable
T
))
inversedBarycentricWeights
[@property getter]
normalizedValues
const
(
RCArray
!
T
)[
maxAdditionalFunctions
+
1
]
normalizedValues
[@property getter]
Templates
opCall
template
opCall
(uint derivative = 0)
Undocumented in source.
Variables
_asums
T
[
maxAdditionalFunctions
+
1
]
_asums
;
for internal use only.
_grid
Slice
!(
RCI
!(
immutable
X
))
_grid
;
for internal use only.
_inversedBarycentricWeights
RCArray
!(
immutable
T
)
_inversedBarycentricWeights
;
for internal use only.
_normalizedValues
RCArray
!
T
[
maxAdditionalFunctions
+
1
]
_normalizedValues
;
for internal use only.
derivativeOrder
enum
uint
derivativeOrder
;
Meta
Source
See Implementation
mir
interpolate
polynomial
functions
inversedBarycentricWeights
lagrange
polynomialDerivativeValues
structs
Lagrange