SNAP Library 2.2, User 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
triad.h File Reference

Go to the source code of this file.

Classes

class  TNetConstraint< PGraph >

Namespaces

namespace  TSnap
 Main namespace for all the Snap global entities.

Functions

template<class PGraph >
double TSnap::GetClustCf (const PGraph &Graph, int SampleNodes=-1)
 Computes the average clustering coefficient as defined in Watts and Strogatz, Collective dynamics of 'small-world' networks.
template<class PGraph >
double TSnap::GetClustCf (const PGraph &Graph, TFltPrV &DegToCCfV, int SampleNodes=-1)
 Computes the distribution of average clustering coefficient.
template<class PGraph >
double TSnap::GetClustCf (const PGraph &Graph, TFltPrV &DegToCCfV, int64 &ClosedTriadsX, int64 &OpenTriadsX, int SampleNodes=-1)
 Computes the distribution of average clustering coefficient as well as the number of open and closed triads in the graph.
template<class PGraph >
double TSnap::GetNodeClustCf (const PGraph &Graph, const int &NId)
 Returns clustering coefficient of a particular node.
template<class PGraph >
void TSnap::GetNodeClustCf (const PGraph &Graph, TIntFltH &NIdCCfH)
 Computes clustering coefficient of each node of the Graph.
template<class PGraph >
int64 TSnap::GetTriads (const PGraph &Graph, int SampleNodes=-1)
 Returns the number of triangles in a graph.
template<class PGraph >
int64 TSnap::GetTriads (const PGraph &Graph, int64 &ClosedTriadsX, int64 &OpenTriadsX, int SampleNodes)
 Computes the number of Closed and Open triads.
template<class PGraph >
void TSnap::GetTriads (const PGraph &Graph, TIntTrV &NIdCOTriadV, int SampleNodes=-1)
 Computes the number of open and close triads for every node of the network.
template<class PGraph >
int TSnap::GetTriadEdges (const PGraph &Graph, int SampleEdges=-1)
 Counts the number of edges that participate in at least one triad.
template<class PGraph >
int TSnap::GetNodeTriads (const PGraph &Graph, const int &NId)
 Returns the number of undirected triads a node NId participates in.
template<class PGraph >
int TSnap::GetNodeTriads (const PGraph &Graph, const int &NId, int &ClosedNTriadsX, int &OpenNTriadsX)
 Returns number of Open and Closed triads a node NId participates in.
template<class PGraph >
int TSnap::GetNodeTriads (const PGraph &Graph, const int &NId, const TIntSet &GroupSet, int &InGroupEdgesX, int &InOutGroupEdgesX, int &OutGroupEdgesX)
 Returns the number of triads between a node NId and a subset of its neighbors GroupSet.
template<class PGraph >
void TSnap::GetTriadParticip (const PGraph &Graph, TIntPrV &TriadCntV)
 Triangle Participation Ratio: For each node counts how many triangles it participates in and then returns a set of pairs (number of triangles, number of such nodes).
template<class PGraph >
int TSnap::GetCmnNbrs (const PGraph &Graph, const int &NId1, const int &NId2)
 Returns a number of shared neighbors between a pair of nodes NId1 and NId2.
template<class PGraph >
int TSnap::GetCmnNbrs (const PGraph &Graph, const int &NId1, const int &NId2, TIntV &NbrV)
 Returns the shared neighbors between a pair of nodes NId1 and NId2.
template<class PGraph >
int TSnap::GetLen2Paths (const PGraph &Graph, const int &NId1, const int &NId2)
 Returns the number of length 2 directed paths between a pair of nodes NId1, NId2 (NId1 --> U --> NId2).
template<class PGraph >
int TSnap::GetLen2Paths (const PGraph &Graph, const int &NId1, const int &NId2, TIntV &NbrV)
 Returns the 2 directed paths between a pair of nodes NId1, NId2 (NId1 --> U --> NId2).
template<>
int TSnap::GetCmnNbrs< PUNGraph > (const PUNGraph &Graph, const int &NId1, const int &NId2, TIntV &NbrV)