Browse Subversion Repository
Diff of /Conograph/trunk/src/utility_func/zmath.hh
Parent Directory
| Revision Log
| Patch
| 94 |
return value; |
return value; |
| 95 |
} |
} |
| 96 |
|
|
| 97 |
// On output, sol = alpha*beta. |
inline Int8 iceil(const Double& num) |
|
/* |
|
|
inline void transformVectorFromLeft(const Mat_DP& alpha, const Vec_DP& beta, Vec_DP& sol) |
|
| 98 |
{ |
{ |
| 99 |
const Int4 asize = alpha.size(); |
return lrint( ceil(num) ); |
|
|
|
|
sol.resize( asize ); |
|
|
for (Int4 j=0;j<asize;j++){ |
|
|
sol[j] = 0.0; |
|
|
for (int k=0;k<asize;k++) sol[j] += alpha[j][k] * beta[k]; |
|
|
} |
|
|
} |
|
|
*/ |
|
|
|
|
|
inline Int4 iceil(const Double& num) |
|
|
{ |
|
|
static const double d = 0.01; |
|
|
return Int4( ceil(num) + d ); |
|
| 100 |
} |
} |
| 101 |
|
|
| 102 |
inline Int4 ifloor(const Double& num) |
inline Int8 ifloor(const Double& num) |
| 103 |
{ |
{ |
| 104 |
static const double d = 0.01; |
return lrint( floor(num) ); |
|
return Int4( floor(num) + d ); |
|
| 105 |
} |
} |
| 106 |
|
|
| 107 |
#endif /*MATH_HH_*/ |
#endif /*MATH_HH_*/ |
|
|
Legend:
| Removed from v.3 |
|
| changed lines |
| |
Added in v.25 |
|
|
|