gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
daFunk::FunkIfElse Class Reference

#include <daFunk.hpp>

Inheritance diagram for daFunk::FunkIfElse:
Collaboration diagram for daFunk::FunkIfElse:

Public Member Functions

 FunkIfElse (Funk f, Funk g, Funk h)
double value (const std::vector< double > &data, size_t bindID)
- Public Member Functions inherited from daFunk::FunkBase
 FunkBase ()
virtual ~FunkBase ()
template<typename... Args>
Funk set (std::string arg, Funk g, Args... args)
template<typename... Args>
Funk set (std::string arg, double x, Args... args)
template<typename... Args>
Funk set (std::string arg, std::string arg1, Args... args)
template<typename... Args>
Funk set ()
template<typename... Args>
shared_ptr< FunkBoundbind (Args... args)
const std::vector< std::string > & getArgs ()
std::size_t getNArgs ()
bool hasArg (std::string)
bool hasArgs ()
Funk help ()
template<typename... Args>
bool assert_args (Args... args)
virtual void resolve (std::map< std::string, size_t > datamap, size_t &datalen, size_t bindID, std::map< std::string, size_t > &argmap)
Singularities getSingl ()
Funk set_singularity (std::string arg, double pos, double width)
Funk print (std::string arg)
template<typename... Args>
shared_ptr< FunkIntegrate_gsl1dgsl_integration (Args... args)
PlainPtrs1 plain (std::string)
PlainPtrs2 plain (std::string, std::string)
PlainPtrs3 plain (std::string, std::string, std::string)
PlainPtrs4 plain (std::string, std::string, std::string, std::string)
template<typename T >
PlainPtr1 plain (std::string)
template<typename T >
PlainPtr2 plain (std::string, std::string)
template<typename T >
PlainPtr3 plain (std::string, std::string, std::string)
template<typename T >
PlainPtr4 plain (std::string, std::string, std::string, std::string)
Funk set ()

Additional Inherited Members

- Protected Attributes inherited from daFunk::FunkBase
std::vector< Funkfunctions
ArgsType arguments
std::vector< std::vector< size_t > > indices
size_t datalen
Singularities singularities

Detailed Description

Definition at line 1356 of file daFunk.hpp.

Constructor & Destructor Documentation

◆ FunkIfElse()

daFunk::FunkIfElse::FunkIfElse ( Funk  f,
Funk  g,
Funk  h 

Definition at line 1359 of file daFunk.hpp.

References daFunk::joinArgs(), daFunk::joinSingl(), and daFunk::vec().

1360  {
1361  functions = vec(f, g, h);
1362  singularities = joinSingl(joinSingl(f->getSingl(), g->getSingl()), h->getSingl());
1363  arguments = joinArgs(joinArgs(f->getArgs(), g->getArgs()), h->getArgs());
1364  }
ArgsType arguments
Definition: daFunk.hpp:369
std::vector< Funk > functions
Definition: daFunk.hpp:368
ArgsType joinArgs(ArgsType args1, ArgsType args2)
Definition: daFunk.hpp:228
Singularities singularities
Definition: daFunk.hpp:372
std::vector< T > vec(std::vector< T > vector)
Definition: daFunk.hpp:142
Singularities joinSingl(Singularities s1, Singularities s2)
Definition: daFunk.hpp:243
Here is the call graph for this function:

Member Function Documentation

◆ value()

double daFunk::FunkIfElse::value ( const std::vector< double > &  data,
size_t  bindID 

Implements daFunk::FunkBase.

Definition at line 1365 of file daFunk.hpp.

1366  {
1367  if ( functions[0]->value(data,bindID) >= 0. )
1368  return functions[1]->value(data,bindID);
1369  else
1370  return functions[2]->value(data,bindID);
1371  }
std::vector< Funk > functions
Definition: daFunk.hpp:368
double value(const std::vector< double > &data, size_t bindID)
Definition: daFunk.hpp:1365

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