Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F63587867
cluster_grow.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, May 21, 04:42
Size
2 KB
Mime Type
text/x-c++
Expires
Thu, May 23, 04:42 (2 d)
Engine
blob
Format
Raw Data
Handle
17791902
Attached To
rTAMAAS tamaas
cluster_grow.hh
View Options
#ifndef __CLUSTER_GROW_HH__
#define __CLUSTER_GROW_HH__
/* -------------------------------------------------------------------------- */
#include "contact_area.hh"
/* -------------------------------------------------------------------------- */
#include <queue>
/* -------------------------------------------------------------------------- */
class ClusterGrow {
/* ------------------------------------------------------------------------ */
/* Typedefs */
/* ------------------------------------------------------------------------ */
public:
/* ------------------------------------------------------------------------ */
/* Constructors/Destructors */
/* ------------------------------------------------------------------------ */
public:
ClusterGrow(Map2d<int> & area,
int initial_state,
int to_check_state = -1,
int contact_state = 1,
int no_contact_state = 0);
virtual ~ClusterGrow();
/* ------------------------------------------------------------------------ */
/* Methods */
/* ------------------------------------------------------------------------ */
public:
//! start grow of a cluster from a given point
template <bool periodic>
void grow(UInt i, UInt j);
private:
void addIndicesToExplore(std::vector<std::pair<UInt,UInt> > & indices_to_add);
/* ------------------------------------------------------------------------ */
/* Accessors */
/* ------------------------------------------------------------------------ */
public:
UInt getNbClusters(){
UInt tmp = current_state - 2;
return tmp;
};
/* ------------------------------------------------------------------------ */
/* Class Members */
/* ------------------------------------------------------------------------ */
private:
int current_state;
const int to_check_state ;
const int contact_state ;
const int no_contact_state;
Map2d<int> & area;
std::queue<std::pair<UInt,UInt> > index_to_explore;
};
/* -------------------------------------------------------------------------- */
#endif /* __CLUSTER_GROW_HH__ */
Event Timeline
Log In to Comment