1 #ifndef snap_temporalmotifs_h
2 #define snap_temporalmotifs_h
20 int m() {
return m_; }
37 int m() {
return m_; }
38 int n() {
return n_; }
60 int m() {
return m_; }
61 int n() {
return n_; }
62 int p() {
return p_; }
178 int& index,
int u,
int v,
int nbr,
int key1,
int key2);
181 int& index,
int u,
int v,
int nbr,
int key);
218 template <
typename EdgeData>
227 virtual void PopPre(
const EdgeData& event) = 0;
228 virtual void PopPos(
const EdgeData& event) = 0;
229 virtual void PushPre(
const EdgeData& event) = 0;
230 virtual void PushPos(
const EdgeData& event) = 0;
303 #endif // snap_temporalmotifs_h
bool HasEdges(int u, int v)
void Count(const TVec< EdgeData > &events, const TIntV ×tamps, double delta)
void GetAllNodes(TIntV &nodes)
TempMotifCounter(const TStr &filename)
int PreCount(int dir1, int dir2, int dir3)
TKeyDat< TInt, TInt > TIntPair
void Count(const TIntV &event_string, const TIntV ×tamps, double delta, Counter3D &counts)
void Count3TEdgeTriadsNaive(double delta, Counter3D &counts)
virtual void PushPre(const EdgeData &event)=0
void ProcessCurrent(const StarEdgeData &event)
void Count3TEdge23Node(double delta, Counter2D &counts)
void PopPre(const StarEdgeData &event)
virtual void PopPre(const EdgeData &event)=0
void PopPre(const TriadEdgeData &event)
virtual void PopPos(const EdgeData &event)=0
void PopPos(const StarEdgeData &event)
const TUInt64 & operator()(int i, int j) const
int PosCount(int dir1, int dir2, int dir3)
void PopPos(const TriadEdgeData &event)
void GetAllStaticTriangles(TIntV &Us, TIntV &Vs, TIntV &Ws)
void InitializeCounters()
const TUInt64 & operator()(int i) const
virtual void InitializeCounters()=0
void AddStarEdgeData(TVec< TIntPair > &ts_indices, TVec< StarEdgeData > &events, int &index, int u, int v, int nbr, int key)
void ProcessCurrent(const TriadEdgeData &event)
const TUInt64 & operator()(int i, int j, int k) const
void PutAll(const TVal &Val)
Sets all elements of the vector to value Val.
virtual void ProcessCurrent(const EdgeData &event)=0
void IncrementCounts(int event)
ThreeTEdgeStarCounter(int max_nodes)
void Count3TEdge3NodeStars(double delta, Counter3D &pre_counts, Counter3D &pos_counts, Counter3D &mid_counts)
void InitializeCounters()
Counter2D(int m=0, int n=0)
StarEdgeData(int _nbr, int _dir)
void GetAllNeighbors(int node, TIntV &nbrs)
Counter3D(int m=0, int n=0, int p=0)
int Counts(int dir1, int dir2, int dir3)
TUInt64 & operator()(int i, int j, int k)
TriadEdgeData(int _nbr, int _dir, int _u_or_v)
void PushPos(const StarEdgeData &event)
ThreeTEdgeMotifCounter(int size)
void AddTriadEdgeData(TVec< TriadEdgeData > &events, TVec< TIntPair > &ts_indices, int &index, int u, int v, int nbr, int key1, int key2)
void DecrementCounts(int event)
ThreeTEdgeTriadCounter(int max_nodes, int node_u, int node_v)
virtual void PushPos(const EdgeData &event)=0
void Count3TEdge2Node(double delta, Counter2D &counts)
void PushPre(const StarEdgeData &event)
void Count3TEdgeTriads(double delta, Counter3D &counts)
void PushPre(const TriadEdgeData &event)
void AddStarEdges(TVec< TIntPair > &combined, int u, int v, int key)
int MidCount(int dir1, int dir2, int dir3)
TUInt64 & operator()(int i, int j)
TUInt64 & operator()(int i)
TVec< THash< TInt, TIntV > > temporal_data_
void PushPos(const TriadEdgeData &event)
void Count3TEdge3NodeStarsNaive(double delta, Counter3D &pre_counts, Counter3D &pos_counts, Counter3D &mid_counts)