Commit 3633c3ea authored by Mathias Goldau's avatar Mathias Goldau
Browse files

[DOC] Improved some documentation and added the shutdown flag test.

parent b6111b15
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "../WExportCommon.h" #include "../WExportCommon.h"
/** /**
* Implements a very simple union-find datastructure aka disjoint_sets. * Implements a very simple union-find datastructure aka disjoint_sets.
* \note I know there is a boost solution on that: * \note I know there is a boost solution on that, but I didn't get it to work and I don't know how fast it is:
* http://www.boost.org/doc/libs/1_42_0/libs/disjoint_sets/disjoint_sets.html * http://www.boost.org/doc/libs/1_42_0/libs/disjoint_sets/disjoint_sets.html
* *
* And you may use it like this: * And you may use it like this:
...@@ -117,7 +117,7 @@ public: ...@@ -117,7 +117,7 @@ public:
void merge( size_t i, size_t j ); void merge( size_t i, size_t j );
private: private:
std::vector< size_t > m_component; //!< Stores for each index its cluster ID std::vector< size_t > m_component; //!< Stores for each index its ID
}; };
......
...@@ -90,10 +90,16 @@ void WMDetTractClustering::moduleMain() ...@@ -90,10 +90,16 @@ void WMDetTractClustering::moduleMain()
{ {
m_moduleState.wait(); m_moduleState.wait();
if ( m_shutdownFlag() ) // in case of shutdown => abort
{
break;
}
if ( !m_tractInput->getData().get() ) // ok, the output has not yet sent data if ( !m_tractInput->getData().get() ) // ok, the output has not yet sent data
{ {
continue; continue;
} }
if( m_rawTracts != m_tractInput->getData() ) // in case data has changed if( m_rawTracts != m_tractInput->getData() ) // in case data has changed
{ {
m_rawTracts = m_tractInput->getData(); m_rawTracts = m_tractInput->getData();
...@@ -288,7 +294,6 @@ void WMDetTractClustering::cluster() ...@@ -288,7 +294,6 @@ void WMDetTractClustering::cluster()
m_dLtTableExists = true; m_dLtTableExists = true;
boost::shared_ptr< WProgress > eraseProgress( new WProgress( "Erasing clusters", 1 ) ); boost::shared_ptr< WProgress > eraseProgress( new WProgress( "Erasing clusters", 1 ) );
// m_progress->addSubProgress( eraseProgress );
// remove empty clusters // remove empty clusters
WFiberCluster emptyCluster; WFiberCluster emptyCluster;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment