7 #include <boost/lexical_cast.hpp> 9 #include <boost/algorithm/string.hpp> 59 static inline SP::CORE_Real
New() {
67 static inline SP::CORE_Real
New(
const tReal& i) {
135 return boost::lexical_cast<
tString>(r);
136 }
catch(std::exception& e) {
147 return boost::lexical_cast<
tString>(r);
148 }
catch(std::exception& e) {
159 return boost::lexical_cast<
tString>(r);
160 }
catch(std::exception& e) {
173 }
catch(std::exception& e) {
205 return boost::lexical_cast<
tLDouble>(ret);
206 }
catch(std::exception& e) {
242 return ((x==0)?0:((x>0)?1:-1));
245 return sgn(x)*floor(0.5+fabs(x)/
EPS)*
EPS;
249 #endif // end of ifndef
#define tLDouble
Definition: types.h:54
#define tDouble
Definition: types.h:52
static SP::CORE_Real New(const tReal &i)
create a class Real
Definition: CORE_Real.h:67
tReal mReal
Definition: CORE_Real.h:29
static tString toString(const tFloat &r)
return the string associated to the real
Definition: CORE_Real.h:133
static tString roundToString(const tReal &r, const tReal &eps)
return the string associated to the real
Definition: CORE_Real.cpp:54
#define tFloat
Definition: types.h:50
static tString toString(const tDouble &r)
return the string associated to the real
Definition: CORE_Real.h:145
void setReal(const tString &r)
set the real to r
Definition: CORE_Real.h:81
static tLDouble parseReal(const tString &str)
return the real associated to the string
Definition: CORE_Real.h:201
static tReal surround(const tReal &x)
Definition: CORE_Real.h:244
#define tBoolean
Definition: types.h:139
static void solveEq3(const tReal &a, const tReal &b, const tReal &c, const tReal &d, vector< tReal > &x)
solve a 3nd order equation ax3+bx2+cx+d=0
Definition: CORE_Real.cpp:88
virtual ~CORE_Real()
delete class
Definition: CORE_Real.cpp:19
static void shellSort(tReal a[], const tUIndex &N)
sort the array tb a shell sorting method
Definition: CORE_Real.cpp:60
static SP::CORE_Real New()
create a class Real
Definition: CORE_Real.h:59
static tString toString(const tDouble &i, const tFlag &n)
return the string associated to the real
Definition: CORE_Real.h:113
void setReal(const tReal &r)
set the real to r
Definition: CORE_Real.h:77
#define tUIndex
Definition: types.h:126
static tString toString(const tFloat &i, const tFlag &n)
return the string associated to the real
Definition: CORE_Real.h:122
abstract base class for most classes.
Definition: CORE_Object.h:53
static tBoolean isReal(const tString &str)
return trie if the tsring is real
Definition: CORE_Real.h:167
#define tString
Definition: types.h:135
static tString toString(const tLDouble &r)
return the string associated to the real
Definition: CORE_Real.h:157
static void solveEq2(const tReal &a, const tReal &b, const tReal &c, vector< tReal > &x)
solve a 2nd order equation ax2+bx+c=0
Definition: CORE_Real.cpp:154
#define EPS
Definition: types.h:121
CORE_Real()
create a real
Definition: CORE_Real.cpp:13
tString toString() const
return the string associated to the real
Definition: CORE_Real.h:97
static int sgn(const tReal &x)
Definition: CORE_Real.h:241
#define tReal
Definition: types.h:118
tReal getReal() const
get the real
Definition: CORE_Real.h:90
static tString mSystemDigitalDot
Definition: CORE_Real.h:30
this class describes a real Attributes:
Definition: CORE_Real.h:25
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
#define tFlag
Definition: types.h:74