Wordsearch Solver
Public Member Functions | Public Attributes | Friends | List of all members
compact_trie2::FullNodeView_< Iterator > Class Template Reference

Class representing a full node, a view into a contiguous array. More...

#include <full_node_view.hpp>

Public Member Functions

 FullNodeView_ (Iterator it)
 
auto base () const
 
std::size_t size () const
 
bool is_only_end_of_word () const
 
std::uint8_t data_size () const
 Number of letters stored in this node.
 
bool is_end_of_word () const
 
std::uint_fast32_t next_row_offset () const
 
auto data () const
 
auto mini_offsets () const
 
template<class = std::enable_if_t<std::is_convertible_v< std::add_pointer_t<ranges::iter_value_t<Iterator>>, void*>>>
void set_next_row_offset (const std::uint_fast32_t next_row_offset)
 Set the 23 bit next_row_offset from a 4byte unsigned int. More...
 

Public Attributes

Iterator it_
 

Friends

std::ostream & operator<< (std::ostream &os, const FullNodeView_ &nv)
 

Detailed Description

template<class Iterator>
class compact_trie2::FullNodeView_< Iterator >

Class representing a full node, a view into a contiguous array.

A word may end here, and offsets to edges to child nodes are stored here.

Member Function Documentation

◆ base()

template<class Iterator >
auto compact_trie2::FullNodeView_< Iterator >::base ( ) const
inline
Returns
The underlying iterator where this node begins.

◆ data()

template<class Iterator >
auto compact_trie2::FullNodeView_< Iterator >::data ( ) const
inline
Returns
A range over the letters/suffixes in this node.

◆ is_end_of_word()

template<class Iterator >
bool compact_trie2::FullNodeView_< Iterator >::is_end_of_word ( ) const
inline
Returns
Whether or not a word terminates here.

◆ mini_offsets()

template<class Iterator >
auto compact_trie2::FullNodeView_< Iterator >::mini_offsets ( ) const
inline
Returns
A range of 2 byte offsets into each child node, relative to the next_row_offset

◆ next_row_offset()

template<class Iterator >
std::uint_fast32_t compact_trie2::FullNodeView_< Iterator >::next_row_offset ( ) const
inline
Returns
Starting offset in the next row of child nodes.

◆ set_next_row_offset()

template<class Iterator >
template<class = std::enable_if_t<std::is_convertible_v< std::add_pointer_t<ranges::iter_value_t<Iterator>>, void*>>>
void compact_trie2::FullNodeView_< Iterator >::set_next_row_offset ( const std::uint_fast32_t  next_row_offset)
inline

Set the 23 bit next_row_offset from a 4byte unsigned int.

Parameters
[in]next_row_offset

◆ size()

template<class Iterator >
std::size_t compact_trie2::FullNodeView_< Iterator >::size ( ) const
inline
Returns
The size of the node in bytes

The documentation for this class was generated from the following file: