C++ Technical Report 1

C++ Technical Report 1

C++ Technical Report 1 (TR1) является общим названием для стандарта ISO / IEC TR 19768, библиотеки расширений C++ — это документ с предложением дополнений в стандарт библиотеки С++. Дополнения включают регулярные выражения, умные указатели, хэш-таблицы, и генераторы случайных чисел. TR1 не стандарт, а скорее проект документа. Однако, большинство его предложений, вероятно, станут частью следующего официальный стандарта. В то же время, производители могут использовать этот документ как руководство по созданию расширений.

Содержание

Специальные математические функции

Некоторые особенности TR1, такие, как специальные математические функции и некоторые дополнения C99, которые не включены в Visual C++ реализацию TR1

  • дополнения к <cmath>/<math.h> файлы заголовков — beta, legendre и т. д.


В следующей таблице приведены все 23 специальных функций, описанные в TR1.

Имя функции Прототип функции Математическое выражение
Обобщённые полиномы Лягерра double assoc_laguerre(unsigned n, unsigned m, double x) ; {L_n}^m(x) = (-1)^m \frac{d^m}{dx^m} L_{n+m}(x), \text{ for } x \ge 0
Присоединённые многочлены Лежандра double assoc_legendre(unsigned l, unsigned m, double x) ; {P_l}^m(x) = (1-x^2)^{m/2} \frac{d^m}{dx^m} P_l(x), \text{ for } x \ge 0
Бета-функция double beta(double x, double y) ; \Beta(x,y)=\frac{\Gamma(x) \Gamma(y)}{\Gamma(x+y)}
Полный нормальный эллиптический интеграл Лежандра 1-го рода double comp_ellint_1(double k) ; K(k) = F\left(k, \textstyle \frac{\pi}{2}\right) = \int_0^{\frac{\pi}{2}} \frac{d\theta}{\sqrt{1 - k^2 \sin^2 \theta}}
Полный нормальный эллиптический интеграл Лежандра 2-го рода double comp_ellint_2(double k) ; E\left(k, \textstyle \frac{\pi}{2}\right) = \int_0^{\frac{\pi}{2}} \sqrt{1 - k^2 \sin^2 \theta}\; d\theta
Полный нормальный эллиптический интеграл Лежандра 3-го рода double comp_ellint_3(double k, double nu) ; \Pi\left(\nu, k, \textstyle \frac{\pi}{2}\right) = \int_0^{\frac{\pi}{2}} \frac{d\theta}{(1 - \nu \sin^2 \theta)\sqrt{1 - k^2 \sin^2 \theta}}
Вырожденные гипергеометрические функции double conf_hyperg(double a, double c, double x) ; F(a, c, x) = \frac{\Gamma(c)}{\Gamma(a)} \sum_{n = 0}^\infty \frac{\Gamma(a + n) x^n}{\Gamma(c + n) n!}
Регулярные цилиндрические функции Бесселя double cyl_bessel_i(double nu, double x) ; I_\nu(x) = i^{-\nu} J_\nu(ix) = \sum_{k = 0}^\infty \frac{(x/2)^{\nu + 2k}}{k! \; \Gamma(\nu + k + 1)}, \text{ for } x \ge 0
Цилиндрические функции Бесселя первого рода double cyl_bessel_j(double nu, double x) ; J_\nu(x) = \sum_{k = 0}^\infty \frac{(-1)^k \; (x/2)^{\nu + 2k}}{k! \; \Gamma(\nu + k + 1)}, \text{ for } x \ge 0
en:Irregular modified cylindrical Bessel functions double cyl_bessel_k(double nu, double x) ; \begin{align}
K_\nu(x) & = \textstyle\frac{\pi}{2} i^{\nu+1} \big(J_\nu(ix) + i N_\nu(ix)\big) \\
         & = \begin{cases}
                 \displaystyle \frac{I_{-\nu}(x) - I_\nu(x)}{\sin \nu\pi}, & \text{for } x \ge 0 \text{ and } \nu \notin \mathbb{Z} \\[10pt]
                 \displaystyle \frac{\pi}{2} \lim_{\mu \to \nu} \frac{I_{-\mu}(x) - I_\mu(x)}{\sin \mu\pi}, & \text{for } x < 0 \text{ and } \nu \in \mathbb{Z} \\
             \end{cases}
\end{align}
en:Cylindrical Neumann functions

en:Cylindrical Bessel functions of the second kind

double cyl_neumann(double nu, double x) ; 
N_\nu(x) = \begin{cases}
                 \displaystyle \frac{J_\nu(x)\cos \nu\pi - J_{-\nu}(x)}{\sin \nu\pi}, & \text{for } x \ge 0 \text{ and } \nu \notin \mathbb{Z} \\[10pt]
                 \displaystyle \lim_{\mu \to \nu} \frac{J_\mu(x)\cos \mu\pi - J_{-\mu}(x)}{\sin \mu\pi}, & \text{for } x < 0 \text{ and } \nu \in \mathbb{Z} \\
             \end{cases}
Неполный нормальный эллиптический интеграл 1-го рода double ellint_1(double k, double phi) ; F(k,\phi)=\int_0^\phi\frac{d\theta}{\sqrt{1-k^2\sin^2\theta}}, \text{ for } \left|k\right| \le 1
Неполный нормальный эллиптический интеграл 2-го рода double ellint_2(double k, double phi) ; \displaystyle E(k,\phi)=\int_0^\phi\sqrt{1-k^2\sin^2\theta}d\theta, \text{ for } \left|k\right| \le 1
Неполный нормальный эллиптический интеграл 3-го рода double ellint_3(double k, double nu, double phi) ; \Pi(k,\nu,\phi)=\int_0^\phi\frac{d\theta}{\left(1-\nu\sin^2\theta\right)\sqrt{1-k^2\sin^2\theta}}, \text{ for } \left|k\right| \le 1
Интегральная показательная функция double expint(double x) ;  \mbox{E}i(x)=-\int_{-x}^{\infty} \frac{e^{-t}}{t}\, dt
Многочлены Эрмита double hermite(unsigned n, double x) ; H_n(x)=(-1)^n e^{x^2}\frac{d^n}{dx^n}e^{-x^2}\,\!
en:Hypergeometric series double hyperg(double a, double b, double c, double x) ; F(a,b,c,x)=\frac{\Gamma(c)}{\Gamma(a)\Gamma(b)}\sum_{n = 0}^\infty\frac{\Gamma(a+n)\Gamma(b+n)}{\Gamma(c+n)}\frac{x^n}{n!}
en:Laguerre polynomials double laguerre(unsigned n, double x) ; L_n(x)=\frac{e^x}{n!}\frac{d^n}{dx^n}\left(x^n e^{-x}\right), \text{ for } x \ge 0
en:Legendre polynomials double legendre(unsigned l, double x) ; P_l(x) = {1 \over 2^l l!} {d^l \over dx^l } (x^2 -1)^l, \text{ for } \left|x\right| \le 1
Дзета-функция Римана double riemann_zeta(double x) ; 
\Zeta(x) = 
          \begin{cases}
                 \displaystyle \sum_{k = 1}^\infty k^{-x}, & \text{for } x > 1 \\[10pt]
                 \displaystyle 2^x\pi^{x-1}\sin\left(\frac{x\pi}{2}\right)\Gamma(1-x)\zeta(1-x), & \text{for } x < 1 \\
             \end{cases}
en:Spherical Bessel functions of the first kind double sph_bessel(unsigned n, double x) ; j_n(x) = \sqrt{\frac{\pi}{2x}} J_{n+1/2}(x), \text{ for } x \ge 0
en:Spherical associated Legendre functions double sph_legendre(unsigned l, unsigned m, double theta) ;  Y_{l}^{m}(\theta, 0) \text{ where } Y_{l}^{m}(\theta, \phi) = (-1)^{m}\left[\frac{(2l+1)}{4\pi}\frac{(l-m)!}{(l+m)!}\right]^{1 \over 2} P_{l}^{m}(cos \theta)e^{im\phi}, \text{ for } |m| \leq l
en:Spherical Neumann functions

en:Spherical Bessel functions of the second kind

double sph_neumann(unsigned n, double x) ; n_n(x) = \left(\frac{\pi}{2x}\right)^{\frac{1}{2}}N_{n+\frac{1}{2}}(x), \text{ for } x \ge 0

Каждая функция имеет два дополнительных варианта. Добавление F 'или' L 'суффикс к имени функции дает функцию, которая действует на float или long double значения соответственно. Например:

float sph_neumannf( unsigned n, float x ) ;
long double sph_neumannl( unsigned n, long double x ) ;

Совместимость с СИ

Одной из концепций при разработке C++ было обеспечение как можно большей совместимости с языком программирования Си. Однако данная концепция не являлась и не является приоритетной, а лишь настоятельно рекомендованной, а потому C++ нельзя в строгом смысле считать надмножеством Си (стандарты этих языков расходятся). TR1 — это попытка примирить некоторые из различий данных языков путем добавления различных заголовков в следующие библиотеки С++: <complex>, <locale>, <cmath> и т. д. Данные изменения способствуют приведению C++ в соответствие с C99 (не все части C99 включены в TR1).

См. также

Литература

Ссылки


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Полезное


Смотреть что такое "C++ Technical Report 1" в других словарях:

  • Technical report — A technical report (also: scientific report) is a document that describes the process, progress, or results of technical or scientific research, or the state of a technical or scientific research problem. Unlike other scientific literature, such… …   Wikipedia

  • C++ Technical Report 1 — (TR1) is the common name for ISO/IEC TR 19768, C++ Library Extensions, which is a document proposing additions to the C++ standard library. The additions include regular expressions, smart pointers, hash tables, and random number generators. TR1… …   Wikipedia

  • technical — technically, adv. technicalness, n. /tek ni keuhl/, adj. 1. belonging or pertaining to an art, science, or the like: technical skill. 2. peculiar to or characteristic of a particular art, science, profession, trade, etc.: technical details. 3.… …   Universalium

  • Technical communication — is the process of conveying usable information through writing or speech about a specific domain to an intended audience. Information is usable if the intended audience is able to perform an action or make a decision based on its contents… …   Wikipedia

  • Technical diving — Technical diver during a decompression stop. Technical diving (sometimes referred to as Tec diving) is a form of scuba diving that exceeds the scope of recreational diving (although the vast majority of technical divers dive for recreation and… …   Wikipedia

  • Technical debt — (also known as design debt or code debt) are synonymous, neologistic metaphors referring to the eventual consequences of poor software architecture and software development within a codebase. Common causes of technical debt include (a combination …   Wikipedia

  • Technical intelligence — In a pure military context, Technical Intelligence (TECHINT) is intelligence about weapons and equipment used by the armed forces of foreign nations (often referred to as foreign materiel).The related term, scientific and technical intelligence,… …   Wikipedia

  • Technical Service Council — The TECHNICAL SERVICE COUNCIL was set up to combat the brain drain of Canadian engineers to the United States, when over 20% of the graduating classes were emigrating. Ireland, India, New Zealand and even Switzerland have had similar problems.In… …   Wikipedia

  • Report — For other uses, see Report (disambiguation). Example of a front page of a report A report is a textual work (usually of writing, speech, television, or film) made with the specific intention of relaying information or recounting certain events in …   Wikipedia

  • Technical Education Center Osceola — Infobox School name = Technical Education Center Osceola established = 1994 type = Public secondary accreditation = [http://www.council.org/ Council on Occupational Education (COE)] [http://www.sacs.org/ Southern Association of Colleges and… …   Wikipedia


Поделиться ссылкой на выделенное

Прямая ссылка:
Нажмите правой клавишей мыши и выберите «Копировать ссылку»