Generates the elements of an array associated with a univarate Lagrange polynomial.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | N | |||
| real(kind=wp), | intent(in) | :: | x |
pure module function pascal_1D_line(N, x) result(row)
!*
! Generates the elements of an array associated with a univarate
! Lagrange polynomial.
integer, intent(in) :: N
real(wp), intent(in) :: x
real(wp), dimension(N+1) :: row
integer :: ii
row = [( x**(ii-1), ii = 1, N+1 )]
return
end function pascal_1D_line