SNAP Library 2.0, User Reference  2013-05-13 16:33:57
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
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 60 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>
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.

                                                                      {
        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.

                                                                   {
        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.

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

Definition at line 35 of file ds.h.


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