pascal_1D_line Module Function

pure function pascal_1D_line(N, x) result(row)

Generates the elements of an array associated with a univarate Lagrange polynomial.

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: N
real(kind=wp), intent(in) :: x

Return Value real(kind=wp), dimension(N+1)


Contents

Source Code


Source Code

  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