SNAP Library 6.0, Developer Reference  2020-12-09 16:24:20
SNAP, a general purpose, high performance system for analysis and manipulation of large networks
subgraph.h File Reference

Functions and templates to generate subgraphs. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TSnap::TSnapDetail::TGetSubGraph< PGraph, IsMultiGraph >
 
struct  TSnap::TSnapDetail::TGetSubGraph< PGraph, false >
 
struct  TSnap::TSnapDetail::TConvertSubGraph< POutGraph, PInGraph, IsMultiGraph >
 
struct  TSnap::TSnapDetail::TConvertSubGraph< POutGraph, PInGraph, false >
 

Namespaces

 TSnap
 Main namespace for all the Snap global entities.
 
 TSnap::TSnapDetail
 

Functions

template<class PGraph >
PGraph TSnap::GetSubGraph (const PGraph &Graph, const TIntV &NIdV)
 Returns an induced subgraph of graph Graph with NIdV nodes. More...
 
template<class PGraph >
PGraph TSnap::GetSubGraphRenumber (const PGraph &Graph, const TIntV &NIdV)
 Returns an induced subgraph of graph Graph with NIdV nodes with an node renumbering. More...
 
PUNGraph TSnap::GetSubGraph (const PUNGraph &Graph, const TIntV &NIdV, const bool &RenumberNodes=false)
 Returns an induced subgraph of an undirected graph Graph with NIdV nodes with an optional node renumbering. More...
 
PNGraph TSnap::GetSubGraph (const PNGraph &Graph, const TIntV &NIdV, const bool &RenumberNodes)
 
template<class PGraph >
PGraph TSnap::GetESubGraph (const PGraph &Graph, const TIntV &EIdV)
 Returns a subgraph of graph Graph with EIdV edges. More...
 
template<class PGraph >
PGraph TSnap::GetESubGraph (const PGraph &Graph, const TIntPrV &EdgeV)
 
template<class PGraph , class TEdgeDat >
PGraph TSnap::GetEDatSubGraph (const PGraph &Graph, const TEdgeDat &EDat, const int &Cmp)
 Returns a subgraph of graph Graph with edges where edge data matches the parameters. More...
 
template<class PGraph , class TEdgeDat >
PGraph TSnap::GetEDatSubGraph (const PGraph &Graph, const TIntV &NIdV, const TEdgeDat &EDat, const int &Cmp)
 Returns a subgraph of graph Graph with NIdV nodes and edges where edge data matches the parameters. More...
 
template<class POutGraph , class PInGraph >
POutGraph TSnap::ConvertGraph (const PInGraph &InGraph, const bool &RenumberNodes=false)
 Performs conversion of graph InGraph with an optional node renumbering. More...
 
template<class POutGraph , class PInGraph >
POutGraph TSnap::ConvertSubGraph (const PInGraph &InGraph, const TIntV &NIdV, const bool &RenumberNodes=false)
 Returns an induced subgraph of graph InGraph with NIdV nodes with an optional node renumbering. More...
 
template<class POutGraph , class PInGraph >
POutGraph TSnap::ConvertESubGraph (const PInGraph &InGraph, const TIntV &EIdV, const bool &RenumberNodes=false)
 Returns a subgraph of graph InGraph with EIdV edges with an optional node renumbering. More...
 
template<class PGraph >
PGraph TSnap::GetRndSubGraph (const PGraph &Graph, const int &NNodes)
 Returns an induced random subgraph of graph Graph with NNodes nodes. More...
 
template<class PGraph >
PGraph TSnap::GetRndESubGraph (const PGraph &Graph, const int &NEdges)
 Returns a random subgraph of graph Graph with NEdges edges. More...
 
PUNGraph TSnap::GetEgonet (const PUNGraph &Graph, const int CtrNId, int &ArndEdgesX)
 Returns the egonet of node CtrNId as center in undirected graph Graph. And returns number of edges around the egonet. More...
 
PNGraph TSnap::GetEgonet (const PNGraph &Graph, const int CtrNId, int &InEgoEdgesX, int &OutEgoEdgesX)
 Returns the egonet of node CtrNId as center in directed graph Graph. And returns number of edges go in and out the egonet. More...
 
template<class PGraph >
PGraph TSnap::GetEgonetHop (const PGraph &Graph, const int CtrNId, const int Radius)
 Returns the egonet of node CtrNId as center for a Graph for a given radius. More...
 
template<class PGraph >
PGraph TSnap::GetInEgonetHop (const PGraph &Graph, const int CtrNId, const int Radius)
 Returns the in-egonet of node CtrNId as center in directed graph Graph for a given radius. More...
 
template<class PGraph >
PGraph TSnap::GetOutEgonetHop (const PGraph &Graph, const int CtrNId, const int Radius)
 Returns the out-egonet of node CtrNId as center in directed graph Graph for a given radius. More...
 
PNEANet TSnap::GetEgonetAttr (const PNEANet &Graph, const int CtrNId, const int Radius)
 Returns the complete egonet of at given radius and copies node and edge attributes. More...
 
PNEANet TSnap::GetInEgonetAttr (const PNEANet &Graph, const int CtrNId, const int Radius)
 Returns the in-egonet of at given radius and copies node and edge attributes. More...
 
PNEANet TSnap::GetOutEgonetAttr (const PNEANet &Graph, const int CtrNId, const int Radius)
 Returns the out-egonet of at given radius and copies node and edge attributes. More...
 
template<class PGraph >
PGraph TSnap::GetInEgonetSub (const PGraph &Graph, const int CtrNId, const int Radius, const int MaxNum=2, const float percent=-1.0)
 Returns the randomly sampled in-egonet with nodes sampled based on percentage, if percent != -1.0, or MaxNum nodes otherwise. More...
 
PNEANet TSnap::GetInEgonetSubAttr (const PNEANet &Graph, const int CtrNId, const int Radius, const int MaxNum, const float percent)
 Returns the randomly sampled egonet with nodes sampled based on percentage or raw number, copying attributes. More...
 
template<class PGraph >
PGraph TSnap::GetGraphUnion (PGraph &DstGraph, const PGraph &SrcGraph)
 
PNEANet TSnap::GetGraphUnionAttr (PNEANet &DstGraph, const PNEANet &SrcGraph)
 

Detailed Description

Functions and templates to generate subgraphs.

Definition in file subgraph.h.