Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template basic_two_stage_index

boost::genetics::basic_two_stage_index — Two stage index, first index ordered by value, second by address.

Synopsis

// In header: <boost/genetics/two_stage_index.hpp>

template<typename StringType, typename IndexArrayType, typename AddrArrayType, 
         bool Writable> 
class basic_two_stage_index {
public:
  // types
  typedef AddrArrayType::value_type  addr_type; 
  typedef IndexArrayType::value_type index_type;

  // member classes/structs/unions

  class iterator {
  public:
    // member classes/structs/unions

    struct active_state {

      // public member functions
      bool operator<(const active_state &);

      // public data members
      addr_type elem;
      const addr_type * end;
      index_type idx;
      addr_type prev;
      const addr_type * ptr;
      addr_type start;
    };
    // construct/copy/destruct
    iterator();
    iterator(const basic_two_stage_index *, const dna_string &, size_t, 
             size_t, size_t, bool);

    // public member functions
    operator size_t() const;
    iterator & operator++();
    iterator & operator++(int);

    // private member functions
    void find_next(bool);
  };

  // construct/copy/destruct
  basic_two_stage_index();
  template<typename Mapper> 
    basic_two_stage_index(StringType &, Mapper &, 
                          typename Mapper::is_mapper * = 0);
  basic_two_stage_index(StringType &, size_t);
  basic_two_stage_index & operator=(basic_two_stage_index &&);

  // public member functions
  size_t end() const;
  iterator find_inexact(const dna_string &, size_t, size_t, size_t, bool) const;
  void swap(basic_two_stage_index &);
  template<typename charT, typename traits> 
    void write_ascii(std::basic_ostream< charT, traits > &) const;
  void write_binary(writer &) const;
};

Description

basic_two_stage_index public construct/copy/destruct

  1. basic_two_stage_index();
  2. template<typename Mapper> 
      basic_two_stage_index(StringType & string, Mapper & map, 
                            typename Mapper::is_mapper * p = 0);
  3. basic_two_stage_index(StringType & str, size_t num_indexed_chars);
  4. basic_two_stage_index & operator=(basic_two_stage_index && rhs);

basic_two_stage_index public member functions

  1. size_t end() const;
  2. iterator find_inexact(const dna_string & search_str, size_t pos, 
                          size_t max_distance, size_t max_gap, 
                          bool is_brute_force) const;
    find the next dna string which is close to the search string allowing max_distance errors and max_gap gaps between exons.
  3. void swap(basic_two_stage_index & rhs);
  4. template<typename charT, typename traits> 
      void write_ascii(std::basic_ostream< charT, traits > & os) const;
  5. void write_binary(writer & wr) const;

PrevUpHomeNext