1 #ifndef CASM_SubClusterGenerator
2 #define CASM_SubClusterGenerator
4 #include <boost/iterator/iterator_facade.hpp>
16 template <
typename ClusterType>
18 :
public boost::iterator_facade<SubClusterGenerator<ClusterType>,
19 ClusterType, boost::forward_traversal_tag> {
const_value_iterator value_begin() const
const_value_iterator value_end() const
A Counter allows looping over many incrementing variables in one loop.
Generates subclusters of a cluster with an iterator-like interface.
notstd::cloneable_ptr< ClusterType > m_current
The current subcluster.
ClusterType & dereference() const
bool m_current_valid
for lazy construction of m_current
bool equal(const SubClusterGenerator &other) const
Counter< std::vector< int > > m_site_counter
Indicates which sites to include (1) or not include (0) in the subcluster.
SubClusterGenerator(const ClusterType &clust)
Construt with the cluster to find subclusters of.
notstd::cloneable_ptr< ClusterType > m_cluster
the cluster we're finding subclusters of
friend class boost::iterator_core_access
SubClusterGenerator()
Default construtor.
INDEX_TYPE Index
For long integer indexing:
Non-std smart pointer classes and functions.
std::unique_ptr< T > make_unique(Args &&... args)
c++17 does not include 'make_unique'