Geant4  10.01.p01
c2_function.hh File Reference

Provides the headers for the general c2_function algebra which supports fast, flexible operations on piecewise-twice-differentiable functions. More...

#include <cmath>
#include <vector>
#include <utility>
#include <string>
#include <stdexcept>
#include <typeinfo>
#include <sstream>
#include <limits>
#include "c2_function.icc"
+ Include dependency graph for c2_function.hh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  c2_exception
 the exception class for c2_function operations. More...
 
class  c2_composed_function_p< float_type >
 Provides function composition (nesting)This allows evaluation of f(g(x)) where f and g are c2_function objects. More...
 
class  c2_sum_p< float_type >
 create a c2_function which is the sum of two other c2_function objects.This should always be constructed using c2_function::operator+() More...
 
class  c2_diff_p< float_type >
 create a c2_function which is the difference of two other c2_functions.This should always be constructed using c2_function::operator-() More...
 
class  c2_product_p< float_type >
 create a c2_function which is the product of two other c2_functions.This should always be constructed using c2_function::operator*() More...
 
class  c2_ratio_p< float_type >
 create a c2_function which is the ratio of two other c2_functions.This should always be constructed using c2_function::operator/() More...
 
class  c2_piecewise_function_p< float_type >
 create a c2_function which is a piecewise assembly of other c2_functions.The functions must have increasing, non-overlapping domains. Any empty space between functions will be filled with a linear interpolation. More...
 
class  c2_quadratic_p< float_type >
 create a quadratic mapping of another functionfor example, given a c2_function f More...
 
class  c2_ptr< float_type >
 create a container for a c2_function which handles the reference counting. More...
 
class  c2_fblock< float_type >
 structure used to hold evaluated function data at a point. More...
 
class  c2_function< float_type >
 the parent class for all c2_functions. More...
 
struct  c2_function< float_type >::recur_item
 the data element for the internal recursion stack for the sampler and integrator More...
 
struct  c2_function< float_type >::c2_integrate_recur
 structure used to pass information recursively in integrator. More...
 
struct  c2_function< float_type >::c2_sample_recur
 structure used to pass information recursively in sampler. More...
 
struct  c2_function< float_type >::c2_root_info
 structure used to hold root bracketing information More...
 
class  c2_classic_function_p< float_type >
 a container into which any conventional c-style function can be dropped, to create a degenerate c2_function without derivatives. Mostly useful for sampling into interpolating functions. construct a reference to this with c2_classic_function()The factory function c2_factory::classic_function() creates *new c2_classic_function_p() More...
 
class  c2_const_ptr< float_type >
 create a container for a c2_function which handles the reference counting.It is useful as a smart container to hold a c2_function and keep the reference count correct. The recommended way for a class to store a c2_function which is handed in from the outside is for it to have a c2_ptr member into which the passed-in function is stored. This way, when the class instance is deleted, it will automatically dereference any function which it was handed. More...
 
class  c2_ptr< float_type >
 create a container for a c2_function which handles the reference counting. More...
 
class  c2_typed_ptr< float_type, c2_class >
 create a non-generic container for a c2_function which handles the reference counting. More...
 
class  c2_plugin_function_p< float_type >
 a container into which any other c2_function can be dropped, to allow expressions with replacable components.It is useful for plugging different InterpolatingFunctions into a c2_function expression. It saves a lot of effort in other places with casting away const declarations. More...
 
class  c2_const_plugin_function_p< float_type >
 a c2_plugin_function_p which promises not to fiddle with the plugged function.The factory function c2_factory::const_plugin_function() creates *new c2_const_plugin_function_p() More...
 
class  c2_binary_function< float_type >
 Provides support for c2_function objects which are constructed from two other c2_function objects. More...
 
class  c2_scaled_function_p< float_type >
 Create a very lightweight method to return a scalar multiple of another function. \ \The factory function c2_factory::scaled_function() creates *new c2_scaled_function_p. More...
 
class  c2_cached_function_p< float_type >
 A container into which any other c2_function can be dropped.It allows a function to be pre-evaluated at a point, and used at multiple places in an expression efficiently. If it is re-evaluated at the previous point, it returns the remembered values; otherwise, it re-evauates the function at the new point. More...
 
class  c2_composed_function_p< float_type >
 Provides function composition (nesting)This allows evaluation of f(g(x)) where f and g are c2_function objects. More...
 
class  c2_sum_p< float_type >
 create a c2_function which is the sum of two other c2_function objects.This should always be constructed using c2_function::operator+() More...
 
class  c2_diff_p< float_type >
 create a c2_function which is the difference of two other c2_functions.This should always be constructed using c2_function::operator-() More...
 
class  c2_product_p< float_type >
 create a c2_function which is the product of two other c2_functions.This should always be constructed using c2_function::operator*() More...
 
class  c2_ratio_p< float_type >
 create a c2_function which is the ratio of two other c2_functions.This should always be constructed using c2_function::operator/() More...
 
class  c2_constant_p< float_type >
 a c2_function which is constantThe factory function c2_factory::constant() creates *new c2_constant_p() More...
 
class  c2_transformation< float_type >
 a transformation of a coordinate, including an inverse More...
 
class  c2_transformation_linear< float_type >
 the identity transform More...
 
class  c2_transformation_log< float_type >
 log axis transform More...
 
class  c2_transformation_recip< float_type >
 reciprocal axis transform More...
 
class  c2_function_transformation< float_type >
 a transformation of a function in and out of a coordinate space, using 2 c2_transformations More...
 
class  c2_lin_lin_function_transformation< float_type >
 a transformation of a function in and out of lin-lin space More...
 
class  c2_log_log_function_transformation< float_type >
 a transformation of a function in and out of log-log space More...
 
class  c2_lin_log_function_transformation< float_type >
 a transformation of a function in and out of lin-log space More...
 
class  c2_log_lin_function_transformation< float_type >
 a transformation of a function in and out of log-lin space More...
 
class  c2_arrhenius_function_transformation< float_type >
 a transformation of a function in and out of Arrhenius (1/x vs. log(y)) space More...
 
class  interpolating_function_p< float_type >
 create a cubic spline interpolation of a set of (x,y) pairsThis is one of the main reasons for c2_function objects to exist. More...
 
class  log_lin_interpolating_function_p< float_type >
 A spline with X transformed into log space.Most useful for functions looking like y=log(x) or any other function with a huge X dynamic range, and a slowly varying Y. More...
 
class  lin_log_interpolating_function_p< float_type >
 A spline with Y transformed into log space.Most useful for functions looking like y=exp(x) More...
 
class  log_log_interpolating_function_p< float_type >
 A spline with X and Y transformed into log space.Most useful for functions looking like y=x^n or any other function with a huge X and Y dynamic range. More...
 
class  arrhenius_interpolating_function_p< float_type >
 A spline with X in reciprocal space and Y transformed in log space.Most useful for thermodynamic types of data where Y is roughly A*exp(-B/x). Typical examples are reaction rate data, and thermistor calibration data. More...
 
class  c2_sin_p< float_type >
 compute sin(x) with its derivatives.The factory function c2_factory::sin() creates *new c2_sin_p More...
 
class  c2_cos_p< float_type >
 compute cos(x) with its derivatives.The factory function c2_factory::cos() creates *new c2_cos_p More...
 
class  c2_tan_p< float_type >
 compute tan(x) with its derivatives.The factory function c2_factory::tan() creates *new c2_tan_p More...
 
class  c2_log_p< float_type >
 compute log(x) with its derivatives.The factory function c2_factory::log() creates *new c2_log_p More...
 
class  c2_exp_p< float_type >
 compute exp(x) with its derivatives.The factory function c2_factory::exp() creates *new c2_exp_p More...
 
class  c2_sqrt_p< float_type >
 compute sqrt(x) with its derivatives.The factory function c2_factory::sqrt() creates *new c2_sqrt_p() More...
 
class  c2_recip_p< float_type >
 compute scale/x with its derivatives.The factory function c2_factory::recip() creates *new c2_recip_p More...
 
class  c2_identity_p< float_type >
 compute x with its derivatives.The factory function c2_factory::identity() creates *new c2_identity_p More...
 
class  c2_linear_p< float_type >
 create a linear mapping of another functionfor example, given a c2_function f More...
 
class  c2_quadratic_p< float_type >
 create a quadratic mapping of another functionfor example, given a c2_function f More...
 
class  c2_power_law_p< float_type >
 create a power law mapping of another functionfor example, given a c2_function f More...
 
class  c2_inverse_function_p< float_type >
 create the formal inverse function of another functionfor example, given a c2_function f More...
 
class  accumulated_histogram< float_type >
 An interpolating_function_p which is the cumulative integral of a histogram. More...
 
class  c2_connector_function_p< float_type >
 create a c2_function which smoothly connects two other c2_functions.This takes two points and generates a polynomial which matches two c2_function arguments at those two points, with two derivatives at each point, and an arbitrary value at the center of the region. It is useful for splicing together functions over rough spots (0/0, for example). More...
 
class  c2_piecewise_function_p< float_type >
 create a c2_function which is a piecewise assembly of other c2_functions.The functions must have increasing, non-overlapping domains. Any empty space between functions will be filled with a linear interpolation. More...
 

Macros

#define c2_isnan   std::isnan
 
#define c2_isfinite   std::isfinite
 

Detailed Description

Provides the headers for the general c2_function algebra which supports fast, flexible operations on piecewise-twice-differentiable functions.

Author
Created by R. A. Weller and Marcus H. Mendenhall on 7/9/05.
Copyright 2005 Vanderbilt University. All rights reserved.
   \version c2_function.hh 490 2012-04-10 19:05:40Z marcus 
See also
Factory Functions for information on constructing things in here

Definition in file c2_function.hh.

Macro Definition Documentation

#define c2_isfinite   std::isfinite

Definition at line 52 of file c2_function.hh.

Referenced by c2_function< G4double >::fill_fblock().

#define c2_isnan   std::isnan

Definition at line 51 of file c2_function.hh.

Referenced by c2_function< G4double >::fill_fblock().