Bernoulli scheme: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Tigerboy1966
No edit summary
 
en>Jess Riedel
Line 1: Line 1:
Marvella is what you can contact her but it's not the most female name out there. Managing individuals is what I do and the wage has been truly satisfying. Doing ceramics is what love doing. Years ago we moved to North Dakota.<br><br>Here is my site ... [http://www.teenvalley.net/user/RLay www.teenvalley.net]
'''C++ Technical Report 1 (TR1)''' is the common name for '''''ISO/IEC TR 19768, C++ Library Extensions''''', which was a document proposing additions to the [[C++ standard library]] for the C++03 language standard. The additions include [[regular expression]]s, [[smart pointer]]s, [[hash table]]s, and [[random number generator]]s.  TR1 was not a standard itself, but rather a draft document. However, most of its proposals became part of the current official standard, [[C++11]].  Before C++11 was standardized, vendors used this document as a guide to create extensions.  The report's goal was "to build more widespread existing practice for an expanded C++ standard library."
 
The report was first circulated in draft form in 2005 as [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf Draft Technical Report on C++ Library Extensions], then published in 2007 as an ISO/IEC standard as [http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?ics1=35&ics2=60&ics3=&csnumber=43289 ISO/IEC TR 19768:2007].
 
==Overview==
 
[[Compilers]] needed not include the TR1 components to be conforming to the C++ standard, because TR1 proposals were not part of the standard itself, but only a set of possible additions that were still to be ratified. However, most of it was available from [[Boost C++ Libraries|Boost]], and several compiler/library distributors implemented all or part of the components. TR1 was not a complete list of additions to the library that were going to appear in the next standard, [[C++11]]. For example, C++11 includes thread support library that is not available in TR1.
 
The new components were defined in the <code>std::tr1</code> [[namespace]] to distinguish them from the then current standard library.
 
There is also a second technical report, [[#Technical Report 2|C++ Technical Report 2]], planned for publishing after C++11 [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1810.html].
 
==Components==
 
TR1 includes the following components:
 
===General utilities===
 
'''Reference wrapper''' – enables passing [[Reference#Computer science|references]], rather than copies, into algorithms or function objects. The feature was based on Boost.Ref.<ref>[http://www.boost.org/doc/html/ref.html Chapter 22. Boost.Ref – Boost 1.48.0<!-- Bot generated title -->]</ref> A [[Adapter pattern|wrapper]] reference is obtained from an instance of the template class <code>reference_wrapper</code>. Wrapper references are similar to normal references (‘&’) of the C++ language. To obtain a wrapper reference from any object the template class <code>ref</code> is used (for a constant reference <code>cref</code> is used).
 
Wrapper references are useful above all for template functions, when argument deduction would not deduce a reference (e.g. when forwarding arguments):
<source lang="cpp">
#include <iostream>
#include <tr1/functional>
 
void f( int &r )  { ++r; }
 
template< class Funct, class Arg >
void g( Funct f, Arg t )
{
  f(t);
}
 
int main()
{
  int i = 0;
 
  g( f, i );                  // 'g< void(int &r), int >' is instantiated
  std::cout << i << "\n";      // Output: 0
 
  g( f, std::tr1::ref(i) );    // 'g< void(int &r), reference_wrapper<int> >' is instanced
  std::cout << i << "\n";      // Output: 1
}
 
</source>
 
'''Smart pointers''' – adds several classes that simplify object lifetime management in complex cases. Three main classes are added:
*<code>shared_ptr</code> – a reference-counted smart pointer
*<code>weak_ptr</code> – a variant of <code>shared_ptr</code> that doesn't increase the reference count
 
The proposal is based on Boost Smart Pointer library <ref>[http://www.boost.org/libs/smart_ptr/smart_ptr.htm Smart Pointers – Boost 1.48.0<!-- Bot generated title -->]</ref>
 
===Function objects===
 
These four modules are added to the <code><functional></code> header file:
 
'''Polymorphic function wrapper''' (<code>function</code>) – can store any callable function (function pointers, member function pointers, and function objects) that uses a specified function call signature. The type does not depend on the kind of the callable used. Based on Boost.Function <ref>[http://www.boost.org/doc/html/function.html Chapter 9. Boost.Function – Boost 1.48.0<!-- Bot generated title -->]</ref>
 
'''Function object binders''' (<code>bind</code>) – can bind any parameter [[Parameter#Computer science|parameters]] to function objects. Function composition is also allowed. This is a generalized version of the standard <code>std::bind1st</code> and <code>std::bind2nd</code> bind functions. The feature is based on Boost Bind library.<ref>[http://www.boost.org/libs/bind/bind.html Boost: bind.hpp documentation – Boost 1.48.0<!-- Bot generated title -->]</ref>
 
'''Function return types''' (<code>result_of</code>) – determines the type of a call expression.
 
'''<code>mem_fn</code>''' – enhancement to the standard <code>std::mem_fun</code> and <code>std::mem_fun_ref</code>. Allows [[pointer (computer programming)|pointer]]s to member [[Subroutine|functions]] to be treated as function objects. Based on Boost Mem Fn library <ref>[http://www.boost.org/libs/bind/mem_fn.html Boost: mem_fn.hpp documentation – Boost 1.48.0<!-- Bot generated title -->]</ref>
 
===Metaprogramming and type traits===
 
There is now <code><type_traits></code> header file that contains many useful trait meta-templates, such as <code>is_pod</code>, <code>has_virtual_destructor</code>, <code>remove_extent</code>, etc. It facilitates metaprogramming by enabling queries on and transformation between different [[Datatype|types]] The proposal is based on Boost Type Traits library [http://www.boost.org/doc/libs/1_37_0/libs/type_traits/doc/html/index.html].
 
===Numerical facilities===
 
====Random number generation====
* new <code><random></code> header file – <code>variate_generator</code>, <code>[[Mersenne Twister|mersenne_twister]]</code>, <code>[[Poisson Distribution|poisson_distribution]]</code>, etc.
* utilities for generating random numbers using any of several [[Pseudorandom number generators]], engines, and [[probability distributions]] <!-- I have suspicion this comes from Boost too --><!-- nope! Boost and TR1 facilities come from Fermilab -->
 
====Mathematical special functions====
'''Some features of TR1, such as the mathematical special functions and certain C99 additions, are not included in the Visual C++ implementation of TR1.'''
The Mathematical special functions library was not standardized in C++11.
* additions to the <code><cmath></code>/<code><math.h></code> header files – <code>[[Beta function|beta]]</code>, <code>[[Legendre polynomials|legendre]]</code>, etc. <!-- these come from Fermilab, too -->
 
These functions will likely be of principal interest to programmers in the engineering and scientific disciplines.
 
The following table shows all 23 special functions described in TR1.
{| class="wikitable"
|-
! Function name !! Function prototype !! Mathematical expression
|-
! [[Associated Laguerre polynomials]]
| double '''assoc_laguerre'''( unsigned n, unsigned m, double x ) ; || <math>{L_n}^m(x) = (-1)^m \frac{d^m}{dx^m} L_{n+m}(x), \text{ for } x \ge 0</math>
|-
! [[Associated Legendre polynomials]]
| double '''assoc_legendre'''( unsigned l, unsigned m, double x ) ; || <math>{P_l}^m(x) = (1-x^2)^{m/2} \frac{d^m}{dx^m} P_l(x), \text{ for } x \ge 0</math>
|-
! [[Beta function]]
| double '''beta'''( double x, double y ) ; || <math>\Beta(x,y)=\frac{\Gamma(x) \Gamma(y)}{\Gamma(x+y)}</math>
|-
! [[Complete elliptic integral of the first kind]]
| double '''comp_ellint_1'''( double k ) ; || <math>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}}</math>
|-
! [[Complete elliptic integral of the second kind]]
| double '''comp_ellint_2'''( double k ) ; || <math>E\left(k, \textstyle \frac{\pi}{2}\right) = \int_0^{\frac{\pi}{2}} \sqrt{1 - k^2 \sin^2 \theta}\; d\theta</math>
|-
! [[Complete elliptic integral of the third kind]]
| double '''comp_ellint_3'''( double k, double nu ) ; || <math>\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}}</math>
|-
! [[Confluent hypergeometric functions]]
| double '''conf_hyperg'''( double a, double c, double x ) ; || <math>F(a, c, x) = \frac{\Gamma(c)}{\Gamma(a)} \sum_{n = 0}^\infty \frac{\Gamma(a + n) x^n}{\Gamma(c + n) n!}</math>
|-
! [[Regular modified cylindrical Bessel functions]]
| double '''cyl_bessel_i'''( double nu, double x ) ; || <math>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</math>
|-
! [[Cylindrical Bessel functions of the first kind]]
| double '''cyl_bessel_j'''( double nu, double x ) ; || <math>J_\nu(x) = \sum_{k = 0}^\infty \frac{(-1)^k \; (x/2)^{\nu + 2k}}{k! \; \Gamma(\nu + k + 1)}, \text{ for } x \ge 0</math>
|-
! [[Irregular modified cylindrical Bessel functions]]
| double '''cyl_bessel_k'''( double nu, double x ) ; || <math>\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}</math>
|-
! [[Cylindrical Neumann functions]]
[[Cylindrical Bessel functions of the second kind]]
| double '''cyl_neumann'''( double nu, double x ) ; || <math>
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}
</math>
|-
! [[Incomplete elliptic integral of the first kind]]
| double '''ellint_1'''( double k, double phi ) ; || <math>F(k,\phi)=\int_0^\phi\frac{d\theta}{\sqrt{1-k^2\sin^2\theta}}, \text{ for } \left|k\right| \le 1</math>
|-
! [[Incomplete elliptic integral of the second kind]]
| double '''ellint_2'''( double k, double phi ) ; || <math>\displaystyle E(k,\phi)=\int_0^\phi\sqrt{1-k^2\sin^2\theta}d\theta, \text{ for } \left|k\right| \le 1</math>
|-
! [[Incomplete elliptic integral of the third kind]]
| double '''ellint_3'''( double k, double nu, double phi ) ; || <math>\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</math>
|-
! [[Exponential integral]]
| double '''expint'''( double x ) ; || <math> \mbox{E}i(x)=-\int_{-x}^{\infty} \frac{e^{-t}}{t}\, dt</math>
|-
! [[Hermite polynomials]]
| double '''hermite'''( unsigned n, double x ) ; || <math>H_n(x)=(-1)^n e^{x^2}\frac{d^n}{dx^n}e^{-x^2}\,\!</math>
|-
! [[Hypergeometric series]]
| double '''hyperg'''( double a, double b, double c, double x ) ; || <math>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!}</math>
|-
! [[Laguerre polynomials]]
| double '''laguerre'''( unsigned n, double x ) ; || <math>L_n(x)=\frac{e^x}{n!}\frac{d^n}{dx^n}\left(x^n e^{-x}\right), \text{ for } x \ge 0</math>
|-
! [[Legendre polynomials]]
| double '''legendre'''( unsigned l, double x ) ; || <math>P_l(x) = {1 \over 2^l l!} {d^l \over dx^l } (x^2 -1)^l, \text{ for } \left|x\right| \le 1 </math>
|-
! [[Riemann zeta function]]
| double '''riemann_zeta'''( double x ) ; || <math>
\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}
</math>
|-
! [[Spherical Bessel functions of the first kind]]
| double '''sph_bessel'''( unsigned n, double x ) ; || <math>j_n(x) = \sqrt{\frac{\pi}{2x}} J_{n+1/2}(x), \text{ for } x \ge 0</math>
|-
! [[Spherical associated Legendre functions]]
| double '''sph_legendre'''( unsigned l, unsigned m, double theta ) ; || <math> 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^{\mathrm{i}m\phi}, \text{ for } |m| \leq l</math>
|-
! [[Spherical Neumann functions]]
[[Spherical Bessel functions of the second kind]]
| double '''sph_neumann'''( unsigned n, double x ) ; || <math>n_n(x) = \left(\frac{\pi}{2x}\right)^{\frac{1}{2}}N_{n+\frac{1}{2}}(x), \text{ for } x \ge 0</math>
|}
Each function has two additional variants. Appending the suffix ‘'''f'''’ or ‘'''l'''’ to a function name gives a function that operates on <code>float</code> or <code>long double</code> values respectively. For example:
<source lang="cpp">
float sph_neumannf( unsigned n, float x ) ;
long double sph_neumannl( unsigned n, long double x ) ;
</source>
 
===Containers===
 
====Tuple types====
* new <code><tuple></code> header file – <code>tuple</code>
* based on Boost Tuple library <ref>[http://www.boost.org/libs/tuple/doc/tuple_users_guide.html The Boost Tuple Library – Boost 1.48.0<!-- Bot generated title -->]</ref>
* vaguely an extension of the standard <code>std::pair</code>
* fixed size collection of elements, which may be of different [[Datatype|types]]
 
====Fixed size array====
* new <code><array></code> header file – <code>array</code>
* taken from Boost Array library <ref>[http://www.boost.org/doc/html/array.html Chapter 3. Boost.Array – Boost 1.48.0<!-- Bot generated title -->]</ref>
* as opposed to dynamic array types such as the standard <code>std::vector</code>
 
====Hash tables====
* new <code><unordered_set></code>, <code><[[unordered map (C++)|unordered_map]]></code> header files
* they implement the <code>unordered_set</code>, <code>unordered_multiset</code>, <code>unordered_map</code>, and <code>unordered_multimap</code> classes, analogous to <code>set</code>, <code>multiset</code>, <code>map</code>, and <code>multimap</code>, respectively
** unfortunately, <code>unordered_set</code> and <code>unordered_multiset</code> cannot be used with the <code>set_union</code>, <code>set_intersection</code>, <code>set_difference</code>, <code>set_symmetric_difference</code>, and <code>includes</code> standard library functions, which work for <code>set</code> and <code>multiset</code>
* new implementation, not derived from an existing library, not fully API compatible with existing libraries
* like all [[hash table]]s, often provide [[Algorithmic complexity|constant time]] lookup of elements but the worst case can be linear in the size of the container
 
===Regular expressions===
* new <code><regex></code> header file – <code>regex</code>, <code>regex_match</code>, <code>regex_search</code>, <code>regex_replace</code>, etc.
* based on Boost RegEx library <ref>[http://www.boost.org/doc/libs/1_36_0/libs/regex/doc/html/index.html Boost.Regex – Boost 1.36.0<!-- Bot generated title -->]</ref>
* pattern matching library
 
===C compatibility===
[[C++]] is designed to be compatible with the [[C (programming language)|C programming language]], but is not a strict superset of C due to diverging standards.  TR1 attempts to reconcile some of these differences through additions to various headers in the C++ library, such as <complex>, <locale>, <cmath>, etc.  These changes help to bring C++ more in line with the [[C (programming language)#C99|C99]] version of the C standard (not all parts of C99 are included in TR1).
 
==Technical Report 2==
In 2005 a request for proposals for a TR2 was made with a special interest in Unicode, XML/HTML, Networking and usability for novice programmers.[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1810.html].
 
Some of the proposals include:
* Threads [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1883.pdf]
* The [[Asio C++ library]] (networking [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1925.pdf][http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2175.pdf]).
* Signals/Slots [http://www.mail-archive.com/libsigc-list@gnome.org/msg00115.html][http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2086.pdf]
* Filesystem Library [http://www.open-std.org/JTC1/sc22/WG21/docs/papers/2011/n3239.html] – Based on the Boost Filesystem Library, for query/manipulation of paths, files and directories.
* Boost Any Library [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1939.html]
* Lexical Conversion Library [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1973.html]
* New String Algorithms [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2059.html#abstract]
* Toward a More Complete Taxonomy of Algebraic Properties for Numeric Libraries in TR2 [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/]
* Adding heterogeneous comparison lookup to associative containers for TR2 [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2882.pdf]
 
==See also==
 
*[[C++11]], the most recent standard for the C++ programming language; the library improvements were based on TR1
*[[C11 (C standard revision)]], the most recent standard for the C programming language
*[[Boost library]], a large collection of portable C++ libraries, several of which were included in TR1
*[[Standard Template Library]], part of the current C++ Standard Library
 
==Notes==
{{reflist}}
 
==References==
 
*{{cite journal | title = Draft Technical Report on C++ Library Extensions | url = http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf | date = 2005-06-24 | format = PDF | last = ISO/IEC JTC1/SC22/WG21}}
* {{cite web |title=ISO/IEC TR 19768:2007 |url=http://www.iso.org/iso/iso_catalogue/catalogue_ics/catalogue_detail_ics.htm?ics1=35&ics2=60&ics3=&csnumber=43289 }}
*{{cite book | first = Peter | last = Becker | title = The C++ Standard Library Extensions: A Tutorial and Reference | year = 2006 | publisher = Addison-Wesley Professional | isbn = 0-321-41299-0}}
 
==External links==
*[http://aristeia.com/EC3E/TR1_info_frames.html Scott Meyers' Effective C++: TR1 Information] – contains links to the TR1 proposal documents which provide background and rationale for the TR1 libraries.
 
[[Category:C++ Standard Library]]

Revision as of 21:57, 8 January 2014

C++ Technical Report 1 (TR1) is the common name for ISO/IEC TR 19768, C++ Library Extensions, which was a document proposing additions to the C++ standard library for the C++03 language standard. The additions include regular expressions, smart pointers, hash tables, and random number generators. TR1 was not a standard itself, but rather a draft document. However, most of its proposals became part of the current official standard, C++11. Before C++11 was standardized, vendors used this document as a guide to create extensions. The report's goal was "to build more widespread existing practice for an expanded C++ standard library."

The report was first circulated in draft form in 2005 as Draft Technical Report on C++ Library Extensions, then published in 2007 as an ISO/IEC standard as ISO/IEC TR 19768:2007.

Overview

Compilers needed not include the TR1 components to be conforming to the C++ standard, because TR1 proposals were not part of the standard itself, but only a set of possible additions that were still to be ratified. However, most of it was available from Boost, and several compiler/library distributors implemented all or part of the components. TR1 was not a complete list of additions to the library that were going to appear in the next standard, C++11. For example, C++11 includes thread support library that is not available in TR1.

The new components were defined in the std::tr1 namespace to distinguish them from the then current standard library.

There is also a second technical report, C++ Technical Report 2, planned for publishing after C++11 [1].

Components

TR1 includes the following components:

General utilities

Reference wrapper – enables passing references, rather than copies, into algorithms or function objects. The feature was based on Boost.Ref.[1] A wrapper reference is obtained from an instance of the template class reference_wrapper. Wrapper references are similar to normal references (‘&’) of the C++ language. To obtain a wrapper reference from any object the template class ref is used (for a constant reference cref is used).

Wrapper references are useful above all for template functions, when argument deduction would not deduce a reference (e.g. when forwarding arguments):

#include <iostream>
#include <tr1/functional>

void f( int &r )  { ++r; }

template< class Funct, class Arg >
void g( Funct f, Arg t )
{
  f(t);
}

int main()
{
  int i = 0;

  g( f, i );                   // 'g< void(int &r), int >' is instantiated
  std::cout << i << "\n";      // Output: 0

  g( f, std::tr1::ref(i) );    // 'g< void(int &r), reference_wrapper<int> >' is instanced
  std::cout << i << "\n";      // Output: 1
}

Smart pointers – adds several classes that simplify object lifetime management in complex cases. Three main classes are added:

  • shared_ptr – a reference-counted smart pointer
  • weak_ptr – a variant of shared_ptr that doesn't increase the reference count

The proposal is based on Boost Smart Pointer library [2]

Function objects

These four modules are added to the <functional> header file:

Polymorphic function wrapper (function) – can store any callable function (function pointers, member function pointers, and function objects) that uses a specified function call signature. The type does not depend on the kind of the callable used. Based on Boost.Function [3]

Function object binders (bind) – can bind any parameter parameters to function objects. Function composition is also allowed. This is a generalized version of the standard std::bind1st and std::bind2nd bind functions. The feature is based on Boost Bind library.[4]

Function return types (result_of) – determines the type of a call expression.

mem_fn – enhancement to the standard std::mem_fun and std::mem_fun_ref. Allows pointers to member functions to be treated as function objects. Based on Boost Mem Fn library [5]

Metaprogramming and type traits

There is now <type_traits> header file that contains many useful trait meta-templates, such as is_pod, has_virtual_destructor, remove_extent, etc. It facilitates metaprogramming by enabling queries on and transformation between different types The proposal is based on Boost Type Traits library [2].

Numerical facilities

Random number generation

Mathematical special functions

Some features of TR1, such as the mathematical special functions and certain C99 additions, are not included in the Visual C++ implementation of TR1. The Mathematical special functions library was not standardized in C++11.

  • additions to the <cmath>/<math.h> header files – beta, legendre, etc.

These functions will likely be of principal interest to programmers in the engineering and scientific disciplines.

The following table shows all 23 special functions described in TR1.

Function name Function prototype Mathematical expression
Associated Laguerre polynomials double assoc_laguerre( unsigned n, unsigned m, double x ) ; Lnm(x)=(1)mdmdxmLn+m(x), for x0
Associated Legendre polynomials double assoc_legendre( unsigned l, unsigned m, double x ) ; Plm(x)=(1x2)m/2dmdxmPl(x), for x0
Beta function double beta( double x, double y ) ; B(x,y)=Γ(x)Γ(y)Γ(x+y)
Complete elliptic integral of the first kind double comp_ellint_1( double k ) ; K(k)=F(k,π2)=0π2dθ1k2sin2θ
Complete elliptic integral of the second kind double comp_ellint_2( double k ) ; E(k,π2)=0π21k2sin2θdθ
Complete elliptic integral of the third kind double comp_ellint_3( double k, double nu ) ; Π(ν,k,π2)=0π2dθ(1νsin2θ)1k2sin2θ
Confluent hypergeometric functions double conf_hyperg( double a, double c, double x ) ; F(a,c,x)=Γ(c)Γ(a)n=0Γ(a+n)xnΓ(c+n)n!
Regular modified cylindrical Bessel functions double cyl_bessel_i( double nu, double x ) ; Iν(x)=iνJν(ix)=k=0(x/2)ν+2kk!Γ(ν+k+1), for x0
Cylindrical Bessel functions of the first kind double cyl_bessel_j( double nu, double x ) ; Jν(x)=k=0(1)k(x/2)ν+2kk!Γ(ν+k+1), for x0
Irregular modified cylindrical Bessel functions double cyl_bessel_k( double nu, double x ) ; Kν(x)=π2iν+1(Jν(ix)+iNν(ix))={Iν(x)Iν(x)sinνπ,for x0 and νπ2limμνIμ(x)Iμ(x)sinμπ,for x<0 and ν
Cylindrical Neumann functions

Cylindrical Bessel functions of the second kind

double cyl_neumann( double nu, double x ) ; Nν(x)={Jν(x)cosνπJν(x)sinνπ,for x0 and νlimμνJμ(x)cosμπJμ(x)sinμπ,for x<0 and ν
Incomplete elliptic integral of the first kind double ellint_1( double k, double phi ) ; F(k,ϕ)=0ϕdθ1k2sin2θ, for |k|1
Incomplete elliptic integral of the second kind double ellint_2( double k, double phi ) ; E(k,ϕ)=0ϕ1k2sin2θdθ, for |k|1
Incomplete elliptic integral of the third kind double ellint_3( double k, double nu, double phi ) ; Π(k,ν,ϕ)=0ϕdθ(1νsin2θ)1k2sin2θ, for |k|1
Exponential integral double expint( double x ) ; Ei(x)=xettdt
Hermite polynomials double hermite( unsigned n, double x ) ; Hn(x)=(1)nex2dndxnex2
Hypergeometric series double hyperg( double a, double b, double c, double x ) ; F(a,b,c,x)=Γ(c)Γ(a)Γ(b)n=0Γ(a+n)Γ(b+n)Γ(c+n)xnn!
Laguerre polynomials double laguerre( unsigned n, double x ) ; Ln(x)=exn!dndxn(xnex), for x0
Legendre polynomials double legendre( unsigned l, double x ) ; Pl(x)=12ll!dldxl(x21)l, for |x|1
Riemann zeta function double riemann_zeta( double x ) ; Z(x)={k=1kx,for x>12xπx1sin(xπ2)Γ(1x)ζ(1x),for x<1
Spherical Bessel functions of the first kind double sph_bessel( unsigned n, double x ) ; jn(x)=π2xJn+1/2(x), for x0
Spherical associated Legendre functions double sph_legendre( unsigned l, unsigned m, double theta ) ; Ylm(θ,0) where Ylm(θ,ϕ)=(1)m[(2l+1)4π(lm)!(l+m)!]12Plm(cosθ)eimϕ, for |m|l
Spherical Neumann functions

Spherical Bessel functions of the second kind

double sph_neumann( unsigned n, double x ) ; nn(x)=(π2x)12Nn+12(x), for x0

Each function has two additional variants. Appending the suffix ‘f’ or ‘l’ to a function name gives a function that operates on float or long double values respectively. For example:

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

Containers

Tuple types

  • new <tuple> header file – tuple
  • based on Boost Tuple library [6]
  • vaguely an extension of the standard std::pair
  • fixed size collection of elements, which may be of different types

Fixed size array

  • new <array> header file – array
  • taken from Boost Array library [7]
  • as opposed to dynamic array types such as the standard std::vector

Hash tables

  • new <unordered_set>, <unordered_map> header files
  • they implement the unordered_set, unordered_multiset, unordered_map, and unordered_multimap classes, analogous to set, multiset, map, and multimap, respectively
    • unfortunately, unordered_set and unordered_multiset cannot be used with the set_union, set_intersection, set_difference, set_symmetric_difference, and includes standard library functions, which work for set and multiset
  • new implementation, not derived from an existing library, not fully API compatible with existing libraries
  • like all hash tables, often provide constant time lookup of elements but the worst case can be linear in the size of the container

Regular expressions

  • new <regex> header file – regex, regex_match, regex_search, regex_replace, etc.
  • based on Boost RegEx library [8]
  • pattern matching library

C compatibility

C++ is designed to be compatible with the C programming language, but is not a strict superset of C due to diverging standards. TR1 attempts to reconcile some of these differences through additions to various headers in the C++ library, such as <complex>, <locale>, <cmath>, etc. These changes help to bring C++ more in line with the C99 version of the C standard (not all parts of C99 are included in TR1).

Technical Report 2

In 2005 a request for proposals for a TR2 was made with a special interest in Unicode, XML/HTML, Networking and usability for novice programmers.[3].

Some of the proposals include:

  • Threads [4]
  • The Asio C++ library (networking [5][6]).
  • Signals/Slots [7][8]
  • Filesystem Library [9] – Based on the Boost Filesystem Library, for query/manipulation of paths, files and directories.
  • Boost Any Library [10]
  • Lexical Conversion Library [11]
  • New String Algorithms [12]
  • Toward a More Complete Taxonomy of Algebraic Properties for Numeric Libraries in TR2 [13]
  • Adding heterogeneous comparison lookup to associative containers for TR2 [14]

See also

  • C++11, the most recent standard for the C++ programming language; the library improvements were based on TR1
  • C11 (C standard revision), the most recent standard for the C programming language
  • Boost library, a large collection of portable C++ libraries, several of which were included in TR1
  • Standard Template Library, part of the current C++ Standard Library

Notes

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

References

  • One of the biggest reasons investing in a Singapore new launch is an effective things is as a result of it is doable to be lent massive quantities of money at very low interest rates that you should utilize to purchase it. Then, if property values continue to go up, then you'll get a really high return on funding (ROI). Simply make sure you purchase one of the higher properties, reminiscent of the ones at Fernvale the Riverbank or any Singapore landed property Get Earnings by means of Renting

    In its statement, the singapore property listing - website link, government claimed that the majority citizens buying their first residence won't be hurt by the new measures. Some concessions can even be prolonged to chose teams of consumers, similar to married couples with a minimum of one Singaporean partner who are purchasing their second property so long as they intend to promote their first residential property. Lower the LTV limit on housing loans granted by monetary establishments regulated by MAS from 70% to 60% for property purchasers who are individuals with a number of outstanding housing loans on the time of the brand new housing purchase. Singapore Property Measures - 30 August 2010 The most popular seek for the number of bedrooms in Singapore is 4, followed by 2 and three. Lush Acres EC @ Sengkang

    Discover out more about real estate funding in the area, together with info on international funding incentives and property possession. Many Singaporeans have been investing in property across the causeway in recent years, attracted by comparatively low prices. However, those who need to exit their investments quickly are likely to face significant challenges when trying to sell their property – and could finally be stuck with a property they can't sell. Career improvement programmes, in-house valuation, auctions and administrative help, venture advertising and marketing, skilled talks and traisning are continuously planned for the sales associates to help them obtain better outcomes for his or her shoppers while at Knight Frank Singapore. No change Present Rules

    Extending the tax exemption would help. The exemption, which may be as a lot as $2 million per family, covers individuals who negotiate a principal reduction on their existing mortgage, sell their house short (i.e., for lower than the excellent loans), or take part in a foreclosure course of. An extension of theexemption would seem like a common-sense means to assist stabilize the housing market, but the political turmoil around the fiscal-cliff negotiations means widespread sense could not win out. Home Minority Chief Nancy Pelosi (D-Calif.) believes that the mortgage relief provision will be on the table during the grand-cut price talks, in response to communications director Nadeam Elshami. Buying or promoting of blue mild bulbs is unlawful.

    A vendor's stamp duty has been launched on industrial property for the primary time, at rates ranging from 5 per cent to 15 per cent. The Authorities might be trying to reassure the market that they aren't in opposition to foreigners and PRs investing in Singapore's property market. They imposed these measures because of extenuating components available in the market." The sale of new dual-key EC models will even be restricted to multi-generational households only. The models have two separate entrances, permitting grandparents, for example, to dwell separately. The vendor's stamp obligation takes effect right this moment and applies to industrial property and plots which might be offered inside three years of the date of buy. JLL named Best Performing Property Brand for second year running

    The data offered is for normal info purposes only and isn't supposed to be personalised investment or monetary advice. Motley Fool Singapore contributor Stanley Lim would not personal shares in any corporations talked about. Singapore private home costs increased by 1.eight% within the fourth quarter of 2012, up from 0.6% within the earlier quarter. Resale prices of government-built HDB residences which are usually bought by Singaporeans, elevated by 2.5%, quarter on quarter, the quickest acquire in five quarters. And industrial property, prices are actually double the levels of three years ago. No withholding tax in the event you sell your property. All your local information regarding vital HDB policies, condominium launches, land growth, commercial property and more

    There are various methods to go about discovering the precise property. Some local newspapers (together with the Straits Instances ) have categorised property sections and many local property brokers have websites. Now there are some specifics to consider when buying a 'new launch' rental. Intended use of the unit Every sale begins with 10 p.c low cost for finish of season sale; changes to 20 % discount storewide; follows by additional reduction of fiftyand ends with last discount of 70 % or extra. Typically there is even a warehouse sale or transferring out sale with huge mark-down of costs for stock clearance. Deborah Regulation from Expat Realtor shares her property market update, plus prime rental residences and houses at the moment available to lease Esparina EC @ Sengkang
  • Template:Cite web
  • 20 year-old Real Estate Agent Rusty from Saint-Paul, has hobbies and interests which includes monopoly, property developers in singapore and poker. Will soon undertake a contiki trip that may include going to the Lower Valley of the Omo.

    My blog: http://www.primaboinca.com/view_profile.php?userid=5889534

External links