SNAP Library 2.1, User Reference  2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TLFlt Class Reference

#include <dt.h>

List of all members.

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 1440 of file dt.h.


Constructor & Destructor Documentation

TLFlt::TLFlt ( ) [inline]

Definition at line 1447 of file dt.h.

: Val(0){}
TLFlt::TLFlt ( const ldouble _Val) [inline]

Definition at line 1448 of file dt.h.

: Val(_Val){}
TLFlt::TLFlt ( TSIn SIn) [inline, explicit]

Definition at line 1450 of file dt.h.

{SIn.Load(Val);}

Member Function Documentation

int TLFlt::GetMemUsed ( ) const [inline]

Definition at line 1463 of file dt.h.

{return sizeof(TLFlt);}
int TLFlt::GetPrimHashCd ( ) const [inline]

Definition at line 1465 of file dt.h.

{Fail; return 0;}
int TLFlt::GetSecHashCd ( ) const [inline]

Definition at line 1466 of file dt.h.

{Fail; return 0;}
TStr TLFlt::GetStr ( const ldouble Val,
const int &  Width = -1,
const int &  Prec = -1 
) [static]

Definition at line 2284 of file dt.cpp.

                                                                       {
  char Bf[255];
  if ((Width==-1)&&(Prec==-1)){sprintf(Bf, "%Lg", Val);}
  else {sprintf(Bf, "%*.*Lf", Width, Prec, Val);}
  return TStr(Bf);
}
static TStr TLFlt::GetStr ( const TLFlt LFlt,
const int &  Width = -1,
const int &  Prec = -1 
) [inline, static]

Definition at line 1469 of file dt.h.

                                                                                {
    return GetStr(LFlt.Val, Width, Prec);}
TStr TLFlt::GetStr ( const ldouble Val,
const char *  FmtStr 
) [static]

Definition at line 2291 of file dt.cpp.

                                                        {
  if (FmtStr==NULL){
    return GetStr(Val);
  } else {
    char Bf[255];
    sprintf(Bf, FmtStr, Val);
    return TStr(Bf);
  }
}
static TStr TLFlt::GetStr ( const ldouble Val,
const TStr FmtStr 
) [inline, static]

Definition at line 1472 of file dt.h.

                                                            {
    return GetStr(Val, FmtStr.CStr());}
void TLFlt::LoadXml ( const PXmlTok XmlTok,
const TStr Nm 
)

Definition at line 2275 of file dt.cpp.

                                                        {
  XLoadHd(Nm);
  Val=TXmlObjSer::GetFltArg(XmlTok, "Val");
}
TLFlt::operator ldouble ( ) const [inline]

Definition at line 1449 of file dt.h.

{return Val;}
bool TLFlt::operator!= ( const ldouble LFlt) const [inline]

Definition at line 1458 of file dt.h.

{return Val!=LFlt;}
ldouble TLFlt::operator() ( ) const [inline]

Definition at line 1460 of file dt.h.

{return Val;}
TLFlt& TLFlt::operator+= ( const ldouble LFlt) [inline]

Definition at line 1461 of file dt.h.

{Val+=LFlt; return *this;}
TLFlt& TLFlt::operator-= ( const ldouble LFlt) [inline]

Definition at line 1462 of file dt.h.

{Val-=LFlt; return *this;}
bool TLFlt::operator< ( const TLFlt LFlt) const [inline]

Definition at line 1459 of file dt.h.

{return Val<LFlt.Val;}
TLFlt& TLFlt::operator= ( const TLFlt LFlt) [inline]

Definition at line 1455 of file dt.h.

{Val=LFlt.Val; return *this;}
bool TLFlt::operator== ( const TLFlt LFlt) const [inline]

Definition at line 1456 of file dt.h.

{return Val==LFlt.Val;}
bool TLFlt::operator== ( const ldouble LFlt) const [inline]

Definition at line 1457 of file dt.h.

{return Val==LFlt;}
void TLFlt::Save ( TSOut SOut) const [inline]

Definition at line 1451 of file dt.h.

{SOut.Save(Val);}
void TLFlt::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 2280 of file dt.cpp.

                                                     {
  XSaveBETagArg(Nm, "Val", TFlt::GetStr(double(Val)));
}

Member Data Documentation

const ldouble TLFlt::Mn = -LDBL_MAX [static]

Definition at line 1444 of file dt.h.

const ldouble TLFlt::Mx = +LDBL_MAX [static]

Definition at line 1445 of file dt.h.

Definition at line 1442 of file dt.h.


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