Go to the SVN repository for this file.
1 #ifndef ALGO_BLAST_GUMBEL_PARAMS__INCLUDED_NJN_FUNCTION 2 #define ALGO_BLAST_GUMBEL_PARAMS__INCLUDED_NJN_FUNCTION 60 template<
typenameT>
inline T exp2(
Tx_);
61 template<
typenameT>
inline T log2(
Tx_);
62 template<
typenameT>
inline T exp10(
Tx_);
63 template<
typenameT>
inline T log10(
Tx_);
65 template<
typenameT>
inline T max(
Tx_,
Ty_);
66 template<
typenameT>
inline T max3(
Ta_,
Tb_,
Tc_);
67 template<
typenameT>
inline T min(
Tx_,
Ty_);
68 template<
typenameT>
inline T plus(
Tx_);
69 template<
typenameT>
inline T minus(
Tx_);
70 template<
typenameT>
inline T signum(
Tx_);
73 template<
typenameT>
inline T psqrt(
Tx_);
74 template<
typenameT>
inline T square(
Tx_);
76 template<
typenameT>
inline T bound(
Tx_,
Txlo_,
Txhi_);
78 template<
typenameT>
inline T prob(
Tx_);
80 template<
typenameT>
inline bool isProb(
Tx_);
105 template<
typenameT>
T max(
Tx_,
Ty_) {
returnx_ > y_ ? x_ : y_;}
106 template<
typenameT>
T max3(
Ta_,
Tb_,
Tc_) {
returnmax <T> (a_, max <T> (b_, c_));}
107 template<
typenameT>
T min(
Tx_,
Ty_) {
returnx_ < y_ ? x_ : y_;}
108 template<
typenameT>
T positive(
Tx_) {
returnmax <T> (x_,
static_cast <T>(0));}
109 template<
typenameT>
T negative(
Tx_) {
returnmax <T> (-x_,
static_cast <T>(0));}
110 template<
typenameT>
T signum(
Tx_) {
returnx_ > 0.0 ? 1.0 : (x_ == 0.0 ? 0.0 : -1.0);}
111 template<
typenameT>
T heaviside(
Tx_) {
returnx_ < 0.0 ? 0.0 : 1.0;}
113 template<
typenameT>
T psqrt(
Tx_) {
returnpositive <T> (sqrt (x_));}
114 template<
typenameT>
T square(
Tx_) {
returnx_ * x_;}
116 template<
typenameT>
T bound(
Tx_,
Txlo_,
Txhi_) {
117 if(x_ < xlo_)
returnxlo_;
118 if(x_ < xhi_)
returnx_;
122 template<
typenameT>
T probability(
Tx_) {
returnbound <T> (x_, 0.0, 1.0);}
123 template<
typenameT>
T prob(
Tx_) {
returnprobability <T> (x_);}
125 template<
typenameT>
bool isProb(
Tx_) {
return0.0 <= x_ && x_ <= 1.0;};
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
The NCBI C++/STL use hints.
T bound(T x_, T xlo_, T xhi_)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4