SNAP Library 2.1, Developer Reference
2013-09-25 10:47:25
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <xmath.h>
Static Public Member Functions | |
static double | Inv (const double &x) |
static double | Sqr (const double &x) |
static double | Sqrt (const double &x) |
static double | Log (const double &Val) |
static double | Log2 (const double &Val) |
static double | Round (const double &Val) |
static double | Round (const double &Val, int Decs) |
static int | Fac (const int &Val) |
static int | Choose (const int &N, const int &K) |
static uint | Pow2 (const int &pow) |
static double | Power (const double &Base, const double &Exponent) |
template<typename T > | |
static int | Sign (const T &Val) |
template<class T > | |
static const T & | Mx (const T &LVal, const T &RVal) |
template<class T > | |
static const T & | Mn (const T &LVal, const T &RVal) |
template<class T > | |
static const T & | Mx (const T &Val1, const T &Val2, const T &Val3) |
template<class T > | |
static const T & | Mn (const T &Val1, const T &Val2, const T &Val3) |
template<class T > | |
static const T & | Median (const T &Val1, const T &Val2, const T &Val3) |
template<class T > | |
static const T & | InRange (const T &Val, const T &Mn, const T &Mx) |
template<class T > | |
static bool | IsInRange (const T &Val, const T &Mn, const T &Mx) |
template<class T > | |
static bool | IsInEps (const T &Val, const T &Eps) |
Static Public Attributes | |
static double | E = 2.71828182845904523536 |
static double | Pi = 3.14159265358979323846 |
static double | LogOf2 = log(double(2)) |
static int TMath::Choose | ( | const int & | N, |
const int & | K | ||
) | [inline, static] |
static int TMath::Fac | ( | const int & | Val | ) | [inline, static] |
static const T& TMath::InRange | ( | const T & | Val, |
const T & | Mn, | ||
const T & | Mx | ||
) | [inline, static] |
static double TMath::Inv | ( | const double & | x | ) | [inline, static] |
static bool TMath::IsInEps | ( | const T & | Val, |
const T & | Eps | ||
) | [inline, static] |
Definition at line 83 of file xmath.h.
Referenced by TKronMomentsFit::EstABC().
{
return Val >= -Eps && Val <= Eps;}
static bool TMath::IsInRange | ( | const T & | Val, |
const T & | Mn, | ||
const T & | Mx | ||
) | [inline, static] |
static double TMath::Log | ( | const double & | Val | ) | [inline, static] |
Definition at line 14 of file xmath.h.
Referenced by TAGMFast::FindComsByCV().
{return log(Val);}
static double TMath::Log2 | ( | const double & | Val | ) | [inline, static] |
Definition at line 15 of file xmath.h.
References LogOf2.
Referenced by TGraphAnf< PGraph >::InitAnfBits().
{return log(Val)/LogOf2;}
static const T& TMath::Median | ( | const T & | Val1, |
const T & | Val2, | ||
const T & | Val3 | ||
) | [inline, static] |
static const T& TMath::Mn | ( | const T & | LVal, |
const T & | RVal | ||
) | [inline, static] |
Definition at line 36 of file xmath.h.
Referenced by TGnuPlot::AddPwrFit1(), TGnuPlot::AddPwrFit2(), TGnuPlot::AddPwrFit3(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TLocClustStat::BagOfWhiskers(), TForestFire::BurnGeoFire(), TUndirFFire::BurnGeoFire(), TKroneckerLL::ChainGelmapRubinPlot(), TLocClust::DrawWhiskers(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TArtPointVisitor::FwdEdge(), TSubGraphsEnum::Gen2Graphs(), TSnap::GenConfModel(), TTimeNENet::Get1stEdgeNet(), TNetInfBs::GetBestEdge(), TSnap::GetBetweennessCentr(), TSnap::GetBfsEffDiam(), TSnap::GetCmnNbrs(), TSnap::GetCmnNbrs< PUNGraph >(), TSnap::GetEdgeBridges(), TUNGraph::GetEI(), TSnap::GetInvParticipRat(), GetMinMax(), TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges(), TNcpGraphsBase::Impose(), TAGMFit::JoinCom(), TAGMFit::LeaveCom(), TTimeNet::LoadBipartite(), TTimeNENet::LoadEdgeTm(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), PlotAutoCorrelation(), TSnap::PlotShortPathDistr(), TAGMFit::SeekJoin(), TAGMFit::SeekLeave(), TAGMFit::SeekSwitch(), and TGStat::TakeSpectral().
{
return LVal < RVal ? LVal : RVal;}
static const T& TMath::Mn | ( | const T & | Val1, |
const T & | Val2, | ||
const T & | Val3 | ||
) | [inline, static] |
static const T& TMath::Mx | ( | const T & | LVal, |
const T & | RVal | ||
) | [inline, static] |
Definition at line 32 of file xmath.h.
Referenced by TNEGraph::AddEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge(), TNEANet::AddEdge(), TBigNet< TNodeData, IsDir >::AddNode(), TNodeNet< TNodeData >::AddNode(), TUNGraph::AddNode(), TNGraph::AddNode(), TNodeEDatNet< TNodeData, TEdgeData >::AddNode(), TNEGraph::AddNode(), TBPGraph::AddNode(), TNodeEdgeNet< TNodeData, TEdgeData >::AddNode(), TNEANet::AddNode(), TBigNet< TNodeData, IsDir >::AddUndirNode(), TBreathFS< PGraph >::DoBfs(), TSubGraphsEnum::Gen2Graphs(), TTimeNENet::Get1stEdgeNet(), TSnap::GetBetweennessCentr(), TSnap::GetEdgeBridges(), TUNGraph::GetEI(), GetMinMax(), TSnap::GetSubTreeSz(), TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges(), IsInRange(), TAGMFit::JoinCom(), TStatTest::KsTest(), TAGMFit::LeaveCom(), TTimeNENet::LoadEdgeTm(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TBigNet< TNodeData, IsDir >::Reserve(), TAGMFit::RunMCMC(), TLocClustStat::SaveTxtInfo(), TAGMFit::SeekJoin(), TAGMFit::SeekLeave(), TAGMFit::SeekSwitch(), TSparseRowMatrix::TSparseRowMatrix(), and TNIBs::UpdateDiff().
{
return LVal > RVal ? LVal : RVal;}
static const T& TMath::Mx | ( | const T & | Val1, |
const T & | Val2, | ||
const T & | Val3 | ||
) | [inline, static] |
static uint TMath::Pow2 | ( | const int & | pow | ) | [inline, static] |
Definition at line 24 of file xmath.h.
Referenced by TGraphEnumUtils::GraphId().
{return uint(1u<<pow);}
static double TMath::Power | ( | const double & | Base, |
const double & | Exponent | ||
) | [inline, static] |
Definition at line 25 of file xmath.h.
Referenced by TSnap::GenBaraHierar(), TKroneckerLL::GetFullGraphLL(), and TNIBs::UpdateDiff().
{
return exp(log(Base)*Exponent);}
static double TMath::Round | ( | const double & | Val | ) | [inline, static] |
Definition at line 16 of file xmath.h.
Referenced by TLocClustStat::BestWhiskEdges(), TSpecFunc::EntropyBias(), TAGMUtil::FindComsByAGM(), TAGMFast::FindComsByCV(), TSnap::GenBaraHierar(), TAGMUtil::GenPLSeq(), TSnap::GenRndPowerLaw(), TNcpGraphsBase::PlotAvgNcp(), TLocClustStat::PlotBoltzmanCurve(), TLocClustStat::PlotNCPScatter(), TLocClustStat::PlotPhiDistr(), TLocClustStat::PlotPhiInOut(), Round(), TKronMaxLL::RoundTheta(), TLocClustStat::Run(), TGraphKey::TakeSig(), and TGraphKey::TGraphKey().
{
return (Val>0)?floor(Val+0.5):ceil(Val-0.5);}
static double TMath::Round | ( | const double & | Val, |
int | Decs | ||
) | [inline, static] |
static int TMath::Sign | ( | const T & | Val | ) | [inline, static] |
static double TMath::Sqr | ( | const double & | x | ) | [inline, static] |
Definition at line 12 of file xmath.h.
Referenced by TNetConstraint< PGraph >::AddConstraint(), TKroneckerLL::CalcChainR2(), TMom::Def(), TLinAlg::EuclDist2(), TSnap::GenGeoPrefAttach(), TKroneckerLL::GetApxEmptyGraphDLL(), TKroneckerLL::GetApxEmptyGraphLL(), TExpBi::GetBiFuncVal(), TLocClustStat::TCutInfo::GetExpEdgesIn(), TSnap::GetHits(), TSnap::TSnapDetail::GetSphereDev(), TSnap::TSnapDetail::TCNMQMatrix::Init(), TSpecFunc::LinearFit(), TLinAlg::Norm2(), TLinReg::NR_lfit(), TSvd::NR_pythag(), PlotAutoCorrelation(), TKroneckerLL::TestBicCriterion(), TSigmoid::TSigmoid(), and TStatTest::TTest().
{return x*x;}
static double TMath::Sqrt | ( | const double & | x | ) | [inline, static] |
double TMath::E = 2.71828182845904523536 [static] |
Definition at line 7 of file xmath.h.
Referenced by TExpBi::TExpBi().
double TMath::LogOf2 = log(double(2)) [static] |
Definition at line 9 of file xmath.h.
Referenced by TSpecFunc::Entropy(), and Log2().
double TMath::Pi = 3.14159265358979323846 [static] |
Definition at line 8 of file xmath.h.
Referenced by TSnap::GenGeoPrefAttach(), TRnd::GetBinomialDev(), TRnd::GetPoissonDev(), and TExpBi::TExpBi().