Counts graphlet orbits with the Escape/EVOKE library.
More...
#include <OrbitCounter.h>
|
| | EVOKEOrbitCounter (const AppGraph &g, int size, const std::vector< bool > *needed_orbits=nullptr) |
| |
| | EVOKEOrbitCounter (const Escape::CGraph *g, int size, const std::vector< bool > *needed_orbits=nullptr) |
| | Counts on a graph given directly (vertices 0..n-1, sorted neighbour lists).
|
| |
| OrbitCounts | count () |
| | Counts the orbits. The result is indexed by internal index, then orbit.
|
| |
| OrbitCounts | countColumns (const std::vector< int > &orbits) |
| | Counts the orbits and returns only the given ones, by column: result[j][i] is orbit orbits[j] of the vertex with internal index i.
|
| |
| const OrbitCountTimings & | timings () const |
| | Timings of the last count() call.
|
| |
| void | setCliqueVertexCap (int orbit, const std::vector< double > *cap) |
| | Caps the clique count of each vertex (orbit 14: 4-cliques; any other value: orbit 72, 5-cliques).
|
| |
|
| using | Extract = std::function< void(double *const *, const int64_t *, int64_t, int)> |
| | Receives the counts (per_vertex[orbit][relabelled vertex]), the internal index -> relabelled vertex map, the vertex count and the orbit count.
|
| |
|
| void | countWith (const Extract &extract) |
| | Counts the orbits and hands them to extract before they are freed.
|
| |
| bool | needed (int orbit) const |
| |
Counts graphlet orbits with the Escape/EVOKE library.
Several of Escape's routines are replaced by reimplementations in OrbitCounter.cpp that return the same counts (checked by test/orbit_equivalence.cpp). The counter is used on the pattern (all orbits) and, in every filtering round, on the data graph or its candidate-induced subgraph.
◆ Extract
Receives the counts (per_vertex[orbit][relabelled vertex]), the internal index -> relabelled vertex map, the vertex count and the orbit count.
◆ EVOKEOrbitCounter() [1/2]
| EVOKEOrbitCounter::EVOKEOrbitCounter |
( |
const AppGraph & |
g, |
|
|
int |
size, |
|
|
const std::vector< bool > * |
needed_orbits = nullptr |
|
) |
| |
- Parameters
-
| g | the graph to count on |
| size | graphlet size: 3, 4 or 5 vertices |
| needed_orbits | if given, orbits whose entry is false may be left at zero. The filter passes the orbits some pattern vertex has: an orbit no pattern vertex has cannot reject a candidate. |
◆ EVOKEOrbitCounter() [2/2]
| EVOKEOrbitCounter::EVOKEOrbitCounter |
( |
const Escape::CGraph * |
g, |
|
|
int |
size, |
|
|
const std::vector< bool > * |
needed_orbits = nullptr |
|
) |
| |
Counts on a graph given directly (vertices 0..n-1, sorted neighbour lists).
◆ count()
Counts the orbits. The result is indexed by internal index, then orbit.
◆ countColumns()
| OrbitCounts EVOKEOrbitCounter::countColumns |
( |
const std::vector< int > & |
orbits | ) |
|
Counts the orbits and returns only the given ones, by column: result[j][i] is orbit orbits[j] of the vertex with internal index i.
Same counts as count().
◆ countWith()
| void EVOKEOrbitCounter::countWith |
( |
const Extract & |
extract | ) |
|
|
private |
Counts the orbits and hands them to extract before they are freed.
◆ needed()
| bool EVOKEOrbitCounter::needed |
( |
int |
orbit | ) |
const |
|
inlineprivate |
◆ setCliqueVertexCap()
| void EVOKEOrbitCounter::setCliqueVertexCap |
( |
int |
orbit, |
|
|
const std::vector< double > * |
cap |
|
) |
| |
|
inline |
Caps the clique count of each vertex (orbit 14: 4-cliques; any other value: orbit 72, 5-cliques).
cap is indexed by internal index. A vertex's count is then either exact or at least its cap, so every test "count >= requirement" with requirement <= cap is unchanged, while cliques among vertices that have all reached their cap are skipped.
◆ timings()
◆ cgraph
| const Escape::CGraph* EVOKEOrbitCounter::cgraph |
|
private |
◆ clique4_cap
| const std::vector<double>* EVOKEOrbitCounter::clique4_cap = nullptr |
|
private |
◆ clique5_cap
| const std::vector<double>* EVOKEOrbitCounter::clique5_cap = nullptr |
|
private |
◆ graphlet_size
| int EVOKEOrbitCounter::graphlet_size |
|
private |
◆ last_timings
◆ needed_orbits
| const std::vector<bool>* EVOKEOrbitCounter::needed_orbits |
|
private |
The documentation for this class was generated from the following files: