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
TTriple< TVal1, TVal2, TVal3 > Class Template Reference

#include <ds.h>

Public Member Functions

 TTriple ()
 
 TTriple (const TTriple &Triple)
 
 TTriple (const TVal1 &_Val1, const TVal2 &_Val2, const TVal3 &_Val3)
 
 TTriple (TSIn &SIn)
 
void Save (TSOut &SOut) const
 
void LoadXml (const PXmlTok &XmlTok, const TStr &Nm="")
 
void SaveXml (TSOut &SOut, const TStr &Nm) const
 
TTripleoperator= (const TTriple &Triple)
 
bool operator== (const TTriple &Triple) const
 
bool operator< (const TTriple &Triple) const
 
int GetPrimHashCd () const
 
int GetSecHashCd () const
 
int GetMemUsed () const
 
void GetVal (TVal1 &_Val1, TVal2 &_Val2, TVal3 &_Val3) const
 
const TVal1 & GetVal1 () const
 
const TVal2 & GetVal2 () const
 
const TVal3 & GetVal3 () const
 

Public Attributes

TVal1 Val1
 
TVal2 Val2
 
TVal3 Val3
 

Detailed Description

template<class TVal1, class TVal2, class TVal3>
class TTriple< TVal1, TVal2, TVal3 >

Definition at line 130 of file ds.h.

Constructor & Destructor Documentation

template<class TVal1, class TVal2, class TVal3>
TTriple< TVal1, TVal2, TVal3 >::TTriple ( )
inline

Definition at line 136 of file ds.h.

136 : Val1(), Val2(), Val3(){}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
TTriple< TVal1, TVal2, TVal3 >::TTriple ( const TTriple< TVal1, TVal2, TVal3 > &  Triple)
inline

Definition at line 137 of file ds.h.

137  :
138  Val1(Triple.Val1), Val2(Triple.Val2), Val3(Triple.Val3){}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
TTriple< TVal1, TVal2, TVal3 >::TTriple ( const TVal1 &  _Val1,
const TVal2 &  _Val2,
const TVal3 &  _Val3 
)
inline

Definition at line 139 of file ds.h.

139  :
140  Val1(_Val1), Val2(_Val2), Val3(_Val3){}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
TTriple< TVal1, TVal2, TVal3 >::TTriple ( TSIn SIn)
inlineexplicit

Definition at line 141 of file ds.h.

141 : Val1(SIn), Val2(SIn), Val3(SIn){}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134

Member Function Documentation

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

Definition at line 158 of file ds.h.

158 {return Val1.GetMemUsed()+Val2.GetMemUsed()+Val3.GetMemUsed();}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
int TTriple< TVal1, TVal2, TVal3 >::GetPrimHashCd ( ) const
inline

Definition at line 156 of file ds.h.

Referenced by GroupStmt::GetPrimHashCd().

156 {return TPairHashImpl::GetHashCd(TPairHashImpl::GetHashCd(Val1.GetPrimHashCd(), Val2.GetPrimHashCd()), Val3.GetPrimHashCd()); }
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TVal3 Val3
Definition: ds.h:134

Here is the caller graph for this function:

template<class TVal1, class TVal2, class TVal3>
int TTriple< TVal1, TVal2, TVal3 >::GetSecHashCd ( ) const
inline

Definition at line 157 of file ds.h.

Referenced by GroupStmt::GetSecHashCd().

157 {return TPairHashImpl::GetHashCd(TPairHashImpl::GetHashCd(Val2.GetSecHashCd(), Val3.GetSecHashCd()), Val1.GetSecHashCd()); }
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TVal3 Val3
Definition: ds.h:134

Here is the caller graph for this function:

template<class TVal1, class TVal2, class TVal3>
void TTriple< TVal1, TVal2, TVal3 >::GetVal ( TVal1 &  _Val1,
TVal2 &  _Val2,
TVal3 &  _Val3 
) const
inline

Definition at line 160 of file ds.h.

160  {
161  _Val1=Val1; _Val2=Val2; _Val3=Val3;}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
const TVal1& TTriple< TVal1, TVal2, TVal3 >::GetVal1 ( ) const
inline

Definition at line 163 of file ds.h.

163 { return Val1;}
TVal1 Val1
Definition: ds.h:132
template<class TVal1, class TVal2, class TVal3>
const TVal2& TTriple< TVal1, TVal2, TVal3 >::GetVal2 ( ) const
inline

Definition at line 164 of file ds.h.

164 { return Val2;}
TVal2 Val2
Definition: ds.h:133
template<class TVal1, class TVal2, class TVal3>
const TVal3& TTriple< TVal1, TVal2, TVal3 >::GetVal3 ( ) const
inline

Definition at line 165 of file ds.h.

165 { return Val3;}
TVal3 Val3
Definition: ds.h:134
template<class TVal1 , class TVal2 , class TVal3 >
void TTriple< TVal1, TVal2, TVal3 >::LoadXml ( const PXmlTok XmlTok,
const TStr Nm = "" 
)

Definition at line 79 of file xmlser.h.

References XLoad, and XLoadHd.

79  {
80  XLoadHd(Nm); XLoad(Val1); XLoad(Val2); XLoad(Val3);}
#define XLoadHd(Nm)
Definition: bd.h:312
#define XLoad(Nm)
Definition: bd.h:315
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
bool TTriple< TVal1, TVal2, TVal3 >::operator< ( const TTriple< TVal1, TVal2, TVal3 > &  Triple) const
inline

Definition at line 152 of file ds.h.

152  {
153  return (Val1<Triple.Val1)||((Val1==Triple.Val1)&&(Val2<Triple.Val2))||
154  ((Val1==Triple.Val1)&&(Val2==Triple.Val2)&&(Val3<Triple.Val3));}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
TTriple& TTriple< TVal1, TVal2, TVal3 >::operator= ( const TTriple< TVal1, TVal2, TVal3 > &  Triple)
inline

Definition at line 147 of file ds.h.

147  {
148  if (this!=&Triple){Val1=Triple.Val1; Val2=Triple.Val2; Val3=Triple.Val3;}
149  return *this;}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
bool TTriple< TVal1, TVal2, TVal3 >::operator== ( const TTriple< TVal1, TVal2, TVal3 > &  Triple) const
inline

Definition at line 150 of file ds.h.

150  {
151  return (Val1==Triple.Val1)&&(Val2==Triple.Val2)&&(Val3==Triple.Val3);}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1, class TVal2, class TVal3>
void TTriple< TVal1, TVal2, TVal3 >::Save ( TSOut SOut) const
inline

Definition at line 142 of file ds.h.

142  {
143  Val1.Save(SOut); Val2.Save(SOut); Val3.Save(SOut);}
TVal1 Val1
Definition: ds.h:132
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134
template<class TVal1 , class TVal2 , class TVal3 >
void TTriple< TVal1, TVal2, TVal3 >::SaveXml ( TSOut SOut,
const TStr Nm 
) const

Definition at line 83 of file xmlser.h.

References XSave, and XSaveHd.

83  {
84  XSaveHd(Nm); XSave(Val1); XSave(Val2); XSave(Val3);}
#define XSaveHd(Nm)
Definition: bd.h:318
TVal1 Val1
Definition: ds.h:132
#define XSave(Nm)
Definition: bd.h:333
TVal2 Val2
Definition: ds.h:133
TVal3 Val3
Definition: ds.h:134

Member Data Documentation


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