SNAP Library 3.0, Developer Reference  2016-07-20 17:56:49
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
THash< TKey, TDat, THashFunc > Class Template Reference

#include <hash.h>

Collaboration diagram for THash< TKey, TDat, THashFunc >:

Classes

class  THashKeyDatCmp
 

Public Types

enum  { HashPrimes =32 }
 
typedef THashKeyDatI< TKey, TDat > TIter
 

Public Member Functions

 THash ()
 
 THash (const THash &Hash)
 
 THash (const int &ExpectVals, const bool &_AutoSizeP=false)
 
 THash (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)
 
THashoperator= (const THash &Hash)
 
bool operator== (const THash &Hash) const
 
bool operator< (const THash &Hash) const
 
const TDat & operator[] (const int &KeyId) const
 The [] operator takes KeyId, use GetDat() if you need value access via the key. More...
 
TDat & operator[] (const int &KeyId)
 
TDat & operator() (const TKey &Key)
 
::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, const bool &ResetDat=true)
 
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)
 
TDat & AddDatId (const TKey &Key)
 
TDat & AddDat (const TKey &Key)
 
TDat & AddDat (const TKey &Key, const TDat &Dat)
 
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
 Get an index of a random element. If the hash table has many deleted keys, this may take a long time. More...
 
int GetRndKeyId (TRnd &Rnd, const double &EmptyFrac)
 Get an index of a random element. If the hash table has many deleted keys, defrag the hash table first (that's why the function is non-const). More...
 
bool IsKey (const TKey &Key) const
 
bool IsKey (const TKey &Key, int &KeyId) const
 
bool IsKeyId (const int &KeyId) const
 
const TDat & GetDat (const TKey &Key) const
 
TDat & GetDat (const TKey &Key)
 
TDat GetDatWithDefault (const TKey &Key, TDat DefaultValue)
 
void GetKeyDat (const int &KeyId, TKey &Key, TDat &Dat) const
 
bool IsKeyGetDat (const TKey &Key, TDat &Dat) const
 
int FFirstKeyId () const
 
bool FNextKeyId (int &KeyId) const
 
void GetKeyV (TVec< TKey > &KeyV) const
 
void GetDatV (TVec< TDat > &DatV) const
 
void GetKeyDatPrV (TVec< TPair< TKey, TDat > > &KeyDatPrV) const
 
void GetDatKeyPrV (TVec< TPair< TDat, TKey > > &DatKeyPrV) const
 
void GetKeyDatKdV (TVec< TKeyDat< TKey, TDat > > &KeyDatKdV) const
 
void GetDatKeyKdV (TVec< TKeyDat< TDat, TKey > > &DatKeyKdV) const
 
void Swap (THash &Hash)
 
void Defrag ()
 
void Pack ()
 
void Sort (const bool &CmpKey, const bool &Asc)
 
void SortByKey (const bool &Asc=true)
 
void SortByDat (const bool &Asc=true)
 

Static Public Attributes

static const unsigned int HashPrimeT [HashPrimes]
 

Private Types

typedef THashKeyDat< TKey, TDat > THKeyDat
 
typedef TPair< TKey, TDat > TKeyDatP
 

Private Member Functions

THKeyDatGetHashKeyDat (const int &KeyId)
 
const THKeyDatGetHashKeyDat (const int &KeyId) const
 
uint GetNextPrime (const uint &Val) const
 
void Resize ()
 

Private Attributes

TIntV PortV
 
TVec< THKeyDatKeyDatV
 
TBool AutoSizeP
 
TInt FFreeKeyId
 
TInt FreeKeys
 

Detailed Description

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
class THash< TKey, TDat, THashFunc >

Definition at line 88 of file hash.h.

Member Typedef Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
typedef THashKeyDat<TKey, TDat> THash< TKey, TDat, THashFunc >::THKeyDat
private

Definition at line 95 of file hash.h.

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
typedef THashKeyDatI<TKey, TDat> THash< TKey, TDat, THashFunc >::TIter

Definition at line 93 of file hash.h.

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
typedef TPair<TKey, TDat> THash< TKey, TDat, THashFunc >::TKeyDatP
private

Definition at line 96 of file hash.h.

Member Enumeration Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
anonymous enum
Enumerator
HashPrimes 

Definition at line 90 of file hash.h.

90 {HashPrimes=32};

Constructor & Destructor Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
THash< TKey, TDat, THashFunc >::THash ( )
inline

Definition at line 126 of file hash.h.

126  :
127  PortV(), KeyDatV(),
128  AutoSizeP(true), FFreeKeyId(-1), FreeKeys(0){}
TInt FreeKeys
Definition: hash.h:100
TBool AutoSizeP
Definition: hash.h:99
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
THash< TKey, TDat, THashFunc >::THash ( const THash< TKey, TDat, THashFunc > &  Hash)
inline

Definition at line 129 of file hash.h.

129  :
130  PortV(Hash.PortV), KeyDatV(Hash.KeyDatV), AutoSizeP(Hash.AutoSizeP),
131  FFreeKeyId(Hash.FFreeKeyId), FreeKeys(Hash.FreeKeys){}
TInt FreeKeys
Definition: hash.h:100
TBool AutoSizeP
Definition: hash.h:99
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey , class TDat , class THashFunc >
THash< TKey, TDat, THashFunc >::THash ( const int &  ExpectVals,
const bool &  _AutoSizeP = false 
)
explicit

Definition at line 301 of file hash.h.

References THash< TKey, TDat, THashFunc >::PortV, and TVec< TVal, TSizeTy >::PutAll().

301  :
302  PortV(GetNextPrime(ExpectVals/2)), KeyDatV(ExpectVals, 0),
303  AutoSizeP(_AutoSizeP), FFreeKeyId(-1), FreeKeys(0){
304  PortV.PutAll(TInt(-1));
305 }
TInt FreeKeys
Definition: hash.h:100
TBool AutoSizeP
Definition: hash.h:99
void PutAll(const TVal &Val)
Sets all elements of the vector to value Val.
Definition: ds.h:1166
Definition: dt.h:1044
TInt FFreeKeyId
Definition: hash.h:100
uint GetNextPrime(const uint &Val) const
Definition: hash.h:265
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the call graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
THash< TKey, TDat, THashFunc >::THash ( TSIn SIn)
inlineexplicit

Definition at line 133 of file hash.h.

133  :
134  PortV(SIn), KeyDatV(SIn),
135  AutoSizeP(SIn), FFreeKeyId(SIn), FreeKeys(SIn){
136  SIn.LoadCs();}
void LoadCs()
Definition: fl.cpp:28
TInt FreeKeys
Definition: hash.h:100
TBool AutoSizeP
Definition: hash.h:99
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Member Function Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TDat& THash< TKey, TDat, THashFunc >::AddDat ( const TKey &  Key)
inline

Definition at line 196 of file hash.h.

Referenced by TCascade::Add(), TUnionFind::Add(), TNIBs::AddCasc(), TTable::AddColType(), TMMNet::AddCrossNet(), TNIBs::AddDomainNm(), TCrossNet::AddEdge(), TNEGraph::AddEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge(), TNEANet::AddEdge(), THttpRq::AddFldVal(), THttpResp::AddFldVal(), TCrossNet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatE(), TNEANet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatN(), TNEANet::AddFltAttrDatN(), TCrossNet::AddFltAttrE(), TNEANetMP::AddFltAttrE(), TNEANet::AddFltAttrE(), TNEANetMP::AddFltAttrN(), TNEANet::AddFltAttrN(), THttpResp::AddHdFld(), TTable::AddIdColumn(), TCrossNet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatE(), TNEANet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatN(), TNEANet::AddIntAttrDatN(), TCrossNet::AddIntAttrE(), TNEANetMP::AddIntAttrE(), TNEANet::AddIntAttrE(), TNEANetMP::AddIntAttrN(), TNEANet::AddIntAttrN(), TModeNet::AddIntVAttrByVecN(), TNEANet::AddIntVAttrDatE(), TNEANet::AddIntVAttrDatN(), TNEANet::AddIntVAttrE(), TNEANet::AddIntVAttrN(), TTable::AddJointRow(), TMMNet::AddMode(), TMMNet::AddModeNet(), TModeNet::AddNbrType(), TTable::AddNJointRowsMP(), TUNGraph::AddNode(), TNGraph::AddNode(), TNEGraph::AddNode(), TNodeEdgeNet< TNodeData, TEdgeData >::AddNode(), TNEANet::AddNode(), TUndirNet::AddNode(), TDirNet::AddNode(), TNetInfBs::AddNodeNm(), TNIBs::AddNodeNm(), TUNGraph::AddNodeUnchecked(), TNGraph::AddNodeUnchecked(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::AddQ(), TILx::AddRw(), TOLx::AddRw(), TAttr::AddSAttr(), TAttrPair::AddSAttr(), TAttr::AddSAttrDat(), TAttrPair::AddSAttrDat(), TCrossNet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatE(), TNEANet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatN(), TNEANet::AddStrAttrDatN(), TCrossNet::AddStrAttrE(), TNEANetMP::AddStrAttrE(), TNEANet::AddStrAttrE(), TNEANetMP::AddStrAttrN(), TNEANet::AddStrAttrN(), TTable::Aggregate(), TNEANet::AppendIntVAttrDatN(), TLocClust::ApproxPageRank(), TGStat::AvgGStat(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TTable::CheckAndAddFltNode(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TSnap::CmtyEvolutionFileBatch(), TSnap::CmtyEvolutionFileBatchV(), TSnap::CommunityGirvanNewman(), TAGMUtil::ConnectCmtyVV(), TSnap::CountTriangles(), CreateEmptyFeatures(), CreateNodeIdMtxIdxHash(), TMom::Def(), TTable::Defrag(), TArtPointVisitor::DiscoverNode(), TBiConVisitor::DiscoverNode(), TSccVisitor< PGraph, OnlyCount >::DiscoverNode(), TLocClust::DrawWhiskers(), TSpecFunc::EntropyBias(), TSnap::EventImportance(), TSnap::EventImportance1(), TSnap::FastCorePeriphery(), TSnap::FastCorePeripheryGC(), TNIBs::FG(), TZipIn::FillFExtToCmdH(), TZipOut::FillFExtToCmdH(), TCesnaUtil::FilterLowEntropy(), FindRoles(), TSccVisitor< PGraph, OnlyCount >::FinishNode(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TSnap::GetBetweennessCentr(), TSnap::GetBfsEffDiam(), TSnap::GetBiConSzCnt(), TSnap::GetClustCf(), TAGMFast::GetCmtyVV(), TCoda::GetCmtyVV(), TAGMFit::GetCmtyVV(), TCesna::GetCmtyVV(), TSnap::GetDegCnt(), TCnCom::GetDfsVisitor(), TSnap::GetEigenVectorCentr(), TSnap::GetGroupDegreeCentr(), TSnap::GetGroupDegreeCentr0(), TSnap::GetHits(), TSnap::GetHitsMP(), TSnap::GetInDegCnt(), GetNIdSorted(), TCoda::GetNIDValH(), TSnap::GetNodeClustCf(), TAGMUtil::GetNodeMembership(), TSnap::GetNodesAtHops(), TGraphEnumUtils::GetNormalizedMap(), TSnap::GetOutDegCnt(), TSnap::GetPageRank(), TSnap::GetPageRank_v1(), TSnap::GetPageRankMP(), TMaxPriorityQueue< TVal >::GetPriorities(), TLxSymStr::GetSSym(), TBigNet< TNodeData, IsDir >::GetSubGraph(), TMMNet::GetSubgraphByCrossNet(), TMMNet::GetSubgraphByModeNet(), TXmlObjSer::GetTagNm(), TCoda::GetTopCIDs(), TSnap::GetTriadParticip(), TGStat::GetValStr(), TSnap::GetWeightedBetweennessCentr(), TSnap::GetWeightedPageRank(), TSnap::GetWeightedPageRankMP(), TSnap::GetWeightedShortestPath(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TTable::GroupAux(), TSnap::TSnapDetail::inComp(), TSnap::Infomap(), TSnap::TSnapDetail::InfomapOnlineIncrement(), TNetInfBs::Init(), TUniChDb::InitScripts(), TUniChDb::InitSpecialCasing(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TMaxPriorityQueue< TVal >::Insert(), TSnap::IntFlowBiDBFS(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TTimeNet::LoadArxiv(), TAGMUtil::LoadEdgeListStr(), TNIBs::LoadGroundTruthNodesTxt(), TNetInfBs::LoadGroundTruthTxt(), TNIBs::LoadGroundTruthTxt(), TKeyDatFl< TKey, TDat, THashFunc >::LoadHash(), TNIBs::LoadInferredNodesTxt(), TNIBs::LoadInferredTxt(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TSnap::LoadNodeList(), TUniCaseFolding::LoadTxt(), TUniChDb::LoadTxt(), TSnap::TSnapDetail::MapEquationNew2Modules(), TSnap::MaxCPGreedyBetter(), TSnap::MaxCPGreedyBetter1(), TSnap::MaxCPGreedyBetter2(), TSnap::MaxCPGreedyBetter3(), TCluster::MCMC(), TCoda::MLEGradAscentParallel(), TDGraphCounter::operator()(), THash< TPair, THash >::operator()(), THttpResp::ParseHttpResp(), THttpRq::ParseHttpRq(), TNcpGraphsBase::PlotAvgNcp(), TLocClustStat::PlotBoltzmanCurve(), TSnap::PlotEigValDistr(), TLocClustStat::PlotPhiDistr(), PlotRoles(), TSnap::PlotShortPathDistr(), TSnap::PlotSngValDistr(), TAGMFit::PrintSummary(), TXmlLx::PutEntityVal(), TXmlLx::PutPEntityVal(), TSnap::ReadEdgeSchemaFromFile(), TSnap::ReadNodeSchemaFromFile(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TTable::Reindex(), TModeNet::RemoveCrossNets(), TTable::RemoveFirstRow(), TTable::RemoveRow(), TTable::RequestIndexFlt(), TTable::RequestIndexInt(), TTable::RequestIndexStrMap(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyVV(), TTable::Save(), TSnap::SavePajek(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TTable::SelfSimJoinPerGroup(), TAGMFast::SetCmtyVV(), TCoda::SetCmtyVV(), TXmlChDef::SetEntityVal(), THtmlLxChDef::SetEscStr(), TPredicate::SetFltVal(), TPredicate::SetIntVal(), TPredicate::SetStrVal(), TGStat::SetVal(), TNIBs::SG(), TD34GraphCounter::TD34GraphCounter(), TTable::ThresholdJoinCountCollisions(), TTable::ThresholdJoinCountPerJoinKeyCollisions(), THttpRq::THttpRq(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), TMMNet::ToNetworkMP(), TArtPointVisitor::TreeEdge(), TBiConVisitor::TreeEdge(), TNIBs::UpdateDiff(), and TTable::UpdateGrouping().

196 {return KeyDatV[AddKey(Key)].Dat;}
int AddKey(const TKey &Key)
Definition: hash.h:331
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TDat& THash< TKey, TDat, THashFunc >::AddDat ( const TKey &  Key,
const TDat &  Dat 
)
inline

Definition at line 197 of file hash.h.

197  {
198  return KeyDatV[AddKey(Key)].Dat=Dat;}
int AddKey(const TKey &Key)
Definition: hash.h:331
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TDat& THash< TKey, TDat, THashFunc >::AddDatId ( const TKey &  Key)
inline

Definition at line 194 of file hash.h.

194  {
195  int KeyId=AddKey(Key); return KeyDatV[KeyId].Dat=KeyId;}
int AddKey(const TKey &Key)
Definition: hash.h:331
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey, class TDat , class THashFunc >
int THash< TKey, TDat, THashFunc >::AddKey ( const TKey &  Key)

Definition at line 331 of file hash.h.

Referenced by TUniTrie< TInt >::Add(), THash< TPair, THash >::AddDat(), THash< TPair, THash >::AddDatId(), TTable::AddNodeAttributes(), TTmProfiler::AddTimer(), TLocClustStat::BagOfWhiskers(), TTable::CheckAndAddFltNode(), TTimeNENet::GetEdgeTmBuckets(), TSnap::GetSngVals(), TSnap::GetSngVec(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TUniChDb::InitDerivedCoreProperties(), TUniChDb::InitLineBreaks(), TAGMFit::InitNodeData(), TUniChDb::InitPropList(), TUniChDb::InitScripts(), THtmlTok::IsBreakTag(), TAGMFit::JoinCom(), TTable::KeepSortedRows(), TUniChDb::LoadTxt(), TSnap::PrintInfo(), TUniChDb::TSubcatHelper::ProcessComment(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), and TUniChDb::TestComposition().

331  {
332  if ((KeyDatV.Len()>2*PortV.Len())||PortV.Empty()){Resize();}
333  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
334  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
335  int PrevKeyId=-1;
336  int KeyId=PortV[PortN];
337  while ((KeyId!=-1) &&
338  !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
339  PrevKeyId=KeyId; KeyId=KeyDatV[KeyId].Next;}
340 
341  if (KeyId==-1){
342  if (FFreeKeyId==-1){
343  KeyId=KeyDatV.Add(THKeyDat(-1, HashCd, Key));
344  } else {
346  //KeyDatV[KeyId]=TKeyDat(-1, HashCd, Key); // slow version
347  KeyDatV[KeyId].Next=-1;
348  KeyDatV[KeyId].HashCd=HashCd;
349  KeyDatV[KeyId].Key=Key;
350  //KeyDatV[KeyId].Dat=TDat(); // already empty
351  }
352  if (PrevKeyId==-1){
353  PortV[PortN]=KeyId;
354  } else {
355  KeyDatV[PrevKeyId].Next=KeyId;
356  }
357  }
358  return KeyId;
359 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TInt FreeKeys
Definition: hash.h:100
bool Empty() const
Tests whether the vector is empty.
Definition: ds.h:542
THashKeyDat< TKey, TDat > THKeyDat
Definition: hash.h:95
void Resize()
Definition: hash.h:277
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TIter THash< TKey, TDat, THashFunc >::BegI ( ) const
inline

Definition at line 171 of file hash.h.

Referenced by TNIBs::AddCasc(), TTable::Aggregate(), AppendFeatures(), TCrossNet::AttrNameEI(), TNEANetMP::AttrNameEI(), TNEANet::AttrNameEI(), TNEANetMP::AttrNameNI(), TNEANet::AttrNameNI(), TCrossNet::AttrValueEI(), TNEANetMP::AttrValueEI(), TNEANet::AttrValueEI(), TNEANetMP::AttrValueNI(), TNEANet::AttrValueNI(), TMMNet::BegCrossNetI(), TCrossNet::BegEdgeI(), TNEGraph::BegEI(), TNodeEdgeNet< TSecTm, TSecTm >::BegEI(), TNEANet::BegEI(), TCascade::BegI(), TGHash< TUInt64 >::BegI(), TBPGraph::BegLNI(), TModeNet::BegMMNI(), TMMNet::BegModeNetI(), TBigNet< TNodeData, IsDir >::BegNI(), TNodeNet< TSecTm >::BegNI(), TUNGraph::BegNI(), TNGraph::BegNI(), TNodeEDatNet< TStr, TFltFltH >::BegNI(), TNEGraph::BegNI(), TBPGraph::BegNI(), TNodeEdgeNet< TSecTm, TSecTm >::BegNI(), TNEANet::BegNI(), TUndirNet::BegNI(), TDirNet::BegNI(), TBPGraph::BegRNI(), MotifCluster::BifanMotifAdjacency(), TTable::BuildGraph(), TSnap::CmtyEvolutionFileBatch(), TSnap::CmtyEvolutionJson(), ConvertFeatureToMatrix(), CreateEmptyFeatures(), CreateNodeIdMtxIdxHash(), TAttr::DelSAttrId(), TAttrPair::DelSAttrId(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TSnap::EventImportance(), TSnap::EventImportance1(), TSnap::FastCorePeriphery(), TSnap::FastCorePeripheryGC(), TCrossNet::FltAttrNameEI(), TNEANetMP::FltAttrNameEI(), TNEANet::FltAttrNameEI(), TNEANetMP::FltAttrNameNI(), TNEANet::FltAttrNameNI(), TCrossNet::FltAttrValueEI(), TNEANetMP::FltAttrValueEI(), TNEANet::FltAttrValueEI(), TNEANetMP::FltAttrValueNI(), TNEANet::FltAttrValueNI(), FPrintRoles(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TNEANet::GetAttrENames(), TNEANet::GetAttrNNames(), TNIBs::GetGroundTruthGraphAtT(), TNIBs::GetGroundTruthNetworkAtT(), TSnap::GetGroupDegreeCentr(), TAttr::GetIdVSAttr(), TAttrPair::GetIdVSAttr(), TNIBs::GetInferredGraphAtT(), TNIBs::GetInferredNetworkAtT(), GetNIdSorted(), GetNodeId(), TAGMUtil::GetNodeMembership(), GetNthFeature(), GetNumFeatures(), TAttr::GetSAttrV(), TAttrPair::GetSAttrV(), TMMNet::GetSubgraphByCrossNet(), TMMNet::GetSubgraphByModeNet(), TNIBs::Init(), Inner(), TCrossNet::IntAttrNameEI(), TNEANetMP::IntAttrNameEI(), TNEANet::IntAttrNameEI(), TNEANetMP::IntAttrNameNI(), TNEANet::IntAttrNameNI(), TCrossNet::IntAttrValueEI(), TNEANetMP::IntAttrValueEI(), TNEANet::IntAttrValueEI(), TNEANetMP::IntAttrValueNI(), TNEANet::IntAttrValueNI(), TNEANet::IntVAttrNameEI(), TNEANet::IntVAttrNameNI(), TNEANet::IntVAttrValueEI(), TNEANet::IntVAttrValueNI(), TCoda::LikelihoodForNode(), TAGMFast::LikelihoodForRow(), TCesna::LikelihoodForRow(), TSnap::MaxCPGreedyBetter(), TSnap::MaxCPGreedyBetter1(), TSnap::MaxCPGreedyBetter2(), TSnap::MaxCPGreedyBetter3(), TAGMFast::MLEGradAscent(), TCoda::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TAGMFast::MLENewton(), TAGMFast::Norm2(), TCoda::Norm2(), TCesna::Norm2(), PlotRoles(), TCesna::PredictAttrK(), PrintFeatures(), TTable::PrintGrouping(), PrintRoles(), TSnap::ReadEdgesFromFile(), TSnap::ReadNodesFromFile(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TModeNet::RemoveCrossNets(), TTable::Save(), TNetInfBs::SaveCascades(), TNIBs::SaveCascades(), TNIBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferred(), TNIBs::SaveInferredPajek(), TNetInfBs::SavePajek(), TNetInfBs::SavePlaneTextNet(), TNIBs::SaveSites(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TTable::SelfSimJoinPerGroup(), MotifCluster::SpectralCut(), TTable::SpliceByGroup(), TCrossNet::StrAttrNameEI(), TNEANetMP::StrAttrNameEI(), TNEANet::StrAttrNameEI(), TNEANetMP::StrAttrNameNI(), TNEANet::StrAttrNameNI(), TCrossNet::StrAttrValueEI(), TNEANetMP::StrAttrValueEI(), TNEANet::StrAttrValueEI(), TNEANetMP::StrAttrValueNI(), TNEANet::StrAttrValueNI(), TAGMFast::Sum(), TCoda::Sum(), TCesna::Sum(), TTable::ThresholdJoinOutputTable(), TTable::ThresholdJoinPerJoinKeyOutputTable(), TMMNet::TMMNet(), TSnap::ToNetwork(), TMMNet::ToNetwork(), TSnap::ToNetworkMP(), TTable::TTable(), TTable::Unique(), and UnweightedGraphRepresentation().

171  {
172  if (Len() == 0){return TIter(KeyDatV.EndI(), KeyDatV.EndI());}
173  if (IsKeyIdEqKeyN()) { return TIter(KeyDatV.BegI(), KeyDatV.EndI());}
174  int FKeyId=-1; FNextKeyId(FKeyId);
175  return TIter(KeyDatV.BegI()+FKeyId, KeyDatV.EndI()); }
TIter EndI() const
Returns an iterator referring to the past-the-end element in the vector.
Definition: ds.h:567
bool IsKeyIdEqKeyN() const
Definition: hash.h:191
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
THashKeyDatI< TKey, TDat > TIter
Definition: hash.h:93
TIter BegI() const
Returns an iterator pointing to the first element in the vector.
Definition: ds.h:565
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
int Len() const
Definition: hash.h:186

Here is the caller graph for this function:

template<class TKey , class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::Clr ( const bool &  DoDel = true,
const int &  NoDelLim = -1,
const bool &  ResetDat = true 
)

Definition at line 319 of file hash.h.

Referenced by TTable::AddIdColumn(), TTable::AddNJointRowsMP(), TLocClust::ApproxPageRank(), TNIBs::BSG(), TAttr::Clr(), TCascade::Clr(), TAttrPair::Clr(), TGHash< TUInt64 >::Clr(), TBigNet< TNodeData, IsDir >::Clr(), TNodeNet< TSecTm >::Clr(), TUNGraph::Clr(), TUniCaseFolding::Clr(), TCrossNet::Clr(), TNGraph::Clr(), TNEANetMP::Clr(), TNodeEDatNet< TStr, TFltFltH >::Clr(), TNEGraph::Clr(), TBPGraph::Clr(), TUniTrie< TInt >::Clr(), TUniChDb::Clr(), TNodeEdgeNet< TSecTm, TSecTm >::Clr(), TNEANet::Clr(), TUndirNet::Clr(), TDirNet::Clr(), TSnap::CmtyEvolutionFileBatch(), TNIBs::FG(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TSnap::GetBetweennessCentr(), TSnap::GetNodeClustCf(), TAGMUtil::GetNodeMembership(), TSnap::GetShortPath(), TSnap::GetWeightedBetweennessCentr(), TSnap::GetWeightedShortestPath(), TNIBs::Init(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TCoda::MLEGradAscentParallel(), TTable::ProjectInPlace(), TTable::Reindex(), TNIBs::Reset(), TNIBs::SG(), and TTable::TTable().

319  {
320  if (DoDel){
321  PortV.Clr(); KeyDatV.Clr();
322  } else {
323  PortV.PutAll(TInt(-1));
324  KeyDatV.Clr(DoDel, NoDelLim);
325  if (ResetDat){KeyDatV.PutAll(THKeyDat());}
326  }
327  FFreeKeyId=TInt(-1); FreeKeys=TInt(0);
328 }
TInt FreeKeys
Definition: hash.h:100
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
Definition: ds.h:971
THashKeyDat< TKey, TDat > THKeyDat
Definition: hash.h:95
void PutAll(const TVal &Val)
Sets all elements of the vector to value Val.
Definition: ds.h:1166
Definition: dt.h:1044
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey , class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::Defrag ( )

Definition at line 513 of file hash.h.

References IAssert.

Referenced by TUNGraph::Defrag(), TGHash< TUInt64 >::Defrag(), TNGraph::Defrag(), TNEGraph::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::Defrag(), TNEANet::Defrag(), TUndirNet::Defrag(), TDirNet::Defrag(), TCoda::MLEGradAscentParallel(), and TBigNet< TNodeData, IsDir >::Rewire().

513  {
514  if (!IsKeyIdEqKeyN()){
516  int KeyId=FFirstKeyId(); TKey Key; TDat Dat;
517  while (FNextKeyId(KeyId)){
518  GetKeyDat(KeyId, Key, Dat);
519  Hash.AddDat(Key, Dat);
520  }
521  Pack();
522  operator=(Hash);
524  }
525 }
#define IAssert(Cond)
Definition: bd.h:262
bool IsKeyIdEqKeyN() const
Definition: hash.h:191
THash & operator=(const THash &Hash)
Definition: hash.h:148
void GetKeyDat(const int &KeyId, TKey &Key, TDat &Dat) const
Definition: hash.h:229
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
Definition: hash.h:88
TIntV PortV
Definition: hash.h:97
void Pack()
Definition: hash.h:247

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::DelIfKey ( const TKey &  Key)
inline

Definition at line 201 of file hash.h.

Referenced by TAttr::DelSAttrId(), TAttrPair::DelSAttrId(), and TCoda::MLEGradAscentParallel().

201  {
202  int KeyId; if (IsKey(Key, KeyId)){DelKeyId(KeyId); return true;} return false;}
void DelKeyId(const int &KeyId)
Definition: hash.h:203
bool IsKey(const TKey &Key) const
Definition: hash.h:216

Here is the caller graph for this function:

template<class TKey, class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::DelKey ( const TKey &  Key)

Definition at line 362 of file hash.h.

References IAssert.

Referenced by TCascade::Del(), TCrossNet::DelAttrE(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), TTable::DelColType(), TMMNet::DelCrossNet(), TCrossNet::DelEdge(), TNEGraph::DelEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::DelEdge(), TNEANet::DelEdge(), THash< TPair, THash >::DelKeyId(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::DelLink(), TMMNet::DelModeNet(), TModeNet::DelNbrType(), TUNGraph::DelNode(), TNGraph::DelNode(), TNEGraph::DelNode(), TBPGraph::DelNode(), TNodeEdgeNet< TNodeData, TEdgeData >::DelNode(), TNEANet::DelNode(), TUndirNet::DelNode(), TDirNet::DelNode(), TAttr::DelSAttrDat(), TAttrPair::DelSAttrDat(), TAGMFit::LeaveCom(), TSnap::MaxCPGreedyBetter(), TSnap::MaxCPGreedyBetter1(), TSnap::MaxCPGreedyBetter2(), TSnap::MaxCPGreedyBetter3(), TMaxPriorityQueue< TVal >::PopMax(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TBigNet< TNodeData, IsDir >::Rewire(), and TUniChDb::TSubcatHelper::~TSubcatHelper().

362  {
363  IAssert(!PortV.Empty());
364  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
365  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
366  int PrevKeyId=-1;
367  int KeyId=PortV[PortN];
368 
369  while ((KeyId!=-1) &&
370  !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
371  PrevKeyId=KeyId; KeyId=KeyDatV[KeyId].Next;}
372 
373  //IAssertR(KeyId!=-1, Key.GetStr()); //J: some classes do not provide GetStr()?
374  IAssert(KeyId!=-1); //J: some classes do not provide GetStr()?
375  if (PrevKeyId==-1){PortV[PortN]=KeyDatV[KeyId].Next;}
376  else {KeyDatV[PrevKeyId].Next=KeyDatV[KeyId].Next;}
377  KeyDatV[KeyId].Next=FFreeKeyId; FFreeKeyId=KeyId; FreeKeys++;
378  KeyDatV[KeyId].HashCd=TInt(-1);
379  KeyDatV[KeyId].Key=TKey();
380  KeyDatV[KeyId].Dat=TDat();
381 }
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TInt FreeKeys
Definition: hash.h:100
bool Empty() const
Tests whether the vector is empty.
Definition: ds.h:542
Definition: dt.h:1044
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::DelKeyId ( const int &  KeyId)
inline

Definition at line 203 of file hash.h.

Referenced by THash< TPair, THash >::DelIfKey(), and THash< TPair, THash >::DelKeyIdV().

203 {DelKey(GetKey(KeyId));}
void DelKey(const TKey &Key)
Definition: hash.h:362
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:210

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::DelKeyIdV ( const TIntV KeyIdV)
inline

Definition at line 204 of file hash.h.

204  {
205  for (int KeyIdN=0; KeyIdN<KeyIdV.Len(); KeyIdN++){DelKeyId(KeyIdV[KeyIdN]);}}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
void DelKeyId(const int &KeyId)
Definition: hash.h:203
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TIter THash< TKey, TDat, THashFunc >::EndI ( ) const
inline

Definition at line 176 of file hash.h.

Referenced by TNIBs::AddCasc(), TTable::Aggregate(), AppendFeatures(), TBPGraph::BegLNI(), TBPGraph::BegRNI(), MotifCluster::BifanMotifAdjacency(), TTable::BuildGraph(), ConvertFeatureToMatrix(), CreateEmptyFeatures(), CreateNodeIdMtxIdxHash(), TAttr::DelSAttrId(), TAttrPair::DelSAttrId(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TMMNet::EndCrossNetI(), TCrossNet::EndEdgeI(), TNEGraph::EndEI(), TNodeEdgeNet< TSecTm, TSecTm >::EndEI(), TNEANet::EndEI(), TCascade::EndI(), TGHash< TUInt64 >::EndI(), TModeNet::EndMMNI(), TMMNet::EndModeNetI(), TBigNet< TNodeData, IsDir >::EndNI(), TNodeNet< TSecTm >::EndNI(), TUNGraph::EndNI(), TNGraph::EndNI(), TNodeEDatNet< TStr, TFltFltH >::EndNI(), TNEGraph::EndNI(), TBPGraph::EndNI(), TNodeEdgeNet< TSecTm, TSecTm >::EndNI(), TNEANet::EndNI(), TUndirNet::EndNI(), TDirNet::EndNI(), TSnap::EventImportance(), TSnap::EventImportance1(), TSnap::FastCorePeripheryGC(), FPrintRoles(), TNetInfBs::GenCascade(), TNEANet::GetAttrENames(), TNEANet::GetAttrNNames(), TNIBs::GetGroundTruthGraphAtT(), TNIBs::GetGroundTruthNetworkAtT(), TSnap::GetGroupDegreeCentr(), TAttr::GetIdVSAttr(), TAttrPair::GetIdVSAttr(), TNIBs::GetInferredGraphAtT(), TNIBs::GetInferredNetworkAtT(), TBPGraph::GetNI(), GetNIdSorted(), GetNodeId(), TAGMUtil::GetNodeMembership(), GetNthFeature(), TAttr::GetSAttrV(), TAttrPair::GetSAttrV(), TMMNet::GetSubgraphByCrossNet(), TMMNet::GetSubgraphByModeNet(), TNIBs::Init(), TCoda::LikelihoodForNode(), TAGMFast::LikelihoodForRow(), TCesna::LikelihoodForRow(), TSnap::MaxCPGreedyBetter(), TSnap::MaxCPGreedyBetter1(), TSnap::MaxCPGreedyBetter2(), TSnap::MaxCPGreedyBetter3(), TAGMFast::MLEGradAscent(), TCoda::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TAGMFast::MLENewton(), TAGMFast::Norm2(), TCoda::Norm2(), TCesna::Norm2(), PlotRoles(), TCesna::PredictAttrK(), PrintFeatures(), TTable::PrintGrouping(), PrintRoles(), TSnap::ReadEdgesFromFile(), TSnap::ReadNodesFromFile(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TModeNet::RemoveCrossNets(), TTable::Save(), TNetInfBs::SaveCascades(), TNIBs::SaveCascades(), TNIBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferred(), TNIBs::SaveInferredPajek(), TNetInfBs::SavePajek(), TNetInfBs::SavePlaneTextNet(), TNIBs::SaveSites(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TTable::SelfSimJoinPerGroup(), MotifCluster::SpectralCut(), TTable::SpliceByGroup(), TAGMFast::Sum(), TCoda::Sum(), TCesna::Sum(), TTable::ThresholdJoinOutputTable(), TTable::ThresholdJoinPerJoinKeyOutputTable(), TMMNet::TMMNet(), TSnap::ToNetwork(), TMMNet::ToNetwork(), TSnap::ToNetworkMP(), TTable::TTable(), TTable::Unique(), and UnweightedGraphRepresentation().

176 {return TIter(KeyDatV.EndI(), KeyDatV.EndI());}
TIter EndI() const
Returns an iterator referring to the past-the-end element in the vector.
Definition: ds.h:567
THashKeyDatI< TKey, TDat > TIter
Definition: hash.h:93
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey , class TDat , class THashFunc >
bool THash< TKey, TDat, THashFunc >::FNextKeyId ( int &  KeyId) const

Definition at line 436 of file hash.h.

Referenced by TGnuPlot::AddPlot(), THash< TPair, THash >::BegI(), TUNGraph::Defrag(), TNGraph::Defrag(), TNEGraph::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::Defrag(), TNEANet::Defrag(), TUndirNet::Defrag(), TDirNet::Defrag(), TUNGraph::Dump(), TNGraph::Dump(), TUndirNet::Dump(), TDirNet::Dump(), TGHash< TUInt64 >::FNextKeyId(), TNGraph::GetEdges(), TDirNet::GetEdges(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TNEANet::GetEIdV(), TUNGraph::GetNIdV(), TNGraph::GetNIdV(), TNEGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TNEANet::GetNIdV(), TUndirNet::GetNIdV(), TDirNet::GetNIdV(), TUniChDb::InitLineBreaks(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TUNGraph::IsOk(), TNGraph::IsOk(), TNEGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TNEANet::IsOk(), TUndirNet::IsOk(), TDirNet::IsOk(), TUniChDb::LoadTxt(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TGnuPlot::PlotValCntH(), TGnuPlot::PlotValMomH(), TGnuPlot::PlotValRank(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TUniChDb::TestComposition(), TUniChDb::TestWbFindNonIgnored(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::UpdateMaxQ(), and TUniChDb::TSubcatHelper::~TSubcatHelper().

436  {
437  do {KeyId++;} while ((KeyId<KeyDatV.Len())&&(KeyDatV[KeyId].HashCd==-1));
438  return KeyId<KeyDatV.Len();
439 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::Gen ( const int &  ExpectVals)
inline

Definition at line 180 of file hash.h.

Referenced by TCesnaUtil::FilterLowEntropy(), TGHash< TUInt64 >::Gen(), TSnap::GetEigenVectorCentr(), TSnap::GetHits(), TSnap::GetHitsMP(), TCoda::GetNIDValH(), TSnap::GetPageRank(), TSnap::GetPageRank_v1(), TSnap::GetPageRankMP(), TSnap::GetWeightedPageRank(), TSnap::GetWeightedPageRankMP(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TAGMFit::InitNodeData(), TAGMUtil::LoadEdgeListStr(), TKeyDatFl< TKey, TDat, THashFunc >::LoadHash(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TNodeNet< TSecTm >::Reserve(), TUNGraph::Reserve(), TNGraph::Reserve(), TNodeEDatNet< TStr, TFltFltH >::Reserve(), TNEGraph::Reserve(), TNodeEdgeNet< TSecTm, TSecTm >::Reserve(), TNEANet::Reserve(), TUndirNet::Reserve(), and TDirNet::Reserve().

180  {
181  PortV.Gen(GetNextPrime(ExpectVals/2)); KeyDatV.Gen(ExpectVals, 0);
182  FFreeKeyId=-1; FreeKeys=0; PortV.PutAll(TInt(-1));}
TInt FreeKeys
Definition: hash.h:100
void PutAll(const TVal &Val)
Sets all elements of the vector to value Val.
Definition: ds.h:1166
Definition: dt.h:1044
TInt FFreeKeyId
Definition: hash.h:100
uint GetNextPrime(const uint &Val) const
Definition: hash.h:265
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
const TDat& THash< TKey, TDat, THashFunc >::GetDat ( const TKey &  Key) const
inline

Definition at line 220 of file hash.h.

Referenced by TSnap::TSnapDetail::_GirvanNewmanGetModularity(), TMMNet::AddCrossNet(), TCrossNet::AddEdge(), TNEANetMP::AddEdge(), TNEANet::AddEdge(), AddEgonetFeatures(), TCrossNet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatE(), TNEANet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatN(), TNEANet::AddFltAttrDatN(), TCrossNet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatE(), TNEANet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatN(), TNEANet::AddIntAttrDatN(), TNEANet::AddIntVAttrDatE(), TNEANet::AddIntVAttrDatN(), AddLocalFeatures(), TNEANetMP::AddNode(), TNEANet::AddNode(), TTable::AddNodeAttributes(), TAttr::AddSAttrDat(), TAttrPair::AddSAttrDat(), TCrossNet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatE(), TNEANet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatN(), TNEANet::AddStrAttrDatN(), TTable::Aggregate(), AppendFeatures(), TNEANet::AppendIntVAttrDatE(), TNEANet::AppendIntVAttrDatN(), TLocClust::ApproxPageRank(), AssignBinValue(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TCrossNet::BegEAFltI(), TNEANetMP::BegEAFltI(), TNEANet::BegEAFltI(), TCrossNet::BegEAIntI(), TNEANetMP::BegEAIntI(), TNEANet::BegEAIntI(), TNEANet::BegEAIntVI(), TCrossNet::BegEAStrI(), TNEANetMP::BegEAStrI(), TNEANet::BegEAStrI(), TNEANetMP::BegNAFltI(), TNEANet::BegNAFltI(), TNEANetMP::BegNAIntI(), TNEANet::BegNAIntI(), TNEANet::BegNAIntVI(), TNEANetMP::BegNAStrI(), TNEANet::BegNAStrI(), TSnap::BorgattiEverettMeasure(), TNIBs::BSG(), TTable::BuildGraph(), TTable::CheckAndAddFltNode(), TSnap::TSnapDetail::chekIfCrossing(), TModeNet::ClrNbr(), TSnap::CmtyEvolutionFileBatch(), TSnap::CmtyEvolutionFileBatchV(), TAGMUtil::ConnectCmtyVV(), TSnap::CountTriangles(), TCrossNet::DelAttrDatE(), TNEANetMP::DelAttrDatE(), TNEANet::DelAttrDatE(), TNEANetMP::DelAttrDatN(), TNEANet::DelAttrDatN(), TCrossNet::DelAttrE(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), TMMNet::DelCrossNet(), TCrossNet::DelEdge(), TNEANet::DelFromIntVAttrDatN(), TMMNet::DelModeNet(), TModeNet::DelNbrType(), TBPGraph::DelNode(), TAttr::DelSAttrDat(), TAttrPair::DelSAttrDat(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TCodaAnalyzer::Draw2ModeCommunity(), TCodaAnalyzer::Dump2ModeCommunities(), TAGMUtil::DumpCmtyVV(), TCesnaUtil::DumpNIDAttrHToMetis(), TNEANet::EdgeAttrIsIntVDeleted(), TCrossNet::EndEAFltI(), TNEANetMP::EndEAFltI(), TNEANet::EndEAFltI(), TCrossNet::EndEAIntI(), TNEANetMP::EndEAIntI(), TNEANet::EndEAIntI(), TNEANet::EndEAIntVI(), TCrossNet::EndEAStrI(), TNEANetMP::EndEAStrI(), TNEANet::EndEAStrI(), TNEANetMP::EndNAFltI(), TNEANet::EndNAFltI(), TNEANetMP::EndNAIntI(), TNEANet::EndNAIntI(), TNEANet::EndNAIntVI(), TNEANetMP::EndNAStrI(), TNEANet::EndNAStrI(), TSpecFunc::EntropyBias(), TPredicate::EvalAtomicPredicate(), TSnap::EventImportance(), TSnap::EventImportance1(), TNIBs::FG(), TCesnaUtil::FilterLowEntropy(), TSnap::FindAugV(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TSccVisitor< PGraph, OnlyCount >::FinishNode(), TArtPointVisitor::FwdEdge(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), GenerateRecursiveFeatures(), TNEANet::GetAttrIndE(), TNEANet::GetAttrIndN(), TCrossNet::GetAttrTypeE(), TModeNet::GetAttrTypeN(), TSnap::GetBetweennessCentr(), TSnap::GetBfsTree(), TNIBs::GetCasc(), TNIBs::GetCascadeId(), TZipIn::GetCmd(), TZipOut::GetCmd(), TAGMFast::GetCmtyVV(), TCesna::GetCmtyVV(), TD34GraphCounter::GetCnt(), TTable::GetColIdx(), TTable::GetColType(), TTable::GetColTypeMap(), TMMNet::GetCrossId(), TMMNet::GetCrossName(), TMMNet::GetCrossNetByName(), TGHash< TUInt64 >::GetDat(), TCnCom::GetDfsVisitor(), TNIBs::GetDomainId(), TCrossNet::GetEAFltI(), TNEANetMP::GetEAFltI(), TNEANet::GetEAFltI(), TCrossNet::GetEAIntI(), TNEANetMP::GetEAIntI(), TNEANet::GetEAIntI(), TNEANet::GetEAIntVI(), TCrossNet::GetEAStrI(), TNEANetMP::GetEAStrI(), TNEANet::GetEAStrI(), TNodeEdgeNet< TSecTm, TSecTm >::GetEDat(), TNEGraph::GetEdge(), TNodeEdgeNet< TSecTm, TSecTm >::GetEdge(), TNEANet::GetEdge(), TCrossNet::GetEdgeAttrValue(), TNEANetMP::GetEdgeAttrValue(), TNEANet::GetEdgeAttrValue(), TTimeNENet::GetEdgeTmBuckets(), TSnap::GetEigenVectorCentr(), THttpRq::GetFldVal(), THttpResp::GetFldVal(), THttpResp::GetFldValV(), TCrossNet::GetFltAttrDatE(), TNEANetMP::GetFltAttrDatE(), TNEANet::GetFltAttrDatE(), TNEANetMP::GetFltAttrDatN(), TNEANet::GetFltAttrDatN(), TCrossNet::GetFltAttrDefaultE(), TNEANet::GetFltAttrDefaultE(), TNEANet::GetFltAttrDefaultN(), TNEANetMP::GetFltAttrVecE(), TNEANet::GetFltAttrVecE(), TTable::GetFltNodePropertyTable(), TTable::GetFltRowIdxByVal(), TUrlEnv::GetFullUrlStr(), TSnap::GetGroupDegreeCentr0(), TSnap::GetGroupFarnessCentr(), TSnap::GetHits(), TSnap::GetHitsMP(), TAttr::GetIdVSAttr(), TAttrPair::GetIdVSAttr(), TCrossNet::GetIntAttrDatE(), TNEANetMP::GetIntAttrDatE(), TNEANet::GetIntAttrDatE(), TNEANetMP::GetIntAttrDatN(), TNEANet::GetIntAttrDatN(), TCrossNet::GetIntAttrDefaultE(), TNEANet::GetIntAttrDefaultE(), TNEANet::GetIntAttrDefaultN(), TNEANetMP::GetIntAttrIndE(), TNEANet::GetIntAttrIndE(), TNEANetMP::GetIntAttrIndN(), TNEANet::GetIntAttrIndN(), TTable::GetIntRowIdxByVal(), TNEANet::GetIntVAttrDatE(), TNEANet::GetIntVAttrDatN(), TSccVisitor< PGraph, OnlyCount >::GetMinDiscTm(), TMMNet::GetModeId(), TMMNet::GetModeName(), TMMNet::GetModeNetByName(), GetMtxIdx(), TNEANetMP::GetNAFltI(), TNEANet::GetNAFltI(), TNEANetMP::GetNAIntI(), TNEANet::GetNAIntI(), TNEANet::GetNAIntVI(), TNEANetMP::GetNAStrI(), TNEANet::GetNAStrI(), TBigNet< TNodeData, IsDir >::GetNDat(), TNodeNet< TSecTm >::GetNDat(), TNodeEDatNet< TStr, TFltFltH >::GetNDat(), TNodeEdgeNet< TSecTm, TSecTm >::GetNDat(), TModeNet::GetNeighborsByCrossNet(), TGraphAnf< PGraph >::GetNIdOffset(), TBigNet< TNodeData, IsDir >::GetNode(), TNodeNet< TSecTm >::GetNode(), TUNGraph::GetNode(), TNGraph::GetNode(), TNodeEDatNet< TStr, TFltFltH >::GetNode(), TNEGraph::GetNode(), TNodeEdgeNet< TSecTm, TSecTm >::GetNode(), TNEANet::GetNode(), TUndirNet::GetNode(), TDirNet::GetNode(), TNEANetMP::GetNodeAttrValue(), TNEANet::GetNodeAttrValue(), TNetInfBs::GetNodeInfo(), TNIBs::GetNodeInfo(), TNetInfBs::GetNodeNm(), TNIBs::GetNodeNm(), TGraphEnumUtils::GetNormalizedGraph(), TSnap::GetPageRank_v1(), TCascade::GetParent(), TMaxPriorityQueue< TVal >::GetPriority(), TCascade::GetProb(), TILx::GetRw(), TAttr::GetSAttrDat(), TAttrPair::GetSAttrDat(), TAttr::GetSAttrId(), TAttrPair::GetSAttrId(), TAttr::GetSAttrName(), TAttrPair::GetSAttrName(), TAGMFast::GetStepSizeByLineSearch(), TCoda::GetStepSizeByLineSearch(), TCesna::GetStepSizeByLineSearch(), TCrossNet::GetStrAttrDatE(), TNEANetMP::GetStrAttrDatE(), TNEANet::GetStrAttrDatE(), TNEANetMP::GetStrAttrDatN(), TNEANet::GetStrAttrDatN(), TCrossNet::GetStrAttrDefaultE(), TNEANet::GetStrAttrDefaultE(), TNEANet::GetStrAttrDefaultN(), TTable::GetStrRowIdxByMap(), TMMNet::GetSubgraphByCrossNet(), TMMNet::GetSubgraphByModeNet(), TCascade::GetTm(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TGStat::GetVal(), TGStat::GetValStr(), TSnap::GetWeightedBetweennessCentr(), TSnap::GetWeightedPageRank(), TSnap::GetWeightedPageRankMP(), TSnap::GetWeightedShortestPath(), TAGMUtil::GVizComGraph(), TSnap::TSnapDetail::inComp(), TSnap::Infomap(), TSnap::InfomapOnline(), TSnap::TSnapDetail::InfomapOnlineIncrement(), TNetInfBs::Init(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TNEANetMP::IsFltAttrE(), TNEANet::IsFltAttrE(), TNEANetMP::IsIntAttrE(), TNEANet::IsIntAttrE(), TNEANetMP::IsStrAttrE(), TNEANet::IsStrAttrE(), TTable::Join(), TTimeNet::LoadArxiv(), TNIBs::LoadInferredNodesTxt(), TNIBs::LoadInferredTxt(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TUniChDb::LoadTxt(), TSnap::TSnapDetail::MapEquationNew2Modules(), TCluster::MCMC(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TCesna::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TNEANet::NodeAttrIsIntVDeleted(), TD34GraphCounter::operator()(), TDGraphCounter::operator()(), TGHash< TUInt64 >::operator()(), TGStat::operator<(), THash< TKey, TDat, THashFunc >::operator==(), TUnionFind::Parent(), TSnap::PearsonCorrelation(), TUnionFind::Rank(), TSnap::ReebRefine(), TSnap::ReebSimplify(), TModeNet::RemoveCrossNets(), TTable::RequestIndexFlt(), TTable::RequestIndexInt(), TTable::RequestIndexStrMap(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::SaveBipartiteGephi(), TNetInfBs::SaveEdgeInfo(), TAGMUtil::SaveGephi(), TNetInfBs::SaveGroundTruth(), TSnap::SaveGViz(), TSnap::SavePajek(), TNIBs::SaveSites(), TTable::SelfSimJoinPerGroup(), TNodeEdgeNet< TNodeData, TEdgeData >::SetNDat(), TMaxPriorityQueue< TVal >::SetPriority(), TNIBs::SG(), TTable::SpliceByGroup(), TMaxPriorityQueue< TVal >::Swap(), TTable::ThresholdJoinCountCollisions(), TTable::ThresholdJoinCountPerJoinKeyCollisions(), TMMNet::TMMNet(), TSnap::ToNetwork(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), TMMNet::ToNetworkMP(), TSnap::ToNetworkMP(), TNIBs::UpdateDiff(), TTable::UpdateFltFromTable(), TTable::UpdateGrouping(), and TCascade::UpdateProb().

220 {return KeyDatV[GetKeyId(Key)].Dat;}
int GetKeyId(const TKey &Key) const
Definition: hash.h:424
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TDat& THash< TKey, TDat, THashFunc >::GetDat ( const TKey &  Key)
inline

Definition at line 221 of file hash.h.

221 {return KeyDatV[GetKeyId(Key)].Dat;}
int GetKeyId(const TKey &Key) const
Definition: hash.h:424
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey, class TDat, class THashFunc >
void THash< TKey, TDat, THashFunc >::GetDatKeyKdV ( TVec< TKeyDat< TDat, TKey > > &  DatKeyKdV) const

Definition at line 491 of file hash.h.

491  {
492  DatKeyKdV.Gen(Len(), 0);
493  TKey Key; TDat Dat;
494  int KeyId=FFirstKeyId();
495  while (FNextKeyId(KeyId)){
496  GetKeyDat(KeyId, Key, Dat);
497  DatKeyKdV.Add(TKeyDat<TDat, TKey>(Dat, Key));
498  }
499 }
Definition: ds.h:345
void GetKeyDat(const int &KeyId, TKey &Key, TDat &Dat) const
Definition: hash.h:229
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574
int Len() const
Definition: hash.h:186
template<class TKey, class TDat, class THashFunc >
void THash< TKey, TDat, THashFunc >::GetDatKeyPrV ( TVec< TPair< TDat, TKey > > &  DatKeyPrV) const

Definition at line 469 of file hash.h.

Referenced by TGHash< TUInt64 >::GetDatKeyPrV().

469  {
470  DatKeyPrV.Gen(Len(), 0);
471  TKey Key; TDat Dat;
472  int KeyId=FFirstKeyId();
473  while (FNextKeyId(KeyId)){
474  GetKeyDat(KeyId, Key, Dat);
475  DatKeyPrV.Add(TPair<TDat, TKey>(Dat, Key));
476  }
477 }
void GetKeyDat(const int &KeyId, TKey &Key, TDat &Dat) const
Definition: hash.h:229
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
Definition: ds.h:32
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574
int Len() const
Definition: hash.h:186

Here is the caller graph for this function:

template<class TKey , class TDat, class THashFunc >
void THash< TKey, TDat, THashFunc >::GetDatV ( TVec< TDat > &  DatV) const

Definition at line 450 of file hash.h.

References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().

Referenced by TAGMUtil::ConnectCmtyVV(), TGHash< TUInt64 >::GetDatV(), TAGMUtil::RewireCmtyVV(), and TTable::TTable().

450  {
451  DatV.Gen(Len(), 0);
452  int KeyId=FFirstKeyId();
453  while (FNextKeyId(KeyId)){
454  DatV.Add(GetHashKeyDat(KeyId).Dat);}
455 }
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
THKeyDat & GetHashKeyDat(const int &KeyId)
Definition: hash.h:117
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574
int Len() const
Definition: hash.h:186

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TDat THash< TKey, TDat, THashFunc >::GetDatWithDefault ( const TKey &  Key,
TDat  DefaultValue 
)
inline

Definition at line 222 of file hash.h.

Referenced by TSnap::GetPersonalizedPageRankBidirectional().

222  {
223  int KeyId = GetKeyId(Key);
224  return KeyId >= 0 ? KeyDatV[KeyId].Dat : DefaultValue;
225  }
int GetKeyId(const TKey &Key) const
Definition: hash.h:424
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
THKeyDat& THash< TKey, TDat, THashFunc >::GetHashKeyDat ( const int &  KeyId)
inlineprivate

Definition at line 117 of file hash.h.

Referenced by THash< TPair, THash >::GetKey(), THash< TPair, THash >::GetKeyDat(), THash< TPair, THash >::IsKeyGetDat(), and THash< TPair, THash >::operator[]().

117  {
118  THKeyDat& KeyDat=KeyDatV[KeyId];
119  Assert(KeyDat.HashCd!=-1); return KeyDat;}
THashKeyDat< TKey, TDat > THKeyDat
Definition: hash.h:95
#define Assert(Cond)
Definition: bd.h:251
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
const THKeyDat& THash< TKey, TDat, THashFunc >::GetHashKeyDat ( const int &  KeyId) const
inlineprivate

Definition at line 120 of file hash.h.

120  {
121  const THKeyDat& KeyDat=KeyDatV[KeyId];
122  Assert(KeyDat.HashCd!=-1); return KeyDat;}
THashKeyDat< TKey, TDat > THKeyDat
Definition: hash.h:95
#define Assert(Cond)
Definition: bd.h:251
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
const TKey& THash< TKey, TDat, THashFunc >::GetKey ( const int &  KeyId) const
inline

Definition at line 210 of file hash.h.

Referenced by TGnuPlot::AddPlot(), TTable::Aggregate(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TSnap::CmtyEvolutionFileBatch(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TMom::Def(), THash< TPair, THash >::DelKeyId(), TUnionFind::Dump(), TCoda::DumpMemberships(), TCesnaUtil::DumpNIDAttrHToNIDK(), TNIBs::FG(), TCesnaUtil::FilterLowEntropy(), TLocClust::FindBestCut(), TNIBs::GenCascade(), TSnap::GetBfsEffDiam(), TSnap::GetBfsTree(), TSnap::GetClustCf(), TAGMFast::GetCmtyVV(), TCoda::GetCmtyVV(), TCesna::GetCmtyVV(), TLocClustStat::GetCurveStat(), TSnap::GetDegCnt(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TNEANet::GetEIdV(), TSnap::GetEigenVectorCentr(), TD34GraphCounter::GetId(), TSnap::GetInDegCnt(), TGHash< TUInt64 >::GetKey(), TUnionFind::GetKeyI(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::GetMxQNId(), TUNGraph::GetNIdV(), TNGraph::GetNIdV(), TNEGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TNEANet::GetNIdV(), TUndirNet::GetNIdV(), TDirNet::GetNIdV(), TCascade::GetNode(), TAGMUtil::GetNodeMembership(), TNetConstraint< PGraph >::GetNodePr(), TSnap::GetNodesAtHop(), TSnap::GetOutDegCnt(), TNEGraph::GetRndEId(), TNodeEdgeNet< TSecTm, TSecTm >::GetRndEId(), TNEANet::GetRndEId(), TBigNet< TNodeData, IsDir >::GetRndNId(), TNodeNet< TSecTm >::GetRndNId(), TUNGraph::GetRndNId(), TNGraph::GetRndNId(), TNodeEDatNet< TStr, TFltFltH >::GetRndNId(), TNEGraph::GetRndNId(), TNodeEdgeNet< TSecTm, TSecTm >::GetRndNId(), TNEANet::GetRndNId(), TUndirNet::GetRndNId(), TDirNet::GetRndNId(), TUniChDb::GetScriptName(), TAGMFast::GetStepSizeByLineSearch(), TCoda::GetStepSizeByLineSearch(), TCesna::GetStepSizeByLineSearch(), THttpRq::GetStr(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TNIBs::LabelBurstAutomaton(), TTimeNet::LoadArxiv(), TNIBs::LoadGroundTruthTxt(), TNIBs::LoadInferredTxt(), TUniChDb::LoadTxt(), THash< TPair, THash >::MarkDelKeyId(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TCesna::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TSnap::PlotShortPathDistr(), TGnuPlot::PlotValCntH(), TGnuPlot::PlotValMomH(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyNID(), TAGMFit::SampleTransition(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TCesna::SetGraph(), TNIBs::SG(), TLocClust::SupportSweep(), TUniChDb::TestComposition(), TUniChDb::TestWbFindNonIgnored(), and TUniChDb::TSubcatHelper::~TSubcatHelper().

210 { return GetHashKeyDat(KeyId).Key;}
THKeyDat & GetHashKeyDat(const int &KeyId)
Definition: hash.h:117
TKey Key
Definition: hash.h:11

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::GetKeyDat ( const int &  KeyId,
TKey &  Key,
TDat &  Dat 
) const
inline

Definition at line 229 of file hash.h.

Referenced by TGHash< TUInt64 >::GetKeyDat().

229  {
230  const THKeyDat& KeyDat=GetHashKeyDat(KeyId);
231  Key=KeyDat.Key; Dat=KeyDat.Dat;}
THashKeyDat< TKey, TDat > THKeyDat
Definition: hash.h:95
THKeyDat & GetHashKeyDat(const int &KeyId)
Definition: hash.h:117

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc >
void THash< TKey, TDat, THashFunc >::GetKeyDatKdV ( TVec< TKeyDat< TKey, TDat > > &  KeyDatKdV) const

Definition at line 480 of file hash.h.

480  {
481  KeyDatKdV.Gen(Len(), 0);
482  TKey Key; TDat Dat;
483  int KeyId=FFirstKeyId();
484  while (FNextKeyId(KeyId)){
485  GetKeyDat(KeyId, Key, Dat);
486  KeyDatKdV.Add(TKeyDat<TKey, TDat>(Key, Dat));
487  }
488 }
Definition: ds.h:345
void GetKeyDat(const int &KeyId, TKey &Key, TDat &Dat) const
Definition: hash.h:229
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574
int Len() const
Definition: hash.h:186
template<class TKey, class TDat, class THashFunc >
void THash< TKey, TDat, THashFunc >::GetKeyDatPrV ( TVec< TPair< TKey, TDat > > &  KeyDatPrV) const

Definition at line 458 of file hash.h.

Referenced by TGStat::AvgGStat(), TSnap::GetBiConSzCnt(), TTimeNENet::GetEdgeTmBuckets(), TGHash< TUInt64 >::GetKeyDatPrV(), TSnap::GetNodesAtHops(), TSnap::GetSccSzCnt(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TSnap::GetTriadParticip(), TGnuPlot::PlotCntOverTm(), TSnap::PlotEigValDistr(), and TSnap::PlotSngValDistr().

458  {
459  KeyDatPrV.Gen(Len(), 0);
460  TKey Key; TDat Dat;
461  int KeyId=FFirstKeyId();
462  while (FNextKeyId(KeyId)){
463  GetKeyDat(KeyId, Key, Dat);
464  KeyDatPrV.Add(TPair<TKey, TDat>(Key, Dat));
465  }
466 }
void GetKeyDat(const int &KeyId, TKey &Key, TDat &Dat) const
Definition: hash.h:229
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
Definition: ds.h:32
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574
int Len() const
Definition: hash.h:186

Here is the caller graph for this function:

template<class TKey, class TDat , class THashFunc >
int THash< TKey, TDat, THashFunc >::GetKeyId ( const TKey &  Key) const

Definition at line 424 of file hash.h.

Referenced by TUniChDb::AddDecomposition(), TCrossNet::AddEdge(), TNEANet::AddEdge(), TCrossNet::AddFltAttrDatE(), TNEANet::AddFltAttrDatE(), TNEANet::AddFltAttrDatN(), TCrossNet::AddIntAttrDatE(), TNEANet::AddIntAttrDatE(), TNEANet::AddIntAttrDatN(), TNEANet::AddIntVAttrDatE(), TNEANet::AddIntVAttrDatN(), TNEANet::AddNode(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::AddQ(), TCrossNet::AddStrAttrDatE(), TNEANet::AddStrAttrDatE(), TNEANet::AddStrAttrDatN(), TNEANet::AppendIntVAttrDatE(), TNEANet::AppendIntVAttrDatN(), TUniChDb::Compose(), TCrossNet::DelAttrDatE(), TNEANet::DelAttrDatE(), TNEANet::DelAttrDatN(), TCrossNet::DelEdge(), TNEANet::DelEdge(), TNEANet::DelFromIntVAttrDatN(), TNEANet::DelNode(), TCrossNet::EdgeAttrIsFltDeleted(), TNEANet::EdgeAttrIsFltDeleted(), TCrossNet::EdgeAttrIsIntDeleted(), TNEANet::EdgeAttrIsIntDeleted(), TNEANet::EdgeAttrIsIntVDeleted(), TCrossNet::EdgeAttrIsStrDeleted(), TNEANet::EdgeAttrIsStrDeleted(), TNEANet::FltAttrValueNI(), TUniCaseFolding::Fold(), TUniCaseFolding::FoldInPlace(), TUniChDb::GetCaseConverted(), TUniChDb::GetCat(), TUniChDb::GetCharName(), TUniChDb::GetCombiningClass(), THash< TPair, THash >::GetDat(), THash< TPair, THash >::GetDatWithDefault(), TCrossNet::GetEAFltI(), TNEANet::GetEAFltI(), TCrossNet::GetEAIntI(), TNEANet::GetEAIntI(), TNEANet::GetEAIntVI(), TCrossNet::GetEAStrI(), TNEANet::GetEAStrI(), TCrossNet::GetEdgeAttrValue(), TNEANet::GetEdgeAttrValue(), THtmlLxChDef::GetEscStr(), TCrossNet::GetFltAttrDatE(), TNEANet::GetFltAttrDatE(), TNEANet::GetFltAttrDatN(), TNEANet::GetFltAttrIndDatE(), TNEANet::GetFltAttrIndDatN(), TNEANet::GetFltKeyIdE(), THash< TPair, THash >::GetI(), TCrossNet::GetIntAttrDatE(), TNEANet::GetIntAttrDatE(), TNEANet::GetIntAttrDatN(), TNEANet::GetIntAttrIndDatE(), TNEANet::GetIntAttrIndDatN(), TNEANet::GetIntVAttrDatE(), TNEANet::GetIntVAttrDatN(), TGHash< TUInt64 >::GetKeyId(), TNEANet::GetNAFltI(), TNEANet::GetNAIntI(), TNEANet::GetNAIntVI(), TNEANet::GetNAStrI(), TNEANet::GetNodeAttrValue(), TUniChDb::GetSbFlags(), TUniChDb::GetScript(), TUniChDb::GetScriptByName(), TUniChDb::GetSimpleCaseConverted(), TSnap::GetSngVals(), TSnap::GetSngVec(), TLxSymStr::GetSSym(), TCrossNet::GetStrAttrDatE(), TNEANet::GetStrAttrDatE(), TNEANet::GetStrAttrDatN(), TNEANet::GetStrAttrIndDatE(), TNEANet::GetStrAttrIndDatN(), TUniChDb::GetSubCat(), TILx::GetSym(), TUniChDb::GetWbFlags(), TUniChDb::InitDerivedCoreProperties(), TUniChDb::InitLineBreaks(), TUniChDb::InitPropList(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TNEANet::IntAttrValueNI(), TNEANet::IntVAttrValueNI(), TUniChDb::IsGetChInfo(), THash< TPair, THash >::IsKey(), TUniChDb::IsPrivateUse(), TUniChDb::IsSbFlag(), TUniChDb::IsSurrogate(), TUniChDb::IsWbFlag(), TUniChDb::IsWbIgnored(), TUniChDb::LoadTxt(), TNEANet::NodeAttrIsFltDeleted(), TNEANet::NodeAttrIsIntDeleted(), TNEANet::NodeAttrIsIntVDeleted(), TNEANet::NodeAttrIsStrDeleted(), TUniChDb::TSubcatHelper::SetCat(), TNEANet::StrAttrValueNI(), TLocClust::SupportSweep(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), TUniChDb::TSubcatHelper::TestCat(), and TUniChDb::ToSimpleCaseConverted().

424  {
425  if (PortV.Empty()){return -1;}
426  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
427  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
428  int KeyId=PortV[PortN];
429  while ((KeyId!=-1) &&
430  !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
431  KeyId=KeyDatV[KeyId].Next;}
432  return KeyId;
433 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
bool Empty() const
Tests whether the vector is empty.
Definition: ds.h:542
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::GetKeyV ( TVec< TKey > &  KeyV) const

Definition at line 442 of file hash.h.

References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().

Referenced by TCrossNet::AddEdge(), TNEANet::AddEdge(), TNEANet::AddNode(), TModeNet::Clr(), TCoda::GetCmtyVV(), TModeNet::GetCrossNetNames(), TGHash< TUInt64 >::GetKeyV(), TCoda::GetTopCIDs(), TBreathFS< PGraph >::GetVisitedNIdV(), TBigNet< TNodeData, IsDir >::Rewire(), TMMNet::ToNetworkMP(), and TTable::TTable().

442  {
443  KeyV.Gen(Len(), 0);
444  int KeyId=FFirstKeyId();
445  while (FNextKeyId(KeyId)){
446  KeyV.Add(GetKey(KeyId));}
447 }
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
Definition: ds.h:574
int Len() const
Definition: hash.h:186
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:210

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
::TSize THash< TKey, TDat, THashFunc >::GetMemUsed ( ) const
inline

Definition at line 159 of file hash.h.

Referenced by TAttr::GetMemUsed(), and TTable::GetMemUsedKB().

159  {
160  // return PortV.GetMemUsed()+KeyDatV.GetMemUsed()+sizeof(bool)+2*sizeof(int);}
161  int64 MemUsed = sizeof(bool)+2*sizeof(int);
162  MemUsed += int64(PortV.Reserved()) * int64(sizeof(TInt));
163  for (int KeyDatN = 0; KeyDatN < KeyDatV.Len(); KeyDatN++) {
164  MemUsed += int64(2 * sizeof(TInt));
165  MemUsed += int64(KeyDatV[KeyDatN].Key.GetMemUsed());
166  MemUsed += int64(KeyDatV[KeyDatN].Dat.GetMemUsed());
167  }
168  return ::TSize(MemUsed);
169  }
TSizeTy Reserved() const
Returns the size of allocated storage capacity.
Definition: ds.h:549
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TSizeTy GetMemUsed() const
Returns the memory footprint (the number of bytes) of the vector.
Definition: ds.h:483
size_t TSize
Definition: bd.h:58
Definition: dt.h:1044
long long int64
Definition: bd.h:27
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
int THash< TKey, TDat, THashFunc >::GetMxKeyIds ( ) const
inline

Definition at line 189 of file hash.h.

Referenced by TAttr::AddSAttr(), TAttrPair::AddSAttr(), TGHash< TUInt64 >::GetMxKeyIds(), and TBigNet< TNodeData, IsDir >::Rewire().

189 {return KeyDatV.Len();}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey , class TDat , class THashFunc >
uint THash< TKey, TDat, THashFunc >::GetNextPrime ( const uint Val) const
private

Definition at line 265 of file hash.h.

Referenced by THash< TPair, THash >::Gen().

265  {
266  const uint* f=(const uint*)HashPrimeT, *m, *l=(const uint*)HashPrimeT + (int)HashPrimes;
267  int h, len = (int)HashPrimes;
268  while (len > 0) {
269  h = len >> 1; m = f + h;
270  if (*m < Val) { f = m; f++; len = len - h - 1; }
271  else len = h;
272  }
273  return f == l ? *(l - 1) : *f;
274 }
unsigned int uint
Definition: bd.h:11
static const unsigned int HashPrimeT[HashPrimes]
Definition: hash.h:91

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
int THash< TKey, TDat, THashFunc >::GetPorts ( ) const
inline

Definition at line 187 of file hash.h.

Referenced by TGHash< TUInt64 >::GetPorts().

187 {return PortV.Len();}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TIntV PortV
Definition: hash.h:97

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
int THash< TKey, TDat, THashFunc >::GetReservedKeyIds ( ) const
inline

Definition at line 190 of file hash.h.

190 {return KeyDatV.Reserved();}
TSizeTy Reserved() const
Returns the size of allocated storage capacity.
Definition: ds.h:549
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey , class TDat , class THashFunc >
int THash< TKey, TDat, THashFunc >::GetRndKeyId ( TRnd Rnd) const

Get an index of a random element. If the hash table has many deleted keys, this may take a long time.

Definition at line 402 of file hash.h.

References TRnd::GetUniDevInt(), and IAssert.

Referenced by TNEGraph::GetRndEId(), TNodeEdgeNet< TSecTm, TSecTm >::GetRndEId(), TNEANet::GetRndEId(), TBigNet< TNodeData, IsDir >::GetRndNId(), TNodeNet< TSecTm >::GetRndNId(), TUNGraph::GetRndNId(), TNGraph::GetRndNId(), TNodeEDatNet< TStr, TFltFltH >::GetRndNId(), TNEGraph::GetRndNId(), TNodeEdgeNet< TSecTm, TSecTm >::GetRndNId(), TNEANet::GetRndNId(), TUndirNet::GetRndNId(), TDirNet::GetRndNId(), TBigNet< TNodeData, IsDir >::Rewire(), and TAGMFit::SampleTransition().

402  {
403  IAssert(! Empty());
404  int KeyId = abs(Rnd.GetUniDevInt(KeyDatV.Len()));
405  while (KeyDatV[KeyId].HashCd == -1) { // if the index is empty, just try again
406  KeyId = abs(Rnd.GetUniDevInt(KeyDatV.Len())); }
407  return KeyId;
408 }
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
bool Empty() const
Definition: hash.h:185
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
int GetUniDevInt(const int &Range=0)
Definition: dt.cpp:39

Here is the call graph for this function:

Here is the caller graph for this function:

template<class TKey , class TDat , class THashFunc >
int THash< TKey, TDat, THashFunc >::GetRndKeyId ( TRnd Rnd,
const double &  EmptyFrac 
)

Get an index of a random element. If the hash table has many deleted keys, defrag the hash table first (that's why the function is non-const).

Definition at line 413 of file hash.h.

References TRnd::GetUniDevInt(), and IAssert.

413  {
414  IAssert(! Empty());
415  if (FreeKeys/double(Len()+FreeKeys) > EmptyFrac) { Defrag(); }
416  int KeyId = Rnd.GetUniDevInt(KeyDatV.Len());
417  while (KeyDatV[KeyId].HashCd == -1) { // if the index is empty, just try again
418  KeyId = Rnd.GetUniDevInt(KeyDatV.Len());
419  }
420  return KeyId;
421 }
#define IAssert(Cond)
Definition: bd.h:262
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
bool Empty() const
Definition: hash.h:185
void Defrag()
Definition: hash.h:513
TInt FreeKeys
Definition: hash.h:100
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
int GetUniDevInt(const int &Range=0)
Definition: dt.cpp:39
int Len() const
Definition: hash.h:186

Here is the call graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::IsAutoSize ( ) const
inline

Definition at line 188 of file hash.h.

Referenced by TGHash< TUInt64 >::IsAutoSize().

188 {return AutoSizeP;}
TBool AutoSizeP
Definition: hash.h:99

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::IsKey ( const TKey &  Key) const
inline

Definition at line 216 of file hash.h.

Referenced by TMMNet::AddCrossNet(), TCrossNet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatE(), TNEANet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatN(), TNEANet::AddFltAttrDatN(), TCrossNet::AddFltAttrE(), TNEANet::AddFltAttrE(), TNEANet::AddFltAttrN(), TCrossNet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatE(), TNEANet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatN(), TNEANet::AddIntAttrDatN(), TCrossNet::AddIntAttrE(), TNEANet::AddIntAttrE(), TNEANet::AddIntAttrN(), TNEANet::AddIntVAttrDatE(), TNEANet::AddIntVAttrDatN(), TMMNet::AddModeNet(), TModeNet::AddNbrType(), TModeNet::AddNeighbor(), TTable::AddNodeAttributes(), TILx::AddRw(), TOLx::AddRw(), TAttr::AddSAttr(), TAttr::AddSAttrDat(), TAttrPair::AddSAttrDat(), TCrossNet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatE(), TNEANet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatN(), TNEANet::AddStrAttrDatN(), TCrossNet::AddStrAttrE(), TNEANet::AddStrAttrE(), TNEANet::AddStrAttrN(), TNEANet::AppendIntVAttrDatE(), TNEANet::AppendIntVAttrDatN(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNIBs::BSG(), TTable::BuildGraph(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TTable::CheckAndAddFltNode(), TSnap::CmtyEvolutionFileBatch(), TCrossNet::DelAttrE(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), TMMNet::DelCrossNet(), TNEANet::DelFromIntVAttrDatN(), THash< TPair, THash >::DelIfKey(), TMMNet::DelModeNet(), TModeNet::DelNeighbor(), TAttr::DelSAttrDat(), TAttrPair::DelSAttrDat(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TCodaAnalyzer::Draw2ModeCommunity(), TCodaAnalyzer::Dump2ModeCommunities(), TAGMUtil::DumpCmtyVV(), TCesnaUtil::DumpNIDAttrHToMetis(), TSpecFunc::EntropyBias(), TSnap::FastCorePeripheryGC(), TCesnaUtil::FilterLowEntropy(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TCrossNet::GetAttrTypeE(), TModeNet::GetAttrTypeN(), TZipIn::GetCmd(), TZipOut::GetCmd(), TTable::GetColIdx(), TTable::GetCollidingRows(), TMMNet::GetCrossId(), TMMNet::GetCrossName(), TCnCom::GetDfsVisitor(), TTimeNENet::GetEdgeTmBuckets(), THttpRq::GetFldVal(), THttpResp::GetFldVal(), THttpResp::GetFldValV(), TCrossNet::GetFltAttrDefaultE(), TNEANet::GetFltAttrDefaultE(), TNEANet::GetFltAttrDefaultN(), TTable::GetFltRowIdxByVal(), TNIBs::GetGroundTruthGraphAtT(), TNIBs::GetGroundTruthNetworkAtT(), TSnap::GetGroupDegreeCentr(), TSnap::GetGroupDegreeCentr0(), TAttr::GetIdVSAttr(), TAttrPair::GetIdVSAttr(), TNIBs::GetInferredGraphAtT(), TNIBs::GetInferredNetworkAtT(), TCrossNet::GetIntAttrDefaultE(), TNEANet::GetIntAttrDefaultE(), TNEANet::GetIntAttrDefaultN(), TTable::GetIntRowIdxByVal(), TMMNet::GetModeId(), TMMNet::GetModeName(), TMaxPriorityQueue< TVal >::GetPriority(), TAttr::GetSAttrDat(), TAttrPair::GetSAttrDat(), TAttr::GetSAttrId(), TAttrPair::GetSAttrId(), TAttr::GetSAttrName(), TAttrPair::GetSAttrName(), TAttr::GetSAttrV(), TAttrPair::GetSAttrV(), TCrossNet::GetStrAttrDefaultE(), TNEANet::GetStrAttrDefaultE(), TNEANet::GetStrAttrDefaultN(), TTable::GetStrRowIdxByMap(), TMMNet::GetSubgraphByCrossNet(), TMMNet::GetSubgraphByModeNet(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TGStat::GetVal(), TGStat::GetValStr(), TSnap::GetWeightedShortestPath(), TUniTrie< TInt >::Has1Gram(), TGStat::HasVal(), TSnap::TSnapDetail::inComp(), TNetInfBs::Init(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TSnap::Intersect(), TSnap::IntFlowBiDBFS(), THtmlTok::IsBreakTag(), TNIBs::IsCascade(), TTable::IsColName(), TNIBs::IsDomainNm(), TCrossNet::IsEdge(), TNEGraph::IsEdge(), TNodeEdgeNet< TSecTm, TSecTm >::IsEdge(), TNEANet::IsEdge(), THttpRq::IsFldNm(), THttpResp::IsFldNm(), TNEANetMP::IsFltAttrE(), TNEANet::IsFltAttrE(), TNEANetMP::IsIntAttrE(), TNEANet::IsIntAttrE(), TGHash< TUInt64 >::IsKey(), TUnionFind::IsKey(), THash< TPair, THash >::IsKeyGetDat(), TBPGraph::IsLNode(), TCascade::IsNode(), TBigNet< TNodeData, IsDir >::IsNode(), TNodeNet< TSecTm >::IsNode(), TUNGraph::IsNode(), TNGraph::IsNode(), TNodeEDatNet< TStr, TFltFltH >::IsNode(), TNEGraph::IsNode(), TNodeEdgeNet< TSecTm, TSecTm >::IsNode(), TNEANet::IsNode(), TUndirNet::IsNode(), TDirNet::IsNode(), TNetInfBs::IsNodeNm(), TNIBs::IsNodeNm(), TBPGraph::IsRNode(), TNEANetMP::IsStrAttrE(), TNEANet::IsStrAttrE(), TZipIn::IsZipExt(), TZipOut::IsZipExt(), TTable::Join(), TTimeNet::LoadArxiv(), TNIBs::LoadInferredNodesTxt(), TNIBs::LoadInferredTxt(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TUniCaseFolding::LoadTxt(), TUniChDb::LoadTxt(), TSnap::TSnapDetail::MapEquationNew2Modules(), MapIdsToFirstN(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TCoda::MLEGradAscentParallel(), TD34GraphCounter::operator()(), TDGraphCounter::operator()(), TGStat::operator<(), THash< TKey, TDat, THashFunc >::operator==(), TSnap::ReebRefine(), TModeNet::RemoveCrossNets(), TTable::RequestIndexFlt(), TTable::RequestIndexInt(), TTable::RequestIndexStrMap(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyNID(), TAGMFit::SampleTransition(), TAGMUtil::SaveBipartiteGephi(), TNIBs::SaveCascades(), TAGMUtil::SaveGephi(), TNetInfBs::SaveGroundTruth(), TNIBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TSnap::SaveGViz(), TNIBs::SaveInferred(), TNIBs::SaveInferredEdges(), TNIBs::SaveInferredPajek(), TSnap::SavePajek(), TNIBs::SaveSites(), TTable::SelfSimJoinPerGroup(), TMaxPriorityQueue< TVal >::SetPriority(), TNIBs::SG(), TUniChDb::TestComposition(), TTable::ThresholdJoinCountCollisions(), TTable::ThresholdJoinCountPerJoinKeyCollisions(), TSnap::ToNetwork(), TMMNet::ToNetwork(), TMMNet::ToNetwork2(), TMMNet::ToNetworkMP(), TSnap::ToNetworkMP(), TNIBs::UpdateDiff(), TTable::UpdateFltFromTable(), TTable::UpdateGrouping(), and TUniChDb::TSubcatHelper::~TSubcatHelper().

216 {return GetKeyId(Key)!=-1;}
int GetKeyId(const TKey &Key) const
Definition: hash.h:424

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::IsKey ( const TKey &  Key,
int &  KeyId 
) const
inline

Definition at line 217 of file hash.h.

217 { KeyId=GetKeyId(Key); return KeyId!=-1;}
int GetKeyId(const TKey &Key) const
Definition: hash.h:424
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::IsKeyGetDat ( const TKey &  Key,
TDat &  Dat 
) const
inline

Definition at line 232 of file hash.h.

Referenced by TSnap::GetBfsEffDiam(), TXmlLx::IsEntityNm(), TGHash< TUInt64 >::IsKeyGetDat(), TBigNet< TNodeData, IsDir >::IsNode(), and TXmlLx::IsPEntityNm().

232  {int KeyId;
233  if (IsKey(Key, KeyId)){Dat=GetHashKeyDat(KeyId).Dat; return true;}
234  else {return false;}}
TDat Dat
Definition: hash.h:12
THKeyDat & GetHashKeyDat(const int &KeyId)
Definition: hash.h:117
bool IsKey(const TKey &Key) const
Definition: hash.h:216

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::IsKeyId ( const int &  KeyId) const
inline

Definition at line 218 of file hash.h.

Referenced by TGHash< TUInt64 >::IsKeyId().

218  {
219  return (0<=KeyId)&&(KeyId<KeyDatV.Len())&&(KeyDatV[KeyId].HashCd!=-1);}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::IsKeyIdEqKeyN ( ) const
inline
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
int THash< TKey, TDat, THashFunc >::Len ( ) const
inline

Definition at line 186 of file hash.h.

Referenced by TNIBs::AddCasc(), TNIBs::AddDomainNm(), TGnuPlot::AddPlot(), TILx::AddRw(), TOLx::AddRw(), TTable::Aggregate(), TLocClust::ApproxPageRank(), AssignBinValue(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), THash< TPair, THash >::BegI(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TTable::CheckAndAddFltNode(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TSnap::CmtyEvolutionFileBatch(), TSnap::CmtyEvolutionFileBatchV(), TSnap::CmtyEvolutionJson(), ConvertFeatureToMatrix(), TMom::Def(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TUnionFind::Dump(), TCoda::DumpMemberships(), TCesnaUtil::DumpNIDAttrHToNIDK(), THash< TPair, THash >::Empty(), TSnap::TSnapDetail::Equation(), TSnap::FastCorePeriphery(), TSnap::FastCorePeripheryGC(), TNIBs::FG(), TCesnaUtil::FilterLowEntropy(), TLocClust::FindBestCut(), TNIBs::GenCascade(), TCesnaUtil::GetAttrs(), TSnap::GetBfsEffDiam(), TSnap::GetBfsTree(), TNIBs::GetCascs(), TSnap::GetClustCf(), TMMNet::GetCrossNets(), TLocClustStat::GetCurveStat(), TSnap::GetDegCnt(), TCrossNet::GetEdges(), TNEGraph::GetEdges(), TNodeEdgeNet< TSecTm, TSecTm >::GetEdges(), TNEANet::GetEdges(), TSnap::GetEigenVectorCentr(), TSnap::GetGroupDegreeCentr(), TSnap::GetGroupDegreeCentr0(), TSnap::GetGroupFarnessCentr(), TSnap::GetHits(), TSnap::GetHitsMP(), TSnap::GetInDegCnt(), TBPGraph::GetLNodes(), TCascade::GetMaxTm(), TMMNet::GetModeNets(), TSnap::GetNodeEcc(), TAGMUtil::GetNodeMembership(), TBigNet< TNodeData, IsDir >::GetNodes(), TNodeNet< TSecTm >::GetNodes(), TUNGraph::GetNodes(), TNGraph::GetNodes(), TNodeEDatNet< TStr, TFltFltH >::GetNodes(), TNEGraph::GetNodes(), TNodeEdgeNet< TSecTm, TSecTm >::GetNodes(), TNEANet::GetNodes(), TUndirNet::GetNodes(), TDirNet::GetNodes(), TSnap::GetNodesAtHop(), TSnap::GetNodesAtHops(), TBreathFS< PGraph >::GetNVisited(), TSnap::GetOutDegCnt(), TSnap::GetPageRank_v1(), TBPGraph::GetRNodes(), TSnap::GetShortPath(), TLxSymStr::GetSSym(), TAGMFast::GetStepSizeByLineSearch(), TCoda::GetStepSizeByLineSearch(), TCesna::GetStepSizeByLineSearch(), THttpRq::GetStr(), TSnap::GetSubTreeSz(), TCoda::GetTopCIDs(), TGStat::GetVals(), TSnap::GetWeightedPageRank(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TSnap::Infomap(), TSnap::InfomapOnline(), TUniChDb::InitScripts(), THtmlTok::IsBreakTag(), TNIBs::LabelBurstAutomaton(), TD34GraphCounter::Len(), TCascade::Len(), TGHash< TUInt64 >::Len(), TUnionFind::Len(), TNetConstraint< PGraph >::Len(), TCascade::LenAfterT(), TCascade::LenBeforeT(), TTimeNet::LoadArxiv(), TAGMUtil::LoadEdgeListStr(), TNIBs::LoadGroundTruthTxt(), TNIBs::LoadInferredTxt(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TUniCaseFolding::LoadTxt(), TUniChDb::LoadTxt(), TCesna::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), THash< TKey, TDat, THashFunc >::operator==(), TSnap::PlotShortPathDistr(), TGnuPlot::PlotValCntH(), TGnuPlot::PlotValRank(), TSnap::PrintInfo(), TAGMFit::PrintSummary(), TSnap::ReebRefine(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyNID(), TAGMFit::SampleTransition(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferredPajek(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TTable::SelfSimJoinPerGroup(), TCesna::SetGraph(), TNIBs::SG(), and TLocClust::SupportSweep().

186 {return KeyDatV.Len()-FreeKeys;}
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TInt FreeKeys
Definition: hash.h:100
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::Load ( TSIn SIn)
inline

Definition at line 137 of file hash.h.

Referenced by TAGMFit::Load(), TUniCaseFolding::Load(), TUniChDb::Load(), and TBigNet< TNodeData, IsDir >::LoadNodeDatH().

137  {
138  PortV.Load(SIn); KeyDatV.Load(SIn);
139  AutoSizeP=TBool(SIn); FFreeKeyId=TInt(SIn); FreeKeys=TInt(SIn);
140  SIn.LoadCs();}
void Load(TSIn &SIn)
Definition: ds.h:895
void LoadCs()
Definition: fl.cpp:28
TInt FreeKeys
Definition: hash.h:100
TBool AutoSizeP
Definition: hash.h:99
Definition: dt.h:1044
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
Definition: dt.h:881

Here is the caller graph for this function:

template<class TKey , class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::LoadXml ( const PXmlTok XmlTok,
const TStr Nm = "" 
)

Definition at line 127 of file xmlser.h.

References TVec< TVal, TSizeTy >::Len(), XLoad, and XLoadHd.

127  {
129  for (int KeyDatN=0; KeyDatN<KeyDatV.Len(); KeyDatN++){
130  AddDat(KeyDatV[KeyDatN].Key, KeyDatV[KeyDatN].Dat);}}
#define XLoadHd(Nm)
Definition: bd.h:312
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
#define XLoad(Nm)
Definition: bd.h:315
TBool AutoSizeP
Definition: hash.h:99
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
TDat & AddDat(const TKey &Key)
Definition: hash.h:196
Vector is a sequence TVal objects representing an array that can change in size.
Definition: ds.h:429

Here is the call graph for this function:

template<class TKey, class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::MarkDelKey ( const TKey &  Key)

Definition at line 384 of file hash.h.

References IAssert, and IAssertR.

Referenced by THash< TPair, THash >::MarkDelKeyId().

384  {
385  // MarkDelKey is same as Delkey except last two lines
386  IAssert(!PortV.Empty());
387  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
388  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
389  int PrevKeyId=-1;
390  int KeyId=PortV[PortN];
391  while ((KeyId!=-1) &&
392  !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
393  PrevKeyId=KeyId; KeyId=KeyDatV[KeyId].Next;}
394  IAssertR(KeyId!=-1, Key.GetStr());
395  if (PrevKeyId==-1){PortV[PortN]=KeyDatV[KeyId].Next;}
396  else {KeyDatV[PrevKeyId].Next=KeyDatV[KeyId].Next;}
397  KeyDatV[KeyId].Next=FFreeKeyId; FFreeKeyId=KeyId; FreeKeys++;
398  KeyDatV[KeyId].HashCd=TInt(-1);
399 }
#define IAssert(Cond)
Definition: bd.h:262
#define IAssertR(Cond, Reason)
Definition: bd.h:265
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TInt FreeKeys
Definition: hash.h:100
bool Empty() const
Tests whether the vector is empty.
Definition: ds.h:542
Definition: dt.h:1044
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::MarkDelKeyId ( const int &  KeyId)
inline

Definition at line 208 of file hash.h.

208 {MarkDelKey(GetKey(KeyId));}
void MarkDelKey(const TKey &Key)
Definition: hash.h:384
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:210
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TDat& THash< TKey, TDat, THashFunc >::operator() ( const TKey &  Key)
inline

Definition at line 158 of file hash.h.

158 {return AddDat(Key);}
TDat & AddDat(const TKey &Key)
Definition: hash.h:196
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
bool THash< TKey, TDat, THashFunc >::operator< ( const THash< TKey, TDat, THashFunc > &  Hash) const
inline

Definition at line 154 of file hash.h.

154 { Fail; return true; }
#define Fail
Definition: bd.h:238
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
THash& THash< TKey, TDat, THashFunc >::operator= ( const THash< TKey, TDat, THashFunc > &  Hash)
inline

Definition at line 148 of file hash.h.

148  {
149  if (this!=&Hash){
150  PortV=Hash.PortV; KeyDatV=Hash.KeyDatV; AutoSizeP=Hash.AutoSizeP;
152  return *this;}
TInt FreeKeys
Definition: hash.h:100
TBool AutoSizeP
Definition: hash.h:99
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey , class TDat , class THashFunc >
bool THash< TKey, TDat, THashFunc >::operator== ( const THash< TKey, TDat, THashFunc > &  Hash) const

Definition at line 308 of file hash.h.

References THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), and THash< TKey, TDat, THashFunc >::Len().

308  {
309  if (Len() != Hash.Len()) { return false; }
310  for (int i = FFirstKeyId(); FNextKeyId(i); ) {
311  const TKey& Key = GetKey(i);
312  if (! Hash.IsKey(Key)) { return false; }
313  if (GetDat(Key) != Hash.GetDat(Key)) { return false; }
314  }
315  return true;
316 }
const TDat & GetDat(const TKey &Key) const
Definition: hash.h:220
bool FNextKeyId(int &KeyId) const
Definition: hash.h:436
int FFirstKeyId() const
Definition: hash.h:236
bool IsKey(const TKey &Key) const
Definition: hash.h:216
int Len() const
Definition: hash.h:186
const TKey & GetKey(const int &KeyId) const
Definition: hash.h:210

Here is the call graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
const TDat& THash< TKey, TDat, THashFunc >::operator[] ( const int &  KeyId) const
inline

The [] operator takes KeyId, use GetDat() if you need value access via the key.

Definition at line 156 of file hash.h.

156 {return GetHashKeyDat(KeyId).Dat;}
TDat Dat
Definition: hash.h:12
THKeyDat & GetHashKeyDat(const int &KeyId)
Definition: hash.h:117
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TDat& THash< TKey, TDat, THashFunc >::operator[] ( const int &  KeyId)
inline

Definition at line 157 of file hash.h.

157 {return GetHashKeyDat(KeyId).Dat;}
TDat Dat
Definition: hash.h:12
THKeyDat & GetHashKeyDat(const int &KeyId)
Definition: hash.h:117
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::Pack ( )
inline

Definition at line 247 of file hash.h.

Referenced by TUNGraph::Defrag(), TUndirNet::Defrag(), and TGHash< TUInt64 >::Pack().

247 {KeyDatV.Pack();}
void Pack()
Reduces vector capacity (frees memory) to match its size.
Definition: ds.h:1005
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the caller graph for this function:

template<class TKey , class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::Resize ( )
private

Definition at line 277 of file hash.h.

References THashKeyDat< TKey, TDat >::HashCd, THashKeyDat< TKey, TDat >::Key, and THashKeyDat< TKey, TDat >::Next.

277  {
278  // resize & initialize port vector
279  //if (PortV.Len()==0){PortV.Gen(17);}
280  //else {PortV.Gen(2*PortV.Len()+1);}
281  if (PortV.Len()==0){
282  PortV.Gen(17);
283  } else if (AutoSizeP&&(KeyDatV.Len()>2*PortV.Len())){
285  } else {
286  return;
287  }
288  PortV.PutAll(TInt(-1));
289  // rehash keys
290  for (int KeyId=0; KeyId<KeyDatV.Len(); KeyId++){
291  THKeyDat& KeyDat=KeyDatV[KeyId];
292  if (KeyDat.HashCd!=-1){
293  const int PortN = abs(THashFunc::GetPrimHashCd(KeyDat.Key) % PortV.Len());
294  KeyDat.Next=PortV[PortN];
295  PortV[PortN]=KeyId;
296  }
297  }
298 }
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TBool AutoSizeP
Definition: hash.h:99
THashKeyDat< TKey, TDat > THKeyDat
Definition: hash.h:95
void PutAll(const TVal &Val)
Sets all elements of the vector to value Val.
Definition: ds.h:1166
Definition: dt.h:1044
uint GetNextPrime(const uint &Val) const
Definition: hash.h:265
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
void Gen(const TSizeTy &_Vals)
Constructs a vector (an array) of _Vals elements.
Definition: ds.h:495
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::Save ( TSOut SOut) const
inline
template<class TKey , class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::SaveXml ( TSOut SOut,
const TStr Nm 
)

Definition at line 133 of file xmlser.h.

References XSave, and XSaveHd.

133  {
#define XSaveHd(Nm)
Definition: bd.h:318
#define XSave(Nm)
Definition: bd.h:333
void Defrag()
Definition: hash.h:513
TBool AutoSizeP
Definition: hash.h:99
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
template<class TKey , class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::Sort ( const bool &  CmpKey,
const bool &  Asc 
)

Definition at line 528 of file hash.h.

References IAssertR, and THashKeyDat< TKey, TDat >::Next.

Referenced by THash< TPair, THash >::SortByDat(), and THash< TPair, THash >::SortByKey().

528  {
529  IAssertR(IsKeyIdEqKeyN(), "THash::Sort only works when table has no deleted keys.");
530  TIntV TargV(Len()), MapV(Len()), StateV(Len());
531  for (int i = 0; i < TargV.Len(); i++) {
532  TargV[i] = i; MapV[i] = i; StateV[i] = i;
533  }
534  // sort KeyIds
535  THashKeyDatCmp HashCmp(*this, CmpKey, Asc);
536  TargV.SortCmp(HashCmp);
537  // now sort the update vector
539  for (int i = 0; i < TargV.Len()-1; i++) {
540  const int SrcPos = MapV[TargV[i]];
541  const int Loc = i;
542  // swap data
543  Tmp = KeyDatV[SrcPos];
544  KeyDatV[SrcPos] = KeyDatV[Loc];
545  KeyDatV[Loc] = Tmp;
546  // swap keys
547  MapV[StateV[i]] = SrcPos;
548  StateV.Swap(Loc, SrcPos);
549  }
550  for (int i = 0; i < TargV.Len(); i++) {
551  MapV[TargV[i]] = i; }
552  for (int p = 0; p < PortV.Len(); p++) {
553  if (PortV[p] != -1) {
554  PortV[p] = MapV[PortV[p]]; } }
555  for (int i = 0; i < KeyDatV.Len(); i++) {
556  if (KeyDatV[i].Next != -1) {
557  KeyDatV[i].Next = MapV[KeyDatV[i].Next]; }
558  }
559 }
bool IsKeyIdEqKeyN() const
Definition: hash.h:191
#define IAssertR(Cond, Reason)
Definition: bd.h:265
TSizeTy Len() const
Returns the number of elements in the vector.
Definition: ds.h:547
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98
int Len() const
Definition: hash.h:186

Here is the caller graph for this function:

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
void THash< TKey, TDat, THashFunc >::SortByKey ( const bool &  Asc = true)
inline
template<class TKey , class TDat , class THashFunc >
void THash< TKey, TDat, THashFunc >::Swap ( THash< TKey, TDat, THashFunc > &  Hash)

Definition at line 502 of file hash.h.

References THash< TKey, TDat, THashFunc >::AutoSizeP, THash< TKey, TDat, THashFunc >::FFreeKeyId, THash< TKey, TDat, THashFunc >::FreeKeys, THash< TKey, TDat, THashFunc >::KeyDatV, THash< TKey, TDat, THashFunc >::PortV, and Swap().

Referenced by TSnap::GetShortPath().

502  {
503  if (this!=&Hash){
504  PortV.Swap(Hash.PortV);
505  KeyDatV.Swap(Hash.KeyDatV);
506  ::Swap(AutoSizeP, Hash.AutoSizeP);
508  ::Swap(FreeKeys, Hash.FreeKeys);
509  }
510 }
TInt FreeKeys
Definition: hash.h:100
void Swap(TVec< TVal, TSizeTy > &Vec)
Swaps the contents of the vector with Vec.
Definition: ds.h:1047
void Swap(THash &Hash)
Definition: hash.h:502
TBool AutoSizeP
Definition: hash.h:99
TInt FFreeKeyId
Definition: hash.h:100
TIntV PortV
Definition: hash.h:97
TVec< THKeyDat > KeyDatV
Definition: hash.h:98

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TBool THash< TKey, TDat, THashFunc >::AutoSizeP
private
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TInt THash< TKey, TDat, THashFunc >::FFreeKeyId
private
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
TInt THash< TKey, TDat, THashFunc >::FreeKeys
private
template<class TKey, class TDat, class THashFunc = TDefaultHashFunc<TKey>>
const unsigned int THash< TKey, TDat, THashFunc >::HashPrimeT
static
Initial value:
={
3ul, 5ul, 11ul, 23ul,
53ul, 97ul, 193ul, 389ul, 769ul,
1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
1610612741ul, 3221225473ul, 4294967291ul
}

Definition at line 91 of file hash.h.


The documentation for this class was generated from the following files: