72e469da0a
[CI SKIP]
120 lines
6.8 KiB
HTML
120 lines
6.8 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>Policies</title>
|
|
<link rel="stylesheet" href="../math.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
|
<link rel="home" href="../index.html" title="Math Toolkit 2.11.0">
|
|
<link rel="up" href="../overview.html" title="Chapter 1. Overview">
|
|
<link rel="prev" href="config_macros.html" title="Configuration Macros">
|
|
<link rel="next" href="threads.html" title="Thread Safety">
|
|
</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="config_macros.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.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="threads.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
|
<a name="math_toolkit.intro_pol_overview"></a><a class="link" href="intro_pol_overview.html" title="Policies">Policies</a>
|
|
</h2></div></div></div>
|
|
<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>
|
|
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>
|
|
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>
|
|
Although the policy mechanism itself is rather complicated, in practice it
|
|
is easy to use, and very flexible.
|
|
</p>
|
|
<p>
|
|
Using policies you can control:
|
|
</p>
|
|
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
|
<li class="listitem">
|
|
<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 class="listitem">
|
|
How <a class="link" href="pol_ref/internal_promotion.html" title="Internal Floating-point Promotion Policies">accuracy is
|
|
controlled by internal promotion</a> to use more precise types.
|
|
</li>
|
|
<li class="listitem">
|
|
What working <a class="link" href="pol_ref/precision_pol.html" title="Precision Policies">precision</a>
|
|
should be used to calculate results.
|
|
</li>
|
|
<li class="listitem">
|
|
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 class="listitem">
|
|
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 class="listitem">
|
|
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="error_handling.html#math_toolkit.error_handling.evaluation_error">evaluation_error</a>.
|
|
</li>
|
|
</ul></div>
|
|
<p>
|
|
You can control policies:
|
|
</p>
|
|
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
|
|
<li class="listitem">
|
|
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 preferred method for installation
|
|
wide policies.
|
|
</li>
|
|
<li class="listitem">
|
|
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 preferred
|
|
method for project, namespace, or translation unit scope policies.
|
|
</li>
|
|
<li class="listitem">
|
|
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>
|
|
</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-2019 Nikhar
|
|
Agrawal, Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos,
|
|
Hubert Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Matthew Pulver, Johan
|
|
Råde, Gautam Sewani, Benjamin Sobotta, Nicholas Thompson, Thijs van den Berg,
|
|
Daryle Walker and Xiaogang Zhang<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="config_macros.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.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="threads.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|