#include <motifcluster.h>
Definition at line 155 of file motifcluster.h.
ChibaNishizekiWeighter::ChibaNishizekiWeighter |
( |
PUNGraph |
graph | ) |
|
|
inline |
void ChibaNishizekiWeighter::AdjustLabels |
( |
int |
kcurr, |
|
|
int |
klast, |
|
|
const TIntV & |
U |
|
) |
| |
|
private |
Definition at line 644 of file motifcluster.cpp.
645 for (
int i = 0; i < Up.Len(); i++) {
649 TIntV nbrs_klast_new;
650 for (
int j = 0; j < nbrs_klast.
Len(); j++) {
651 int nbr = nbrs_klast[j];
655 nbrs_klast_new.
Add(nbr);
658 graph_[klast][node] = nbrs_klast_new;
TSizeTy Len() const
Returns the number of elements in the vector.
TVec< TVec< TIntV > > graph_
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
void ChibaNishizekiWeighter::CliqueEnum |
( |
int |
k, |
|
|
const TIntV & |
U |
|
) |
| |
|
private |
Definition at line 662 of file motifcluster.cpp.
672 for (
int i = 0; i < order.
Len(); i++) {
678 for (
int j = 0; j < U_prime.
Len(); j++) {
689 for (
int j = 0; j < U_prime.
Len(); j++) {
void AdjustLabels(int kcurr, int klast, const TIntV &U)
void FlushCliques(const TIntV &U)
TSizeTy Len() const
Returns the number of elements in the vector.
void SubgraphDegreeOrder(int k, const TIntV &U, TIntV &order)
void CliqueEnum(int k, const TIntV &U)
TVec< TVec< TIntV > > graph_
TSizeTy Add()
Adds a new element at the end of the vector, after its current last element.
void DelLast()
Removes the last element of the vector.
void ChibaNishizekiWeighter::FlushCliques |
( |
const TIntV & |
U | ) |
|
|
private |
Definition at line 624 of file motifcluster.cpp.
625 for (
int i = 0; i < U.
Len(); i++) {
628 for (
int j = 0; j < nbrs.
Len(); j++) {
635 for (
int k = 0; k <
C_.
Len(); k++) {
636 clique[k + 2] =
C_[k];
TSizeTy Len() const
Returns the number of elements in the vector.
void UpdateWeights(const TIntV &clique)
TVec< TVec< TIntV > > graph_
void ChibaNishizekiWeighter::Initialize |
( |
int |
k | ) |
|
|
private |
Definition at line 549 of file motifcluster.cpp.
557 for (
int i = 0; i <= max_nodes; i++) {
566 for (
int i = 0; i < k + 2; ++i) {
573 for (
int src = 0; src < N; src++) {
575 int deg = src_it.
GetDeg();
576 graph_k[src] =
TIntV(deg);
579 graph_k[src][
edge] = dst;
int GetMxNId() const
Returns an ID that is larger than any node ID in the graph.
int AddNode(int NId=-1)
Adds a node of ID NId to the graph.
Node iterator. Only forward iteration (operator++) is supported.
int GetNodes() const
Returns the number of nodes in the graph.
int GetDeg() const
Returns degree of the current node.
void Clr(const bool &DoDel=true, const TSizeTy &NoDelLim=-1)
Clears the contents of the vector.
void PutAll(const TVal &Val)
Sets all elements of the vector to value Val.
TNodeI GetNI(const int &NId) const
Returns an iterator referring to the node of ID NId in the graph.
TVec< THash< TInt, TInt > > WeightVH
PGraph GetKCore(const PGraph &Graph, const int &K)
TVec< TVec< TIntV > > graph_
int GetNbrNId(const int &NodeN) const
Returns ID of NodeN-th neighboring node.
bool IsNode(const int &NId) const
Tests whether ID NId is a node.
void DelSelfEdges(const PGraph &Graph)
Removes all the self-edges from the graph.
Vector is a sequence TVal objects representing an array that can change in size.
void ChibaNishizekiWeighter::Run |
( |
int |
k | ) |
|
Definition at line 584 of file motifcluster.cpp.
587 for (
int i = 0; i < U.Len(); i++) {
void CliqueEnum(int k, const TIntV &U)
TVec< TVec< TIntV > > graph_
void ChibaNishizekiWeighter::SubgraphDegreeOrder |
( |
int |
k, |
|
|
const TIntV & |
U, |
|
|
TIntV & |
order |
|
) |
| |
|
private |
Definition at line 593 of file motifcluster.cpp.
597 for (
int i = 0; i < U.
Len(); i++) {
599 int size =
graph_[k][node].Len();
606 degs.
Trunc(end_size);
610 order =
TIntV(degs.Len());
611 for (
int i = 0; i < degs.Len(); i++) {
612 order[i] = degs[i].Dat;
TSizeTy Len() const
Returns the number of elements in the vector.
TVec< TVec< TIntV > > graph_
void Trunc(const TSizeTy &_Vals=-1)
Truncates the vector's length and capacity to _Vals elements.
Vector is a sequence TVal objects representing an array that can change in size.
void ChibaNishizekiWeighter::UpdateWeights |
( |
const TIntV & |
clique | ) |
|
|
private |
Definition at line 616 of file motifcluster.cpp.
617 for (
int i = 0; i < clique.
Len(); ++i) {
618 for (
int j = i + 1; j < clique.
Len(); ++j) {
TSizeTy Len() const
Returns the number of elements in the vector.
static void IncrementWeight(int i, int j, WeightVH &weights)
WeightVH& ChibaNishizekiWeighter::weights |
( |
| ) |
|
|
inline |
TIntV ChibaNishizekiWeighter::C_ |
|
private |
int ChibaNishizekiWeighter::k_ |
|
private |
TIntV ChibaNishizekiWeighter::labels_ |
|
private |
PUNGraph ChibaNishizekiWeighter::orig_graph_ |
|
private |
WeightVH ChibaNishizekiWeighter::weights_ |
|
private |
The documentation for this class was generated from the following files: