SNAP Library 3.0, User Reference  2016-07-20 17:56:49
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 129 of file ds.h.

Constructor & Destructor Documentation

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

Definition at line 135 of file ds.h.

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

Definition at line 136 of file ds.h.

136  :
137  Val1(Triple.Val1), Val2(Triple.Val2), Val3(Triple.Val3){}
TVal1 Val1
Definition: ds.h:131
TVal2 Val2
Definition: ds.h:132
TVal3 Val3
Definition: ds.h:133
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 138 of file ds.h.

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

Definition at line 140 of file ds.h.

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

Member Function Documentation

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

Definition at line 157 of file ds.h.

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

Definition at line 155 of file ds.h.

155 {return TPairHashImpl::GetHashCd(TPairHashImpl::GetHashCd(Val1.GetPrimHashCd(), Val2.GetPrimHashCd()), Val3.GetPrimHashCd()); }
TVal1 Val1
Definition: ds.h:131
TVal2 Val2
Definition: ds.h:132
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TVal3 Val3
Definition: ds.h:133
template<class TVal1, class TVal2, class TVal3>
int TTriple< TVal1, TVal2, TVal3 >::GetSecHashCd ( ) const
inline

Definition at line 156 of file ds.h.

156 {return TPairHashImpl::GetHashCd(TPairHashImpl::GetHashCd(Val2.GetSecHashCd(), Val3.GetSecHashCd()), Val1.GetSecHashCd()); }
TVal1 Val1
Definition: ds.h:131
TVal2 Val2
Definition: ds.h:132
static int GetHashCd(const int hc1, const int hc2)
Definition: bd.h:590
TVal3 Val3
Definition: ds.h:133
template<class TVal1, class TVal2, class TVal3>
void TTriple< TVal1, TVal2, TVal3 >::GetVal ( TVal1 &  _Val1,
TVal2 &  _Val2,
TVal3 &  _Val3 
) const
inline

Definition at line 159 of file ds.h.

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

Definition at line 162 of file ds.h.

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

Definition at line 163 of file ds.h.

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

Definition at line 164 of file ds.h.

164 { return Val3;}
TVal3 Val3
Definition: ds.h:133
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.

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:131
TVal2 Val2
Definition: ds.h:132
TVal3 Val3
Definition: ds.h:133
template<class TVal1, class TVal2, class TVal3>
bool TTriple< TVal1, TVal2, TVal3 >::operator< ( const TTriple< TVal1, TVal2, TVal3 > &  Triple) const
inline

Definition at line 151 of file ds.h.

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

Definition at line 146 of file ds.h.

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

Definition at line 149 of file ds.h.

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

Definition at line 141 of file ds.h.

141  {
142  Val1.Save(SOut); Val2.Save(SOut); Val3.Save(SOut);}
TVal1 Val1
Definition: ds.h:131
TVal2 Val2
Definition: ds.h:132
TVal3 Val3
Definition: ds.h:133
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.

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

Member Data Documentation

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

Definition at line 131 of file ds.h.

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

Definition at line 132 of file ds.h.

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

Definition at line 133 of file ds.h.


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