numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::functions::legendre_roots< T > Class Template Reference

Class of roots of Legendre function. More...

#include <num_collect/functions/legendre_roots.h>

+ Inheritance diagram for num_collect::functions::legendre_roots< T >:
+ Collaboration diagram for num_collect::functions::legendre_roots< T >:

Public Types

using variable_type = T
 Type of variables.
 

Public Member Functions

 legendre_roots (index_type degree=0)
 Constructor.
 
void compute (index_type degree)
 Compute roots of Legendre function.
 
auto degree () const noexcept -> index_type
 Get the degree of Legendre function.
 
auto operator[] (index_type i) const -> variable_type
 Get the i-th root.
 
auto root (index_type i) const -> variable_type
 Get the i-th root.
 
auto size () const noexcept -> index_type
 Get the number of roots.
 

Private Attributes

index_type degree_
 Degree of Legendre function.
 
Eigen::Matrix< variable_type, Eigen::Dynamic, 1 > roots_ {}
 List of roots.
 

Detailed Description

template<base::concepts::real_scalar T>
class num_collect::functions::legendre_roots< T >

Class of roots of Legendre function.

Template Parameters
TType of variables.

Definition at line 114 of file legendre_roots.h.

Member Typedef Documentation

◆ variable_type

template<base::concepts::real_scalar T>
using num_collect::functions::legendre_roots< T >::variable_type = T

Type of variables.

Definition at line 117 of file legendre_roots.h.

Constructor & Destructor Documentation

◆ legendre_roots()

template<base::concepts::real_scalar T>
num_collect::functions::legendre_roots< T >::legendre_roots ( index_type degree = 0)
inlineexplicit

Constructor.

Parameters
[in]degreeDegree of Legendre function.

Definition at line 124 of file legendre_roots.h.

Member Function Documentation

◆ compute()

template<base::concepts::real_scalar T>
void num_collect::functions::legendre_roots< T >::compute ( index_type degree)
inline

Compute roots of Legendre function.

Parameters
[in]degreeDegree of Legendre function.

Definition at line 137 of file legendre_roots.h.

◆ degree()

template<base::concepts::real_scalar T>
auto num_collect::functions::legendre_roots< T >::degree ( ) const -> index_type
inlinenodiscardnoexcept

Get the degree of Legendre function.

Returns
Degree of Legendre function.

Definition at line 183 of file legendre_roots.h.

◆ operator[]()

template<base::concepts::real_scalar T>
auto num_collect::functions::legendre_roots< T >::operator[] ( index_type i) const -> variable_type
inlinenodiscard

Get the i-th root.

Parameters
[in]iIndex.
Returns
i-th root.

Definition at line 212 of file legendre_roots.h.

◆ root()

template<base::concepts::real_scalar T>
auto num_collect::functions::legendre_roots< T >::root ( index_type i) const -> variable_type
inlinenodiscard

Get the i-th root.

Parameters
[in]iIndex.
Returns
i-th root.

Definition at line 200 of file legendre_roots.h.

◆ size()

template<base::concepts::real_scalar T>
auto num_collect::functions::legendre_roots< T >::size ( ) const -> index_type
inlinenodiscardnoexcept

Get the number of roots.

Returns
Number of roots.

Definition at line 190 of file legendre_roots.h.

Member Data Documentation

◆ degree_

template<base::concepts::real_scalar T>
index_type num_collect::functions::legendre_roots< T >::degree_
private

Degree of Legendre function.

Definition at line 218 of file legendre_roots.h.

◆ roots_

template<base::concepts::real_scalar T>
Eigen::Matrix<variable_type, Eigen::Dynamic, 1> num_collect::functions::legendre_roots< T >::roots_ {}
private

List of roots.

Definition at line 221 of file legendre_roots.h.


The documentation for this class was generated from the following file: