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
localmotifcluster.h File Reference
#include "Snap.h"
Include dependency graph for localmotifcluster.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ProcessedGraph
 
class  MAPPR
 

Typedefs

typedef TVec< THash< TInt, TFlt > > WeightVH
 
typedef TVec< THash< TInt,
TIntV > > 
CountVH
 

Enumerations

enum  MotifType {
  UniDE, BiDE, DE, DE_any,
  M1, M2, M3, M4,
  M5, M6, M7, triad,
  cycle, FFLoop, UEdge, clique3,
  clique4, clique5, clique6, clique7,
  clique8, clique9, M1, M2,
  M3, M4, M5, M6,
  M7, M8, M9, M10,
  M11, M12, M13, bifan,
  semiclique, triangle, clique3, clique4,
  clique5, clique6, clique7, clique8,
  clique9, edge
}
 

Functions

MotifType ParseMotifType (const TStr &motif, const bool &IsDirected=false)
 

Typedef Documentation

typedef TVec< THash<TInt, TIntV> > CountVH

Definition at line 7 of file localmotifcluster.h.

typedef TVec< THash<TInt, TFlt> > WeightVH

Definition at line 6 of file localmotifcluster.h.

Enumeration Type Documentation

enum MotifType
Enumerator
UniDE 
BiDE 
DE 
DE_any 
M1 
M2 
M3 
M4 
M5 
M6 
M7 
triad 
cycle 
FFLoop 
UEdge 
clique3 
clique4 
clique5 
clique6 
clique7 
clique8 
clique9 
M1 
M2 
M3 
M4 
M5 
M6 
M7 
M8 
M9 
M10 
M11 
M12 
M13 
bifan 
semiclique 
triangle 
clique3 
clique4 
clique5 
clique6 
clique7 
clique8 
clique9 
edge 

Definition at line 14 of file localmotifcluster.h.

14  {
15  // directed graph 2-node motifs
16  UniDE, // uni-directed edge, u --> v but not v --> u
17  BiDE, // bi-directed edge, u <--> v
18  DE, // directed edge, = UniDE + 2 * BiDE
19  DE_any, // any edge, counted as 1 if(u --> v or v --> u), = UniDE + BiDE
20 
21  // directed graph 3-node motifs, see [Austin et al. 2016 Science] for more information.
22  M1, // u --> v, v --> w, w --> u
23  M2, // u <--> v, v --> w, w --> u
24  M3, // u <--> v, v <--> w, w --> u
25  M4, // u <--> v, v <--> w, w <--> u
26  M5, // u --> v, v --> w, u --> w
27  M6, // u <--> v, w --> u, w --> v
28  M7, // u <--> v, u --> w, v --> w
29  triad, // M1 + M2 + M3 + M4 + M5 + M6 + M7
30  cycle, // M1 + M2 + M3 + 2 * M4
31  FFLoop, // feed-forward loop, M5 + 2 * M6 + 2 * M7
32 
33  // undirected graph motifs
34  UEdge, // undirected edges
35  clique3, // |
36  clique4, // |
37  clique5, // |
38  clique6, // |
39  clique7, // |
40  clique8, // |
41  clique9, // |
42 };

Function Documentation

MotifType ParseMotifType ( const TStr motif,
const bool &  IsDirected = false 
)

Definition at line 20 of file localmotifcluster.cpp.

References BiDE, clique3, clique4, clique5, clique6, clique7, clique8, clique9, cycle, DE, DE_any, FFLoop, TStr::GetLc(), M1, M2, M3, M4, M5, M6, M7, TExcept::Throw(), triad, UEdge, and UniDE.

20  {
21  TStr motif_lc = motif.GetLc();
22  if (IsDirected) {
23  if (motif_lc == "m1") { return M1; }
24  else if (motif_lc == "m2") { return M2; }
25  else if (motif_lc == "m3") { return M3; }
26  else if (motif_lc == "m4") { return M4; }
27  else if (motif_lc == "m5") { return M5; }
28  else if (motif_lc == "m6") { return M6; }
29  else if (motif_lc == "m7") { return M7; }
30  else if (motif_lc == "triad") { return triad; }
31  else if (motif_lc == "cycle") { return cycle; }
32  else if (motif_lc == "ffloop") { return FFLoop; }
33  else if (motif_lc == "unide") { return UniDE; }
34  else if (motif_lc == "bide") { return BiDE; }
35  else if (motif_lc == "de") { return DE; }
36  else if (motif_lc == "edge") { return DE_any; }
37  else {
38  TExcept::Throw("Unknown motif for directed graph!");
39  }
40  } else {
41  if (motif_lc == "uedge") { return UEdge; }
42  else if (motif_lc == "clique3") { return clique3; }
43  else if (motif_lc == "clique4") { return clique4; }
44  else if (motif_lc == "clique5") { return clique5; }
45  else if (motif_lc == "clique6") { return clique6; }
46  else if (motif_lc == "clique7") { return clique7; }
47  else if (motif_lc == "clique8") { return clique8; }
48  else if (motif_lc == "clique9") { return clique9; }
49  else { TExcept::Throw("Unknown motif for undirected graph!"); }
50  }
51  TExcept::Throw("Inappropriate input!");
52  return UEdge;
53 }
static void Throw(const TStr &MsgStr)
Definition: ut.h:187
TStr GetLc() const
Definition: dt.h:499
Definition: dt.h:412

Here is the call graph for this function: