SNAP Library 3.0, User Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TLFlt Class Reference

#include <dt.h>

Public Member Functions

 TLFlt ()
 
 TLFlt (const ldouble &_Val)
 
 operator ldouble () const
 
 TLFlt (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm)
 
void SaveXml (TSOut &SOut, const TStr &Nm) const
 
TLFltoperator= (const TLFlt &LFlt)
 
bool operator== (const TLFlt &LFlt) const _CMPWARN
 
bool operator== (const ldouble &LFlt) const _CMPWARN
 
bool operator!= (const ldouble &LFlt) const _CMPWARN
 
bool operator< (const TLFlt &LFlt) const
 
ldouble operator() () const
 
TLFltoperator+= (const ldouble &LFlt)
 
TLFltoperator-= (const ldouble &LFlt)
 
int GetMemUsed () const
 
int GetPrimHashCd () const
 
int GetSecHashCd () const
 

Static Public Member Functions

static TStr GetStr (const ldouble &Val, const int &Width=-1, const int &Prec=-1)
 
static TStr GetStr (const TLFlt &LFlt, const int &Width=-1, const int &Prec=-1)
 
static TStr GetStr (const ldouble &Val, const char *FmtStr)
 
static TStr GetStr (const ldouble &Val, const TStr &FmtStr)
 

Public Attributes

ldouble Val
 

Static Public Attributes

static const ldouble Mn =-LDBL_MAX
 
static const ldouble Mx =+LDBL_MAX
 

Detailed Description

Definition at line 1444 of file dt.h.

Constructor & Destructor Documentation

TLFlt::TLFlt ( )
inline

Definition at line 1451 of file dt.h.

1451 : Val(0){}
ldouble Val
Definition: dt.h:1446
TLFlt::TLFlt ( const ldouble _Val)
inline

Definition at line 1452 of file dt.h.

1452 : Val(_Val){}
ldouble Val
Definition: dt.h:1446
TLFlt::TLFlt ( TSIn SIn)
inlineexplicit

Definition at line 1454 of file dt.h.

1454 {SIn.Load(Val);}
void Load(bool &Bool)
Definition: fl.h:84
ldouble Val
Definition: dt.h:1446

Member Function Documentation

int TLFlt::GetMemUsed ( ) const
inline

Definition at line 1467 of file dt.h.

1467 {return sizeof(TLFlt);}
TLFlt()
Definition: dt.h:1451
int TLFlt::GetPrimHashCd ( ) const
inline

Definition at line 1469 of file dt.h.

1469 {Fail; return 0;}
#define Fail
Definition: bd.h:238
int TLFlt::GetSecHashCd ( ) const
inline

Definition at line 1470 of file dt.h.

1470 {Fail; return 0;}
#define Fail
Definition: bd.h:238
TStr TLFlt::GetStr ( const ldouble Val,
const int &  Width = -1,
const int &  Prec = -1 
)
static

Definition at line 2284 of file dt.cpp.

2284  {
2285  char Bf[255];
2286  if ((Width==-1)&&(Prec==-1)){sprintf(Bf, "%Lg", Val);}
2287  else {sprintf(Bf, "%*.*Lf", Width, Prec, Val);}
2288  return TStr(Bf);
2289 }
Definition: dt.h:412
ldouble Val
Definition: dt.h:1446
static TStr TLFlt::GetStr ( const TLFlt LFlt,
const int &  Width = -1,
const int &  Prec = -1 
)
inlinestatic

Definition at line 1473 of file dt.h.

1473  {
1474  return GetStr(LFlt.Val, Width, Prec);}
ldouble Val
Definition: dt.h:1446
static TStr GetStr(const ldouble &Val, const int &Width=-1, const int &Prec=-1)
Definition: dt.cpp:2284
TStr TLFlt::GetStr ( const ldouble Val,
const char *  FmtStr 
)
static

Definition at line 2291 of file dt.cpp.

2291  {
2292  if (FmtStr==NULL){
2293  return GetStr(Val);
2294  } else {
2295  char Bf[255];
2296  sprintf(Bf, FmtStr, Val);
2297  return TStr(Bf);
2298  }
2299 }
Definition: dt.h:412
ldouble Val
Definition: dt.h:1446
static TStr GetStr(const ldouble &Val, const int &Width=-1, const int &Prec=-1)
Definition: dt.cpp:2284
static TStr TLFlt::GetStr ( const ldouble Val,
const TStr FmtStr 
)
inlinestatic

Definition at line 1476 of file dt.h.

1476  {
1477  return GetStr(Val, FmtStr.CStr());}
ldouble Val
Definition: dt.h:1446
static TStr GetStr(const ldouble &Val, const int &Width=-1, const int &Prec=-1)
Definition: dt.cpp:2284
char * CStr()
Definition: dt.h:476
void TLFlt::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 2275 of file dt.cpp.

2275  {
2276  XLoadHd(Nm);
2277  Val=TXmlObjSer::GetFltArg(XmlTok, "Val");
2278 }
#define XLoadHd(Nm)
Definition: bd.h:312
static double GetFltArg(const PXmlTok &XmlTok, const TStr &Nm)
Definition: xml.cpp:104
ldouble Val
Definition: dt.h:1446
TLFlt::operator ldouble ( ) const
inline

Definition at line 1453 of file dt.h.

1453 {return Val;}
ldouble Val
Definition: dt.h:1446
bool TLFlt::operator!= ( const ldouble LFlt) const
inline

Definition at line 1462 of file dt.h.

1462 {return Val!=LFlt;}
ldouble Val
Definition: dt.h:1446
ldouble TLFlt::operator() ( ) const
inline

Definition at line 1464 of file dt.h.

1464 {return Val;}
ldouble Val
Definition: dt.h:1446
TLFlt& TLFlt::operator+= ( const ldouble LFlt)
inline

Definition at line 1465 of file dt.h.

1465 {Val+=LFlt; return *this;}
ldouble Val
Definition: dt.h:1446
TLFlt& TLFlt::operator-= ( const ldouble LFlt)
inline

Definition at line 1466 of file dt.h.

1466 {Val-=LFlt; return *this;}
ldouble Val
Definition: dt.h:1446
bool TLFlt::operator< ( const TLFlt LFlt) const
inline

Definition at line 1463 of file dt.h.

1463 {return Val<LFlt.Val;}
ldouble Val
Definition: dt.h:1446
TLFlt& TLFlt::operator= ( const TLFlt LFlt)
inline

Definition at line 1459 of file dt.h.

1459 {Val=LFlt.Val; return *this;}
ldouble Val
Definition: dt.h:1446
bool TLFlt::operator== ( const TLFlt LFlt) const
inline

Definition at line 1460 of file dt.h.

1460 {return Val==LFlt.Val;}
ldouble Val
Definition: dt.h:1446
bool TLFlt::operator== ( const ldouble LFlt) const
inline

Definition at line 1461 of file dt.h.

1461 {return Val==LFlt;}
ldouble Val
Definition: dt.h:1446
void TLFlt::Save ( TSOut SOut) const
inline

Definition at line 1455 of file dt.h.

1455 {SOut.Save(Val);}
void Save(const bool &Bool)
Definition: fl.h:173
ldouble Val
Definition: dt.h:1446
void TLFlt::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 2280 of file dt.cpp.

2280  {
2281  XSaveBETagArg(Nm, "Val", TFlt::GetStr(double(Val)));
2282 }
#define XSaveBETagArg(Nm, ArgNm, ArgVal)
Definition: bd.h:327
TStr GetStr() const
Definition: dt.h:1369
ldouble Val
Definition: dt.h:1446

Member Data Documentation

const ldouble TLFlt::Mn =-LDBL_MAX
static

Definition at line 1448 of file dt.h.

const ldouble TLFlt::Mx =+LDBL_MAX
static

Definition at line 1449 of file dt.h.

ldouble TLFlt::Val

Definition at line 1446 of file dt.h.


The documentation for this class was generated from the following files: