SNAP Library 4.0, User 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
TDGHashGraphCounter Class Reference

#include <graphcounter.h>

Public Member Functions

 TDGHashGraphCounter ()
void operator() (const PNGraph &G, const TIntV &sg)
TGHash< TUInt64 > & Graphs ()

Private Attributes

TGHash< TUInt64m_graphs

Detailed Description

Definition at line 37 of file graphcounter.h.

Constructor & Destructor Documentation

TDGHashGraphCounter::TDGHashGraphCounter ( )

Definition at line 39 of file graphcounter.h.

39 : m_graphs(false) {}
TGHash< TUInt64 > m_graphs
Definition: graphcounter.h:44

Member Function Documentation

TGHash<TUInt64>& TDGHashGraphCounter::Graphs ( )

Definition at line 42 of file graphcounter.h.

42 { return m_graphs; }
TGHash< TUInt64 > m_graphs
Definition: graphcounter.h:44
void TDGHashGraphCounter::operator() ( const PNGraph G,
const TIntV sg 

Definition at line 136 of file graphcounter.cpp.

136  {
137  PNGraph indG = TNGraph::New();
138  TGraphEnumUtils::GetIndGraph(G, sg, indG);
139  //
140  if(m_graphs.IsKey(indG))
141  m_graphs.GetDat(indG)++;
142  else m_graphs.AddDat(indG, 1);
143 }
static PNGraph New()
Static constructor that returns a pointer to the graph. Call: PNGraph Graph = TNGraph::New().
Definition: graph.h:477
const TDat & GetDat(const PNGraph &Graph) const
Returns the data associated with key Graph.
Definition: ghash.h:192
bool IsKey(const PNGraph &Graph) const
Test whether Graph is an existing key in the hash table.
Definition: ghash.h:184
TDat & AddDat(const PNGraph &Graph)
Adds a key Graph to the table and returns its data value.
Definition: ghash.h:177
TGHash< TUInt64 > m_graphs
Definition: graphcounter.h:44
static void GetIndGraph(const PNGraph &G, const TIntV &sg, PNGraph &indG)

Member Data Documentation

TGHash<TUInt64> TDGHashGraphCounter::m_graphs

Definition at line 44 of file graphcounter.h.

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