SNAP Library 4.0, Developer Reference  2017-07-27 13:18:06
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
TPair< TVal1, TVal2 > Class Template Reference

#include <ds.h>

Public Member Functions

 TPair ()
 
 TPair (const TPair &Pair)
 
 TPair (const TVal1 &_Val1, const TVal2 &_Val2)
 
 TPair (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
void Load (TSIn &SIn)
 
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm="")
 
void SaveXml (TSOut &SOut, const TStr &Nm) const
 
TPairoperator= (const TPair &Pair)
 
bool operator== (const TPair &Pair) const
 
bool operator< (const TPair &Pair) const
 
int GetMemUsed () const
 
int GetPrimHashCd () const
 
int GetSecHashCd () const
 
void GetVal (TVal1 &_Val1, TVal2 &_Val2) const
 
const TVal1 & GetVal1 () const
 
const TVal2 & GetVal2 () const
 
TStr GetStr () const
 

Public Attributes

TVal1 Val1
 
TVal2 Val2
 

Detailed Description

template<class TVal1, class TVal2>
class TPair< TVal1, TVal2 >

Definition at line 32 of file ds.h.

Constructor & Destructor Documentation

template<class TVal1, class TVal2>
TPair< TVal1, TVal2 >::TPair ( )
inline

Definition at line 37 of file ds.h.

37 : Val1(), Val2(){}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
TPair< TVal1, TVal2 >::TPair ( const TPair< TVal1, TVal2 > &  Pair)
inline

Definition at line 38 of file ds.h.

38 : Val1(Pair.Val1), Val2(Pair.Val2){}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
TPair< TVal1, TVal2 >::TPair ( const TVal1 &  _Val1,
const TVal2 &  _Val2 
)
inline

Definition at line 39 of file ds.h.

39 : Val1(_Val1), Val2(_Val2){}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
TPair< TVal1, TVal2 >::TPair ( TSIn SIn)
inlineexplicit

Definition at line 40 of file ds.h.

40 : Val1(SIn), Val2(SIn){}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35

Member Function Documentation

template<class TVal1, class TVal2>
int TPair< TVal1, TVal2 >::GetMemUsed ( ) const
inline

Definition at line 54 of file ds.h.

54 {return Val1.GetMemUsed()+Val2.GetMemUsed();}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
int TPair< TVal1, TVal2 >::GetPrimHashCd ( ) const
inline

Definition at line 56 of file ds.h.

56 {return TPairHashImpl::GetHashCd(Val1.GetPrimHashCd(), Val2.GetPrimHashCd()); }
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
int TPair< TVal1, TVal2 >::GetSecHashCd ( ) const
inline

Definition at line 57 of file ds.h.

57 {return TPairHashImpl::GetHashCd(Val2.GetSecHashCd(), Val1.GetSecHashCd()); }
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
TStr TPair< TVal1, TVal2 >::GetStr ( ) const
inline

Definition at line 62 of file ds.h.

62  {
63  return TStr("Pair(")+Val1.GetStr()+", "+Val2.GetStr()+")";}
Definition: dt.h:412
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
void TPair< TVal1, TVal2 >::GetVal ( TVal1 &  _Val1,
TVal2 &  _Val2 
) const
inline

Definition at line 59 of file ds.h.

59 {_Val1=Val1; _Val2=Val2;}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
const TVal1& TPair< TVal1, TVal2 >::GetVal1 ( ) const
inline
template<class TVal1, class TVal2>
void TPair< TVal1, TVal2 >::Load ( TSIn SIn)
inline

Definition at line 43 of file ds.h.

43 {Val1.Load(SIn); Val2.Load(SIn);}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1 , class TVal2 >
void TPair< TVal1, TVal2 >::LoadXml ( const PXmlTok XmlTok,
const TStr Nm = "" 
)

Definition at line 71 of file xmlser.h.

References XLoad, and XLoadHd.

71  {
72  XLoadHd(Nm); XLoad(Val1); XLoad(Val2);}
#define XLoadHd(Nm)
Definition: bd.h:312
#define XLoad(Nm)
Definition: bd.h:315
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
bool TPair< TVal1, TVal2 >::operator< ( const TPair< TVal1, TVal2 > &  Pair) const
inline

Definition at line 51 of file ds.h.

51  {
52  return (Val1<Pair.Val1)||((Val1==Pair.Val1)&&(Val2<Pair.Val2));}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
TPair& TPair< TVal1, TVal2 >::operator= ( const TPair< TVal1, TVal2 > &  Pair)
inline

Definition at line 47 of file ds.h.

47  {
48  if (this!=&Pair){Val1=Pair.Val1; Val2=Pair.Val2;} return *this;}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
bool TPair< TVal1, TVal2 >::operator== ( const TPair< TVal1, TVal2 > &  Pair) const
inline

Definition at line 49 of file ds.h.

49  {
50  return (Val1==Pair.Val1)&&(Val2==Pair.Val2);}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1, class TVal2>
void TPair< TVal1, TVal2 >::Save ( TSOut SOut) const
inline

Definition at line 41 of file ds.h.

41  {
42  Val1.Save(SOut); Val2.Save(SOut);}
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35
template<class TVal1 , class TVal2 >
void TPair< TVal1, TVal2 >::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 75 of file xmlser.h.

References XSave, and XSaveHd.

75  {
76  XSaveHd(Nm); XSave(Val1); XSave(Val2);}
#define XSaveHd(Nm)
Definition: bd.h:318
#define XSave(Nm)
Definition: bd.h:333
TVal1 Val1
Definition: ds.h:34
TVal2 Val2
Definition: ds.h:35

Member Data Documentation

template<class TVal1, class TVal2>
TVal1 TPair< TVal1, TVal2 >::Val1

Definition at line 34 of file ds.h.

Referenced by TGnuPlot::AddPwrFit3(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TLocClustStat::BestWhiskNodes(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TTable::ColConcat(), TTable::ColConcatConst(), TTable::ColGenericOp(), TNIBs::ComputePerformanceNId(), TAGMUtil::ConnectCmtyVV(), TNEANet::ConvertToSparse(), TGnuPlot::CreatePlotFile(), TCache< TKey, TDat, THashFunc >::Del(), TLinAlg::EuclDist2(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TSccVisitor< PGraph, OnlyCount >::FinishNode(), TArtPointVisitor::FwdEdge(), TSubGraphsEnum::Gen2Graphs(), TSnap::GenDegSeq(), TSnap::GenRewire(), TCrossNet::GetAttrTypeE(), TModeNet::GetAttrTypeN(), TNetInfBs::GetBestEdge(), TNetInfBs::GetBound(), THttpLx::GetCh(), TSnap::GetClustCf(), TTable::GetCollidingRows(), TPair< TFlt, TFlt >::GetMemUsed(), TSccVisitor< PGraph, OnlyCount >::GetMinDiscTm(), GetNodeAlias(), TPair< TFlt, TFlt >::GetPrimHashCd(), TPair< TFlt, TFlt >::GetSecHashCd(), TPair< TFlt, TFlt >::GetStr(), TBigNet< TNodeData, IsDir >::GetSubGraph(), GetSwitchedPrV(), TPair< TFlt, TFlt >::GetVal(), TPair< TFlt, TFlt >::GetVal1(), TCluster::Gradient(), TNetInfBs::GreedyOpt(), TTable::GroupAux(), TTable::InitializeJointTable(), TNEANetMP::IsFltAttrE(), TNEANet::IsFltAttrE(), TNEANetMP::IsIntAttrE(), TNEANet::IsIntAttrE(), TNEANetMP::IsStrAttrE(), TNEANet::IsStrAttrE(), TPair< TFlt, TFlt >::Load(), TCluster::LogLikelihood(), TLocClustStat::MakeExpBins(), TCluster::MCMC(), TJsonVal::NewArr(), TPair< TFlt, TFlt >::operator<(), TPair< TFlt, TFlt >::operator=(), TPair< TFlt, TFlt >::operator==(), TUnionFind::Parent(), TNcpGraphsBase::PlotNcpMin(), TNcpGraphsBase::PlotRewNcpMin(), TSnap::PlotSccDistr(), TSnap::PlotWccDistr(), TTable::PrintGrouping(), TCache< TKey, TDat, THashFunc >::Put(), TAGMUtil::RewireCmtyNID(), TAGMFit::SampleTransition(), TPair< TFlt, TFlt >::Save(), TNcpGraphsBase::SaveTxtNcpMin(), TTable::SelfSimJoinPerGroup(), TTable::SpliceByGroup(), and TTable::ThresholdJoinCountPerJoinKeyCollisions().

template<class TVal1, class TVal2>
TVal2 TPair< TVal1, TVal2 >::Val2

Definition at line 35 of file ds.h.

Referenced by TNEANet::AddAttributes(), TCrossNet::AddEdge(), TNEANetMP::AddEdge(), TNEANet::AddEdge(), TCrossNet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatE(), TNEANet::AddFltAttrDatE(), TNEANetMP::AddFltAttrDatN(), TNEANet::AddFltAttrDatN(), TCrossNet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatE(), TNEANet::AddIntAttrDatE(), TNEANetMP::AddIntAttrDatN(), TNEANet::AddIntAttrDatN(), TNEANet::AddIntVAttrDatE(), TNEANet::AddIntVAttrDatN(), TNEANetMP::AddNode(), TCrossNet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatE(), TNEANet::AddStrAttrDatE(), TNEANetMP::AddStrAttrDatN(), TNEANet::AddStrAttrDatN(), TNEANet::AppendIntVAttrDatE(), TNEANet::AppendIntVAttrDatN(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TCrossNet::BegEAFltI(), TNEANetMP::BegEAFltI(), TCrossNet::BegEAIntI(), TNEANetMP::BegEAIntI(), TCrossNet::BegEAStrI(), TNEANetMP::BegEAStrI(), TNEANetMP::BegNAFltI(), TNEANetMP::BegNAIntI(), TNEANetMP::BegNAStrI(), TLocClustStat::BestWhiskEdges(), TLocClustStat::BestWhiskPhi(), TModeNet::ClrNbr(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TTable::ColConcat(), TTable::ColConcatConst(), TTable::ColGenericOp(), TNIBs::ComputePerformanceNId(), TAGMUtil::ConnectCmtyVV(), TNEANet::ConvertToSparse(), TGnuPlot::CreatePlotFile(), TCache< TKey, TDat, THashFunc >::Del(), TCrossNet::DelAttrDatE(), TNEANetMP::DelAttrDatE(), TNEANet::DelAttrDatE(), TNEANetMP::DelAttrDatN(), TNEANet::DelAttrDatN(), TCrossNet::DelAttrE(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), TNEANet::DelFromIntVAttrDatN(), TCrossNet::EndEAFltI(), TNEANetMP::EndEAFltI(), TCrossNet::EndEAIntI(), TNEANetMP::EndEAIntI(), TCrossNet::EndEAStrI(), TNEANetMP::EndEAStrI(), TNEANetMP::EndNAFltI(), TNEANetMP::EndNAIntI(), TNEANetMP::EndNAStrI(), TLinAlg::EuclDist2(), TAGMUtil::FindComsByAGM(), TArtPointVisitor::FinishNode(), TBiConVisitor::FinishNode(), TSccVisitor< PGraph, OnlyCount >::FinishNode(), TCache< TKey, TDat, THashFunc >::Flush(), TArtPointVisitor::FwdEdge(), TSubGraphsEnum::Gen2Graphs(), TSnap::GenDegSeq(), TSnap::GenRewire(), TNEANet::GetAttrIndE(), TNEANet::GetAttrIndN(), TNetInfBs::GetBestEdge(), TNetInfBs::GetBound(), THttpLx::GetCh(), TSnap::GetClustCf(), TTable::GetCollidingRows(), TCrossNet::GetEAFltI(), TNEANetMP::GetEAFltI(), TCrossNet::GetEAIntI(), TNEANetMP::GetEAIntI(), TCrossNet::GetEAStrI(), TNEANetMP::GetEAStrI(), TCrossNet::GetFltAttrDatE(), TNEANetMP::GetFltAttrDatE(), TNEANet::GetFltAttrDatE(), TNEANetMP::GetFltAttrDatN(), TNEANet::GetFltAttrDatN(), TNEANetMP::GetFltAttrVecE(), TNEANet::GetFltAttrVecE(), TCrossNet::GetIntAttrDatE(), TNEANetMP::GetIntAttrDatE(), TNEANet::GetIntAttrDatE(), TNEANetMP::GetIntAttrDatN(), TNEANet::GetIntAttrDatN(), TNEANetMP::GetIntAttrIndE(), TNEANet::GetIntAttrIndE(), TNEANetMP::GetIntAttrIndN(), TNEANet::GetIntAttrIndN(), TNEANet::GetIntVAttrDatE(), TNEANet::GetIntVAttrDatN(), TPair< TFlt, TFlt >::GetMemUsed(), TCache< TKey, TDat, THashFunc >::GetMemUsed(), TNEANetMP::GetNAFltI(), TNEANetMP::GetNAIntI(), TNEANetMP::GetNAStrI(), GetNodeAlias(), TPair< TFlt, TFlt >::GetPrimHashCd(), TPair< TFlt, TFlt >::GetSecHashCd(), TPair< TFlt, TFlt >::GetStr(), TCrossNet::GetStrAttrDatE(), TNEANetMP::GetStrAttrDatE(), TNEANet::GetStrAttrDatE(), TNEANetMP::GetStrAttrDatN(), TNEANet::GetStrAttrDatN(), TBigNet< TNodeData, IsDir >::GetSubGraph(), GetSwitchedPrV(), TPair< TFlt, TFlt >::GetVal(), TPair< TFlt, TFlt >::GetVal2(), TCluster::Gradient(), TNetInfBs::GreedyOpt(), TTable::GroupAux(), TTable::InitializeJointTable(), TPair< TFlt, TFlt >::Load(), TCluster::LogLikelihood(), TCluster::MCMC(), TJsonVal::NewArr(), TCmpPairByVal2< TVal1, TVal2 >::operator()(), TPair< TFlt, TFlt >::operator<(), TPair< TFlt, TFlt >::operator=(), TPair< TFlt, TFlt >::operator==(), TNcpGraphsBase::PlotNcpMin(), TNcpGraphsBase::PlotRewNcpMin(), TTable::PrintGrouping(), TCache< TKey, TDat, THashFunc >::Put(), TUnionFind::Rank(), TAGMUtil::RewireCmtyNID(), TAGMFit::SampleTransition(), TPair< TFlt, TFlt >::Save(), TNcpGraphsBase::SaveTxtNcpMin(), TTable::SelfSimJoinPerGroup(), TTable::SpliceByGroup(), and TTable::ThresholdJoinCountPerJoinKeyCollisions().


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