SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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 1534 of file dt.h.

Constructor & Destructor Documentation

TLFlt::TLFlt ( )
inline

Definition at line 1541 of file dt.h.

Referenced by GetMemUsed().

1541 : Val(0){}
ldouble Val
Definition: dt.h:1536

Here is the caller graph for this function:

TLFlt::TLFlt ( const ldouble _Val)
inline

Definition at line 1542 of file dt.h.

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

Definition at line 1544 of file dt.h.

References TSIn::Load(), and Val.

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

Here is the call graph for this function:

Member Function Documentation

int TLFlt::GetMemUsed ( ) const
inline

Definition at line 1557 of file dt.h.

References TLFlt().

1557 {return sizeof(TLFlt);}
TLFlt()
Definition: dt.h:1541

Here is the call graph for this function:

int TLFlt::GetPrimHashCd ( ) const
inline

Definition at line 1559 of file dt.h.

References Fail.

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

Definition at line 1560 of file dt.h.

References Fail.

1560 {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.

Referenced by GetStr().

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:1536

Here is the caller graph for this function:

static TStr TLFlt::GetStr ( const TLFlt LFlt,
const int &  Width = -1,
const int &  Prec = -1 
)
inlinestatic

Definition at line 1563 of file dt.h.

References GetStr(), and Val.

1563  {
1564  return GetStr(LFlt.Val, Width, Prec);}
ldouble Val
Definition: dt.h:1536
static TStr GetStr(const ldouble &Val, const int &Width=-1, const int &Prec=-1)
Definition: dt.cpp:2284

Here is the call graph for this function:

TStr TLFlt::GetStr ( const ldouble Val,
const char *  FmtStr 
)
static

Definition at line 2291 of file dt.cpp.

References GetStr().

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:1536
static TStr GetStr(const ldouble &Val, const int &Width=-1, const int &Prec=-1)
Definition: dt.cpp:2284

Here is the call graph for this function:

static TStr TLFlt::GetStr ( const ldouble Val,
const TStr FmtStr 
)
inlinestatic

Definition at line 1566 of file dt.h.

References TStr::CStr(), and GetStr().

1566  {
1567  return GetStr(Val, FmtStr.CStr());}
ldouble Val
Definition: dt.h:1536
static TStr GetStr(const ldouble &Val, const int &Width=-1, const int &Prec=-1)
Definition: dt.cpp:2284
char * CStr()
Definition: dt.h:476

Here is the call graph for this function:

void TLFlt::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 2275 of file dt.cpp.

References TXmlObjSer::GetFltArg(), Val, and XLoadHd.

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:1536

Here is the call graph for this function:

TLFlt::operator ldouble ( ) const
inline

Definition at line 1543 of file dt.h.

References Val.

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

Definition at line 1552 of file dt.h.

References Val.

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

Definition at line 1554 of file dt.h.

References Val.

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

Definition at line 1555 of file dt.h.

References Val.

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

Definition at line 1556 of file dt.h.

References Val.

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

Definition at line 1553 of file dt.h.

References Val.

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

Definition at line 1549 of file dt.h.

References Val.

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

Definition at line 1550 of file dt.h.

References Val.

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

Definition at line 1551 of file dt.h.

References Val.

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

Definition at line 1545 of file dt.h.

References TSOut::Save(), and Val.

1545 {SOut.Save(Val);}
void Save(const bool &Bool)
Definition: fl.h:173
ldouble Val
Definition: dt.h:1536

Here is the call graph for this function:

void TLFlt::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 2280 of file dt.cpp.

References TFlt::GetStr(), Val, and XSaveBETagArg.

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:1459
ldouble Val
Definition: dt.h:1536

Here is the call graph for this function:

Member Data Documentation

const ldouble TLFlt::Mn =-LDBL_MAX
static

Definition at line 1538 of file dt.h.

const ldouble TLFlt::Mx =+LDBL_MAX
static

Definition at line 1539 of file dt.h.


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