legendre#
Return Legendre polynomial coefficients at the input operator
-
template<typename T1, typename T2, typename T3>
auto __MATX_INLINE__ matx::legendre(const T1 &n, const T2 &m, const T3 &in)# Legendre polynomial operator
constructs the legendre polynomial coefficients evaluated at the input operator
- Template Parameters:
T1 – Input Operator
m – The degree operator
- Parameters:
in – Operator that computes the location to evaluate the lengrande polynomial
n – order of the polynomial produced
m – operator specifing which degrees to output
- Returns:
New operator with Rank+1 and size of last dimension = order.
-
template<typename T1, typename T2, typename T3>
auto __MATX_INLINE__ matx::legendre(const T1 &n, const T2 &m, const T3 &in, int (&axis)[2])#
-
template<typename T1, typename T2, typename T3>
auto __MATX_INLINE__ matx::legendre(const T1 &n, const T2 &m, const T3 &in, cuda::std::array<int, 2> axis)# Legendre polynomial operator
constructs the legendre polynomial coefficients evaluated at the input operator. This version of the API produces all n+1 coefficients
- Template Parameters:
T1 – Input Operator
- Parameters:
in – Operator that computes the location to evaluate the lengrande polynomial
n – order of the polynomial produced
m – operator specifing which degrees to output
axis – The axis to write the polynomial coeffients into the output tensor
- Returns:
New operator with Rank+1 and size of last dimension = order.
Examples#
auto n = range<0, 1, int>({order}, 0, 1);
auto m = range<0, 1, int>({order}, 0, 1);
auto x = as_type<TestType>(linspace<0>({size}, TestType(0), TestType(1)));
auto out = make_tensor<TestType>({order, order, size});
(out = legendre(n, m, x)).run(exec);