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
|
#include <temporalmotifs.h>
Public Member Functions | |
TempMotifCounter (const TStr &filename) | |
void | Count3TEdge2Node (double delta, Counter2D &counts) |
void | Count3TEdge2Node (int u, int v, double delta, Counter3D &counts) |
void | Count3TEdge3NodeStars (double delta, Counter3D &pre_counts, Counter3D &pos_counts, Counter3D &mid_counts) |
void | Count3TEdge3NodeStarsNaive (double delta, Counter3D &pre_counts, Counter3D &pos_counts, Counter3D &mid_counts) |
void | Count3TEdgeTriads (double delta, Counter3D &counts) |
void | Count3TEdgeTriadsNaive (double delta, Counter3D &counts) |
void | Count3TEdge23Node (double delta, Counter2D &counts) |
Private Member Functions | |
void | GetAllStaticTriangles (TIntV &Us, TIntV &Vs, TIntV &Ws) |
void | GetAllNeighbors (int node, TIntV &nbrs) |
void | GetAllNodes (TIntV &nodes) |
bool | HasEdges (int u, int v) |
void | AddTriadEdgeData (TVec< TriadEdgeData > &events, TVec< TIntPair > &ts_indices, int &index, int u, int v, int nbr, int key1, int key2) |
void | AddStarEdgeData (TVec< TIntPair > &ts_indices, TVec< StarEdgeData > &events, int &index, int u, int v, int nbr, int key) |
void | AddStarEdges (TVec< TIntPair > &combined, int u, int v, int key) |
Private Attributes | |
PNGraph | static_graph_ |
TVec< THash< TInt, TIntV > > | temporal_data_ |
Definition at line 94 of file temporalmotifs.h.
TempMotifCounter::TempMotifCounter | ( | const TStr & | filename | ) |
Definition at line 6 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), atInt, TNGraph::GetMxNId(), TTable::LoadSS(), static_graph_, and temporal_data_.
|
private |
Definition at line 284 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::GetDat(), HasEdges(), TVec< TVal, TSizeTy >::Len(), and temporal_data_.
Referenced by Count3TEdge3NodeStars().
Definition at line 219 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::GetDat(), HasEdges(), TVec< TVal, TSizeTy >::Len(), and temporal_data_.
Referenced by Count3TEdge2Node(), Count3TEdge3NodeStarsNaive(), and Count3TEdgeTriadsNaive().
|
private |
Definition at line 431 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::GetDat(), HasEdges(), TVec< TVal, TSizeTy >::Len(), and temporal_data_.
Referenced by Count3TEdgeTriads().
void TempMotifCounter::Count3TEdge23Node | ( | double | delta, |
Counter2D & | counts | ||
) |
Definition at line 116 of file temporalmotifs.cpp.
References Count3TEdge2Node(), Count3TEdge3NodeStars(), and Count3TEdgeTriads().
void TempMotifCounter::Count3TEdge2Node | ( | double | delta, |
Counter2D & | counts | ||
) |
Definition at line 171 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), TNGraph::BegEI(), TKeyDat< TKey, TDat >::Dat, edge, TNGraph::EndEI(), TKeyDat< TKey, TDat >::Key, TVec< TVal, TSizeTy >::Len(), and static_graph_.
Referenced by Count3TEdge23Node(), and Count3TEdge3NodeStars().
void TempMotifCounter::Count3TEdge2Node | ( | int | u, |
int | v, | ||
double | delta, | ||
Counter3D & | counts | ||
) |
Definition at line 198 of file temporalmotifs.cpp.
References AddStarEdges(), ThreeTEdgeMotifCounter::Count(), TVec< TVal, TSizeTy >::Len(), and TVec< TVal, TSizeTy >::Sort().
void TempMotifCounter::Count3TEdge3NodeStars | ( | double | delta, |
Counter3D & | pre_counts, | ||
Counter3D & | pos_counts, | ||
Counter3D & | mid_counts | ||
) |
Definition at line 297 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), AddStarEdgeData(), StarTriad3TEdgeCounter< EdgeData >::Count(), Count3TEdge2Node(), GetAllNeighbors(), GetAllNodes(), TNGraph::GetNI(), TVec< TVal, TSizeTy >::Len(), ThreeTEdgeStarCounter::MidCount(), ThreeTEdgeStarCounter::PosCount(), ThreeTEdgeStarCounter::PreCount(), TVec< TVal, TSizeTy >::Sort(), and static_graph_.
Referenced by Count3TEdge23Node().
void TempMotifCounter::Count3TEdge3NodeStarsNaive | ( | double | delta, |
Counter3D & | pre_counts, | ||
Counter3D & | pos_counts, | ||
Counter3D & | mid_counts | ||
) |
Definition at line 229 of file temporalmotifs.cpp.
References AddStarEdges(), ThreeTEdgeMotifCounter::Count(), GetAllNeighbors(), GetAllNodes(), TVec< TVal, TSizeTy >::Len(), and TVec< TVal, TSizeTy >::Sort().
void TempMotifCounter::Count3TEdgeTriads | ( | double | delta, |
Counter3D & | counts | ||
) |
Definition at line 445 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), AddTriadEdgeData(), TNGraph::BegEI(), StarTriad3TEdgeCounter< EdgeData >::Count(), ThreeTEdgeTriadCounter::Counts(), TKeyDat< TKey, TDat >::Dat, edge, TNGraph::EndEI(), GetAllNeighbors(), GetAllNodes(), GetAllStaticTriangles(), TVec< TVal, TSizeTy >::GetDat(), TNGraph::GetMxNId(), TKeyDat< TKey, TDat >::Key, TVec< TVal, TSizeTy >::Len(), MAX, MIN, TVec< TVal, TSizeTy >::Sort(), static_graph_, and temporal_data_.
Referenced by Count3TEdge23Node().
void TempMotifCounter::Count3TEdgeTriadsNaive | ( | double | delta, |
Counter3D & | counts | ||
) |
Definition at line 370 of file temporalmotifs.cpp.
References AddStarEdges(), ThreeTEdgeMotifCounter::Count(), GetAllStaticTriangles(), TVec< TVal, TSizeTy >::Len(), and TVec< TVal, TSizeTy >::Sort().
|
private |
Definition at line 46 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), TNGraph::TNodeI::GetInDeg(), TNGraph::TNodeI::GetInNId(), TNGraph::GetNI(), TNGraph::TNodeI::GetOutDeg(), TNGraph::TNodeI::GetOutNId(), TNGraph::TNodeI::IsOutNId(), and static_graph_.
Referenced by Count3TEdge3NodeStars(), Count3TEdge3NodeStarsNaive(), Count3TEdgeTriads(), and GetAllStaticTriangles().
|
private |
Definition at line 34 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), TNGraph::BegNI(), TNGraph::EndNI(), and static_graph_.
Referenced by Count3TEdge3NodeStars(), Count3TEdge3NodeStarsNaive(), Count3TEdgeTriads(), and GetAllStaticTriangles().
Definition at line 56 of file temporalmotifs.cpp.
References TVec< TVal, TSizeTy >::Add(), TVec< TVal, TSizeTy >::Clr(), GetAllNeighbors(), GetAllNodes(), TNGraph::GetMxNId(), TNGraph::IsEdge(), TVec< TVal, TSizeTy >::Len(), TVec< TVal, TSizeTy >::PutAll(), TVec< TVal, TSizeTy >::Sort(), and static_graph_.
Referenced by Count3TEdgeTriads(), and Count3TEdgeTriadsNaive().
|
private |
Definition at line 42 of file temporalmotifs.cpp.
References temporal_data_.
Referenced by AddStarEdgeData(), AddStarEdges(), and AddTriadEdgeData().
|
private |
Definition at line 186 of file temporalmotifs.h.
Referenced by Count3TEdge2Node(), Count3TEdge3NodeStars(), Count3TEdgeTriads(), GetAllNeighbors(), GetAllNodes(), GetAllStaticTriangles(), and TempMotifCounter().
Definition at line 190 of file temporalmotifs.h.
Referenced by AddStarEdgeData(), AddStarEdges(), AddTriadEdgeData(), Count3TEdgeTriads(), HasEdges(), and TempMotifCounter().