#include <TopNI.h>
Collaboration diagram for PLearn::TopNI< T >:

Public Member Functions | |
| TopNI () | |
| Default constructor, you must then call init. | |
| TopNI (int the_N) | |
| N is the number of (value,index) pairs to remember. | |
| void | init (int the_N) |
| N is the number of (value,point) pairs to remember. | |
| void | reset () |
| void | update (T value, int index) |
| call this for each new value seen | |
| void | sort () |
| const TVec< pair< T, int > > & | getTopN () |
| call this at the end to get the the smallest N values with associated integer index | |
Protected Attributes | |
| int | N |
| TVec< pair< T, int > > | topn |
| pair< T, int > * | topnptr |
| topn.data() | |
| pair< T, int > * | minpair |
Definition at line 62 of file TopNI.h.
|
|||||||||
|
Default constructor, you must then call init.
|
|
||||||||||
|
N is the number of (value,index) pairs to remember.
Definition at line 77 of file TopNI.h. References PLearn::TopNI< T >::init(). |
|
|||||||||
|
call this at the end to get the the smallest N values with associated integer index
Definition at line 121 of file TopNI.h. References PLearn::TopNI< T >::topn. Referenced by PLearn::VMatrix::evaluateKernelTopN(). |
|
||||||||||
|
N is the number of (value,point) pairs to remember. < reserve space for N elements < set length back to 0 < ptr for faster access Definition at line 80 of file TopNI.h. References PLearn::TVec< pair< T, int > >::data(), PLearn::TopNI< T >::init(), PLearn::TopNI< T >::N, PLearn::TVec< pair< T, int > >::resize(), PLearn::TopNI< T >::topn, and PLearn::TopNI< T >::topnptr. Referenced by PLearn::TopNI< T >::init(), and PLearn::TopNI< T >::TopNI(). |
|
|||||||||
|
Definition at line 88 of file TopNI.h. References PLearn::TopNI< T >::N. |
|
|||||||||
|
Definition at line 117 of file TopNI.h. References PLearn::TVec< pair< T, int > >::length(), PLearn::TopNI< T >::topn, and PLearn::TopNI< T >::topnptr. Referenced by PLearn::VMatrix::evaluateKernelTopN(). |
|
||||||||||||||||
|
call this for each new value seen find the new minimum: Definition at line 91 of file TopNI.h. References PLearn::TVec< pair< T, int > >::append(), PLearn::TVec< pair< T, int > >::length(), PLearn::TopNI< T >::minpair, PLearn::TopNI< T >::N, PLearn::TopNI< T >::topn, and PLearn::TopNI< T >::topnptr. Referenced by PLearn::VMatrix::evaluateKernelTopN(). |
|
|||||
|
Definition at line 68 of file TopNI.h. Referenced by PLearn::TopNI< T >::update(). |
|
|||||
|
Definition at line 65 of file TopNI.h. Referenced by PLearn::TopNI< T >::init(), PLearn::TopNI< T >::reset(), and PLearn::TopNI< T >::update(). |
|
|||||
|
Definition at line 66 of file TopNI.h. Referenced by PLearn::TopNI< T >::getTopN(), PLearn::TopNI< T >::init(), PLearn::TopNI< T >::sort(), and PLearn::TopNI< T >::update(). |
|
|||||
|
topn.data()
Definition at line 67 of file TopNI.h. Referenced by PLearn::TopNI< T >::init(), PLearn::TopNI< T >::sort(), and PLearn::TopNI< T >::update(). |
1.3.7