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
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
TPair< TVal1, TVal2 > Class Template Reference

#include <ds.h>

List of all members.

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.

: Val1(), Val2(){}
template<class TVal1, class TVal2>
TPair< TVal1, TVal2 >::TPair ( const TPair< TVal1, TVal2 > &  Pair) [inline]

Definition at line 38 of file ds.h.

: Val1(Pair.Val1), Val2(Pair.Val2){}
template<class TVal1, class TVal2>
TPair< TVal1, TVal2 >::TPair ( const TVal1 &  _Val1,
const TVal2 &  _Val2 
) [inline]

Definition at line 39 of file ds.h.

: Val1(_Val1), Val2(_Val2){}
template<class TVal1, class TVal2>
TPair< TVal1, TVal2 >::TPair ( TSIn SIn) [inline, explicit]

Definition at line 40 of file ds.h.

: Val1(SIn), Val2(SIn){}

Member Function Documentation

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

Definition at line 54 of file ds.h.

{return Val1.GetMemUsed()+Val2.GetMemUsed();}
template<class TVal1, class TVal2>
int TPair< TVal1, TVal2 >::GetPrimHashCd ( ) const [inline]

Definition at line 56 of file ds.h.

{return TPairHashImpl::GetHashCd(Val1.GetPrimHashCd(), Val2.GetPrimHashCd()); }
template<class TVal1, class TVal2>
int TPair< TVal1, TVal2 >::GetSecHashCd ( ) const [inline]

Definition at line 57 of file ds.h.

{return TPairHashImpl::GetHashCd(Val2.GetSecHashCd(), Val1.GetSecHashCd()); }
template<class TVal1, class TVal2>
TStr TPair< TVal1, TVal2 >::GetStr ( ) const [inline]

Definition at line 62 of file ds.h.

                      {
    return TStr("Pair(")+Val1.GetStr()+", "+Val2.GetStr()+")";}
template<class TVal1, class TVal2>
void TPair< TVal1, TVal2 >::GetVal ( TVal1 &  _Val1,
TVal2 &  _Val2 
) const [inline]

Definition at line 59 of file ds.h.

{_Val1=Val1; _Val2=Val2;}
template<class TVal1, class TVal2>
const TVal1& TPair< TVal1, TVal2 >::GetVal1 ( ) const [inline]

Definition at line 60 of file ds.h.

{ return Val1;}
template<class TVal1, class TVal2>
const TVal2& TPair< TVal1, TVal2 >::GetVal2 ( ) const [inline]

Definition at line 61 of file ds.h.

{ return Val2;}
template<class TVal1, class TVal2>
void TPair< TVal1, TVal2 >::Load ( TSIn SIn) [inline]

Definition at line 43 of file ds.h.

{Val1.Load(SIn); Val2.Load(SIn);}
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.

                                                                      {
        XLoadHd(Nm); XLoad(Val1); XLoad(Val2);}
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.

                                          {
    return (Val1<Pair.Val1)||((Val1==Pair.Val1)&&(Val2<Pair.Val2));}
template<class TVal1, class TVal2>
TPair& TPair< TVal1, TVal2 >::operator= ( const TPair< TVal1, TVal2 > &  Pair) [inline]

Definition at line 47 of file ds.h.

                                     {
    if (this!=&Pair){Val1=Pair.Val1; Val2=Pair.Val2;} return *this;}
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.

                                           {
    return (Val1==Pair.Val1)&&(Val2==Pair.Val2);}
template<class TVal1, class TVal2>
void TPair< TVal1, TVal2 >::Save ( TSOut SOut) const [inline]

Definition at line 41 of file ds.h.

                               {
    Val1.Save(SOut); Val2.Save(SOut);}
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.

                                                                   {
        XSaveHd(Nm); XSave(Val1); XSave(Val2);}

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(), TNIBs::ComputePerformanceNId(), TAGMUtil::ConnectCmtyVV(), 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(), TNetInfBs::GetBestEdge(), TNetInfBs::GetBound(), THttpLx::GetCh(), TSnap::GetClustCf(), TPair< TFlt, TFlt >::GetMemUsed(), TSccVisitor< PGraph, OnlyCount >::GetMinDiscTm(), 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(), 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(), TCache< TKey, TDat, THashFunc >::Put(), TAGMUtil::RewireCmtyNID(), TAGMFit::SampleTransition(), TPair< TFlt, TFlt >::Save(), and TNcpGraphsBase::SaveTxtNcpMin().

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

Definition at line 35 of file ds.h.

Referenced by TNEANet::AddEdge(), TNEANet::AddFltAttrDatE(), TNEANet::AddFltAttrDatN(), TNEANet::AddIntAttrDatE(), TNEANet::AddIntAttrDatN(), TNEANet::AddNode(), TNEANet::AddStrAttrDatE(), TNEANet::AddStrAttrDatN(), TArtPointVisitor::BackEdge(), TBiConVisitor::BackEdge(), TNEANet::BegEAFltI(), TNEANet::BegEAIntI(), TNEANet::BegEAStrI(), TNEANet::BegNAFltI(), TNEANet::BegNAIntI(), TNEANet::BegNAStrI(), TLocClustStat::BestWhiskEdges(), TLocClustStat::BestWhiskPhi(), TSnap::TSnapDetail::CmtyGirvanNewmanStep(), TNIBs::ComputePerformanceNId(), TAGMUtil::ConnectCmtyVV(), TGnuPlot::CreatePlotFile(), TCache< TKey, TDat, THashFunc >::Del(), TNEANet::DelAttrDatE(), TNEANet::DelAttrDatN(), TNEANet::DelAttrE(), TNEANet::DelAttrN(), TNEANet::EndEAFltI(), TNEANet::EndEAIntI(), TNEANet::EndEAStrI(), TNEANet::EndNAFltI(), TNEANet::EndNAIntI(), TNEANet::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(), TNetInfBs::GetBestEdge(), TNetInfBs::GetBound(), THttpLx::GetCh(), TSnap::GetClustCf(), TNEANet::GetEAFltI(), TNEANet::GetEAIntI(), TNEANet::GetEAStrI(), TNEANet::GetFltAttrDatE(), TNEANet::GetFltAttrDatN(), TNEANet::GetIntAttrDatE(), TNEANet::GetIntAttrDatN(), TPair< TFlt, TFlt >::GetMemUsed(), TCache< TKey, TDat, THashFunc >::GetMemUsed(), TNEANet::GetNAFltI(), TNEANet::GetNAIntI(), TNEANet::GetNAStrI(), TPair< TFlt, TFlt >::GetPrimHashCd(), TPair< TFlt, TFlt >::GetSecHashCd(), TPair< TFlt, TFlt >::GetStr(), TNEANet::GetStrAttrDatE(), TNEANet::GetStrAttrDatN(), TBigNet< TNodeData, IsDir >::GetSubGraph(), GetSwitchedPrV(), TPair< TFlt, TFlt >::GetVal(), TPair< TFlt, TFlt >::GetVal2(), TCluster::Gradient(), TNetInfBs::GreedyOpt(), 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(), TCache< TKey, TDat, THashFunc >::Put(), TUnionFind::Rank(), TAGMUtil::RewireCmtyNID(), TAGMFit::SampleTransition(), TPair< TFlt, TFlt >::Save(), and TNcpGraphsBase::SaveTxtNcpMin().


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