UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::BitSet< N > Class Template Reference

Classes

struct  Reference
 

Public Types

using T = std::conditional_t< 8 >=N, std::uint8_t, std::conditional_t< 16 >=N, std::uint16_t, std::conditional_t< 32 >=N, std::uint32_t, std::uint64_t > > >
 
using value_type = T
 

Public Member Functions

template<class CharT >
 BitSet (CharT const *str, typename std::basic_string< CharT >::size_type n=std::basic_string< CharT >::npos, CharT zero=CharT('0'), CharT one=CharT('1'))
 
template<class CharT , class Traits , class Alloc >
 BitSet (std::basic_string< CharT, Traits, Alloc > const &str, typename std::basic_string< CharT, Traits, Alloc >::size_type pos=0, typename std::basic_string< CharT, Traits, Alloc >::size_type n=std::basic_string< CharT, Traits, Alloc >::npos, CharT zero=CharT('0'), CharT one=CharT('1'))
 
constexpr BitSet (T val) noexcept
 
constexpr bool all () const noexcept
 
constexpr bool any () const noexcept
 
constexpr std::size_t count () const noexcept
 
constexpr value_type data () const
 
constexpr void flip () noexcept
 
constexpr void flip (std::size_t pos)
 
constexpr bool none () const noexcept
 
constexpr bool operator!= (BitSet rhs) const noexcept
 
constexpr BitSetoperator&= (BitSet const other) noexcept
 
constexpr bool operator== (BitSet rhs) const noexcept
 
constexpr Reference operator[] (std::size_t pos)
 
constexpr bool operator[] (std::size_t pos) const
 
constexpr BitSetoperator^= (BitSet const &other) noexcept
 
constexpr BitSetoperator|= (BitSet const &other) noexcept
 
constexpr BitSet operator~ () const noexcept
 
constexpr void reset () noexcept
 
constexpr void reset (std::size_t pos)
 
constexpr void set () noexcept
 
constexpr void set (std::size_t pos)
 
constexpr void set (std::size_t pos, bool value)
 
constexpr bool some () const noexcept
 
bool test (std::size_t pos) const
 

Static Public Member Functions

static constexpr std::size_t size () noexcept
 

Detailed Description

template<std::size_t N>
class ufo::BitSet< N >

Definition at line 56 of file bit_set.hpp.

Member Typedef Documentation

◆ T

template<std::size_t N>
using ufo::BitSet< N >::T = std::conditional_t< 8 >= N, std::uint8_t, std::conditional_t<16 >= N, std::uint16_t, std::conditional_t<32 >= N, std::uint32_t, std::uint64_t> >>

Definition at line 61 of file bit_set.hpp.

◆ value_type

template<std::size_t N>
using ufo::BitSet< N >::value_type = T

Definition at line 66 of file bit_set.hpp.

Constructor & Destructor Documentation

◆ BitSet() [1/3]

template<std::size_t N>
constexpr ufo::BitSet< N >::BitSet ( val)
inlineconstexprnoexcept

Definition at line 118 of file bit_set.hpp.

◆ BitSet() [2/3]

template<std::size_t N>
template<class CharT , class Traits , class Alloc >
ufo::BitSet< N >::BitSet ( std::basic_string< CharT, Traits, Alloc > const &  str,
typename std::basic_string< CharT, Traits, Alloc >::size_type  pos = 0,
typename std::basic_string< CharT, Traits, Alloc >::size_type  n = std::basic_string<CharT, Traits, Alloc>::npos,
CharT  zero = CharT('0'),
CharT  one = CharT('1') 
)
inlineexplicit

Definition at line 121 of file bit_set.hpp.

◆ BitSet() [3/3]

template<std::size_t N>
template<class CharT >
ufo::BitSet< N >::BitSet ( CharT const *  str,
typename std::basic_string< CharT >::size_type  n = std::basic_string<CharT>::npos,
CharT  zero = CharT('0'),
CharT  one = CharT('1') 
)
inlineexplicit

Definition at line 131 of file bit_set.hpp.

Member Function Documentation

◆ all()

template<std::size_t N>
constexpr bool ufo::BitSet< N >::all ( ) const
inlineconstexprnoexcept

Definition at line 164 of file bit_set.hpp.

◆ any()

template<std::size_t N>
constexpr bool ufo::BitSet< N >::any ( ) const
inlineconstexprnoexcept

Definition at line 166 of file bit_set.hpp.

◆ count()

template<std::size_t N>
constexpr std::size_t ufo::BitSet< N >::count ( ) const
inlineconstexprnoexcept

Definition at line 172 of file bit_set.hpp.

◆ data()

template<std::size_t N>
constexpr value_type ufo::BitSet< N >::data ( ) const
inlineconstexpr

Definition at line 234 of file bit_set.hpp.

◆ flip() [1/2]

template<std::size_t N>
constexpr void ufo::BitSet< N >::flip ( )
inlineconstexprnoexcept

Definition at line 226 of file bit_set.hpp.

◆ flip() [2/2]

template<std::size_t N>
constexpr void ufo::BitSet< N >::flip ( std::size_t  pos)
inlineconstexpr

Definition at line 228 of file bit_set.hpp.

◆ none()

template<std::size_t N>
constexpr bool ufo::BitSet< N >::none ( ) const
inlineconstexprnoexcept

Definition at line 168 of file bit_set.hpp.

◆ operator!=()

template<std::size_t N>
constexpr bool ufo::BitSet< N >::operator!= ( BitSet< N >  rhs) const
inlineconstexprnoexcept

Definition at line 141 of file bit_set.hpp.

◆ operator&=()

template<std::size_t N>
constexpr BitSet & ufo::BitSet< N >::operator&= ( BitSet< N > const  other)
inlineconstexprnoexcept

Definition at line 179 of file bit_set.hpp.

◆ operator==()

template<std::size_t N>
constexpr bool ufo::BitSet< N >::operator== ( BitSet< N >  rhs) const
inlineconstexprnoexcept

Definition at line 139 of file bit_set.hpp.

◆ operator[]() [1/2]

template<std::size_t N>
constexpr Reference ufo::BitSet< N >::operator[] ( std::size_t  pos)
inlineconstexpr

Definition at line 149 of file bit_set.hpp.

◆ operator[]() [2/2]

template<std::size_t N>
constexpr bool ufo::BitSet< N >::operator[] ( std::size_t  pos) const
inlineconstexpr

Definition at line 143 of file bit_set.hpp.

◆ operator^=()

template<std::size_t N>
constexpr BitSet & ufo::BitSet< N >::operator^= ( BitSet< N > const &  other)
inlineconstexprnoexcept

Definition at line 191 of file bit_set.hpp.

◆ operator|=()

template<std::size_t N>
constexpr BitSet & ufo::BitSet< N >::operator|= ( BitSet< N > const &  other)
inlineconstexprnoexcept

Definition at line 185 of file bit_set.hpp.

◆ operator~()

template<std::size_t N>
constexpr BitSet ufo::BitSet< N >::operator~ ( ) const
inlineconstexprnoexcept

Definition at line 197 of file bit_set.hpp.

◆ reset() [1/2]

template<std::size_t N>
constexpr void ufo::BitSet< N >::reset ( )
inlineconstexprnoexcept

Definition at line 218 of file bit_set.hpp.

◆ reset() [2/2]

template<std::size_t N>
constexpr void ufo::BitSet< N >::reset ( std::size_t  pos)
inlineconstexpr

Definition at line 220 of file bit_set.hpp.

◆ set() [1/3]

template<std::size_t N>
constexpr void ufo::BitSet< N >::set ( )
inlineconstexprnoexcept

Definition at line 199 of file bit_set.hpp.

◆ set() [2/3]

template<std::size_t N>
constexpr void ufo::BitSet< N >::set ( std::size_t  pos)
inlineconstexpr

Definition at line 212 of file bit_set.hpp.

◆ set() [3/3]

template<std::size_t N>
constexpr void ufo::BitSet< N >::set ( std::size_t  pos,
bool  value 
)
inlineconstexpr

Definition at line 201 of file bit_set.hpp.

◆ size()

template<std::size_t N>
static constexpr std::size_t ufo::BitSet< N >::size ( )
inlinestaticconstexprnoexcept

Definition at line 177 of file bit_set.hpp.

◆ some()

template<std::size_t N>
constexpr bool ufo::BitSet< N >::some ( ) const
inlineconstexprnoexcept

Definition at line 170 of file bit_set.hpp.

◆ test()

template<std::size_t N>
bool ufo::BitSet< N >::test ( std::size_t  pos) const
inline

Definition at line 155 of file bit_set.hpp.


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