Go to the SVN repository for this file.
1 #ifndef ALGO_BLAST_GUMBEL_PARAMS__INCLUDED_NJN_INTEGER 2 #define ALGO_BLAST_GUMBEL_PARAMS__INCLUDED_NJN_INTEGER 71Int abs_j = j >= 0 ? j : -j;
80Int k = (
i>= 0 ?
i: -
i) % abs_j;
81 returnk == 0 ? k : abs_j - k;
94Int abs_i = maximum <Int> (i_ >= 0 ? i_ : -i_, j_ >= 0 ? j_ : -j_);
95Int abs_j = minimum <Int> (i_ >= 0 ? i_ : -i_, j_ >= 0 ? j_ : -j_);
100remainder = mod <Int> (abs_i, abs_j);
108 template<
classInt,
classConstIntegerPtr>
110ConstIntegerPtr begin_,
111ConstIntegerPtr end_)
115 if(begin_ == end_)
return0;
119 for(ConstIntegerPtr k = begin_ + 1; k != end_; k++)
127 template<
classInt>
131 returnmod <Int> (
i, 2) == 0 ? 1 : -1;
134 template<
classReal,
classInt>
141 Njn::IoUtil::abort(
"Int::integerPower <class Real, class Int> : negative exponent of zero");
156 for(
i=
n> 0 ?
n: -
n;
i> 0 ;
i/= 2)
174 template<
classReal,
classUn
signedInteger>
190UnsignedInteger
i= 0;
192 for(
i=
n;
i> 0 ;
i/= 2)
204 template<
classInt,
classIntTwo>
211 return n== 0 ? 1 : 0;
217 for(
i=
n> 0 ?
n: -
n;
i> 0 ;
i/= 2)
static Int8 gcd(Int8 x, Int8 y)
#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.
Int euclidAlgorithm(Int i_, Int j_)
Int intPower(Int x, IntTwo n)
Int maximum(Int i, Int j)
Real integerPower(Real x, Int n)
Int minimum(Int i, Int j)
Real integerPositivePower(Real x, UnsignedInteger n)
Int euclidAlgorithmVector(ConstIntegerPtr begin_, ConstIntegerPtr end_)
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