SNAP Library 4.1, Developer Reference
2018-07-26 16:30:42
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
|
#include <shash.h>
Public Types | |
typedef THashSetKeyI< TKey > | TIter |
Public Member Functions | |
THashSet () | |
THashSet (const THashSet &Set) | |
THashSet (const int &ExpectVals, const bool &_AutoSizeP=false) | |
THashSet (const TVec< TKey > &KeyV) | |
THashSet (TSIn &SIn) | |
void | Load (TSIn &SIn) |
void | Save (TSOut &SOut) const |
void | LoadXml (const PXmlTok &XmlTok, const TStr &Nm="") |
void | SaveXml (TSOut &SOut, const TStr &Nm) |
THashSet & | operator= (const THashSet &Set) |
bool | operator== (const THashSet &Set) const |
const TKey & | operator[] (const int &KeyId) const |
TKey & | operator[] (const int &KeyId) |
::TSize | GetMemUsed () const |
TIter | BegI () const |
TIter | EndI () const |
TIter | GetI (const TKey &Key) const |
void | Gen (const int &ExpectVals) |
void | Clr (const bool &DoDel=true, const int &NoDelLim=-1) |
bool | Empty () const |
int | Len () const |
int | GetPorts () const |
bool | IsAutoSize () const |
int | GetMxKeyIds () const |
int | GetReservedKeyIds () const |
bool | IsKeyIdEqKeyN () const |
int | AddKey (const TKey &Key) |
void | AddKeyV (const TVec< TKey > &KeyV) |
void | DelKey (const TKey &Key) |
bool | DelIfKey (const TKey &Key) |
void | DelKeyId (const int &KeyId) |
void | DelKeyIdV (const TIntV &KeyIdV) |
void | MarkDelKey (const TKey &Key) |
void | MarkDelKeyId (const int &KeyId) |
const TKey & | GetKey (const int &KeyId) const |
int | GetKeyId (const TKey &Key) const |
int | GetRndKeyId (TRnd &Rnd) const |
bool | IsKey (const TKey &Key) const |
bool | IsKey (const TKey &Key, int &KeyId) const |
bool | IsKeyId (const int &KeyId) const |
int | FFirstKeyId () const |
bool | FNextKeyId (int &KeyId) const |
void | GetKeyV (TVec< TKey > &KeyV) const |
void | Swap (THashSet &Set) |
void | Defrag () |
void | Pack () |
Static Public Member Functions | |
static THashSet< TKey > | GetSet (const TKey &Key1) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2, const TKey &Key3) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2, const TKey &Key3, const TKey &Key4) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2, const TKey &Key3, const TKey &Key4, const TKey &Key5) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2, const TKey &Key3, const TKey &Key4, const TKey &Key5, const TKey &Key6) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2, const TKey &Key3, const TKey &Key4, const TKey &Key5, const TKey &Key6, const TKey &Key7) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2, const TKey &Key3, const TKey &Key4, const TKey &Key5, const TKey &Key6, const TKey &Key7, const TKey &Key8) |
static THashSet< TKey > | GetSet (const TKey &Key1, const TKey &Key2, const TKey &Key3, const TKey &Key4, const TKey &Key5, const TKey &Key6, const TKey &Key7, const TKey &Key8, const TKey &Key9) |
Private Types | |
typedef THashSetKey< TKey > | TSetKey |
Private Member Functions | |
TSetKey & | GetSetKey (const int &KeyId) |
const TSetKey & | GetSetKey (const int &KeyId) const |
uint | GetNextPrime (const uint &Val) const |
void | Resize () |
Private Attributes | |
TIntV | PortV |
TVec< TSetKey > | KeyV |
TBool | AutoSizeP |
TInt | FFreeKeyId |
TInt | FreeKeys |
typedef THashSetKeyI<TKey> THashSet< TKey, THashFunc >::TIter |
|
private |
|
inline |
|
inline |
THashSet< TKey, THashFunc >::THashSet | ( | const int & | ExpectVals, |
const bool & | _AutoSizeP = false |
||
) |
Definition at line 1217 of file shash.h.
References THashSet< TKey, THashFunc >::PortV, and TVec< TVal, TSizeTy >::PutAll().
|
explicit |
Definition at line 1224 of file shash.h.
References THashSet< TKey, THashFunc >::AddKey(), TVec< TVal, TSizeTy >::Len(), THashSet< TKey, THashFunc >::PortV, and TVec< TVal, TSizeTy >::PutAll().
|
inlineexplicit |
int THashSet< TKey, THashFunc >::AddKey | ( | const TKey & | Key | ) |
Definition at line 1254 of file shash.h.
Referenced by TLocClustStat::BagOfWhiskers(), TUndirFFire::BurnGeoFire(), TNetConstraint< PGraph >::CalcConstraints(), TCliqueOverlap::CalculateOverlapMtx(), TSnap::CascFind(), TSnap::CascFindMP(), TTable::CheckAndAddIntNode(), TSnap::CntEdgesToSet(), TSnap::CntUniqDirEdges(), TSnap::CntUniqUndirEdges(), MAPPR::computeProfile(), TAGMUtil::ConnectCmtyVV(), TSnap::ConvertGraph(), TSnap::TSnapDetail::TGetSubGraph< PGraph, false >::Do(), TSnap::TSnapDetail::TConvertSubGraph< POutGraph, PInGraph, IsMultiGraph >::Do(), TSnap::TSnapDetail::TConvertSubGraph< POutGraph, PInGraph, false >::Do(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TAGM::GenAGM(), TSnap::GenConfModel(), TCesna::GenHoldOutAttr(), TSnap::GenPrefAttach(), TSnap::GenRewire(), TSnap::GenSmallWorld(), TSnap::Get1CnCom(), TSnap::Get1CnComSzCnt(), TTimeNENet::Get1stEdgeNet(), TSnap::GetCmnNbrs(), TTable::GetCollidingRows(), TLocClust::GetCutStat(), TSnap::GetEdgeBridges(), TSnap::GetEdgesInOut(), TLocClustStat::TCutInfo::GetFracDegOut(), TCliqueOverlap::GetIntersection(), TAGMUtil::GetIntersection(), TCliqueOverlap::GetMaximalCliques(), TSnap::GetModularity(), TAGMUtil::GetNbhCom(), TCesnaUtil::GetNbhCom(), TAGMFastUtil::GetNbhCom(), TCliqueOverlap::GetNbrs(), TAGMUtil::GetNodeMembership(), TSnap::GetNodeTriads(), TTimeNENet::GetPrefAttach(), TCliqueOverlap::GetRelativeComplement(), THashSet< TInt >::GetSet(), TSnap::GetSubGraph(), TBigNet< TNodeData, IsDir >::GetSubGraph(), TSnap::GetTriadEdges(), TSnap::GetTriads_v0(), TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges(), TSnap::GetWccs(), TSnap::GetWccSzCnt(), TSnap::LoadDyNet(), TSnap::LoadDyNetGraphV(), THashSet< TInt >::LoadXml(), TCluster::MCMC(), TCoda::MLEGradAscent(), TCesna::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TAGMFast::MLENewton(), TLocClustStat::PlotNCPScatter(), TGnuPlot::PlotValMomH(), TAGM::RndConnectInsideCommunity(), TLocClustStat::Run(), TTimeNENet::SaveEdgeTm(), TSnap::SaveMatlabSparseMtx(), TGStatVec::SaveTxt(), TGraphKey::TakeGraph(), TGraphAttributes::TGraphAttributes(), THashSet< TKey, THashFunc >::THashSet(), TTable::ThresholdJoinPerJoinKeyOutputTable(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), and TMMNet::ToNetworkMP().
void THashSet< TKey, THashFunc >::AddKeyV | ( | const TVec< TKey > & | KeyV | ) |
Definition at line 1284 of file shash.h.
References TVec< TVal, TSizeTy >::Len().
Referenced by TCliqueOverlap::GetCPMCommunities(), and TCesna::SetGraph().
|
inline |
Definition at line 1105 of file shash.h.
Referenced by TCliqueOverlap::GetIntersection(), TAGMUtil::GetIntersection(), TCliqueOverlap::GetNodeIdWithMaxDeg(), TCliqueOverlap::GetRelativeComplement(), TAGMFit::GradLogLForLambda(), TCliqueOverlap::Intersection(), TAGMUtil::Intersection(), Loss(), TCliqueOverlap::MaxNbrsInCANDNodeId(), TAGMFast::MLENewton(), TAGMFit::SelectLambdaSum(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), and TMMNet::ToNetworkMP().
void THashSet< TKey, THashFunc >::Clr | ( | const bool & | DoDel = true , |
const int & | NoDelLim = -1 |
||
) |
Definition at line 1243 of file shash.h.
Referenced by TUndirFFire::BurnGeoFire(), TSnap::CntUniqDirEdges(), TSnap::CntUniqUndirEdges(), TCliqueOverlap::Expand(), TBiConVisitor::FinishNode(), TSnap::GenPrefAttach(), TCliqueOverlap::GetCPMCommunities(), TTimeNENet::GetPrefAttach(), TSnap::GetTriadEdges(), TSnap::GetTriads_v0(), TSnap::GetWccs(), and TLocClustStat::Run().
void THashSet< TKey, THashFunc >::Defrag | ( | ) |
Definition at line 1366 of file shash.h.
References IAssert.
Referenced by TSnap::TSnapDetail::TGetSubGraph< PGraph, false >::Do(), and THashSet< TInt >::SaveXml().
|
inline |
void THashSet< TKey, THashFunc >::DelKey | ( | const TKey & | Key | ) |
Definition at line 1289 of file shash.h.
References IAssert, and IAssertR.
Referenced by THashSet< TInt >::DelKeyId(), and TCliqueOverlap::Expand().
|
inline |
Definition at line 1134 of file shash.h.
Referenced by THashSet< TInt >::DelIfKey(), THashSet< TInt >::DelKeyIdV(), and TSnap::GenRewire().
|
inline |
|
inline |
Definition at line 1120 of file shash.h.
Referenced by TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TAGMFast::MLENewton(), and TLocClustStat::Run().
|
inline |
Definition at line 1112 of file shash.h.
Referenced by TCliqueOverlap::GetIntersection(), TAGMUtil::GetIntersection(), TCliqueOverlap::GetNodeIdWithMaxDeg(), TCliqueOverlap::GetRelativeComplement(), TAGMFit::GradLogLForLambda(), TCliqueOverlap::Intersection(), TAGMUtil::Intersection(), Loss(), TCliqueOverlap::MaxNbrsInCANDNodeId(), TAGMFast::MLENewton(), TAGMFit::SelectLambdaSum(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), and TMMNet::ToNetworkMP().
|
inline |
bool THashSet< TKey, THashFunc >::FNextKeyId | ( | int & | KeyId | ) | const |
Definition at line 1341 of file shash.h.
Referenced by THashSet< TInt >::BegI().
|
inline |
Definition at line 1115 of file shash.h.
Referenced by TCliqueOverlap::CalculateOverlapMtx(), TCoda::GetCmtyS(), TAGMUtil::GetIntersection(), TAGMUtil::GetNbhCom(), TCesnaUtil::GetNbhCom(), TAGMFastUtil::GetNbhCom(), TBigNet< TNodeData, IsDir >::GetSubGraph(), TSnap::GetWccs(), TTimeNENet::SaveEdgeTm(), and TCesna::SetGraph().
|
inline |
|
inline |
Definition at line 1141 of file shash.h.
Referenced by THashSet< TInt >::DelKeyId(), TSnap::GetTriads_v0(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), and THashSet< TInt >::MarkDelKeyId().
int THashSet< TKey, THashFunc >::GetKeyId | ( | const TKey & | Key | ) | const |
Definition at line 1328 of file shash.h.
Referenced by TCesna::GetComFromNID(), THashSet< TInt >::GetI(), TBigNet< TNodeData, IsDir >::GetSubGraph(), THashSet< TInt >::IsKey(), TSnap::LoadDyNet(), TSnap::LoadDyNetGraphV(), TTimeNENet::SaveEdgeTm(), TCesna::SetAttrHoldOut(), TCesna::SetCmtyVV(), TCesna::SetGraph(), and TGraphKey::TakeGraph().
void THashSet< TKey, THashFunc >::GetKeyV | ( | TVec< TKey > & | KeyV | ) | const |
Definition at line 1347 of file shash.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Clr().
Referenced by TBiConVisitor::FinishNode(), TAGM::GenAGM(), TCesna::GetCmtyVV(), TCliqueOverlap::GetCPMCommunities(), TSnap::GetEdgeBridges(), TLocClustStat::PlotNCPScatter(), and TGStatVec::SaveTxt().
|
inline |
|
inline |
|
private |
Definition at line 1184 of file shash.h.
References THash< TInt, TInt >::HashPrimes, and THash< TInt, TInt >::HashPrimeT.
Referenced by THashSet< TInt >::Gen().
|
inline |
|
inline |
|
inline |
Definition at line 1144 of file shash.h.
Referenced by TSnap::GenRewire().
|
inlinestatic |
|
inlinestatic |
Definition at line 1164 of file shash.h.
|
inlinestatic |
Definition at line 1166 of file shash.h.
|
inlinestatic |
Definition at line 1168 of file shash.h.
|
inlinestatic |
Definition at line 1170 of file shash.h.
|
inlinestatic |
Definition at line 1172 of file shash.h.
|
inlinestatic |
Definition at line 1174 of file shash.h.
|
inlinestatic |
Definition at line 1176 of file shash.h.
|
inlinestatic |
Definition at line 1178 of file shash.h.
|
inlineprivate |
Definition at line 1057 of file shash.h.
Referenced by THashSet< TInt >::GetKey(), and THashSet< TInt >::operator[]().
|
inlineprivate |
|
inline |
|
inline |
Definition at line 1148 of file shash.h.
Referenced by TLocClustStat::BagOfWhiskers(), TUndirFFire::BurnGeoFire(), TNetConstraint< PGraph >::CalcConstraints(), TSnap::CascFind(), TSnap::CascFindMP(), TTable::CheckAndAddIntNode(), TSnap::CntEdgesToSet(), MAPPR::computeProfile(), TAGMUtil::ConnectCmtyVV(), THashSet< TInt >::DelIfKey(), TLocClustStat::FindBestCut(), TSnap::GenConfModel(), TCesna::GenHoldOutAttr(), TSnap::GenRewire(), TSnap::GenSmallWorld(), TTimeNENet::Get1stEdgeNet(), TCesnaUtil::GetConductance(), TAGMUtil::GetConductance(), TAGMFastUtil::GetConductance(), TLocClust::GetCutStat(), TCliqueOverlap::GetIntersection(), TAGMUtil::GetIntersection(), TSnap::GetNodeTriads(), TCliqueOverlap::GetRelativeComplement(), TSnap::GetTriadEdges(), TCliqueOverlap::Intersection(), TAGMUtil::Intersection(), TTable::Intersection(), Loss(), TCliqueOverlap::MaxNbrsInCANDNodeId(), TTable::Minus(), TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TAGMFast::MLENewton(), THashSet< TKey, THashFunc >::operator==(), TTable::ProjectInPlace(), TAGM::RndConnectInsideCommunity(), TLocClustStat::Run(), TCesna::SetCmtyVV(), TCesna::SetGraph(), TTable::ThresholdJoinPerJoinKeyOutputTable(), and TTable::Union().
|
inline |
|
inline |
|
inline |
Definition at line 1126 of file shash.h.
Referenced by THashSet< TInt >::BegI(), and THashSet< TInt >::GetRndKeyId().
|
inline |
Definition at line 1121 of file shash.h.
Referenced by TLocClustStat::BagOfWhiskers(), THashSet< TInt >::BegI(), TUndirFFire::BurnGeoFire(), TAGMFit::CalcPNoComByCmtyVV(), TSnap::CascFind(), TSnap::CntUniqDirEdges(), TSnap::CntUniqUndirEdges(), TAGMUtil::ConnectCmtyVV(), TSnap::TSnapDetail::TGetSubGraph< PGraph, false >::Do(), THashSet< TInt >::Empty(), TCliqueOverlap::Expand(), TSnap::GenPrefAttach(), TSnap::GenRewire(), TSnap::GenSmallWorld(), TCesnaUtil::GetConductance(), TAGMUtil::GetConductance(), TAGMFastUtil::GetConductance(), TLocClust::GetCutStat(), TAGMFit::GetEdgeJointCom(), TCliqueOverlap::GetIntersection(), TAGMUtil::GetIntersection(), TUndirFFire::GetNBurned(), TTimeNENet::GetPrefAttach(), THashSet< TInt >::GetRndKeyId(), TSnap::GetTriads_v0(), TNodeEdgeNet< TNodeData, TEdgeData >::GetUniqEdges(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TAGMFit::GradLogLForLambda(), TCliqueOverlap::Intersection(), TAGMUtil::Intersection(), TAGMFit::Likelihood(), Loss(), THashSet< TKey, THashFunc >::operator==(), TGnuPlot::PlotValMomH(), TNetInfBs::SavePajek(), TLocClustStat::SaveTxtInfo(), TAGMFit::SeekJoin(), TAGMFit::SeekLeave(), and TAGMFit::SeekSwitch().
|
inline |
Definition at line 1078 of file shash.h.
Referenced by TCesna::Load().
|
inline |
void THashSet< TKey, THashFunc >::MarkDelKey | ( | const TKey & | Key | ) |
Definition at line 1309 of file shash.h.
References IAssert, and IAssertR.
Referenced by THashSet< TInt >::MarkDelKeyId().
|
inline |
|
inline |
bool THashSet< TKey, THashFunc >::operator== | ( | const THashSet< TKey, THashFunc > & | Set | ) | const |
Definition at line 1234 of file shash.h.
References THashSet< TKey, THashFunc >::IsKey(), and THashSet< TKey, THashFunc >::Len().
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 1196 of file shash.h.
References THashSetKey< TKey >::HashCd, THashSetKey< TKey >::Key, and THashSetKey< TKey >::Next.
|
inline |
Definition at line 1082 of file shash.h.
Referenced by TCesna::Save().
|
inline |
void THashSet< TKey, THashFunc >::Swap | ( | THashSet< TKey, THashFunc > & | Set | ) |
Definition at line 1355 of file shash.h.
References THashSet< TKey, THashFunc >::AutoSizeP, THashSet< TKey, THashFunc >::FFreeKeyId, THashSet< TKey, THashFunc >::FreeKeys, THashSet< TKey, THashFunc >::KeyV, THashSet< TKey, THashFunc >::PortV, and Swap().
|
private |
Definition at line 1054 of file shash.h.
Referenced by THashSet< TInt >::IsAutoSize(), THashSet< TInt >::Load(), THashSet< TInt >::LoadXml(), THashSet< TInt >::operator=(), THashSet< TInt >::Save(), THashSet< TInt >::SaveXml(), and THashSet< TKey, THashFunc >::Swap().
|
private |
Definition at line 1055 of file shash.h.
Referenced by THashSet< TInt >::Gen(), THashSet< TInt >::Load(), THashSet< TInt >::operator=(), THashSet< TInt >::Save(), and THashSet< TKey, THashFunc >::Swap().
|
private |
Definition at line 1055 of file shash.h.
Referenced by THashSet< TInt >::Gen(), THashSet< TInt >::IsKeyIdEqKeyN(), THashSet< TInt >::Len(), THashSet< TInt >::Load(), THashSet< TInt >::operator=(), THashSet< TInt >::Save(), and THashSet< TKey, THashFunc >::Swap().
|
private |
Definition at line 1053 of file shash.h.
Referenced by THashSet< TInt >::BegI(), THashSet< TInt >::EndI(), THashSet< TInt >::Gen(), THashSet< TInt >::GetI(), THashSet< TInt >::GetMemUsed(), THashSet< TInt >::GetMxKeyIds(), THashSet< TInt >::GetReservedKeyIds(), THashSet< TInt >::GetSetKey(), THashSet< TInt >::IsKeyId(), THashSet< TInt >::Len(), THashSet< TInt >::Load(), THashSet< TInt >::LoadXml(), THashSet< TInt >::operator=(), THashSet< TInt >::Pack(), THashSet< TInt >::Save(), THashSet< TInt >::SaveXml(), and THashSet< TKey, THashFunc >::Swap().
|
private |
Definition at line 1052 of file shash.h.
Referenced by THashSet< TInt >::Gen(), THashSet< TInt >::GetMemUsed(), THashSet< TInt >::GetPorts(), THashSet< TInt >::Load(), THashSet< TInt >::operator=(), THashSet< TInt >::Save(), THashSet< TKey, THashFunc >::Swap(), and THashSet< TKey, THashFunc >::THashSet().