SNAP Library 2.3, Developer Reference
2014-06-16 11:58:46
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 1211 of file shash.h.
References THashSet< TKey, THashFunc >::PortV, and TVec< TVal, TSizeTy >::PutAll().
|
explicit |
Definition at line 1218 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 1248 of file shash.h.
Referenced by TLocClustStat::BagOfWhiskers(), TUndirFFire::BurnGeoFire(), TNetConstraint< PGraph >::CalcConstraints(), TCliqueOverlap::CalculateOverlapMtx(), TSnap::CntEdgesToSet(), TSnap::CntUniqDirEdges(), TSnap::CntUniqUndirEdges(), 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(), 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(), 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(), and THashSet< TKey, THashFunc >::THashSet().
void THashSet< TKey, THashFunc >::AddKeyV | ( | const TVec< TKey > & | KeyV | ) |
Definition at line 1278 of file shash.h.
References TVec< TVal, TSizeTy >::Len().
Referenced by TCliqueOverlap::GetCPMCommunities(), and TCesna::SetGraph().
|
inline |
Definition at line 1099 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(), and TAGMFit::SelectLambdaSum().
void THashSet< TKey, THashFunc >::Clr | ( | const bool & | DoDel = true , |
const int & | NoDelLim = -1 |
||
) |
Definition at line 1237 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(), TSnap::GetWccs(), and TLocClustStat::Run().
void THashSet< TKey, THashFunc >::Defrag | ( | ) |
Definition at line 1360 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 1283 of file shash.h.
References IAssert, and IAssertR.
Referenced by THashSet< TInt >::DelKeyId(), and TCliqueOverlap::Expand().
|
inline |
Definition at line 1128 of file shash.h.
Referenced by THashSet< TInt >::DelIfKey(), THashSet< TInt >::DelKeyIdV(), and TSnap::GenRewire().
|
inline |
|
inline |
Definition at line 1114 of file shash.h.
Referenced by TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TAGMFast::MLENewton(), and TLocClustStat::Run().
|
inline |
Definition at line 1106 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(), and TAGMFit::SelectLambdaSum().
|
inline |
bool THashSet< TKey, THashFunc >::FNextKeyId | ( | int & | KeyId | ) | const |
Definition at line 1335 of file shash.h.
Referenced by THashSet< TInt >::BegI().
|
inline |
Definition at line 1109 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 1135 of file shash.h.
Referenced by THashSet< TInt >::DelKeyId(), TSnap::GetTriads(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), and THashSet< TInt >::MarkDelKeyId().
int THashSet< TKey, THashFunc >::GetKeyId | ( | const TKey & | Key | ) | const |
Definition at line 1322 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 1341 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 1178 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 1138 of file shash.h.
Referenced by TSnap::GenRewire().
|
inlinestatic |
|
inlinestatic |
Definition at line 1158 of file shash.h.
|
inlinestatic |
Definition at line 1160 of file shash.h.
|
inlinestatic |
Definition at line 1162 of file shash.h.
|
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.
|
inlineprivate |
Definition at line 1051 of file shash.h.
Referenced by THashSet< TInt >::GetKey(), and THashSet< TInt >::operator[]().
|
inlineprivate |
|
inline |
|
inline |
Definition at line 1142 of file shash.h.
Referenced by TLocClustStat::BagOfWhiskers(), TUndirFFire::BurnGeoFire(), TNetConstraint< PGraph >::CalcConstraints(), TSnap::CntEdgesToSet(), 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(), Loss(), TCliqueOverlap::MaxNbrsInCANDNodeId(), TCoda::MLEGradAscent(), TCoda::MLEGradAscentParallel(), TAGMFast::MLENewton(), THashSet< TKey, THashFunc >::operator==(), TAGM::RndConnectInsideCommunity(), TLocClustStat::Run(), TCesna::SetCmtyVV(), and TCesna::SetGraph().
|
inline |
|
inline |
|
inline |
Definition at line 1120 of file shash.h.
Referenced by THashSet< TInt >::BegI(), and THashSet< TInt >::GetRndKeyId().
|
inline |
Definition at line 1115 of file shash.h.
Referenced by TLocClustStat::BagOfWhiskers(), THashSet< TInt >::BegI(), TUndirFFire::BurnGeoFire(), TAGMFit::CalcPNoComByCmtyVV(), 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(), 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 1072 of file shash.h.
Referenced by TCesna::Load().
|
inline |
void THashSet< TKey, THashFunc >::MarkDelKey | ( | const TKey & | Key | ) |
Definition at line 1303 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 1228 of file shash.h.
References THashSet< TKey, THashFunc >::IsKey(), and THashSet< TKey, THashFunc >::Len().
|
inline |
|
inline |
|
inline |
|
private |
Definition at line 1190 of file shash.h.
References THashSetKey< TKey >::HashCd, THashSetKey< TKey >::Key, and THashSetKey< TKey >::Next.
|
inline |
Definition at line 1076 of file shash.h.
Referenced by TCesna::Save().
|
inline |
void THashSet< TKey, THashFunc >::Swap | ( | THashSet< TKey, THashFunc > & | Set | ) |
Definition at line 1349 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 1048 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 1049 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 1049 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 1047 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 1046 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().