Class representing the neighbourhood of a given cell in the graph. In this derived class the neighbourhood is extended, meaning that all the neighbours seen so far are candidates.
More...
|
| Neighbourhood_Extended (const std::unordered_set< CoMMAIndexType > &s_neighbours_of_seed, const std::vector< CoMMAWeightType > &weights) |
| Constructor. More...
|
|
| Neighbourhood_Extended (const Neighbourhood_Extended< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > &other)=default |
| Copy constructor. More...
|
|
| ~Neighbourhood_Extended () override=default |
| Destructor. More...
|
|
void | update_it (const CoMMAIndexType new_fc, ContainerIndexConstIt neighs_begin, ContainerIndexConstIt neighs_end) override |
| Method that updates the neighbourhood. Given the new_fc, if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates. More...
|
|
| Neighbourhood (const std::unordered_set< CoMMAIndexType > &s_neighbours_of_seed, const std::vector< CoMMAWeightType > &weights) |
| Constructor. More...
|
|
| Neighbourhood (const Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType > &other)=default |
| Copy constructor. More...
|
|
virtual | ~Neighbourhood ()=default |
| Destructor. More...
|
|
void | update (const CoMMAIndexType new_fc, const ContainerIndexType &new_neighbours) |
| Method that updates the neighbourhood. Given the new_fc , if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates. More...
|
|
virtual void | update_it (const CoMMAIndexType new_fc, ContainerIndexConstIt neighs_begin, ContainerIndexConstIt neighs_end)=0 |
| Method that updates the neighbourhood. Given the new_fc , if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates. More...
|
|
const CandidatesContainerType & | get_candidates () const |
| Get candidates that should be consider in the next step of the agglomeration. More...
|
|
|
void | extract_and_update_candidates (const CoMMASetOfPairType &candidates_w_weights) |
| Extract the indices from a list of index-weight pairs and add them at the back of the candidates list. More...
|
|
const std::unordered_set< CoMMAIndexType > | _s_neighbours_of_seed |
| Set of the neighbours of seed given as an input in the constructor. Here, we can find all the neighbours of order up to a user-defined value of the initial seed. Hence, it holds the cells allowed to be agglomerated. More...
|
|
const std::vector< CoMMAWeightType > & | _weights |
| Priority weights. More...
|
|
std::unordered_set< CoMMAIndexType > | _s_fc |
| Set of the fine cells composing the coarse cell. More...
|
|
CandidatesContainerType | _candidates |
| Candidates that should be considered when choosing the next fine cell to add to the coarse one. More...
|
|
template<typename CoMMAIndexType, typename CoMMAWeightType, typename CoMMAIntType>
class comma::Neighbourhood_Extended< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >
Class representing the neighbourhood of a given cell in the graph. In this derived class the neighbourhood is extended, meaning that all the neighbours seen so far are candidates.
- Template Parameters
-
CoMMAIndexType | the CoMMA index type for the global index of the mesh |
CoMMAWeightType | the CoMMA weight type for the weights (volume or area) of the nodes or edges of the Mesh |
CoMMAIntType | the CoMMA type for integers |
template<typename CoMMAIndexType , typename CoMMAWeightType , typename CoMMAIntType >
Method that updates the neighbourhood. Given the new_fc, if is in the neighbours, it is deleted. Then, the new neighbours are added as candidates.
- Parameters
-
[in] | new_fc | Index of the new fine cell to be added to the set of fine cells |
[in] | neighs_begin | Constant iterator giving the beginning of the neighbours |
[in] | neighs_end | Constant iterator giving the end of the neighbours |
Implements comma::Neighbourhood< CoMMAIndexType, CoMMAWeightType, CoMMAIntType >.