New Immissions/Updates:
boundless - educate - edutalab - empatico - es-ebooks - es16 - fr16 - fsfiles - hesperian - solidaria - wikipediaforschools
- wikipediaforschoolses - wikipediaforschoolsfr - wikipediaforschoolspt - worldmap -

See also: Liber Liber - Libro Parlato - Liber Musica  - Manuzio -  Liber Liber ISO Files - Alphabetical Order - Multivolume ZIP Complete Archive - PDF Files - OGG Music Files -

PROJECT GUTENBERG HTML: Volume I - Volume II - Volume III - Volume IV - Volume V - Volume VI - Volume VII - Volume VIII - Volume IX

Ascolta ""Volevo solo fare un audiolibro"" su Spreaker.
CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Boost C++ Libraries - Wikipedia, the free encyclopedia

Boost C++ Libraries

From Wikipedia, the free encyclopedia

Boost
Boost logo

Latest release: 1.33.1 / December 5, 2005
Use: Application framework
License: Boost Software License
Website: Boost Homepage

The Boost C++ libraries are a collection of peer-reviewed, open source libraries that extend the functionality of C++. The libraries are licensed under the Boost Software License, designed to allow Boost to be used with both open and closed source projects. Many of Boost's founders are on the C++ standard committee and several Boost libraries have been accepted for incorporation into the Technical Report 1 [1] of C++0x.

The libraries are aimed at a wide range of C++ users and application domains. They range from general-purpose libraries like SmartPtr, to OS Abstractions like FileSystem, to libraries primarily aimed at other library developers and advanced C++ users, like MPL.

In order to ensure efficiency and flexibility, Boost makes extensive use of templates. Boost has been a source of extensive work and research into generic programming and metaprogramming in C++.

Contents

[edit] Libraries

Boost provides extension libraries in the following areas:

  • Algorithms
  • Concurrent programming (threads)
  • Containers
    • array - Management of fixed-size arrays with STL container semantics
    • dynamic bitset - Management of a container of bits, whose size can be specified at runtime
    • Boost Graph Library (BGL) - Generic graph containers, components and algorithms
    • multi-array - Simplifies creation of N-dimensional arrays
    • multi-index containers - Containers with built in indexes that allow different sorting and access semantics
    • pointer containers - Containers modeled after most standard STL containers that allow for transparent management of pointers to values
    • property map - Interface specifications in the form of concepts and a general purpose interface for mapping key values to objects
    • variant - A safe and generic stack-based object container that allows for the efficient storage of and access to an object of a type that can be chosen from among a set of types that must be specified at compile time.
  • Correctness and testing
    • concept check - Allows for the enforcement of actual template parameter requirements (concepts)
    • static assert - Compile time assertion support
    • Boost Test Library - A matched set of components for writing test programs, organizing tests into test cases and test suites, and controlling their runtime execution
  • Data structures
  • Function objects and higher-order programming
    • bind and mem_fn - General binders for functions, function objects, function pointers and member functions
    • function - Function object wrappers for deferred calls. Also, provides a generalized mechanism for callbacks
    • functional - Enhancements to the function object adapters specified in the C++ Standard Library, including:
    • hash - An implementation of the hash function object specified by the C++ Technical Report 1 (TR1). Can be used as the default hash function for unordered associative containers
    • lambda - In the spirit of lambda abstractions, allows for the definition of small anonymous function objects and operations on those objects at a call site, using placeholders, especially for use with deferred callbacks from algorithms.
    • ref - Provides utility class templates for enhancing the capabilities of standard C++ references, especially for use with generic functions
    • result_of - Helps in the determination of the type of a call expression
    • signals and slots - Managed signals and slots callback implementation
  • Generic programming
  • Graphs
  • Input/output
  • Interlanguage support (for Python)
  • Iterators
    • iterators
    • operators - Class templates that help with overloaded operator definitions for user defined iterators and classes that can participate in arithmetic computation.
    • tokenizer - Provides a view of a set of tokens contained in a sequence that makes them appear as a container with iterator access
  • Math and Numerics
  • Memory
    • pool - Provides a simple segregated storage based memory management scheme
    • smart_ptr - A collection of smart pointer class templates with different pointee management semantics
      • scoped_ptr - Owns the pointee (single object)
      • scoped_array - Like scoped_ptr, but for arrays
      • shared_ptr - Potentially shares the pointer with other shared_ptrs. Pointee is destroyed when last shared_ptr to it is destroyed
      • shared_array - Like shared_ptr, but for arrays
      • weak_ptr - Provides a "weak" reference to an object that is already managed by a shared_ptr
      • intrusive_ptr - Similared to shared_ptr, but uses a reference count provided by the pointee
    • utility - Miscellaneous support classes, including:
      • base from member idiom - Provides a workaround for a class that needs to initialize a member of a base class inside its own (i.e., the derived class') constructor's initializer list
      • checked delete - Check if an attempt is made to destroy an object or array of objects using a pointer to an incomplete type
      • next and prior functions - Allow for easier motion of a forward or bidirectional iterator, especially when the results of such a motion need to be stored in a separate iterator (i.e., should not change the original iterator)
      • noncopyable - Allows for the prohibition of copy construction and copy assignment
      • addressof - Allows for the acquisition of an object's real address, bypassing any overloads of operator&(), in the process
      • result_of - Helps in the determination of the type of a call expression
  • Miscellaneous
  • Parsers
  • Preprocessor Metaprogramming
  • String and text processing
    • lexical_cast - Type conversions to/from text
    • format - Type safe argument formatting according to a format string
    • iostreams - C++ streams and stream buffer assistance for new sources/sinks, filters framework
    • regex - Support for regular expressions
    • spirit - An object-oriented recursive-descent parser generator framework
    • string algorithms - A collection of various algorithms related to strings
    • tokenizer - Allows for the partitioning of a string or other character sequence into tokens
    • wave - Standards conformant implementation of the mandated [C99] / C++ pre-processor functionality packed behind an easy to use interface
  • Template metaprogramming
    • mpl - A general purpose high-level metaprogramming framework of compile-time algorithms, sequences and metafunctions
    • static assert - Compile time assertion support
    • type traits - Templates that define the fundamental properties of types
  • Workarounds for broken compilers

[edit] Linear algebra

Boost includes a linear algebra library called uBLAS, with BLAS support for vectors and matrices.

  • Example showing how to multiply a vector with a matrix:
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>

using namespace boost::numeric::ublas;

/* "y = Ax" example */
int main () {
        vector<double> x (2);
        x(0) = 1; x(1) = 2;

        matrix<double> A(2,2);
        A(0,0) = 0; A(0,1) = 1;
        A(1,0) = 2; A(1,1) = 3;

        vector<double> y = prod(A, x);

        std::cout << y << std::endl;
        return 0;
}

[edit] Generating random numbers

Boost provides several pseudorandom number generators, together with several target distributions.

#include <boost/random.hpp>
#include <ctime>

using namespace boost;

double SampleNormal (double mean, double sigma)
{
    // select random number generator
    mt19937 rng;
    // seed generator with #seconds since 1970
    rng.seed(static_cast<unsigned> (std::time(0)));

    // select desired probability distribution
    normal_distribution<double> norm_dist(mean, sigma);

    // bind random number generator to distribution, forming a function
    variate_generator<mt19937&, normal_distribution<double> >  normal_sampler(rng, norm_dist);

    // sample from the distribution
    return normal_sampler();
}

Check Boost Random Number Library for more details.

[edit] Multi-threading

Example code that demonstrates creation of threads:

#include <boost/thread/thread.hpp>
#include <iostream>
using namespace std; 

void hello_world() {
  cout << "Hello world, I'm a thread!" << endl;
}

int main(int argc, char* argv[]) {
  // start a new thread that calls the "hello_world" function
  boost::thread my_thread(&hello_world);
  // wait for the thread to finish
  my_thread.join();
  
  return 0;
}

[edit] People associated with Boost

Author of several books on C++, Nicolai Josuttis contributed the Boost array library in 2001. Original founders of Boost still active in the community include Beman Dawes and David Abrahams. Around 3,000 people are subscribed to Boost mail-list and dozens of them are very active (as of 2006).

[edit] External links

Wikibooks
Wikibooks has more on the topic of

Static Wikipedia (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia February 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu