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 <priorityqueue.h>
Public Member Functions | |
TMaxPriorityQueue () | |
void | Insert (const TVal &X, float Priority) |
void | SetPriority (const TVal &X, float NewPriority) |
float | GetPriority (const TVal &X) |
float | GetMaxPriority () |
TVal | PopMax () |
bool | IsEmpty () |
int | Size () |
void | GetPriorities (THash< TVal, TFlt > &Result) |
Private Member Functions | |
int | Parent (int i) |
int | Left (int i) |
int | Right (int i) |
void | Swap (int i, int j) |
void | MaxHeapify (int i) |
Private Attributes | |
TFltV | Priorities |
THash< TVal, int > | ValToIndex |
TVec< TVal > | IndexToVal |
Definition at line 19 of file priorityqueue.h.
|
inline |
Definition at line 21 of file priorityqueue.h.
|
inline |
Definition at line 57 of file priorityqueue.h.
References IAssertR, TMaxPriorityQueue< TVal >::Priorities, and TMaxPriorityQueue< TVal >::Size().
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced().
|
inline |
Definition at line 83 of file priorityqueue.h.
References THash< TKey, TDat, THashFunc >::AddDat(), TMaxPriorityQueue< TVal >::IndexToVal, TVec< TVal, TSizeTy >::Len(), and TMaxPriorityQueue< TVal >::Priorities.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced().
|
inline |
Definition at line 49 of file priorityqueue.h.
References THash< TKey, TDat, THashFunc >::GetDat(), THash< TKey, TDat, THashFunc >::IsKey(), TMaxPriorityQueue< TVal >::Priorities, and TMaxPriorityQueue< TVal >::ValToIndex.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced(), and TMaxPriorityQueue< TVal >::SetPriority().
|
inline |
Definition at line 23 of file priorityqueue.h.
References TVec< TVal, TSizeTy >::Add(), THash< TKey, TDat, THashFunc >::AddDat(), TMaxPriorityQueue< TVal >::IndexToVal, TVec< TVal, TSizeTy >::Len(), TMaxPriorityQueue< TVal >::Priorities, TMaxPriorityQueue< TVal >::SetPriority(), and TMaxPriorityQueue< TVal >::ValToIndex.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced(), and TMaxPriorityQueue< TVal >::SetPriority().
|
inline |
Definition at line 74 of file priorityqueue.h.
References TMaxPriorityQueue< TVal >::Size().
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced().
|
inlineprivate |
Definition at line 95 of file priorityqueue.h.
Referenced by TMaxPriorityQueue< TVal >::MaxHeapify().
|
inlineprivate |
Definition at line 106 of file priorityqueue.h.
References TMaxPriorityQueue< TVal >::Left(), TVec< TVal, TSizeTy >::Len(), TMaxPriorityQueue< TVal >::Priorities, TMaxPriorityQueue< TVal >::Right(), and TMaxPriorityQueue< TVal >::Swap().
Referenced by TMaxPriorityQueue< TVal >::PopMax(), and TMaxPriorityQueue< TVal >::SetPriority().
|
inlineprivate |
Definition at line 94 of file priorityqueue.h.
Referenced by TMaxPriorityQueue< TVal >::SetPriority().
|
inline |
Definition at line 62 of file priorityqueue.h.
References THash< TKey, TDat, THashFunc >::DelKey(), TVec< TVal, TSizeTy >::DelLast(), IAssertR, TMaxPriorityQueue< TVal >::IndexToVal, TVec< TVal, TSizeTy >::Len(), TMaxPriorityQueue< TVal >::MaxHeapify(), TMaxPriorityQueue< TVal >::Priorities, TMaxPriorityQueue< TVal >::Size(), TMaxPriorityQueue< TVal >::Swap(), and TMaxPriorityQueue< TVal >::ValToIndex.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced().
|
inlineprivate |
Definition at line 96 of file priorityqueue.h.
Referenced by TMaxPriorityQueue< TVal >::MaxHeapify().
|
inline |
Definition at line 31 of file priorityqueue.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TMaxPriorityQueue< TVal >::GetPriority(), TMaxPriorityQueue< TVal >::Insert(), THash< TKey, TDat, THashFunc >::IsKey(), TMaxPriorityQueue< TVal >::MaxHeapify(), TMaxPriorityQueue< TVal >::Parent(), TMaxPriorityQueue< TVal >::Priorities, TMaxPriorityQueue< TVal >::Swap(), and TMaxPriorityQueue< TVal >::ValToIndex.
Referenced by anonymous_namespace{randwalk.h}::ApproxContributionsBalanced(), and TMaxPriorityQueue< TVal >::Insert().
|
inline |
Definition at line 78 of file priorityqueue.h.
References TVec< TVal, TSizeTy >::Len(), and TMaxPriorityQueue< TVal >::Priorities.
Referenced by TMaxPriorityQueue< TVal >::GetMaxPriority(), TMaxPriorityQueue< TVal >::IsEmpty(), and TMaxPriorityQueue< TVal >::PopMax().
|
inlineprivate |
Definition at line 98 of file priorityqueue.h.
References THash< TKey, TDat, THashFunc >::GetDat(), TMaxPriorityQueue< TVal >::IndexToVal, TMaxPriorityQueue< TVal >::Priorities, TVec< TVal, TSizeTy >::Swap(), and TMaxPriorityQueue< TVal >::ValToIndex.
Referenced by TMaxPriorityQueue< TVal >::MaxHeapify(), TMaxPriorityQueue< TVal >::PopMax(), and TMaxPriorityQueue< TVal >::SetPriority().
|
private |
Definition at line 92 of file priorityqueue.h.
Referenced by TMaxPriorityQueue< TVal >::GetPriorities(), TMaxPriorityQueue< TVal >::Insert(), TMaxPriorityQueue< TVal >::PopMax(), and TMaxPriorityQueue< TVal >::Swap().
|
private |
Definition at line 90 of file priorityqueue.h.
Referenced by TMaxPriorityQueue< TVal >::GetMaxPriority(), TMaxPriorityQueue< TVal >::GetPriorities(), TMaxPriorityQueue< TVal >::GetPriority(), TMaxPriorityQueue< TVal >::Insert(), TMaxPriorityQueue< TVal >::MaxHeapify(), TMaxPriorityQueue< TVal >::PopMax(), TMaxPriorityQueue< TVal >::SetPriority(), TMaxPriorityQueue< TVal >::Size(), and TMaxPriorityQueue< TVal >::Swap().
|
private |
Definition at line 91 of file priorityqueue.h.
Referenced by TMaxPriorityQueue< TVal >::GetPriority(), TMaxPriorityQueue< TVal >::Insert(), TMaxPriorityQueue< TVal >::PopMax(), TMaxPriorityQueue< TVal >::SetPriority(), and TMaxPriorityQueue< TVal >::Swap().