SNAP Library 2.0, Developer Reference
2013-05-13 16:33:57
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <tm.h>
Public Member Functions | |
TExeTm () | |
TExeTm (const TExeTm &Tm) | |
TExeTm & | operator= (const TExeTm &Tm) |
void | Tick () |
int | GetTime () const |
double | GetSecs () const |
int | GetSecInt () |
const char * | GetStr () const |
TStr | GetStr2 () const |
const char * | GetTmStr () const |
Static Public Member Functions | |
static char * | GetCurTm () |
Private Attributes | |
int | LastTick |
TExeTm::TExeTm | ( | ) | [inline] |
TExeTm::TExeTm | ( | const TExeTm & | Tm | ) | [inline] |
static char* TExeTm::GetCurTm | ( | ) | [inline, static] |
Definition at line 373 of file tm.h.
References TStr::CStr().
Referenced by TTimeNet::PlotMissingPast(), and TLocClustStat::Run().
{ static TStr TmStr; TmStr=TSecTm::GetCurTm().GetTmStr(); return TmStr.CStr(); }
int TExeTm::GetSecInt | ( | ) | [inline] |
Definition at line 366 of file tm.h.
References GetSecs(), and TFlt::Round().
{ return TFlt::Round(GetSecs()); }
double TExeTm::GetSecs | ( | ) | const [inline] |
Definition at line 365 of file tm.h.
References LastTick.
Referenced by TFfGGen::AddNodes(), TLocClust::ApproxPageRank(), TSnap::GenRewire(), GetSecInt(), TSubGraphEnum< TGraphCounter >::GetSubGraphs(), GetTmStr(), TKroneckerLL::GradDescentConvergence(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TSparseSVD::Lanczos2(), TKroneckerLL::SampleGradient(), TKroneckerLL::TestKronDescent(), and TKroneckerLL::TestSamplePerm().
{return double(clock()-LastTick)/double(CLOCKS_PER_SEC);}
const char* TExeTm::GetStr | ( | ) | const [inline] |
Definition at line 367 of file tm.h.
References GetTmStr().
Referenced by TFfGGen::AddNodes(), TLocClust::ApproxPageRank(), TLocClustStat::BagOfWhiskers(), TSnap::GenRewire(), TCliqueOverlap::GetCPMCommunities(), TSnap::GetInvParticipRat(), TKCore< PGraph >::GetNextCore(), TTimeNENet::GetTriadEdges(), TBigNet< TNodeData, IsDir >::IsOk(), TSparseSVD::Lanczos2(), TTimeNENet::LoadEdgeTm(), TTimeNet::PlotCCfOverTm(), TBigNet< TNodeData, IsDir >::Rewire(), TLocClustStat::Run(), TLocClustStat::SaveTxtInfo(), and TBigNet< TNodeData, IsDir >::SortEdgeV().
{return GetTmStr();}
TStr TExeTm::GetStr2 | ( | ) | const [inline] |
Definition at line 368 of file tm.h.
References GetTmStr().
{return GetTmStr();}
int TExeTm::GetTime | ( | ) | const [inline] |
Definition at line 364 of file tm.h.
References LastTick.
Referenced by TTmStopWatch::GetTime(), and TTmStopWatch::Stop().
{return int(clock()-LastTick);}
const char* TExeTm::GetTmStr | ( | ) | const [inline] |
Definition at line 369 of file tm.h.
References GetSecs().
Referenced by TMAGFitBern::DoEStep(), TMAGFitBern::DoMStep(), TGHash< TDat >::DrawGViz(), TSubGraphsEnum::EnumSubGraphs(), TKronMtx::GenKronecker(), GetStr(), GetStr2(), TKroneckerLL::GradDescentConvergence(), TTimeNet::LoadArxiv(), TTimeNet::LoadPatents(), TAGMFast::MLEGradAscent(), TAGMFit::MLEGradAscentGivenCAG(), TAGMFast::MLEGradAscentParallel(), TLogRegFit::MLEGradient(), TAGMFast::MLENewton(), TLogRegFit::MLENewton(), TAGMFast::NeighborComInit(), TAGMFit::NeighborComInit(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TTimeNet::PlotMissingPast(), TSubGraphsEnum::RecurBfs(), TSubGraphsEnum::RecurBfs1(), TKroneckerLL::RunEStep(), TAGMFit::RunMCMC(), TKroneckerLL::RunMStep(), TKroneckerLL::SampleGradient(), TGStat::TakeDiam(), TKroneckerLL::TestKronDescent(), TKroneckerLL::TestSamplePerm(), and TTimeNENet::TimeGrowth().
{ static char TmStr[32]; if (GetSecs() < 60) { sprintf(TmStr, "%.2fs", GetSecs()); } else if (GetSecs() < 3600) { sprintf(TmStr, "%02dm%02ds", int(GetSecs())/60, int(GetSecs())%60); } else { sprintf(TmStr, "%02dh%02dm", int(GetSecs())/3600, (int(GetSecs())%3600)/60); } return TmStr; }
void TExeTm::Tick | ( | ) | [inline] |
Definition at line 363 of file tm.h.
References LastTick.
Referenced by TSubGraphsEnum::EnumSubGraphs(), TTimeNet::LoadArxiv(), TTimeNet::LoadPatents(), TTimeNet::PlotEffDiam(), TTimeNENet::PlotEffDiam(), TTimeNet::PlotMissingPast(), TTmStopWatch::Reset(), TLocClustStat::Run(), TKroneckerLL::RunEStep(), TAGMFit::RunMCMC(), TKroneckerLL::RunMStep(), TKroneckerLL::SampleGradient(), TTmStopWatch::Start(), TGStat::TakeDiam(), TKroneckerLL::TestSamplePerm(), TExeTm(), TTimeNet::TimeGrowth(), and TTimeNENet::TimeGrowth().
{LastTick=(int)clock();}
int TExeTm::LastTick [private] |