| 
    SNAP Library 2.2, Developer Reference
    2014-03-11 19:15:55
    
   SNAP, a general purpose, high performance system for analysis and manipulation of large networks 
   | 
  
  
  
 
#include <hash.h>

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) | 
| THash & | operator= (const THash &Hash) | 
| bool | operator== (const THash &Hash) const | 
| bool | operator< (const THash &Hash) const | 
| const TDat & | operator[] (const int &KeyId) const | 
| 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.   | |
| 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).   | |
| 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) | 
| 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 | |
| THKeyDat & | GetHashKeyDat (const int &KeyId) | 
| const THKeyDat & | GetHashKeyDat (const int &KeyId) const | 
| uint | GetNextPrime (const uint &Val) const | 
| void | Resize () | 
Private Attributes | |
| TIntV | PortV | 
| TVec< THKeyDat > | KeyDatV | 
| TBool | AutoSizeP | 
| TInt | FFreeKeyId | 
| TInt | FreeKeys | 
typedef THashKeyDat<TKey, TDat> THash< TKey, TDat, THashFunc >::THKeyDat [private] | 
        
| typedef THashKeyDatI<TKey, TDat> THash< TKey, TDat, THashFunc >::TIter | 
| anonymous enum | 
| THash< TKey, TDat, THashFunc >::THash | ( | const int & | ExpectVals, | 
| const bool & | _AutoSizeP = false  | 
        ||
| ) |  [explicit] | 
        
Definition at line 296 of file hash.h.
References THash< TKey, TDat, THashFunc >::PortV, and TVec< TVal, TSizeTy >::PutAll().
: PortV(GetNextPrime(ExpectVals/2)), KeyDatV(ExpectVals, 0), AutoSizeP(_AutoSizeP), FFreeKeyId(-1), FreeKeys(0){ PortV.PutAll(TInt(-1)); }

| TDat& THash< TKey, TDat, THashFunc >::AddDat | ( | const TKey & | Key | ) |  [inline] | 
        
Definition at line 195 of file hash.h.
Referenced by TCascade::Add(), TUnionFind::Add(), TUniTrie< TInt >::Add(), TExpBi::AddBi(), TNIBs::AddCasc(), TLocClustStat::AddCut(), TNIBs::AddDomainNm(), TNEGraph::AddEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::AddEdge(), TNEANet::AddEdge(), THttpRq::AddFldVal(), THttpResp::AddFldVal(), TNEANet::AddFltAttrDatE(), TNEANet::AddFltAttrDatN(), TNEANet::AddFltAttrE(), TNEANet::AddFltAttrN(), THttpResp::AddHdFld(), TNEANet::AddIntAttrDatE(), TNEANet::AddIntAttrDatN(), TNEANet::AddIntAttrE(), TNEANet::AddIntAttrN(), TUNGraph::AddNode(), TNGraph::AddNode(), TNEGraph::AddNode(), TNodeEdgeNet< TNodeData, TEdgeData >::AddNode(), TNEANet::AddNode(), TNetInfBs::AddNodeNm(), TNIBs::AddNodeNm(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::AddQ(), TILx::AddRw(), TOLx::AddRw(), TNEANet::AddStrAttrDatE(), TNEANet::AddStrAttrDatN(), TNEANet::AddStrAttrE(), TNEANet::AddStrAttrN(), TLocClustStat::AddToBestCutH(), TLocClust::ApproxPageRank(), TGStat::AvgGStat(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TSnap::CommunityGirvanNewman(), TAGMUtil::ConnectCmtyVV(), TMom::Def(), TArtPointVisitor::DiscoverNode(), TBiConVisitor::DiscoverNode(), TSccVisitor< PGraph, OnlyCount >::DiscoverNode(), TLocClust::DrawWhiskers(), TSpecFunc::EntropyBias(), TNIBs::FG(), TZipIn::FillFExtToCmdH(), TZipOut::FillFExtToCmdH(), TCesnaUtil::FilterLowEntropy(), 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(), TAGMFit::GetEdgeJointCom(), TSnap::GetEigenVectorCentr(), TSnap::GetHits(), TSnap::GetInDegCnt(), TCoda::GetNIDValH(), TSnap::GetNodeClustCf(), TAGMUtil::GetNodeMembership(), TSnap::GetNodesAtHops(), TGraphEnumUtils::GetNormalizedMap(), TSnap::GetOutDegCnt(), TSnap::GetPageRank(), TLxSymStr::GetSSym(), TBigNet< TNodeData, IsDir >::GetSubGraph(), TXmlObjSer::GetTagNm(), TCoda::GetTopCIDs(), TSnap::GetTriadParticip(), TGStat::GetValStr(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TNetInfBs::GreedyOpt(), TSnap::Infomap(), TNetInfBs::Init(), TSnap::TSnapDetail::TCNMQMatrix::Init(), TAGMFit::InitNodeData(), TUniChDb::InitScripts(), TUniChDb::InitSpecialCasing(), TUniChDb::InitWordAndSentenceBoundaryFlags(), 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(), TUniCaseFolding::LoadTxt(), TUniChDb::LoadTxt(), TSnap::TSnapDetail::MapEquationNew2Modules(), TCluster::MCMC(), TCoda::MLEGradAscentParallel(), TDGraphCounter::operator()(), THash< TIntPr, TEdgeInfo >::operator()(), THttpResp::ParseHttpResp(), THttpRq::ParseHttpRq(), TNcpGraphsBase::PlotAvgNcp(), TLocClustStat::PlotBoltzmanCurve(), TSnap::PlotEigValDistr(), TLocClustStat::PlotPhiDistr(), TSnap::PlotShortPathDistr(), TSnap::PlotSngValDistr(), TAGMFit::PrintSummary(), TXmlLx::PutEntityVal(), TXmlLx::PutPEntityVal(), TMacro::PutVarVal(), TUnicode::RegisterCodec(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyVV(), TLocClustStat::Run(), TSnap::SavePajek(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TAGMFast::SetCmtyVV(), TCoda::SetCmtyVV(), TGStat::SetDistr(), TXmlChDef::SetEntityVal(), THtmlLxChDef::SetEscStr(), TGStat::SetVal(), TNIBs::SG(), TGStat::TakeClustCf(), TGStat::TakeConnComp(), TGStat::TakeDegDistr(), TGStat::TakeDiam(), TGStat::TakeSpectral(), TGStat::TakeTriadPart(), TD34GraphCounter::TD34GraphCounter(), TGraphAttributes::TGraphAttributes(), THttpRq::THttpRq(), TMacro::TMacro(), TPreproc::TPreproc(), TArtPointVisitor::TreeEdge(), TBiConVisitor::TreeEdge(), and TNIBs::UpdateDiff().

| int THash< TKey, TDat, THashFunc >::AddKey | ( | const TKey & | Key | ) | 
Definition at line 326 of file hash.h.
Referenced by TUniTrie< TInt >::Add(), THash< TIntPr, TEdgeInfo >::AddDat(), THash< TIntPr, TEdgeInfo >::AddDatId(), TTmProfiler::AddTimer(), TLocClustStat::BagOfWhiskers(), TTimeNENet::GetEdgeTmBuckets(), TSnap::GetSngVals(), TSnap::GetSngVec(), TStrCache::GetStr(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TUniChDb::InitDerivedCoreProperties(), TUniChDb::InitLineBreaks(), TAGMFit::InitNodeData(), TUniChDb::InitPropList(), TUniChDb::InitScripts(), THtmlTok::IsBreakTag(), TAGMFit::JoinCom(), TUniChDb::LoadTxt(), TSnap::PrintInfo(), TUniChDb::TSubcatHelper::ProcessComment(), TSubGraphsEnum::RecurBfs1(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), TUniChDb::TestComposition(), and TGraphAttributes::TGraphAttributes().
                                                       {
  if ((KeyDatV.Len()>2*PortV.Len())||PortV.Empty()){Resize();}
  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
  int PrevKeyId=-1;
  int KeyId=PortV[PortN];
  while ((KeyId!=-1) &&
   !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
    PrevKeyId=KeyId; KeyId=KeyDatV[KeyId].Next;}
  if (KeyId==-1){
    if (FFreeKeyId==-1){
      KeyId=KeyDatV.Add(THKeyDat(-1, HashCd, Key));
    } else {
      KeyId=FFreeKeyId; FFreeKeyId=KeyDatV[FFreeKeyId].Next; FreeKeys--;
      //KeyDatV[KeyId]=TKeyDat(-1, HashCd, Key); // slow version
      KeyDatV[KeyId].Next=-1;
      KeyDatV[KeyId].HashCd=HashCd;
      KeyDatV[KeyId].Key=Key;
      //KeyDatV[KeyId].Dat=TDat(); // already empty
    }
    if (PrevKeyId==-1){
      PortV[PortN]=KeyId;
    } else {
      KeyDatV[PrevKeyId].Next=KeyId;
    }
  }
  return KeyId;
}

| TIter THash< TKey, TDat, THashFunc >::BegI | ( | ) |  const [inline] | 
        
Definition at line 170 of file hash.h.
Referenced by TNIBs::AddCasc(), TNEANet::AttrNameEI(), TNEANet::AttrNameNI(), TNEANet::AttrValueEI(), TNEANet::AttrValueNI(), TNEGraph::BegEI(), TNodeEdgeNet< TSecTm, TSecTm >::BegEI(), TNEANet::BegEI(), TCascade::BegI(), TGHash< TUInt64 >::BegI(), TBPGraph::BegLNI(), 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(), TBPGraph::BegRNI(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TNEANet::FltAttrNameEI(), TNEANet::FltAttrNameNI(), TNEANet::FltAttrValueEI(), TNEANet::FltAttrValueNI(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TNIBs::GetGroundTruthGraphAtT(), TNIBs::GetGroundTruthNetworkAtT(), TNIBs::GetInferredGraphAtT(), TNIBs::GetInferredNetworkAtT(), TAGMUtil::GetNodeMembership(), TCluster::Gradient(), TNIBs::Init(), Inner(), TNEANet::IntAttrNameEI(), TNEANet::IntAttrNameNI(), TNEANet::IntAttrValueEI(), TNEANet::IntAttrValueNI(), TCoda::LikelihoodForNode(), TAGMFast::LikelihoodForRow(), TCesna::LikelihoodForRow(), TCluster::LogLikelihood(), TCluster::MCMC(), TAGMFast::MLEGradAscent(), TCoda::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TAGMFast::MLENewton(), TAGMFast::Norm2(), TCoda::Norm2(), TCesna::Norm2(), TCesna::PredictAttrK(), TNetInfBs::SaveCascades(), TNIBs::SaveCascades(), TNetInfBs::SaveEdgeInfo(), TNIBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferred(), TNIBs::SaveInferredPajek(), TNetInfBs::SaveObjInfo(), TNetInfBs::SavePajek(), TNetInfBs::SavePlaneTextNet(), TNIBs::SaveSites(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TNEANet::StrAttrNameEI(), TNEANet::StrAttrNameNI(), TNEANet::StrAttrValueEI(), TNEANet::StrAttrValueNI(), TAGMFast::Sum(), TCoda::Sum(), TCesna::Sum(), and TGraphAttributes::TGraphAttributes().
                     {
    if (Len() == 0){return TIter(KeyDatV.EndI(), KeyDatV.EndI());}
    if (IsKeyIdEqKeyN()) { return TIter(KeyDatV.BegI(), KeyDatV.EndI());}
    int FKeyId=-1;  FNextKeyId(FKeyId);
    return TIter(KeyDatV.BegI()+FKeyId, KeyDatV.EndI()); }

| void THash< TKey, TDat, THashFunc >::Clr | ( | const bool & | DoDel = true,  | 
        
| const int & | NoDelLim = -1,  | 
        ||
| const bool & | ResetDat = true  | 
        ||
| ) | 
Definition at line 314 of file hash.h.
Referenced by TLocClust::ApproxPageRank(), TNIBs::BSG(), TStrCache::Clr(), TCascade::Clr(), TGHash< TUInt64 >::Clr(), TLocClustStat::Clr(), TBigNet< TNodeData, IsDir >::Clr(), TNodeNet< TSecTm >::Clr(), TUNGraph::Clr(), TUniCaseFolding::Clr(), TNGraph::Clr(), TNodeEDatNet< TStr, TFltFltH >::Clr(), TNEGraph::Clr(), TBPGraph::Clr(), TUniTrie< TInt >::Clr(), TUniChDb::Clr(), TNodeEdgeNet< TSecTm, TSecTm >::Clr(), TNEANet::Clr(), TUnicode::ClrCodecs(), TNIBs::FG(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TSnap::GetBetweennessCentr(), TSnap::GetNodeClustCf(), TAGMUtil::GetNodeMembership(), TSnap::GetShortPath(), TNetInfBs::Init(), TNIBs::Init(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TCoda::MLEGradAscentParallel(), TNIBs::Reset(), and TNIBs::SG().
                                                                                                  {
  if (DoDel){
    PortV.Clr(); KeyDatV.Clr();
  } else {
    PortV.PutAll(TInt(-1));
    KeyDatV.Clr(DoDel, NoDelLim);
    if (ResetDat){KeyDatV.PutAll(THKeyDat());}
  }
  FFreeKeyId=TInt(-1); FreeKeys=TInt(0);
}

| void THash< TKey, TDat, THashFunc >::Defrag | ( | ) | 
Definition at line 508 of file hash.h.
References IAssert.
Referenced by TUNGraph::Defrag(), TGHash< TUInt64 >::Defrag(), TNGraph::Defrag(), TNEGraph::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::Defrag(), TNEANet::Defrag(), TCoda::MLEGradAscentParallel(), and TBigNet< TNodeData, IsDir >::Rewire().
                                         {
  if (!IsKeyIdEqKeyN()){
    THash<TKey, TDat, THashFunc> Hash(PortV.Len());
    int KeyId=FFirstKeyId(); TKey Key; TDat Dat;
    while (FNextKeyId(KeyId)){
      GetKeyDat(KeyId, Key, Dat);
      Hash.AddDat(Key, Dat);
    }
    Pack();
    operator=(Hash);
    IAssert(IsKeyIdEqKeyN());
  }
}

| bool THash< TKey, TDat, THashFunc >::DelIfKey | ( | const TKey & | Key | ) |  [inline] | 
        
Definition at line 200 of file hash.h.
Referenced by TCoda::MLEGradAscentParallel().

| void THash< TKey, TDat, THashFunc >::DelKey | ( | const TKey & | Key | ) | 
Definition at line 357 of file hash.h.
References IAssert.
Referenced by TCascade::Del(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), TNEGraph::DelEdge(), TNodeEdgeNet< TNodeData, TEdgeData >::DelEdge(), TNEANet::DelEdge(), THash< TIntPr, TEdgeInfo >::DelKeyId(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::DelLink(), TUNGraph::DelNode(), TNGraph::DelNode(), TNEGraph::DelNode(), TBPGraph::DelNode(), TNodeEdgeNet< TNodeData, TEdgeData >::DelNode(), TNEANet::DelNode(), TSnap::Infomap(), TAGMFit::LeaveCom(), TSnap::TSnapDetail::MapEquationNew2Modules(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TSubGraphsEnum::RecurBfs1(), TBigNet< TNodeData, IsDir >::Rewire(), TUnicode::UnregisterCodec(), and TUniChDb::TSubcatHelper::~TSubcatHelper().
                                                        {
  IAssert(!PortV.Empty());
  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
  int PrevKeyId=-1;
  int KeyId=PortV[PortN];
  while ((KeyId!=-1) &&
   !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
    PrevKeyId=KeyId; KeyId=KeyDatV[KeyId].Next;}
  //IAssertR(KeyId!=-1, Key.GetStr()); //J: some classes do not provide GetStr()?
  IAssert(KeyId!=-1); //J: some classes do not provide GetStr()?
  if (PrevKeyId==-1){PortV[PortN]=KeyDatV[KeyId].Next;}
  else {KeyDatV[PrevKeyId].Next=KeyDatV[KeyId].Next;}
  KeyDatV[KeyId].Next=FFreeKeyId; FFreeKeyId=KeyId; FreeKeys++;
  KeyDatV[KeyId].HashCd=TInt(-1);
  KeyDatV[KeyId].Key=TKey();
  KeyDatV[KeyId].Dat=TDat();
}

| void THash< TKey, TDat, THashFunc >::DelKeyId | ( | const int & | KeyId | ) |  [inline] | 
        
Definition at line 202 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::DelIfKey(), and THash< TIntPr, TEdgeInfo >::DelKeyIdV().

| bool THash< TKey, TDat, THashFunc >::Empty | ( | ) |  const [inline] | 
        
Definition at line 184 of file hash.h.
Referenced by TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TGHash< TUInt64 >::Empty(), TUniTrie< TInt >::Empty(), TSpecFunc::EntropyBias(), TZipIn::FillFExtToCmdH(), TZipOut::FillFExtToCmdH(), TCesnaUtil::FilterLowEntropy(), TLocClustStat::FindBestCut(), TLocClustStat::GetBoltzmanCurveStat(), TZipIn::GetCmd(), TZipOut::GetCmd(), TLocClustStat::GetCurveStat(), TILx::GetSym(), TGStat::GetValStr(), TZipIn::IsZipExt(), TZipOut::IsZipExt(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TGStat::operator<(), TLocClustStat::PlotNCPScatter(), TLocClustStat::PlotPhiDistr(), TLocClustStat::PlotPhiInOut(), TLocClust::SupportSweep(), and TUniChDb::TSubcatHelper::~TSubcatHelper().
{return Len()==0;}

| TIter THash< TKey, TDat, THashFunc >::EndI | ( | ) |  const [inline] | 
        
Definition at line 175 of file hash.h.
Referenced by TNIBs::AddCasc(), TBPGraph::BegLNI(), TBPGraph::BegRNI(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TNEGraph::EndEI(), TNodeEdgeNet< TSecTm, TSecTm >::EndEI(), TNEANet::EndEI(), TCascade::EndI(), TGHash< TUInt64 >::EndI(), 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(), TNetInfBs::GenCascade(), TNIBs::GetGroundTruthGraphAtT(), TNIBs::GetGroundTruthNetworkAtT(), TNIBs::GetInferredGraphAtT(), TNIBs::GetInferredNetworkAtT(), TBPGraph::GetNI(), TAGMUtil::GetNodeMembership(), TNIBs::Init(), TCoda::LikelihoodForNode(), TAGMFast::LikelihoodForRow(), TCesna::LikelihoodForRow(), TAGMFast::MLEGradAscent(), TCoda::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TAGMFast::MLENewton(), TAGMFast::Norm2(), TCoda::Norm2(), TCesna::Norm2(), TCesna::PredictAttrK(), TNetInfBs::SaveCascades(), TNIBs::SaveCascades(), TNetInfBs::SaveEdgeInfo(), TNIBs::SaveGroundTruth(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferred(), TNIBs::SaveInferredPajek(), TNetInfBs::SaveObjInfo(), TNetInfBs::SavePajek(), TNetInfBs::SavePlaneTextNet(), TNIBs::SaveSites(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TAGMFast::Sum(), TCoda::Sum(), and TCesna::Sum().

| int THash< TKey, TDat, THashFunc >::FFirstKeyId | ( | ) |  const [inline] | 
        
Definition at line 231 of file hash.h.
Referenced by TGnuPlot::AddPlot(), TUNGraph::Defrag(), TNGraph::Defrag(), TNEGraph::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::Defrag(), TNEANet::Defrag(), TUNGraph::Dump(), TNGraph::Dump(), TUnicode::GetAllCodecs(), TNGraph::GetEdges(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TNEANet::GetEIdV(), TUNGraph::GetNIdV(), TNGraph::GetNIdV(), TNEGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TNEANet::GetNIdV(), TUniChDb::InitLineBreaks(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TUNGraph::IsOk(), TNGraph::IsOk(), TNEGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TNEANet::IsOk(), TUniChDb::LoadTxt(), TGnuPlot::PlotValCntH(), TGnuPlot::PlotValMomH(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TUniChDb::TestComposition(), TUniChDb::TestWbFindNonIgnored(), and TUniChDb::TSubcatHelper::~TSubcatHelper().
{return 0-1;}

| bool THash< TKey, TDat, THashFunc >::FNextKeyId | ( | int & | KeyId | ) | const | 
Definition at line 431 of file hash.h.
Referenced by TGnuPlot::AddPlot(), THash< TIntPr, TEdgeInfo >::BegI(), TUNGraph::Defrag(), TNGraph::Defrag(), TNEGraph::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::Defrag(), TNEANet::Defrag(), TUNGraph::Dump(), TNGraph::Dump(), TGHash< TUInt64 >::FNextKeyId(), TUnicode::GetAllCodecs(), TNGraph::GetEdges(), TNEGraph::GetEIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetEIdV(), TNEANet::GetEIdV(), TUNGraph::GetNIdV(), TNGraph::GetNIdV(), TNEGraph::GetNIdV(), TNodeEdgeNet< TNodeData, TEdgeData >::GetNIdV(), TNEANet::GetNIdV(), TUniChDb::InitLineBreaks(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TUNGraph::IsOk(), TNGraph::IsOk(), TNEGraph::IsOk(), TNodeEdgeNet< TNodeData, TEdgeData >::IsOk(), TNEANet::IsOk(), TUniChDb::LoadTxt(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TGnuPlot::PlotValCntH(), TGnuPlot::PlotValMomH(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TUniChDb::TestComposition(), TUniChDb::TestWbFindNonIgnored(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::UpdateMaxQ(), and TUniChDb::TSubcatHelper::~TSubcatHelper().
                                                              {
  do {KeyId++;} while ((KeyId<KeyDatV.Len())&&(KeyDatV[KeyId].HashCd==-1));
  return KeyId<KeyDatV.Len();
}

| void THash< TKey, TDat, THashFunc >::Gen | ( | const int & | ExpectVals | ) |  [inline] | 
        
Definition at line 179 of file hash.h.
Referenced by TCesnaUtil::FilterLowEntropy(), TGHash< TUInt64 >::Gen(), TAGMFit::GetEdgeJointCom(), TSnap::GetEigenVectorCentr(), TSnap::GetHits(), TCoda::GetNIDValH(), TSnap::GetPageRank(), 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(), and TNEANet::Reserve().
                                 {
    PortV.Gen(GetNextPrime(ExpectVals/2)); KeyDatV.Gen(ExpectVals, 0);
    FFreeKeyId=-1; FreeKeys=0; PortV.PutAll(TInt(-1));}

| const TDat& THash< TKey, TDat, THashFunc >::GetDat | ( | const TKey & | Key | ) |  const [inline] | 
        
Definition at line 219 of file hash.h.
Referenced by TSnap::TSnapDetail::_GirvanNewmanGetModularity(), TNEANet::AddEdge(), TNEANet::AddFltAttrDatE(), TNEANet::AddFltAttrDatN(), TNEANet::AddIntAttrDatE(), TNEANet::AddIntAttrDatN(), TNEANet::AddNode(), TNEANet::AddStrAttrDatE(), TNEANet::AddStrAttrDatN(), TLocClustStat::AddToBestCutH(), TLocClust::ApproxPageRank(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNEANet::BegEAFltI(), TNEANet::BegEAIntI(), TNEANet::BegEAStrI(), TNEANet::BegNAFltI(), TNEANet::BegNAIntI(), TNEANet::BegNAStrI(), TNIBs::BSG(), TAGMFit::CalcPNoComByCmtyVV(), TAGMUtil::ConnectCmtyVV(), TNEANet::DelAttrDatE(), TNEANet::DelAttrDatN(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), TBPGraph::DelNode(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TCodaAnalyzer::Draw2ModeCommunity(), TCodaAnalyzer::Dump2ModeCommunities(), TAGMUtil::DumpCmtyVV(), TCesnaUtil::DumpNIDAttrHToMetis(), TNEANet::EndEAFltI(), TNEANet::EndEAIntI(), TNEANet::EndEAStrI(), TNEANet::EndNAFltI(), TNEANet::EndNAIntI(), TNEANet::EndNAStrI(), TSpecFunc::EntropyBias(), TNIBs::FG(), TCesnaUtil::FilterLowEntropy(), TLocClustStat::FindBestCut(), TSnap::TSnapDetail::TCNMQMatrix::FindMxQEdge(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TSccVisitor< PGraph, OnlyCount >::FinishNode(), TArtPointVisitor::FwdEdge(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TNetInfBs::GetAllCascProb(), TSnap::GetBetweennessCentr(), TSnap::GetBfsTree(), TNIBs::GetCasc(), TNIBs::GetCascadeId(), TZipIn::GetCmd(), TZipOut::GetCmd(), TAGMFast::GetCmtyVV(), TCesna::GetCmtyVV(), TD34GraphCounter::GetCnt(), TGHash< TUInt64 >::GetDat(), TCnCom::GetDfsVisitor(), TGStat::GetDistr(), TNIBs::GetDomainId(), TNEANet::GetEAFltI(), TNEANet::GetEAIntI(), TNEANet::GetEAStrI(), TNodeEdgeNet< TSecTm, TSecTm >::GetEDat(), TNEGraph::GetEdge(), TNodeEdgeNet< TSecTm, TSecTm >::GetEdge(), TNEANet::GetEdge(), TNEANet::GetEdgeAttrValue(), TAGMFit::GetEdgeJointCom(), TTimeNENet::GetEdgeTmBuckets(), TSnap::GetEigenVectorCentr(), TExpBi::GetExpBiArgType(), THttpRq::GetFldVal(), THttpResp::GetFldVal(), THttpResp::GetFldValV(), TNEANet::GetFltAttrDatE(), TNEANet::GetFltAttrDatN(), TNEANet::GetFltAttrDefaultE(), TNEANet::GetFltAttrDefaultN(), TUrlEnv::GetFullUrlStr(), TSnap::GetHits(), TNEANet::GetIntAttrDatE(), TNEANet::GetIntAttrDatN(), TNEANet::GetIntAttrDefaultE(), TNEANet::GetIntAttrDefaultN(), TLocClustStat::GetKNodeCut(), TSccVisitor< PGraph, OnlyCount >::GetMinDiscTm(), TNEANet::GetNAFltI(), TNEANet::GetNAIntI(), TNEANet::GetNAStrI(), TBigNet< TNodeData, IsDir >::GetNDat(), TNodeNet< TSecTm >::GetNDat(), TNodeEDatNet< TStr, TFltFltH >::GetNDat(), TNodeEdgeNet< TSecTm, TSecTm >::GetNDat(), 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(), TNEANet::GetNodeAttrValue(), TNetInfBs::GetNodeInfo(), TNIBs::GetNodeInfo(), TNetInfBs::GetNodeNm(), TNIBs::GetNodeNm(), TGraphEnumUtils::GetNormalizedGraph(), TJsonVal::GetObjBool(), TJsonVal::GetObjKey(), TJsonVal::GetObjNum(), TJsonVal::GetObjStr(), TSnap::GetPageRank(), TCascade::GetParent(), TCascade::GetProb(), TILx::GetRw(), TAGMFast::GetStepSizeByLineSearch(), TCoda::GetStepSizeByLineSearch(), TCesna::GetStepSizeByLineSearch(), TNEANet::GetStrAttrDatE(), TNEANet::GetStrAttrDatN(), TNEANet::GetStrAttrDefaultE(), TNEANet::GetStrAttrDefaultN(), TCascade::GetTm(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TGStat::GetVal(), TGStat::GetValStr(), TMacro::GetVarVal(), TNetInfBs::GreedyOpt(), TAGMUtil::GVizComGraph(), TSnap::Infomap(), TNetInfBs::Init(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TBigNet< TNodeData, IsDir >::InvertFromSources(), TPreproc::IsSubstId(), TAGMFit::JoinCom(), TAGMFit::LeaveCom(), 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(), TD34GraphCounter::operator()(), TDGraphCounter::operator()(), TGHash< TUInt64 >::operator()(), TGStat::operator<(), THash< TKey, TDat, THashFunc >::operator==(), TUnionFind::Parent(), TLocClustStat::PlotPhiDistr(), TUnionFind::Rank(), TBigNet< TNodeData, IsDir >::Rewire(), TLocClustStat::Run(), TAGMFit::SampleTransition(), TAGMUtil::SaveBipartiteGephi(), TNetInfBs::SaveEdgeInfo(), TAGMUtil::SaveGephi(), TNetInfBs::SaveGroundTruth(), TSnap::SaveGViz(), TSnap::SavePajek(), TNIBs::SaveSites(), TAGMFit::SeekJoin(), TAGMFit::SeekLeave(), TAGMFit::SeekSwitch(), TNodeEdgeNet< TNodeData, TEdgeData >::SetNDat(), TNIBs::SG(), TGraphAttributes::TGraphAttributes(), TNIBs::UpdateDiff(), and TCascade::UpdateProb().

| void THash< TKey, TDat, THashFunc >::GetDatKeyKdV | ( | TVec< TKeyDat< TDat, TKey > > & | DatKeyKdV | ) | const | 
Definition at line 486 of file hash.h.
                                                                                           {
  DatKeyKdV.Gen(Len(), 0);
  TKey Key; TDat Dat;
  int KeyId=FFirstKeyId();
  while (FNextKeyId(KeyId)){
    GetKeyDat(KeyId, Key, Dat);
    DatKeyKdV.Add(TKeyDat<TDat, TKey>(Dat, Key));
  }
}
| void THash< TKey, TDat, THashFunc >::GetDatKeyPrV | ( | TVec< TPair< TDat, TKey > > & | DatKeyPrV | ) | const | 
Definition at line 464 of file hash.h.
Referenced by TGHash< TUInt64 >::GetDatKeyPrV().
                                                                                         {
  DatKeyPrV.Gen(Len(), 0);
  TKey Key; TDat Dat;
  int KeyId=FFirstKeyId();
  while (FNextKeyId(KeyId)){
    GetKeyDat(KeyId, Key, Dat);
    DatKeyPrV.Add(TPair<TDat, TKey>(Dat, Key));
  }
}

| void THash< TKey, TDat, THashFunc >::GetDatV | ( | TVec< TDat > & | DatV | ) | const | 
Definition at line 445 of file hash.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().
Referenced by TAGMUtil::ConnectCmtyVV(), TGHash< TUInt64 >::GetDatV(), and TAGMUtil::RewireCmtyVV().
                                                                 {
  DatV.Gen(Len(), 0);
  int KeyId=FFirstKeyId();
  while (FNextKeyId(KeyId)){
    DatV.Add(GetHashKeyDat(KeyId).Dat);}
}


| THKeyDat& THash< TKey, TDat, THashFunc >::GetHashKeyDat | ( | const int & | KeyId | ) |  [inline, private] | 
        
Definition at line 117 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::GetKey(), THash< TIntPr, TEdgeInfo >::GetKeyDat(), THash< TIntPr, TEdgeInfo >::IsKeyGetDat(), and THash< TIntPr, TEdgeInfo >::operator[]().

| const THKeyDat& THash< TKey, TDat, THashFunc >::GetHashKeyDat | ( | const int & | KeyId | ) |  const [inline, private] | 
        
| TIter THash< TKey, TDat, THashFunc >::GetI | ( | const TKey & | Key | ) |  const [inline] | 
        
Definition at line 177 of file hash.h.
Referenced by TNEGraph::GetEI(), TNodeEdgeNet< TSecTm, TSecTm >::GetEI(), TNEANet::GetEI(), TGHash< TUInt64 >::GetI(), TBigNet< TNodeData, IsDir >::GetNI(), TNodeNet< TSecTm >::GetNI(), TUNGraph::GetNI(), TNGraph::GetNI(), TNodeEDatNet< TStr, TFltFltH >::GetNI(), TNEGraph::GetNI(), TBPGraph::GetNI(), TNodeEdgeNet< TSecTm, TSecTm >::GetNI(), and TNEANet::GetNI().

| const TKey& THash< TKey, TDat, THashFunc >::GetKey | ( | const int & | KeyId | ) |  const [inline] | 
        
Definition at line 209 of file hash.h.
Referenced by TGnuPlot::AddPlot(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TMom::Def(), THash< TIntPr, TEdgeInfo >::DelKeyId(), TUnionFind::Dump(), TCoda::DumpMemberships(), TCesnaUtil::DumpNIDAttrHToNIDK(), TNIBs::FG(), TCesnaUtil::FilterLowEntropy(), TLocClust::FindBestCut(), TNIBs::GenCascade(), TSnap::GetBfsEffDiam(), TSnap::GetBfsTree(), TLocClustStat::GetBoltzmanCurveStat(), TSnap::GetClustCf(), TAGMFast::GetCmtyVV(), TCoda::GetCmtyVV(), TCesna::GetCmtyVV(), TLocClustStat::GetCurveStat(), TSnap::GetDegCnt(), TMacro::GetDstSubstStr(), 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(), 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(), TUniChDb::GetScriptName(), TMacro::GetSrcSubstStr(), TAGMFast::GetStepSizeByLineSearch(), TCoda::GetStepSizeByLineSearch(), TCesna::GetStepSizeByLineSearch(), TStrCache::GetStr(), THttpRq::GetStr(), TMacro::GetVarNm(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TNIBs::LabelBurstAutomaton(), TTimeNet::LoadArxiv(), TNIBs::LoadGroundTruthTxt(), TNIBs::LoadInferredTxt(), TUniChDb::LoadTxt(), THash< TIntPr, TEdgeInfo >::MarkDelKeyId(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TCesna::MLEGradAscent(), TAGMFast::MLEGradAscentParallel(), TCoda::MLEGradAscentParallel(), TCesna::MLEGradAscentParallel(), TLocClustStat::PlotBestClustDens(), TLocClustStat::PlotBoltzmanCurve(), TLocClustStat::PlotNCPModul(), TLocClustStat::PlotNCPScatter(), 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().
{ return GetHashKeyDat(KeyId).Key;}

| void THash< TKey, TDat, THashFunc >::GetKeyDat | ( | const int & | KeyId, | 
| TKey & | Key, | ||
| TDat & | Dat | ||
| ) |  const [inline] | 
        
Definition at line 224 of file hash.h.
Referenced by TGHash< TUInt64 >::GetKeyDat().
                                                               {
    const THKeyDat& KeyDat=GetHashKeyDat(KeyId);
    Key=KeyDat.Key; Dat=KeyDat.Dat;}

| void THash< TKey, TDat, THashFunc >::GetKeyDatKdV | ( | TVec< TKeyDat< TKey, TDat > > & | KeyDatKdV | ) | const | 
Definition at line 475 of file hash.h.
                                                                                           {
  KeyDatKdV.Gen(Len(), 0);
  TKey Key; TDat Dat;
  int KeyId=FFirstKeyId();
  while (FNextKeyId(KeyId)){
    GetKeyDat(KeyId, Key, Dat);
    KeyDatKdV.Add(TKeyDat<TKey, TDat>(Key, Dat));
  }
}
| void THash< TKey, TDat, THashFunc >::GetKeyDatPrV | ( | TVec< TPair< TKey, TDat > > & | KeyDatPrV | ) | const | 
Definition at line 453 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(), TSnap::PlotEigValDistr(), and TSnap::PlotSngValDistr().
                                                                                         {
  KeyDatPrV.Gen(Len(), 0);
  TKey Key; TDat Dat;
  int KeyId=FFirstKeyId();
  while (FNextKeyId(KeyId)){
    GetKeyDat(KeyId, Key, Dat);
    KeyDatPrV.Add(TPair<TKey, TDat>(Key, Dat));
  }
}

| int THash< TKey, TDat, THashFunc >::GetKeyId | ( | const TKey & | Key | ) | const | 
Definition at line 419 of file hash.h.
Referenced by TUniTrie< TInt >::Add(), TUniChDb::AddDecomposition(), TNEANet::AddEdge(), TNEANet::AddFltAttrDatE(), TNEANet::AddFltAttrDatN(), TNEANet::AddIntAttrDatE(), TNEANet::AddIntAttrDatN(), TNEANet::AddNode(), TSnap::TSnapDetail::TCNMQMatrix::TCmtyDat::AddQ(), TNEANet::AddStrAttrDatE(), TNEANet::AddStrAttrDatN(), TUniChDb::Compose(), TNEANet::DelAttrDatE(), TNEANet::DelAttrDatN(), TNEANet::DelEdge(), TNEANet::DelNode(), TNEANet::EdgeAttrIsFltDeleted(), TNEANet::EdgeAttrIsIntDeleted(), TNEANet::EdgeAttrIsStrDeleted(), TNEANet::FltAttrValueNI(), TUniCaseFolding::Fold(), TUniCaseFolding::FoldInPlace(), TUniTrie< TInt >::Get3GramRoot(), TUniChDb::GetCaseConverted(), TUniChDb::GetCat(), TUniChDb::GetCharName(), TUniChDb::GetCombiningClass(), THash< TIntPr, TEdgeInfo >::GetDat(), TNEANet::GetEAFltI(), TNEANet::GetEAIntI(), TNEANet::GetEAStrI(), TNEANet::GetEdgeAttrValue(), THtmlLxChDef::GetEscStr(), TNEANet::GetFltAttrDatE(), TNEANet::GetFltAttrDatN(), THash< TIntPr, TEdgeInfo >::GetI(), TNEANet::GetIntAttrDatE(), TNEANet::GetIntAttrDatN(), TGHash< TUInt64 >::GetKeyId(), TNEANet::GetNAFltI(), TNEANet::GetNAIntI(), TNEANet::GetNAStrI(), TNEANet::GetNodeAttrValue(), TUniChDb::GetSbFlags(), TUniChDb::GetScript(), TUniChDb::GetScriptByName(), TUniChDb::GetSimpleCaseConverted(), TSnap::GetSngVals(), TSnap::GetSngVec(), TMacro::GetSrcSubstStrN(), TLxSymStr::GetSSym(), TNEANet::GetStrAttrDatE(), TNEANet::GetStrAttrDatN(), TUniChDb::GetSubCat(), TILx::GetSym(), TUniChDb::GetWbFlags(), TUniChDb::InitDerivedCoreProperties(), TUniChDb::InitLineBreaks(), TUniChDb::InitPropList(), TUniChDb::InitScripts(), TUniChDb::InitWordAndSentenceBoundaryFlags(), TNEANet::IntAttrValueNI(), TUniChDb::IsGetChInfo(), THash< TIntPr, TEdgeInfo >::IsKey(), TUniChDb::IsPrivateUse(), TUniChDb::IsSbFlag(), TUniChDb::IsSurrogate(), TUniChDb::IsWbFlag(), TUniChDb::IsWbIgnored(), TUniChDb::LoadTxt(), TCluster::MCMC(), TNEANet::NodeAttrIsFltDeleted(), TNEANet::NodeAttrIsIntDeleted(), TNEANet::NodeAttrIsStrDeleted(), TUniChDb::TSubcatHelper::SetCat(), TNEANet::StrAttrValueNI(), TLocClust::SupportSweep(), TGraphKey::TakeGraph(), TGraphKey::TakeSig(), TUniChDb::TSubcatHelper::TestCat(), and TUniChDb::ToSimpleCaseConverted().
                                                                {
  if (PortV.Empty()){return -1;}
  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
  int KeyId=PortV[PortN];
  while ((KeyId!=-1) &&
   !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
    KeyId=KeyDatV[KeyId].Next;}
  return KeyId;
}

| void THash< TKey, TDat, THashFunc >::GetKeyV | ( | TVec< TKey > & | KeyV | ) | const | 
Definition at line 437 of file hash.h.
References TVec< TVal, TSizeTy >::Add(), and TVec< TVal, TSizeTy >::Gen().
Referenced by TNEANet::AddEdge(), TNEANet::AddNode(), TCoda::GetCmtyVV(), TGHash< TUInt64 >::GetKeyV(), TCoda::GetTopCIDs(), TBreathFS< PGraph >::GetVisitedNIdV(), TSubGraphsEnum::RecurBfs1(), and TBigNet< TNodeData, IsDir >::Rewire().
                                                                 {
  KeyV.Gen(Len(), 0);
  int KeyId=FFirstKeyId();
  while (FNextKeyId(KeyId)){
    KeyV.Add(GetKey(KeyId));}
}


| ::TSize THash< TKey, TDat, THashFunc >::GetMemUsed | ( | ) |  const [inline] | 
        
Definition at line 158 of file hash.h.
                           {
    // return PortV.GetMemUsed()+KeyDatV.GetMemUsed()+sizeof(bool)+2*sizeof(int);}
      int64 MemUsed = sizeof(bool)+2*sizeof(int);
      MemUsed += int64(PortV.Reserved()) * int64(sizeof(TInt));
      for (int KeyDatN = 0; KeyDatN < KeyDatV.Len(); KeyDatN++) {
          MemUsed += int64(2 * sizeof(TInt));
          MemUsed += int64(KeyDatV[KeyDatN].Key.GetMemUsed());
          MemUsed += int64(KeyDatV[KeyDatN].Dat.GetMemUsed());
      }
      return ::TSize(MemUsed);
  }
| int THash< TKey, TDat, THashFunc >::GetMxKeyIds | ( | ) |  const [inline] | 
        
Definition at line 188 of file hash.h.
Referenced by TGHash< TUInt64 >::GetMxKeyIds(), and TBigNet< TNodeData, IsDir >::Rewire().

| uint THash< TKey, TDat, THashFunc >::GetNextPrime | ( | const uint & | Val | ) |  const [private] | 
        
Definition at line 260 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::Gen().
                                                                     {
  const uint* f=(const uint*)HashPrimeT, *m, *l=(const uint*)HashPrimeT + (int)HashPrimes;
  int h, len = (int)HashPrimes;
  while (len > 0) {
    h = len >> 1;  m = f + h;
    if (*m < Val) { f = m;  f++;  len = len - h - 1; }
    else len = h;
  }
  return f == l ? *(l - 1) : *f;
}

| int THash< TKey, TDat, THashFunc >::GetPorts | ( | ) |  const [inline] | 
        
Definition at line 186 of file hash.h.
Referenced by TGHash< TUInt64 >::GetPorts().

| int THash< TKey, TDat, THashFunc >::GetReservedKeyIds | ( | ) |  const [inline] | 
        
| 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 397 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(), TBigNet< TNodeData, IsDir >::Rewire(), and TAGMFit::SampleTransition().
                                                              {
  IAssert(! Empty());
  int KeyId = abs(Rnd.GetUniDevInt(KeyDatV.Len()));
  while (KeyDatV[KeyId].HashCd == -1) { // if the index is empty, just try again
    KeyId = abs(Rnd.GetUniDevInt(KeyDatV.Len())); }
  return KeyId; 
}


| 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 408 of file hash.h.
References TRnd::GetUniDevInt(), and IAssert.
                                                                                {
  IAssert(! Empty());
  if (FreeKeys/double(Len()+FreeKeys) > EmptyFrac) { Defrag(); }
  int KeyId = Rnd.GetUniDevInt(KeyDatV.Len());
  while (KeyDatV[KeyId].HashCd == -1) { // if the index is empty, just try again
    KeyId = Rnd.GetUniDevInt(KeyDatV.Len());
  }
  return KeyId;
}

| bool THash< TKey, TDat, THashFunc >::IsAutoSize | ( | ) |  const [inline] | 
        
Definition at line 187 of file hash.h.
Referenced by TGHash< TUInt64 >::IsAutoSize().
{return AutoSizeP;}

| bool THash< TKey, TDat, THashFunc >::IsKey | ( | const TKey & | Key | ) |  const [inline] | 
        
Definition at line 215 of file hash.h.
Referenced by TNEANet::AddFltAttrDatE(), TNEANet::AddFltAttrDatN(), TNEANet::AddFltAttrE(), TNEANet::AddFltAttrN(), TNEANet::AddIntAttrDatE(), TNEANet::AddIntAttrDatN(), TNEANet::AddIntAttrE(), TNEANet::AddIntAttrN(), TILx::AddRw(), TOLx::AddRw(), TNEANet::AddStrAttrDatE(), TNEANet::AddStrAttrDatN(), TNEANet::AddStrAttrE(), TNEANet::AddStrAttrN(), TLocClustStat::AddToBestCutH(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), THash< TIntPr, TEdgeInfo >::DelIfKey(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TCodaAnalyzer::Draw2ModeCommunity(), TCodaAnalyzer::Dump2ModeCommunities(), TAGMUtil::DumpCmtyVV(), TCesnaUtil::DumpNIDAttrHToMetis(), TSpecFunc::EntropyBias(), TCesnaUtil::FilterLowEntropy(), TLocClustStat::FindBestCut(), TSnap::TSnapDetail::TCNMQMatrix::FindMxQEdge(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TZipIn::GetCmd(), TZipOut::GetCmd(), TCnCom::GetDfsVisitor(), TGStat::GetDistr(), TMacro::GetDstTxtStr(), TAGMFit::GetEdgeJointCom(), TTimeNENet::GetEdgeTmBuckets(), THttpRq::GetFldVal(), THttpResp::GetFldVal(), THttpResp::GetFldValV(), TNEANet::GetFltAttrDefaultE(), TNEANet::GetFltAttrDefaultN(), TNIBs::GetGroundTruthGraphAtT(), TNIBs::GetGroundTruthNetworkAtT(), TNIBs::GetInferredGraphAtT(), TNIBs::GetInferredNetworkAtT(), TNEANet::GetIntAttrDefaultE(), TNEANet::GetIntAttrDefaultN(), TStrCache::GetStr(), TNEANet::GetStrAttrDefaultE(), TNEANet::GetStrAttrDefaultN(), TTimeNet::GetTmBuckets(), TTimeNENet::GetTmBuckets(), TGStat::GetVal(), TGStat::GetValStr(), TUniTrie< TInt >::Has1Gram(), TUniTrie< TInt >::Has2Gram(), TGStat::HasDistr(), TGStat::HasVal(), TNetInfBs::Init(), TUniChDb::InitWordAndSentenceBoundaryFlags(), THtmlTok::IsBreakTag(), TNIBs::IsCascade(), TNIBs::IsDomainNm(), TNEGraph::IsEdge(), TNodeEdgeNet< TSecTm, TSecTm >::IsEdge(), TNEANet::IsEdge(), TExpBi::IsExpBiId(), THttpRq::IsFldNm(), THttpResp::IsFldNm(), TGHash< TUInt64 >::IsKey(), TUnionFind::IsKey(), THash< TIntPr, TEdgeInfo >::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(), TNetInfBs::IsNodeNm(), TNIBs::IsNodeNm(), TBPGraph::IsRNode(), TMacro::IsSrcSubstStr(), TPreproc::IsSubstId(), TZipIn::IsZipExt(), TZipOut::IsZipExt(), TTimeNet::LoadArxiv(), TNIBs::LoadInferredNodesTxt(), TNIBs::LoadInferredTxt(), TCesnaUtil::LoadNIDAttrHFromNIDKH(), TUniCaseFolding::LoadTxt(), TUniChDb::LoadTxt(), TSnap::TSnapDetail::MapEquationNew2Modules(), TSnap::TSnapDetail::TCNMQMatrix::MergeBestQ(), TCoda::MLEGradAscentParallel(), TD34GraphCounter::operator()(), TDGraphCounter::operator()(), TGStat::operator<(), THash< TKey, TDat, THashFunc >::operator==(), TSubGraphsEnum::RecurBfs1(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyNID(), TLocClustStat::Run(), 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(), TLocClustStat::SaveTxtInfo(), TNIBs::SG(), TUniChDb::TestComposition(), TGraphAttributes::TGraphAttributes(), TNIBs::UpdateDiff(), and TUniChDb::TSubcatHelper::~TSubcatHelper().
{return GetKeyId(Key)!=-1;}

| bool THash< TKey, TDat, THashFunc >::IsKeyGetDat | ( | const TKey & | Key, | 
| TDat & | Dat | ||
| ) |  const [inline] | 
        
Definition at line 227 of file hash.h.
Referenced by TSnap::GetBfsEffDiam(), TUnicode::GetCodec(), TXmlLx::IsEntityNm(), TGHash< TUInt64 >::IsKeyGetDat(), TBigNet< TNodeData, IsDir >::IsNode(), and TXmlLx::IsPEntityNm().
                                                     {int KeyId;
    if (IsKey(Key, KeyId)){Dat=GetHashKeyDat(KeyId).Dat; return true;}
    else {return false;}}

| bool THash< TKey, TDat, THashFunc >::IsKeyIdEqKeyN | ( | ) |  const [inline] | 
        
Definition at line 190 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::BegI(), TUNGraph::Defrag(), TNGraph::Defrag(), TNEGraph::Defrag(), TNodeEdgeNet< TNodeData, TEdgeData >::Defrag(), TNEANet::Defrag(), and TGHash< TUInt64 >::IsKeyIdEqKeyN().
{return FreeKeys==0;}

| int THash< TKey, TDat, THashFunc >::Len | ( | ) |  const [inline] | 
        
Definition at line 185 of file hash.h.
Referenced by TNIBs::AddCasc(), TNIBs::AddDomainNm(), TGnuPlot::AddPlot(), TILx::AddRw(), TOLx::AddRw(), TLocClust::ApproxPageRank(), TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), THash< TIntPr, TEdgeInfo >::BegI(), TNIBs::BSG(), TForestFire::BurnExpFire(), TForestFire::BurnGeoFire(), TSnap::TSnapDetail::TCNMQMatrix::CmtyCMN(), TMom::Def(), TAGMFast::DotProduct(), TCoda::DotProduct(), TCesna::DotProduct(), TUnionFind::Dump(), TCoda::DumpMemberships(), TCesnaUtil::DumpNIDAttrHToNIDK(), THash< TIntPr, TEdgeInfo >::Empty(), TSnap::TSnapDetail::Equation(), TNIBs::FG(), TCesnaUtil::FilterLowEntropy(), TLocClust::FindBestCut(), TLocClustStat::FindBestCut(), TNIBs::GenCascade(), TCesnaUtil::GetAttrs(), TSnap::GetBfsEffDiam(), TSnap::GetBfsTree(), TLocClustStat::GetBoltzmanCurveStat(), TNIBs::GetCascs(), TSnap::GetClustCf(), TLocClustStat::GetCurveStat(), TLocClustStat::GetCuts(), TSnap::GetDegCnt(), TGStat::GetDistrs(), TAGMFit::GetEdgeJointCom(), TNEGraph::GetEdges(), TNodeEdgeNet< TSecTm, TSecTm >::GetEdges(), TNEANet::GetEdges(), TSnap::GetEigenVectorCentr(), TSnap::GetHits(), TSnap::GetInDegCnt(), TBPGraph::GetLNodes(), TCascade::GetMaxTm(), 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(), TSnap::GetNodesAtHop(), TSnap::GetNodesAtHops(), TBreathFS< PGraph >::GetNVisited(), TSnap::GetOutDegCnt(), TSnap::GetPageRank(), TBPGraph::GetRNodes(), TSnap::GetShortPath(), TLxSymStr::GetSSym(), TAGMFast::GetStepSizeByLineSearch(), TCoda::GetStepSizeByLineSearch(), TCesna::GetStepSizeByLineSearch(), THttpRq::GetStr(), TMacro::GetSubstStrs(), TSnap::GetSubTreeSz(), TCoda::GetTopCIDs(), TGStat::GetVals(), TMacro::GetVars(), TCoda::GradientForNode(), TAGMFast::GradientForRow(), TCesna::GradientForRow(), TAGMFit::GradLogLForLambda(), TSnap::Infomap(), TUniChDb::InitScripts(), THtmlTok::IsBreakTag(), TNIBs::LabelBurstAutomaton(), TD34GraphCounter::Len(), TCascade::Len(), TGHash< TUInt64 >::Len(), TUnionFind::Len(), TNetConstraint< PGraph >::Len(), TCascade::LenAfterT(), TCascade::LenBeforeT(), TAGMFit::Likelihood(), 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==(), TLocClustStat::PlotBestClustDens(), TLocClustStat::PlotBoltzmanCurve(), TLocClustStat::PlotNCPModul(), TLocClustStat::PlotNCPScatter(), TLocClustStat::PlotPhiInOut(), TSnap::PlotShortPathDistr(), TGnuPlot::PlotValCntH(), TSnap::PrintInfo(), TAGMFit::PrintSummary(), TNIBs::Reset(), TBigNet< TNodeData, IsDir >::Rewire(), TAGMUtil::RewireCmtyNID(), TLocClustStat::Run(), TAGMFit::SampleTransition(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TNIBs::SaveGroundTruthPajek(), TNIBs::SaveInferredPajek(), TBigNet< TNodeData, IsDir >::SaveToDisk(), TCesna::SetGraph(), TNIBs::SG(), and TLocClust::SupportSweep().

| 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().
                      {
    PortV.Load(SIn); KeyDatV.Load(SIn);
    AutoSizeP=TBool(SIn); FFreeKeyId=TInt(SIn); FreeKeys=TInt(SIn);
    SIn.LoadCs();}

| 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.
                                                                                {
  XLoadHd(Nm); TVec<THashKeyDat<TKey, TDat> > KeyDatV; XLoad(KeyDatV); XLoad(AutoSizeP);
        for (int KeyDatN=0; KeyDatN<KeyDatV.Len(); KeyDatN++){
                AddDat(KeyDatV[KeyDatN].Key, KeyDatV[KeyDatN].Dat);}}

| void THash< TKey, TDat, THashFunc >::MarkDelKey | ( | const TKey & | Key | ) | 
Definition at line 379 of file hash.h.
References IAssert, and IAssertR.
Referenced by THash< TIntPr, TEdgeInfo >::MarkDelKeyId().
                                                            {
  // MarkDelKey is same as Delkey except last two lines
  IAssert(!PortV.Empty());
  const int PortN=abs(THashFunc::GetPrimHashCd(Key)%PortV.Len());
  const int HashCd=abs(THashFunc::GetSecHashCd(Key));
  int PrevKeyId=-1;
  int KeyId=PortV[PortN];
  while ((KeyId!=-1) &&
   !((KeyDatV[KeyId].HashCd==HashCd) && (KeyDatV[KeyId].Key==Key))){
    PrevKeyId=KeyId; KeyId=KeyDatV[KeyId].Next;}
  IAssertR(KeyId!=-1, Key.GetStr());
  if (PrevKeyId==-1){PortV[PortN]=KeyDatV[KeyId].Next;}
  else {KeyDatV[PrevKeyId].Next=KeyDatV[KeyId].Next;}
  KeyDatV[KeyId].Next=FFreeKeyId; FFreeKeyId=KeyId; FreeKeys++;
  KeyDatV[KeyId].HashCd=TInt(-1);
}

| void THash< TKey, TDat, THashFunc >::MarkDelKeyId | ( | const int & | KeyId | ) |  [inline] | 
        
Definition at line 207 of file hash.h.
{MarkDelKey(GetKey(KeyId));}
| TDat& THash< TKey, TDat, THashFunc >::operator() | ( | const TKey & | Key | ) |  [inline] | 
        
| bool THash< TKey, TDat, THashFunc >::operator== | ( | const THash< TKey, TDat, THashFunc > & | Hash | ) | const | 
Definition at line 303 of file hash.h.
References THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), and THash< TKey, TDat, THashFunc >::Len().
                                                                     {
  if (Len() != Hash.Len()) { return false; }
  for (int i = FFirstKeyId(); FNextKeyId(i); ) {
    const TKey& Key = GetKey(i);
    if (! Hash.IsKey(Key)) { return false; }
    if (GetDat(Key) != Hash.GetDat(Key)) { return false; }
  }
  return true;
}

| const TDat& THash< TKey, TDat, THashFunc >::operator[] | ( | const int & | KeyId | ) |  const [inline] | 
        
Definition at line 155 of file hash.h.
{return GetHashKeyDat(KeyId).Dat;}
| TDat& THash< TKey, TDat, THashFunc >::operator[] | ( | const int & | KeyId | ) |  [inline] | 
        
Definition at line 156 of file hash.h.
{return GetHashKeyDat(KeyId).Dat;}
| void THash< TKey, TDat, THashFunc >::Pack | ( | ) |  [inline] | 
        
Definition at line 242 of file hash.h.
Referenced by TUNGraph::Defrag(), and TGHash< TUInt64 >::Pack().

| void THash< TKey, TDat, THashFunc >::Resize | ( | ) |  [private] | 
        
Definition at line 272 of file hash.h.
References THashKeyDat< TKey, TDat >::HashCd, THashKeyDat< TKey, TDat >::Key, and THashKeyDat< TKey, TDat >::Next.
                                         {
  // resize & initialize port vector
  //if (PortV.Len()==0){PortV.Gen(17);}
  //else {PortV.Gen(2*PortV.Len()+1);}
  if (PortV.Len()==0){
    PortV.Gen(17);
  } else if (AutoSizeP&&(KeyDatV.Len()>2*PortV.Len())){
    PortV.Gen(GetNextPrime(PortV.Len()+1));
  } else {
    return;
  }
  PortV.PutAll(TInt(-1));
  // rehash keys
  for (int KeyId=0; KeyId<KeyDatV.Len(); KeyId++){
    THKeyDat& KeyDat=KeyDatV[KeyId];
    if (KeyDat.HashCd!=-1){
      const int PortN = abs(THashFunc::GetPrimHashCd(KeyDat.Key) % PortV.Len());
      KeyDat.Next=PortV[PortN];
      PortV[PortN]=KeyId;
    }
  }
}
| void THash< TKey, TDat, THashFunc >::Save | ( | TSOut & | SOut | ) |  const [inline] | 
        
Definition at line 141 of file hash.h.
Referenced by TStrCache::Save(), TJsonVal::Save(), TKeyDatFl< TKey, TDat, THashFunc >::Save(), TAGMFit::Save(), TGStat::Save(), TCascade::Save(), TNetInfBs::Save(), TNodeNet< TSecTm >::Save(), TUNGraph::Save(), TNIBs::Save(), TUniCaseFolding::Save(), TNGraph::Save(), TNodeEDatNet< TStr, TFltFltH >::Save(), PHash< TKey, TDat >::Save(), TNEGraph::Save(), TBPGraph::Save(), TNodeEdgeNet< TSecTm, TSecTm >::Save(), TUniChDb::Save(), and TNEANet::Save().
                               {
    PortV.Save(SOut); KeyDatV.Save(SOut);
    AutoSizeP.Save(SOut); FFreeKeyId.Save(SOut); FreeKeys.Save(SOut);
    SOut.SaveCs();}

| void THash< TKey, TDat, THashFunc >::Sort | ( | const bool & | CmpKey, | 
| const bool & | Asc | ||
| ) | 
Definition at line 523 of file hash.h.
References IAssertR, and THashKeyDat< TKey, TDat >::Next.
Referenced by TLocClustStat::Run(), THash< TIntPr, TEdgeInfo >::SortByDat(), and THash< TIntPr, TEdgeInfo >::SortByKey().
                                                                           {
  IAssertR(IsKeyIdEqKeyN(), "THash::Sort only works when table has no deleted keys.");
  TIntV TargV(Len()), MapV(Len()), StateV(Len());
  for (int i = 0; i < TargV.Len(); i++) {
    TargV[i] = i; MapV[i] = i; StateV[i] = i;
  }
  // sort KeyIds
  THashKeyDatCmp HashCmp(*this, CmpKey, Asc);
  TargV.SortCmp(HashCmp);
  // now sort the update vector
  THashKeyDat<TKey, TDat> Tmp;
  for (int i = 0; i < TargV.Len()-1; i++) {
    const int SrcPos = MapV[TargV[i]];
    const int Loc = i;
    // swap data
    Tmp = KeyDatV[SrcPos];
    KeyDatV[SrcPos] = KeyDatV[Loc];
    KeyDatV[Loc] = Tmp;
    // swap keys
    MapV[StateV[i]] = SrcPos;
    StateV.Swap(Loc, SrcPos);
  }
  for (int i = 0; i < TargV.Len(); i++) {
    MapV[TargV[i]] = i; }
  for (int p = 0; p < PortV.Len(); p++) {
    if (PortV[p] != -1) {
      PortV[p] = MapV[PortV[p]]; } }
  for (int i = 0; i < KeyDatV.Len(); i++) {
    if (KeyDatV[i].Next != -1) {
      KeyDatV[i].Next = MapV[KeyDatV[i].Next]; }
  }
}

| void THash< TKey, TDat, THashFunc >::SortByDat | ( | const bool & | Asc = true | ) |  [inline] | 
        
Definition at line 245 of file hash.h.
Referenced by TNIBs::BSG(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TNIBs::FG(), TCesnaUtil::FilterLowEntropy(), TLocClust::FindBestCut(), TNetInfBs::GenCascade(), TNIBs::GenCascade(), TSnap::GetBfsTree(), TAGMFast::GetCmtyVV(), TCoda::GetCmtyVV(), TCesna::GetCmtyVV(), TCoda::GetNIDValH(), TCoda::GetTopCIDs(), TSnap::Infomap(), TNIBs::SG(), TCascade::Sort(), TNodeEdgeNet< TSecTm, TSecTm >::SortEIdByDat(), TNodeNet< TSecTm >::SortNIdByDat(), TNodeEDatNet< TStr, TFltFltH >::SortNIdByDat(), TNodeEdgeNet< TSecTm, TSecTm >::SortNIdByDat(), TTimeNENet::SortNodeEdgeTimes(), and TNIBs::SortNodeNmByVol().
{ Sort(false, Asc); }

| void THash< TKey, TDat, THashFunc >::SortByKey | ( | const bool & | Asc = true | ) |  [inline] | 
        
Definition at line 244 of file hash.h.
Referenced by TLocClustStat::BagOfWhiskers(), TLocClustStat::BagOfWhiskers2(), TSnap::PlotShortPathDistr(), TLocClustStat::Run(), TNodeEdgeNet< TSecTm, TSecTm >::SortEIdById(), TNodeNet< TSecTm >::SortNIdById(), TNodeEDatNet< TStr, TFltFltH >::SortNIdById(), and TNodeEdgeNet< TSecTm, TSecTm >::SortNIdById().
{ Sort(true, Asc); }

| void THash< TKey, TDat, THashFunc >::Swap | ( | THash< TKey, TDat, THashFunc > & | Hash | ) | 
Definition at line 497 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().
                                                   {
  if (this!=&Hash){
    PortV.Swap(Hash.PortV);
    KeyDatV.Swap(Hash.KeyDatV);
    ::Swap(AutoSizeP, Hash.AutoSizeP);
    ::Swap(FFreeKeyId, Hash.FFreeKeyId);
    ::Swap(FreeKeys, Hash.FreeKeys);
  }
}


TBool THash< TKey, TDat, THashFunc >::AutoSizeP [private] | 
        
Definition at line 99 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::IsAutoSize(), THash< TIntPr, TEdgeInfo >::Load(), THash< TIntPr, TEdgeInfo >::operator=(), THash< TIntPr, TEdgeInfo >::Save(), and THash< TKey, TDat, THashFunc >::Swap().
TInt THash< TKey, TDat, THashFunc >::FFreeKeyId [private] | 
        
Definition at line 100 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::Gen(), THash< TIntPr, TEdgeInfo >::Load(), THash< TIntPr, TEdgeInfo >::operator=(), THash< TIntPr, TEdgeInfo >::Save(), and THash< TKey, TDat, THashFunc >::Swap().
TInt THash< TKey, TDat, THashFunc >::FreeKeys [private] | 
        
Definition at line 100 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::Gen(), THash< TIntPr, TEdgeInfo >::IsKeyIdEqKeyN(), THash< TIntPr, TEdgeInfo >::Len(), THash< TIntPr, TEdgeInfo >::Load(), THash< TIntPr, TEdgeInfo >::operator=(), THash< TIntPr, TEdgeInfo >::Save(), and THash< TKey, TDat, THashFunc >::Swap().
const unsigned int THash< TKey, TDat, THashFunc >::HashPrimeT [static] | 
        
{
  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
}
TVec<THKeyDat> THash< TKey, TDat, THashFunc >::KeyDatV [private] | 
        
Definition at line 98 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::AddDat(), THash< TIntPr, TEdgeInfo >::AddDatId(), THash< TIntPr, TEdgeInfo >::BegI(), THash< TIntPr, TEdgeInfo >::EndI(), THash< TIntPr, TEdgeInfo >::Gen(), THash< TIntPr, TEdgeInfo >::GetDat(), THash< TIntPr, TEdgeInfo >::GetHashKeyDat(), THash< TIntPr, TEdgeInfo >::GetI(), THash< TIntPr, TEdgeInfo >::GetMemUsed(), THash< TIntPr, TEdgeInfo >::GetMxKeyIds(), THash< TIntPr, TEdgeInfo >::GetReservedKeyIds(), THash< TIntPr, TEdgeInfo >::IsKeyId(), THash< TIntPr, TEdgeInfo >::Len(), THash< TIntPr, TEdgeInfo >::Load(), THash< TIntPr, TEdgeInfo >::operator=(), THash< TIntPr, TEdgeInfo >::Pack(), THash< TIntPr, TEdgeInfo >::Save(), and THash< TKey, TDat, THashFunc >::Swap().
TIntV THash< TKey, TDat, THashFunc >::PortV [private] | 
        
Definition at line 97 of file hash.h.
Referenced by THash< TIntPr, TEdgeInfo >::Gen(), THash< TIntPr, TEdgeInfo >::GetMemUsed(), THash< TIntPr, TEdgeInfo >::GetPorts(), THash< TIntPr, TEdgeInfo >::Load(), THash< TIntPr, TEdgeInfo >::operator=(), THash< TIntPr, TEdgeInfo >::Save(), THash< TKey, TDat, THashFunc >::Swap(), and THash< TKey, TDat, THashFunc >::THash().