Geant4  10.02.p03
c2_factory< float_type > Class Template Reference

a factory of pre-templated c2_function generators More...

#include <c2_factory.hh>

Collaboration diagram for c2_factory< float_type >:

Static Public Member Functions

static c2_classic_function_p< float_type > & classic_function (float_type(*c_func)(float_type))
 make a *new object More...
 
static c2_plugin_function_p< float_type > & plugin_function ()
 make a *new object More...
 
static c2_plugin_function_p< float_type > & plugin_function (c2_function< float_type > &f)
 make a *new object More...
 
static c2_const_plugin_function_p< float_type > & const_plugin_function ()
 make a *new object More...
 
static c2_const_plugin_function_p< float_type > & const_plugin_function (const c2_function< float_type > &f)
 make a *new object More...
 
static c2_scaled_function_p< float_type > & scaled_function (const c2_function< float_type > &outer, float_type scale)
 make a *new object More...
 
static c2_cached_function_p< float_type > & cached_function (const c2_function< float_type > &func)
 make a *new object More...
 
static c2_constant_p< float_type > & constant (float_type x)
 make a *new object More...
 
static interpolating_function_p< float_type > & interpolating_function ()
 make a *new object More...
 
static lin_log_interpolating_function_p< float_type > & lin_log_interpolating_function ()
 make a *new object More...
 
static log_lin_interpolating_function_p< float_type > & log_lin_interpolating_function ()
 make a *new object More...
 
static log_log_interpolating_function_p< float_type > & log_log_interpolating_function ()
 make a *new object More...
 
static arrhenius_interpolating_function_p< float_type > & arrhenius_interpolating_function ()
 make a *new object More...
 
static c2_connector_function_p< float_type > & connector_function (float_type x0, const c2_function< float_type > &f0, float_type x2, const c2_function< float_type > &f2, bool auto_center, float_type y1)
 make a *new object More...
 
static c2_connector_function_p< float_type > & connector_function (const c2_fblock< float_type > &fb0, const c2_fblock< float_type > &fb2, bool auto_center, float_type y1)
 make a *new object More...
 
static c2_connector_function_p< float_type > & connector_function (float_type x0, float_type y0, float_type yp0, float_type ypp0, float_type x2, float_type y2, float_type yp2, float_type ypp2, bool auto_center, float_type y1)
 make a *new object More...
 
static c2_piecewise_function_p< float_type > & piecewise_function ()
 make a *new object More...
 
static c2_sin_p< float_type > & sin ()
 make a *new object More...
 
static c2_cos_p< float_type > & cos ()
 make a *new object More...
 
static c2_tan_p< float_type > & tan ()
 make a *new object More...
 
static c2_log_p< float_type > & log ()
 make a *new object More...
 
static c2_exp_p< float_type > & exp ()
 make a *new object More...
 
static c2_sqrt_p< float_type > & sqrt ()
 make a *new object More...
 
static c2_recip_p< float_type > & recip (float_type scale=1)
 make a *new object More...
 
static c2_identity_p< float_type > & identity ()
 make a *new object More...
 
static c2_linear_p< float_type > & linear (float_type x0, float_type y0, float_type slope)
 make a *new object More...
 
static c2_quadratic_p< float_type > & quadratic (float_type x0, float_type y0, float_type xcoef, float_type x2coef)
 make a *new object More...
 
static c2_power_law_p< float_type > & power_law (float_type scale, float_type power)
 make a *new object More...
 
static c2_inverse_function_p< float_type > & inverse_function (const c2_function< float_type > &source)
 make a *new object More...
 

Detailed Description

template<typename float_type>
class c2_factory< float_type >

a factory of pre-templated c2_function generators

do

typedef c2_ptr<double> c2_p;
c2_p f=c2.sin();
Note
The factory class doesn't contain any data. It can be statically instantiated at the top of a file, and used everywhere inside, or even instantiated in your project's top-level include file.
See also
c2_math_factory

Definition at line 57 of file c2_factory.hh.

Member Function Documentation

◆ arrhenius_interpolating_function()

template<typename float_type>
static arrhenius_interpolating_function_p<float_type>& c2_factory< float_type >::arrhenius_interpolating_function ( )
inlinestatic

make a *new object

Definition at line 107 of file c2_factory.hh.

A spline with X in reciprocal space and Y transformed in log space.Most useful for thermodynamic type...

◆ cached_function()

template<typename float_type>
static c2_cached_function_p<float_type>& c2_factory< float_type >::cached_function ( const c2_function< float_type > &  func)
inlinestatic

make a *new object

Definition at line 84 of file c2_factory.hh.

85  { return *new c2_cached_function_p<float_type>(func); }
A container into which any other c2_function can be dropped.It allows a function to be pre-evaluated ...
Definition: c2_function.hh:937

◆ classic_function()

template<typename float_type>
static c2_classic_function_p<float_type>& c2_factory< float_type >::classic_function ( float_type(*)(float_type)  c_func)
inlinestatic

make a *new object

Definition at line 62 of file c2_factory.hh.

63  { return *new c2_classic_function_p<float_type>(c_func); }
a container into which any conventional c-style function can be dropped, to create a degenerate c2_fu...
Definition: c2_function.hh:534

◆ connector_function() [1/3]

template<typename float_type>
static c2_connector_function_p<float_type>& c2_factory< float_type >::connector_function ( float_type  x0,
const c2_function< float_type > &  f0,
float_type  x2,
const c2_function< float_type > &  f2,
bool  auto_center,
float_type  y1 
)
inlinestatic

make a *new object

Definition at line 110 of file c2_factory.hh.

113  {return *new c2_connector_function_p<float_type>(x0, f0, x2, f2,
114  auto_center, y1); }
Double_t y1[nxs]
Double_t x2[nxs]
Float_t f2
create a c2_function which smoothly connects two other c2_functions.This takes two points and generat...
Here is the caller graph for this function:

◆ connector_function() [2/3]

template<typename float_type>
static c2_connector_function_p<float_type>& c2_factory< float_type >::connector_function ( const c2_fblock< float_type > &  fb0,
const c2_fblock< float_type > &  fb2,
bool  auto_center,
float_type  y1 
)
inlinestatic

make a *new object

Definition at line 116 of file c2_factory.hh.

119  { return *new c2_connector_function_p<float_type>(fb0, fb2,
120  auto_center, y1); }
Double_t y1[nxs]
create a c2_function which smoothly connects two other c2_functions.This takes two points and generat...

◆ connector_function() [3/3]

template<typename float_type>
static c2_connector_function_p<float_type>& c2_factory< float_type >::connector_function ( float_type  x0,
float_type  y0,
float_type  yp0,
float_type  ypp0,
float_type  x2,
float_type  y2,
float_type  yp2,
float_type  ypp2,
bool  auto_center,
float_type  y1 
)
inlinestatic

make a *new object

Definition at line 122 of file c2_factory.hh.

127  x0, y0, yp0, ypp0, x2, y2, yp2, ypp2, auto_center, y1); }
Double_t y2[nxs]
Double_t y1[nxs]
Double_t x2[nxs]
create a c2_function which smoothly connects two other c2_functions.This takes two points and generat...

◆ const_plugin_function() [1/2]

template<typename float_type>
static c2_const_plugin_function_p<float_type>& c2_factory< float_type >::const_plugin_function ( )
inlinestatic

make a *new object

Definition at line 72 of file c2_factory.hh.

a c2_plugin_function_p which promises not to fiddle with the plugged function.The factory function c2...
Definition: c2_function.hh:824

◆ const_plugin_function() [2/2]

template<typename float_type>
static c2_const_plugin_function_p<float_type>& c2_factory< float_type >::const_plugin_function ( const c2_function< float_type > &  f)
inlinestatic

make a *new object

Definition at line 76 of file c2_factory.hh.

a c2_plugin_function_p which promises not to fiddle with the plugged function.The factory function c2...
Definition: c2_function.hh:824

◆ constant()

template<typename float_type>
static c2_constant_p<float_type>& c2_factory< float_type >::constant ( float_type  x)
inlinestatic

make a *new object

Definition at line 88 of file c2_factory.hh.

88 { return *new c2_constant_p<float_type>(x); }
a c2_function which is constantThe factory function c2_factory::constant() creates *new c2_constant_p...

◆ cos()

template<typename float_type>
static c2_cos_p<float_type>& c2_factory< float_type >::cos ( )
inlinestatic

make a *new object

Definition at line 134 of file c2_factory.hh.

134 { return *new c2_cos_p<float_type>(); }
compute cos(x) with its derivatives.The factory function c2_factory::cos() creates *new c2_cos_p ...

◆ exp()

template<typename float_type>
static c2_exp_p<float_type>& c2_factory< float_type >::exp ( )
inlinestatic

make a *new object

Definition at line 140 of file c2_factory.hh.

140 { return *new c2_exp_p<float_type>(); }
compute exp(x) with its derivatives.The factory function c2_factory::exp() creates *new c2_exp_p ...

◆ identity()

template<typename float_type>
static c2_identity_p<float_type>& c2_factory< float_type >::identity ( )
inlinestatic

make a *new object

Definition at line 147 of file c2_factory.hh.

148  { return *new c2_identity_p<float_type>(); }
compute x with its derivatives.The factory function c2_factory::identity() creates *new c2_identity_p...

◆ interpolating_function()

template<typename float_type>
static interpolating_function_p<float_type>& c2_factory< float_type >::interpolating_function ( )
inlinestatic

make a *new object

Definition at line 91 of file c2_factory.hh.

92  { return *new 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_fun...

◆ inverse_function()

template<typename float_type>
static c2_inverse_function_p<float_type>& c2_factory< float_type >::inverse_function ( const c2_function< float_type > &  source)
inlinestatic

make a *new object

Definition at line 162 of file c2_factory.hh.

163  { return *new c2_inverse_function_p<float_type>(source); }
create the formal inverse function of another functionfor example, given a c2_function f ...
Here is the caller graph for this function:

◆ lin_log_interpolating_function()

template<typename float_type>
static lin_log_interpolating_function_p<float_type>& c2_factory< float_type >::lin_log_interpolating_function ( )
inlinestatic

make a *new object

Definition at line 95 of file c2_factory.hh.

A spline with Y transformed into log space.Most useful for functions looking like y=exp(x) ...
Here is the caller graph for this function:

◆ linear()

template<typename float_type>
static c2_linear_p<float_type>& c2_factory< float_type >::linear ( float_type  x0,
float_type  y0,
float_type  slope 
)
inlinestatic

make a *new object

Definition at line 151 of file c2_factory.hh.

152  { return *new c2_linear_p<float_type>(x0, y0, slope); }
create a linear mapping of another functionfor example, given a c2_function f
Here is the caller graph for this function:

◆ log()

template<typename float_type>
static c2_log_p<float_type>& c2_factory< float_type >::log ( )
inlinestatic

make a *new object

Definition at line 138 of file c2_factory.hh.

138 { return *new c2_log_p<float_type>(); }
compute log(x) with its derivatives.The factory function c2_factory::log() creates *new c2_log_p ...

◆ log_lin_interpolating_function()

template<typename float_type>
static log_lin_interpolating_function_p<float_type>& c2_factory< float_type >::log_lin_interpolating_function ( )
inlinestatic

make a *new object

Definition at line 99 of file c2_factory.hh.

A spline with X transformed into log space.Most useful for functions looking like y=log(x) or any oth...

◆ log_log_interpolating_function()

template<typename float_type>
static log_log_interpolating_function_p<float_type>& c2_factory< float_type >::log_log_interpolating_function ( )
inlinestatic

make a *new object

Definition at line 103 of file c2_factory.hh.

A spline with X and Y transformed into log space.Most useful for functions looking like y=x^n or any ...
Here is the caller graph for this function:

◆ piecewise_function()

template<typename float_type>
static c2_piecewise_function_p<float_type>& c2_factory< float_type >::piecewise_function ( )
inlinestatic

make a *new object

Definition at line 129 of file c2_factory.hh.

130  { return *new c2_piecewise_function_p<float_type>(); }
create a c2_function which is a piecewise assembly of other c2_functions.The functions must have incr...
Definition: c2_function.hh:84
Here is the caller graph for this function:

◆ plugin_function() [1/2]

template<typename float_type>
static c2_plugin_function_p<float_type>& c2_factory< float_type >::plugin_function ( )
inlinestatic

make a *new object

Definition at line 65 of file c2_factory.hh.

66  { return *new c2_plugin_function_p<float_type>(); }
a container into which any other c2_function can be dropped, to allow expressions with replacable com...
Definition: c2_function.hh:782

◆ plugin_function() [2/2]

template<typename float_type>
static c2_plugin_function_p<float_type>& c2_factory< float_type >::plugin_function ( c2_function< float_type > &  f)
inlinestatic

make a *new object

Definition at line 69 of file c2_factory.hh.

70  { return *new c2_plugin_function_p<float_type>(f); }
a container into which any other c2_function can be dropped, to allow expressions with replacable com...
Definition: c2_function.hh:782

◆ power_law()

template<typename float_type>
static c2_power_law_p<float_type>& c2_factory< float_type >::power_law ( float_type  scale,
float_type  power 
)
inlinestatic

make a *new object

Definition at line 158 of file c2_factory.hh.

159  { return *new c2_power_law_p<float_type>(scale, power); }
Double_t scale
create a power law mapping of another functionfor example, given a c2_function f

◆ quadratic()

template<typename float_type>
static c2_quadratic_p<float_type>& c2_factory< float_type >::quadratic ( float_type  x0,
float_type  y0,
float_type  xcoef,
float_type  x2coef 
)
inlinestatic

make a *new object

Definition at line 154 of file c2_factory.hh.

156  { return *new c2_quadratic_p<float_type>(x0, y0, xcoef, x2coef); }
create a quadratic mapping of another functionfor example, given a c2_function f
Definition: c2_function.hh:85

◆ recip()

template<typename float_type>
static c2_recip_p<float_type>& c2_factory< float_type >::recip ( float_type  scale = 1)
inlinestatic

make a *new object

Definition at line 144 of file c2_factory.hh.

145  { return *new c2_recip_p<float_type>(scale); }
compute scale/x with its derivatives.The factory function c2_factory::recip() creates *new c2_recip_p...
Double_t scale

◆ scaled_function()

template<typename float_type>
static c2_scaled_function_p<float_type>& c2_factory< float_type >::scaled_function ( const c2_function< float_type > &  outer,
float_type  scale 
)
inlinestatic

make a *new object

Definition at line 80 of file c2_factory.hh.

81  { return *new c2_scaled_function_p<float_type>(outer, scale); }
Create a very lightweight method to return a scalar multiple of another function. \ \The factory func...
Definition: c2_function.hh:899
Double_t scale

◆ sin()

template<typename float_type>
static c2_sin_p<float_type>& c2_factory< float_type >::sin ( )
inlinestatic

make a *new object

Definition at line 132 of file c2_factory.hh.

132 { return *new c2_sin_p<float_type>(); }
compute sin(x) with its derivatives.The factory function c2_factory::sin() creates *new c2_sin_p ...

◆ sqrt()

template<typename float_type>
static c2_sqrt_p<float_type>& c2_factory< float_type >::sqrt ( )
inlinestatic

make a *new object

Definition at line 142 of file c2_factory.hh.

142 { return *new c2_sqrt_p<float_type>(); }
compute sqrt(x) with its derivatives.The factory function c2_factory::sqrt() creates *new c2_sqrt_p()...

◆ tan()

template<typename float_type>
static c2_tan_p<float_type>& c2_factory< float_type >::tan ( )
inlinestatic

make a *new object

Definition at line 136 of file c2_factory.hh.

136 { return *new c2_tan_p<float_type>(); }
compute tan(x) with its derivatives.The factory function c2_factory::tan() creates *new c2_tan_p ...

The documentation for this class was generated from the following file: