Home Libraries People FAQ More

#### 拉格朗日 (及連帶) 多項式

##### 概要

```#include <boost/math/special_functions/laguerre.hpp>
```

```namespace boost{ namespace math{

template <class T>
calculated-result-type laguerre(unsigned n, T x);

template <class T, class Policy>
calculated-result-type laguerre(unsigned n, T x, const Policy&);

template <class T>
calculated-result-type laguerre(unsigned n, unsigned m, T x);

template <class T, class Policy>
calculated-result-type laguerre(unsigned n, unsigned m, T x, const Policy&);

template <class T1, class T2, class T3>
calculated-result-type laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);

template <class T1, class T2, class T3>
calculated-result-type laguerre_next(unsigned n, unsigned m, T1 x, T2 Ln, T3 Lnm1);

}} // namespaces
```
##### 說明

```template <class T>
calculated-result-type laguerre(unsigned n, T x);

template <class T, class Policy>
calculated-result-type laguerre(unsigned n, T x, const Policy&);
```

```template <class T>
calculated-result-type laguerre(unsigned n, unsigned m, T x);

template <class T, class Policy>
calculated-result-type laguerre(unsigned n, unsigned m, T x, const Policy&);
```

```template <class T1, class T2, class T3>
calculated-result-type laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
```

```double x = 0.5;  // 橫坐標值
vector<double> v;
v.push_back(laguerre(0, x)).push_back(laguerre(1, x));
for(unsigned l = 1; l < 10; ++l)
v.push_back(laguerre_next(l, x, v[l], v[l-1]));
```

n

x

Ln

Lnm1

```template <class T1, class T2, class T3>
calculated-result-type laguerre_next(unsigned n, unsigned m, T1 x, T2 Ln, T3 Lnm1);
```

```double x = 0.5;  // 橫坐標值
int m = 10;      // 次數
vector<double> v;
v.push_back(laguerre(0, m, x)).push_back(laguerre(1, m, x));
for(unsigned l = 1; l < 10; ++l)
v.push_back(laguerre_next(l, m, x, v[l], v[l-1]));
```

n

m

x

Ln

Lnm1

##### 精確性

0 < l < 20

53

Win32, Visual C++ 8

64

SUSE Linux IA32, g++ 4.1

64

Red Hat Linux IA64, g++ 3.4.4

113

HPUX IA64, aCC A.06.06

0 < l < 20

53

Win32, Visual C++ 8

64

SUSE Linux IA32, g++ 4.1

64

Red Hat Linux IA64, g++ 3.4.4

113

HPUX IA64, aCC A.06.06

##### 實現

 Copyright ?2006 , 2007, 2008 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang Zhang and Bruno Lalande Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)