26 while(m<x) {m*=10; sz++;} sz++;
29 return std::string(str);
40 return std::string(str);
49 static inline T
cv (
const F& x) {
return T(x); }
51 template<
typename T,
typename F>
inline T
as (
const F& x) {
55 template<
typename T,
typename F,
class U>
inline T
56 as (
const F& x,
const U& u) {
60 template<
typename T,
typename F,
class U,
class V>
inline T
61 as (
const F& x,
const U& u,
const V& v) {
67 static inline double cv (
char* x) {
76 static inline double cv (
const char* x) {
97 template<
class A,
class B>
inline void assign(A& a,
const B &
b) {
100 inline void assign(
int & a,
double d ) {
if( ceil(d)==floor(d) ){
int numb = (int)ceil(d);
if(numb%2==0){a = (int)ceil(d);}
else{a = (int)floor(d);}}
else{a = (int)floor(d+0.5);} };
102 inline void assign(
double & d,
int i) {d = double(i);}
103 inline void assign(
double & d,
unsigned i) {d = double(i);}
104 inline void assign(
double & d,
double z) {d = z;}
106 template<
class C>
inline void
107 assign(std::complex<C> & z,
const C& x) { z= std::complex<C>(x);}
109 template<
class X>
inline void assign(
X & a,
const char *s) { std::istringstream
in(s); in >>a; }
115 template<>
inline void assign(
long long int &i,
const char *s){std::istringstream
in(s); in >>i;}
127 template<>
inline void
128 assign(std::complex<double> & z,
const char* s) {
129 z = std::complex<double>(atof(s),0);
136 #endif // realroot_assign_hpp
const C & b
Definition: Interval_glue.hpp:25
TMPL X
Definition: polynomial_operators.hpp:148
Definition: assign.hpp:48
static double cv(const char *x)
Definition: assign.hpp:76
static T cv(const F &x)
Definition: assign.hpp:49
std::string to_string(int x)
to_string convert int to std::string In C++11, it should use std::to_string
Definition: assign.hpp:24
T as(const F &x)
Definition: assign.hpp:51
bool in(const T &x, const Interval< T, r > &y)
Definition: Interval_fcts.hpp:100
static double cv(char *x)
Definition: assign.hpp:67
double C
Definition: solver_mv_fatarcs.cpp:16
void assign(A &a, const B &b)
Generic definition of the assignement function.
Definition: assign.hpp:97