<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <title>Policy Overview</title> <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css"> <meta name="generator" content="DocBook XSL Stylesheets V1.74.0"> <link rel="home" href="../../index.html" title="Math Toolkit"> <link rel="up" href="../policy.html" title="Policies"> <link rel="prev" href="../policy.html" title="Policies"> <link rel="next" href="pol_tutorial.html" title="Policy Tutorial"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table cellpadding="2" width="100%"><tr> <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td> <td align="center"><a href="../../../../../../../index.html">Home</a></td> <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td> <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> <td align="center"><a href="../../../../../../../more/index.htm">More</a></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="../policy.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../policy.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pol_tutorial.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> <div class="section" lang="en"> <div class="titlepage"><div><div><h3 class="title"> <a name="math_toolkit.policy.pol_overview"></a><a class="link" href="pol_overview.html" title="Policy Overview"> Policy Overview</a> </h3></div></div></div> <p> </p> <p> Policies are a powerful fine-grain mechanism that allow you to customise the behaviour of this library according to your needs. There is more information available in the <a class="link" href="pol_tutorial.html" title="Policy Tutorial">policy tutorial</a> and the <a class="link" href="pol_ref.html" title="Policy Reference">policy reference</a>. </p> <p> </p> <p> Generally speaking unless you find that the <a class="link" href="pol_tutorial/policy_tut_defaults.html" title="Policies Have Sensible Defaults">default policy behaviour</a> when encountering 'bad' argument values does not meet your needs, you should not need to worry about policies. </p> <p> </p> <p> Policies are a compile-time mechanism that allow you to change error-handling or calculation precision either program wide, or at the call site. </p> <p> </p> <p> Although the policy mechanism itself is rather complicated, in practice it is easy to use, and very flexible. </p> <p> </p> <p> Using policies you can control: </p> <p> </p> <div class="itemizedlist"><ul type="disc"> <li> <a class="link" href="pol_ref/error_handling_policies.html" title="Error Handling Policies">How results from 'bad' arguments are handled</a>, including those that cannot be fully evaluated. </li> <li> How <a class="link" href="pol_ref/internal_promotion.html" title="Internal Promotion Policies">accuracy is controlled by internal promotion</a> to use more precise types. </li> <li> What working <a class="link" href="pol_ref/precision_pol.html" title="Precision Policies">precision</a> should be used to calculate results. </li> <li> What to do when a <a class="link" href="pol_ref/assert_undefined.html" title="Mathematically Undefined Function Policies">mathematically undefined function</a> is used: Should this raise a run-time or compile-time error? </li> <li> Whether <a class="link" href="pol_ref/discrete_quant_ref.html" title="Discrete Quantile Policies">discrete functions</a>, like the binomial, should return real or only integral values, and how they are rounded. </li> <li> How many iterations a special function is permitted to perform in a series evaluation or root finding algorithm before it gives up and raises an <a class="link" href="../main_overview/error_handling.html#evaluation_error">evaluation_error</a>. </li> </ul></div> <p> </p> <p> You can control policies: </p> <p> </p> <div class="itemizedlist"><ul type="disc"> <li> Using <a class="link" href="pol_ref/policy_defaults.html" title="Using macros to Change the Policy Defaults">macros</a> to change any default policy: the is the prefered method for installation wide policies. </li> <li> At your chosen <a class="link" href="pol_ref/namespace_pol.html" title="Setting Polices at Namespace Scope">namespace scope</a> for distributions and/or functions: this is the prefered method for project, namespace, or translation unit scope policies. </li> <li> In an ad-hoc manner <a class="link" href="pol_tutorial/ad_hoc_sf_policies.html" title="Changing the Policy on an Ad Hoc Basis for the Special Functions">by passing a specific policy to a special function</a>, or to a <a class="link" href="pol_tutorial/ad_hoc_dist_policies.html" title="Setting Policies for Distributions on an Ad Hoc Basis">statistical distribution</a>. </li> </ul></div> <p> </p> </div> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <td align="left"></td> <td align="right"><div class="copyright-footer">Copyright © 2006 , 2007, 2008, 2009 John Maddock, Paul A. Bristow, Hubert Holin, Xiaogang Zhang, Bruno Lalande, Johan Råde, Gautam Sewani and Thijs van den Berg<p> Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) </p> </div></td> </tr></table> <hr> <div class="spirit-nav"> <a accesskey="p" href="../policy.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../policy.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="pol_tutorial.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a> </div> </body> </html>