SNAP Library , Developer Reference
2013-01-07 14:03:36
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <dt.h>
Public Member Functions | |
TFlt () | |
TFlt (const double &_Val) | |
operator double () const | |
TFlt (TSIn &SIn) | |
void | Save (TSOut &SOut) const |
TFlt (TSIn &SIn, const bool &IsTxt) | |
void | Load (TSIn &SIn) |
void | Save (TSOut &SOut, const bool &IsTxt) const |
void | LoadXml (const PXmlTok &XmlTok, const TStr &Nm) |
void | SaveXml (TSOut &SOut, const TStr &Nm) const |
TFlt & | operator= (const TFlt &Flt) |
TFlt & | operator= (const double &Flt) |
bool | operator== (const TFlt &Flt) const _CMPWARN |
bool | operator== (const double &Flt) const _CMPWARN |
bool | operator!= (const double &Flt) const _CMPWARN |
double | operator() () const |
TFlt & | operator+= (const double &Flt) |
TFlt & | operator-= (const double &Flt) |
TFlt & | operator*= (const double &Flt) |
TFlt & | operator/= (const double &Flt) |
TFlt | operator++ (int) |
TFlt | operator-- (int) |
int | GetMemUsed () const |
int | GetPrimHashCd () const |
int | GetSecHashCd () const |
TStr | GetStr () const |
Static Public Member Functions | |
static double | Abs (const double &Flt) |
static int | Sign (const double &Flt) |
static int | Round (const double &Flt) |
static double | GetRnd () |
static bool | Eq6 (const double &LFlt, const double &RFlt) |
static double | GetMn (const double &Flt1, const double &Flt2) |
static double | GetMn (const double &Flt1, const double &Flt2, const double &Flt3) |
static double | GetMn (const double &Flt1, const double &Flt2, const double &Flt3, const double &Flt4) |
static double | GetMx (const double &Flt1, const double &Flt2) |
static double | GetMx (const double &Flt1, const double &Flt2, const double Flt3) |
static double | GetMx (const double &Flt1, const double &Flt2, const double Flt3, const double &Flt4) |
static double | GetInRng (const double &Val, const double &Mn, const double &Mx) |
static double | IsNum (const double &Val) |
static TStr | GetStr (const double &Val, const int &Width=-1, const int &Prec=-1) |
static TStr | GetStr (const TFlt &Flt, const int &Width=-1, const int &Prec=-1) |
static TStr | GetStr (const double &Val, const char *FmtStr) |
static TStr | GetStr (const double &Val, const TStr &FmtStr) |
static TStr | GetPrcStr (const double &RelVal, const double &FullVal) |
static TStr | GetKiloStr (const double &Val) |
static TStr | GetMegaStr (const double &Val) |
static TStr | GetGigaStr (const double &Val) |
Public Attributes | |
double | Val |
Static Public Attributes | |
static const double | Mn = -DBL_MAX |
static const double | Mx = +DBL_MAX |
static const double | NInf = -DBL_MAX |
static const double | PInf = +DBL_MAX |
static const double | Eps = 1e-16 |
static const double | EpsHalf = 1e-7 |
static TRnd | Rnd |
TFlt::TFlt | ( | ) | [inline] |
Definition at line 1284 of file dt.h.
Referenced by GetMemUsed().
: Val(0){}
TFlt::TFlt | ( | const double & | _Val | ) | [inline] |
TFlt::TFlt | ( | TSIn & | SIn | ) | [inline, explicit] |
TFlt::TFlt | ( | TSIn & | SIn, |
const bool & | IsTxt | ||
) | [inline, explicit] |
Definition at line 1289 of file dt.h.
References TStr::GetFlt(), TSIn::Load(), and Val.
static double TFlt::Abs | ( | const double & | Flt | ) | [inline, static] |
Definition at line 1316 of file dt.h.
Referenced by TLinAlg::AssertOrtogonality(), TNumericalStuff::EigSymmetricTridiag(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), TNumericalStuff::LUDecomposition(), TLinAlg::NormL1(), TLinAlg::NormLinf(), TSparseSVD::SimpleLanczos(), and TLAMisc::ToSpVec().
{return Flt<0?-Flt:Flt;}
static bool TFlt::Eq6 | ( | const double & | LFlt, |
const double & | RFlt | ||
) | [inline, static] |
static TStr TFlt::GetGigaStr | ( | const double & | Val | ) | [inline, static] |
Definition at line 1360 of file dt.h.
References TStr::Fmt(), and GetMegaStr().
{ if (fabs(Val)>100*1000000000.0){return TStr::Fmt("%.0fG", Val/1000000000.0);} else if (fabs(Val)>1000000000.0){return TStr::Fmt("%.1fG", Val/1000000000.0);} else {return GetMegaStr(Val);}}
static double TFlt::GetInRng | ( | const double & | Val, |
const double & | Mn, | ||
const double & | Mx | ||
) | [inline, static] |
static TStr TFlt::GetKiloStr | ( | const double & | Val | ) | [inline, static] |
Definition at line 1352 of file dt.h.
References TStr::Fmt().
Referenced by GetMegaStr().
{ if (fabs(Val)>100*1000){return TStr::Fmt("%.0fK", Val/1000);} else if (fabs(Val)>1000){return TStr::Fmt("%.1fK", Val/1000);} else {return TStr::Fmt("%.0f", Val);}}
static TStr TFlt::GetMegaStr | ( | const double & | Val | ) | [inline, static] |
Definition at line 1356 of file dt.h.
References TStr::Fmt(), and GetKiloStr().
Referenced by GetGigaStr().
{ if (fabs(Val)>100*1000000){return TStr::Fmt("%.0fM", Val/1000000);} else if (fabs(Val)>1000000){return TStr::Fmt("%.1fM", Val/1000000);} else {return GetKiloStr(Val);}}
int TFlt::GetMemUsed | ( | ) | const [inline] |
static double TFlt::GetMn | ( | const double & | Flt1, |
const double & | Flt2 | ||
) | [inline, static] |
Definition at line 1323 of file dt.h.
Referenced by TNIBs::ComputePerformanceNId(), TNIBs::GenCascade(), GetMn(), and TFltRect::Intersection().
{
return Flt1<Flt2?Flt1:Flt2;}
static double TFlt::GetMn | ( | const double & | Flt1, |
const double & | Flt2, | ||
const double & | Flt3 | ||
) | [inline, static] |
static double TFlt::GetMn | ( | const double & | Flt1, |
const double & | Flt2, | ||
const double & | Flt3, | ||
const double & | Flt4 | ||
) | [inline, static] |
static double TFlt::GetMx | ( | const double & | Flt1, |
const double & | Flt2 | ||
) | [inline, static] |
Definition at line 1330 of file dt.h.
Referenced by TNetInfBs::GenCascade(), GetMx(), TFltRect::Intersection(), TSparseSVD::Lanczos(), TSparseSVD::Lanczos2(), and TLinAlg::NormLinf().
{
return Flt1>Flt2?Flt1:Flt2;}
static double TFlt::GetMx | ( | const double & | Flt1, |
const double & | Flt2, | ||
const double | Flt3 | ||
) | [inline, static] |
static double TFlt::GetMx | ( | const double & | Flt1, |
const double & | Flt2, | ||
const double | Flt3, | ||
const double & | Flt4 | ||
) | [inline, static] |
static TStr TFlt::GetPrcStr | ( | const double & | RelVal, |
const double & | FullVal | ||
) | [inline, static] |
int TFlt::GetPrimHashCd | ( | ) | const [inline] |
static double TFlt::GetRnd | ( | ) | [inline, static] |
int TFlt::GetSecHashCd | ( | ) | const [inline] |
TStr TFlt::GetStr | ( | ) | const [inline] |
Definition at line 1342 of file dt.h.
References Val.
Referenced by TXmlTok::AddArg(), TLinAlg::ConvexComb(), TEnv::GetIfArgPrefixFlt(), GetPrcStr(), GetStr(), TSOut::PutFlt(), TOLx::PutFlt(), Save(), TLAMisc::SaveMatlabTFltV(), TLAMisc::SaveMatlabTFltVV(), TLAMisc::SaveMatlabTFltVVCol(), TLAMisc::SaveMatlabTFltVVMjrSubMtrx(), SaveXml(), TSFlt::SaveXml(), TLFlt::SaveXml(), TFltRect::SaveXml(), and TNumericalStuff::SymetricToTridiag().
{return TFlt::GetStr(Val);}
TStr TFlt::GetStr | ( | const double & | Val, |
const int & | Width = -1 , |
||
const int & | Prec = -1 |
||
) | [static] |
static TStr TFlt::GetStr | ( | const TFlt & | Flt, |
const int & | Width = -1 , |
||
const int & | Prec = -1 |
||
) | [inline, static] |
TStr TFlt::GetStr | ( | const double & | Val, |
const char * | FmtStr | ||
) | [static] |
static TStr TFlt::GetStr | ( | const double & | Val, |
const TStr & | FmtStr | ||
) | [inline, static] |
static double TFlt::IsNum | ( | const double & | Val | ) | [inline, static] |
void TFlt::Load | ( | TSIn & | SIn | ) | [inline] |
Definition at line 1291 of file dt.h.
References TSIn::Load(), and Val.
Referenced by TSigmoid::Load(), and TSigmoid::TSigmoid().
void TFlt::LoadXml | ( | const PXmlTok & | XmlTok, |
const TStr & | Nm | ||
) |
Definition at line 2180 of file dt.cpp.
References TXmlObjSer::GetFltArg(), Val, and XLoadHd.
{ XLoadHd(Nm); Val=TXmlObjSer::GetFltArg(XmlTok, "Val"); }
TFlt::operator double | ( | ) | const [inline] |
bool TFlt::operator!= | ( | const double & | Flt | ) | const [inline] |
double TFlt::operator() | ( | ) | const [inline] |
TFlt& TFlt::operator*= | ( | const double & | Flt | ) | [inline] |
TFlt TFlt::operator++ | ( | int | ) | [inline] |
TFlt& TFlt::operator+= | ( | const double & | Flt | ) | [inline] |
TFlt TFlt::operator-- | ( | int | ) | [inline] |
TFlt& TFlt::operator-= | ( | const double & | Flt | ) | [inline] |
TFlt& TFlt::operator/= | ( | const double & | Flt | ) | [inline] |
TFlt& TFlt::operator= | ( | const double & | Flt | ) | [inline] |
bool TFlt::operator== | ( | const TFlt & | Flt | ) | const [inline] |
bool TFlt::operator== | ( | const double & | Flt | ) | const [inline] |
static int TFlt::Round | ( | const double & | Flt | ) | [inline, static] |
Definition at line 1318 of file dt.h.
Referenced by TTmStopWatch::GetMSecInt(), TExeTm::GetSecInt(), and TTmStopWatch::GetSecInt().
{return int(floor(Flt+0.5));}
void TFlt::Save | ( | TSOut & | SOut | ) | const [inline] |
Reimplemented in TAscFlt.
Definition at line 1288 of file dt.h.
References TSOut::Save(), and Val.
Referenced by TCascade::Save(), TPpVal::Save(), THitInfo::Save(), TLocClustStat::Save(), TSigmoid::Save(), and TFltRect::Save().
void TFlt::Save | ( | TSOut & | SOut, |
const bool & | IsTxt | ||
) | const [inline] |
void TFlt::SaveXml | ( | TSOut & | SOut, |
const TStr & | Nm | ||
) | const |
Definition at line 2185 of file dt.cpp.
References GetStr(), Val, and XSaveBETagArg.
{ XSaveBETagArg(Nm, "Val", TFlt::GetStr(Val)); }
static int TFlt::Sign | ( | const double & | Flt | ) | [inline, static] |
const double TFlt::EpsHalf = 1e-7 [static] |
const double TFlt::Mn = -DBL_MAX [static] |
Definition at line 1276 of file dt.h.
Referenced by TMom::Def(), TNetInfBs::GetBestEdge(), GetMinMax(), TSnap::GetSngVec(), and IsNum().
const double TFlt::Mx = +DBL_MAX [static] |
Definition at line 1277 of file dt.h.
Referenced by TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TKronMomentsFit::EstABC(), TLocClust::FindBestCut(), TSnap::GetEigenVectorCentr(), GetMinMax(), TNetInfBs::GreedyOpt(), TNetInfBs::Init(), IsNum(), TLocClustStat::MakeExpBins(), and TLocClustStat::Run().
const double TFlt::NInf = -DBL_MAX [static] |
const double TFlt::PInf = +DBL_MAX [static] |
Definition at line 1282 of file dt.h.
Referenced by TNIBs::BSG(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), GetRnd(), and TNIBs::SG().
double TFlt::Val |
Definition at line 1274 of file dt.h.
Referenced by TLocClust::ApproxPageRank(), TLocClustStat::BestWhiskEdges(), TLocClustStat::BestWhiskNodes(), GetInRng(), GetPrimHashCd(), GetSecHashCd(), GetStr(), Load(), LoadXml(), operator double(), operator!=(), operator()(), operator*=(), operator++(), operator+=(), operator--(), operator-=(), operator/=(), operator=(), operator==(), TLAMisc::PrintTFltVV(), Save(), TNetInfBs::SaveEdgeInfo(), TNetInfBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferred(), TNIBs::SaveInferredEdges(), TNIBs::SaveInferredPajek(), SaveXml(), TNIBs::SG(), TFlt(), and TCascade::TransProb().