<commit_before>#ifndef SEQUENCE_GENERATOR_HPP_
#define SEQUENCE_GENERATOR_HPP_

template < class Sequence >
class sequence_generator;

#include "clotho/powerset/variable_subset.hpp"

template < class E, class B, class BM, class EK >
class sequence_generator< std::shared_ptr< clotho::powersets::variable_subset< E, B, BM, EK > > > {
public:
    typedef clotho::powersets::variable_subset< E, B, BM, EK >  sequence_type;
    typedef std::shared_ptr< sequence_type >                    result_type;
    typedef typename sequence_type::powerset_type               set_type;
    typedef sequence_generator< result_type >                   self_type;

    sequence_generator( set_type & s ) : m_set( &s ) {}
    sequence_generator( const self_type & s ) : m_set( s.m_set ) {}

    result_type operator()( ) {
        return m_set->create_subset();
    }

    virtual ~sequence_generator() {}
protected:
    set_type    * m_set;
};

// sequence_generator< Sequence, sequence_generator< Sequence, recombine > >;
#endif  // SEQUENCE_GENERATOR_HPP_<commit_msg>Changed to utilize same empty set for all generated empty sequences<commit_after>#ifndef SEQUENCE_GENERATOR_HPP_
#define SEQUENCE_GENERATOR_HPP_

template < class Sequence >
class sequence_generator;

#include "clotho/powerset/variable_subset.hpp"

template < class E, class B, class BM, class EK >
class sequence_generator< std::shared_ptr< clotho::powersets::variable_subset< E, B, BM, EK > > > {
public:
    typedef clotho::powersets::variable_subset< E, B, BM, EK >  sequence_type;
    typedef std::shared_ptr< sequence_type >                    result_type;
    typedef typename sequence_type::powerset_type               set_type;
    typedef sequence_generator< result_type >                   self_type;

    sequence_generator( set_type & s ) : m_set( &s ), m_res( s.create_subset() ) {}
    sequence_generator( const self_type & s ) : m_set( s.m_set ), m_res( s.m_res ) {}

    result_type operator()( ) {
//        return m_set->create_subset();
        return m_res;
    }

    virtual ~sequence_generator() {}
protected:
    set_type    * m_set;
    result_type m_res;
};

// sequence_generator< Sequence, sequence_generator< Sequence, recombine > >;
#endif  // SEQUENCE_GENERATOR_HPP_
{'fraction_non_alphanumeric': 0.10226767452200979, 'fraction_numerical': 0.0, 'mean_word_length': 3.620123203285421, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4546586', 'n_tokens_mistral': 731, 'n_tokens_neox': 692, 'n_words': 167}