#include <BottomNI.h>
Collaboration diagram for PLearn::BottomNI< T >:
Public Member Functions | |
BottomNI () | |
Default constructor, you must then call init. | |
BottomNI (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 | |
int | nZeros () const |
void | sort () |
const TVec< pair< T, int > > & | getBottomN () |
call this at the end to get the the smallest N values with associated integer index | |
Protected Attributes | |
int | n_zeros |
number of zeros | |
int | N |
TVec< pair< T, int > > | bottomn |
pair< T, int > * | bottomnptr |
bottomn.data() | |
pair< T, int > * | maxpair |
Definition at line 62 of file BottomNI.h.
|
Default constructor, you must then call init.
Definition at line 74 of file BottomNI.h. |
|
N is the number of (value,index) pairs to remember.
Definition at line 78 of file BottomNI.h. References PLearn::BottomNI< T >::init(). |
|
call this at the end to get the the smallest N values with associated integer index
Definition at line 127 of file BottomNI.h. References PLearn::BottomNI< T >::bottomn. Referenced by PLearn::computeNearestNeighbors(), and PLearn::VMatrix::evaluateKernelBottomN(). |
|
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 81 of file BottomNI.h. References PLearn::BottomNI< T >::bottomn, PLearn::BottomNI< T >::bottomnptr, PLearn::TVec< pair< T, int > >::data(), PLearn::BottomNI< T >::init(), PLearn::BottomNI< T >::N, PLearn::BottomNI< T >::n_zeros, and PLearn::TVec< pair< T, int > >::resize(). Referenced by PLearn::BottomNI< T >::BottomNI(), and PLearn::BottomNI< T >::init(). |
|
Definition at line 121 of file BottomNI.h. References PLearn::BottomNI< T >::n_zeros. Referenced by PLearn::computeNearestNeighbors(). |
|
Definition at line 90 of file BottomNI.h. References PLearn::BottomNI< T >::N. |
|
Definition at line 123 of file BottomNI.h. References PLearn::BottomNI< T >::bottomn, PLearn::BottomNI< T >::bottomnptr, and PLearn::TVec< pair< T, int > >::length(). Referenced by PLearn::computeNearestNeighbors(), and PLearn::VMatrix::evaluateKernelBottomN(). |
|
call this for each new value seen find the new maximum: Definition at line 93 of file BottomNI.h. References PLearn::TVec< pair< T, int > >::append(), PLearn::BottomNI< T >::bottomn, PLearn::BottomNI< T >::bottomnptr, PLearn::TVec< pair< T, int > >::length(), PLearn::BottomNI< T >::maxpair, PLearn::BottomNI< T >::N, and PLearn::BottomNI< T >::n_zeros. Referenced by PLearn::computeNearestNeighbors(), and PLearn::VMatrix::evaluateKernelBottomN(). |
|
Definition at line 67 of file BottomNI.h. Referenced by PLearn::BottomNI< T >::getBottomN(), PLearn::BottomNI< T >::init(), PLearn::BottomNI< T >::sort(), and PLearn::BottomNI< T >::update(). |
|
bottomn.data()
Definition at line 68 of file BottomNI.h. Referenced by PLearn::BottomNI< T >::init(), PLearn::BottomNI< T >::sort(), and PLearn::BottomNI< T >::update(). |
|
Definition at line 69 of file BottomNI.h. Referenced by PLearn::BottomNI< T >::update(). |
|
Definition at line 66 of file BottomNI.h. Referenced by PLearn::BottomNI< T >::init(), PLearn::BottomNI< T >::reset(), and PLearn::BottomNI< T >::update(). |
|
number of zeros
Definition at line 65 of file BottomNI.h. Referenced by PLearn::BottomNI< T >::init(), PLearn::BottomNI< T >::nZeros(), and PLearn::BottomNI< T >::update(). |