#include <basic_salembier.hh>
Collaboration diagram for oln::lrde::ufmt::basic_salembier< I >:
Public Types | |
enum | { not_analyzed = MAXINT - 2, in_the_queue = MAXINT - 1 } |
typedef mlc::exact< I >::ret::point_type | point |
typedef mlc::exact< I >::ret::value_type | value |
typedef oln::lrde::ufmt::internal::neighborhood< I >::ret | Nbh |
typedef mlc::exact< Nbh >::ret::iter_type | niter |
typedef std::pair< unsigned, unsigned > | pair_t |
Public Member Functions | |
basic_salembier (const abstract::image< I > &f, const typename oln::lrde::ufmt::internal::neighborhood< I >::ret &nbh) | |
void | go () |
void | init () |
int | flood (int h) |
unsigned | n_level_roots () const |
Public Attributes | |
const I & | f |
const Nbh & | nbh |
mute< I, int >::ret | status |
size_t | nvalues |
unsigned * | number_nodes |
bool * | node_at_level |
hqueue_t< point > | hqueue |
int | h_min |
std::map< pair_t, pair_t > | father |
The (corrected) algorithm, as written in the original article, is as follows:
flood (h) while not hqueue-empty (h) p <- hqueue-first (h) STATUS(p) <- number-nodes (h) for every neighbor q of p if STATUS(q) == "Not analyzed" hqueue-add(ORI(q), q) STATUS(q) <- "In the queue" node-at-level(ORI(q)) <- true if (ORI(q) > ORI(p)) m = ORI(q) repeat m <- flood(m) until m <= h number-nodes(h) <- number-nodes(h) + 1 m <- h - 1 while m >= 0 and node-at-level(m) == false m <- m - 1 i <- number-nodes(h) - 1 if m >= 0 j <- number-nodes(m) father of C(i, h) <- node C(j, m) else C(i, h) has no father // C(i, h) is root node. node-at-level(h) <- false return m
salembier.98.itip.
Definition at line 164 of file basic_salembier.hh.