#include <bitset.h>
shttl::shttl_bitset< N, T >のコラボレーション図
Public 型 | |
typedef size_t | size_type |
typedef shttl_bitset< N, T > | this_type |
typedef T | value_type |
Public メソッド | |
bool | any () const |
reference | at (size_type p) |
size_t | count () const |
this_type & | flip (size_type p) |
this_type & | flip () |
bool | none () const |
this_type & | operator &= (const this_type &i) |
bool | operator!= (const this_type &i) const |
this_type | operator<< (size_type s) const |
this_type & | operator<<= (size_type w) |
bool | operator== (const this_type &i) const |
this_type | operator>> (size_type s) const |
this_type & | operator>>= (size_type w) |
reference | operator[] (size_type p) |
this_type & | operator^= (const this_type &i) |
this_type & | operator|= (const this_type &i) |
this_type | operator~ () const |
this_type & | reset (size_type p) |
this_type & | reset () |
this_type & | set (size_type p, int v=1) |
this_type & | set () |
template<class C, class R, class A> | |
shttl_bitset (const std::basic_string< C, R, A > &s, typename std::basic_string< C, R, A >::size_type p=0, typename std::basic_string< C, R, A >::size_type l=-1) | |
shttl_bitset (u64 v=0) | |
size_t | size () const |
bool | test (size_type p) const |
std::string | to_string () const |
u64 | to_ulong () const |
Protected 変数 | |
value_type | _v |
フレンド | |
class | reference |
構成 | |
class | reference |
typedef size_t shttl::shttl_bitset< N, T >::size_type |
typedef shttl_bitset<N, T> shttl::shttl_bitset< N, T >::this_type |
typedef T shttl::shttl_bitset< N, T >::value_type |
shttl::shttl_bitset< N, T >::shttl_bitset | ( | u64 | v = 0 |
) | [inline] |
shttl::shttl_bitset< N, T >::shttl_bitset | ( | const std::basic_string< C, R, A > & | s, | |
typename std::basic_string< C, R, A >::size_type | p = 0 , |
|||
typename std::basic_string< C, R, A >::size_type | l = -1 | |||
) | [inline, explicit] |
00087 { 00088 std::bitset<u64_bits> bs; 00089 try { 00090 bs = std::bitset<u64_bits>(s, p, l); 00091 } 00092 catch (std::invalid_argument) { 00093 throw std::invalid_argument("shttl_bitset::shttl_bitset"); 00094 } 00095 _v = (value_type)( bs.to_ulong() & umax(size()) ); 00096 }
bool shttl::shttl_bitset< N, T >::any | ( | ) | const [inline] |
reference shttl::shttl_bitset< N, T >::at | ( | size_type | p | ) | [inline] |
size_t shttl::shttl_bitset< N, T >::count | ( | ) | const |
参照先 shttl::shttl_bitset< N, T >::size()・shttl::shttl_bitset< N, T >::test().
00296 { 00297 int s = 0; 00298 for (int p = 0; p < size(); ++p) 00299 if (test(p)) 00300 ++s; 00301 return s; 00302 }
関数の呼び出しグラフ:
this_type& shttl::shttl_bitset< N, T >::flip | ( | size_type | p | ) | [inline] |
this_type& shttl::shttl_bitset< N, T >::flip | ( | ) | [inline] |
bool shttl::shttl_bitset< N, T >::none | ( | ) | const [inline] |
this_type& shttl::shttl_bitset< N, T >::operator &= | ( | const this_type & | i | ) | [inline] |
bool shttl::shttl_bitset< N, T >::operator!= | ( | const this_type & | i | ) | const [inline] |
this_type shttl::shttl_bitset< N, T >::operator<< | ( | size_type | s | ) | const [inline] |
this_type& shttl::shttl_bitset< N, T >::operator<<= | ( | size_type | w | ) | [inline] |
bool shttl::shttl_bitset< N, T >::operator== | ( | const this_type & | i | ) | const [inline] |
this_type shttl::shttl_bitset< N, T >::operator>> | ( | size_type | s | ) | const [inline] |
this_type& shttl::shttl_bitset< N, T >::operator>>= | ( | size_type | w | ) | [inline] |
reference shttl::shttl_bitset< N, T >::operator[] | ( | size_type | p | ) | [inline] |
this_type& shttl::shttl_bitset< N, T >::operator^= | ( | const this_type & | i | ) | [inline] |
this_type& shttl::shttl_bitset< N, T >::operator|= | ( | const this_type & | i | ) | [inline] |
this_type shttl::shttl_bitset< N, T >::operator~ | ( | ) | const [inline] |
this_type& shttl::shttl_bitset< N, T >::reset | ( | size_type | p | ) | [inline] |
this_type& shttl::shttl_bitset< N, T >::reset | ( | ) | [inline] |
this_type& shttl::shttl_bitset< N, T >::set | ( | size_type | p, | |
int | v = 1 | |||
) | [inline] |
this_type& shttl::shttl_bitset< N, T >::set | ( | ) | [inline] |
参照元 shttl::shttl_bitset< N, T >::reference::operator=().
Here is the caller graph for this function:
size_t shttl::shttl_bitset< N, T >::size | ( | ) | const [inline] |
参照元 shttl::shttl_bitset< N >::at()・shttl::shttl_bitset< N, T >::count()・shttl::shttl_bitset< N >::flip()・shttl::shttl_bitset< N >::operator<<()・shttl::shttl_bitset< N >::operator<<=()・shttl::shttl_bitset< N >::operator>>()・shttl::shttl_bitset< N >::operator>>=()・shttl::shttl_bitset< N >::operator[]()・shttl::shttl_bitset< N >::operator~()・shttl::shttl_bitset< N >::reset()・shttl::shttl_bitset< N >::set()・shttl::shttl_bitset< N >::shttl_bitset()・shttl::shttl_bitset< N >::test()・shttl::shttl_bitset< N, T >::to_string()・shttl::shttl_bitset< N >::to_ulong().
Here is the caller graph for this function:
bool shttl::shttl_bitset< N, T >::test | ( | size_type | p | ) | const [inline] |
参照元 shttl::shttl_bitset< N, T >::count()・shttl::xbitset< N >::const_reference::operator bool()・shttl::shttl_bitset< N, T >::reference::operator bool()・shttl::xbitset< N >::const_reference::operator~()・shttl::shttl_bitset< N, T >::reference::operator~()・shttl::shttl_bitset< N, T >::to_string().
00221 { 00222 if (p < 0 || size() <= p) 00223 throw std::out_of_range("shttl_bitset::test"); 00224 return shttl::test(_v, p); 00225 }
Here is the caller graph for this function:
std::string shttl::shttl_bitset< N, T >::to_string | ( | ) | const |
参照先 shttl::shttl_bitset< N, T >::size()・shttl::shttl_bitset< N, T >::test().
参照元 shttl::operator<<().
00286 { 00287 std::string s; 00288 for (int p = (int)size() - 1; p >= 0; --p) 00289 s += test(p) ? '1' : '0'; 00290 return s; 00291 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
u64 shttl::shttl_bitset< N, T >::to_ulong | ( | ) | const [inline] |
参照元 shttl::operator &()・shttl::operator^()・shttl::operator|().
00208 { 00209 SHTTL_ASSERT(_v <= umax(size())); 00210 return _v; 00211 }
Here is the caller graph for this function:
friend class reference [friend] |
value_type shttl::shttl_bitset< N, T >::_v [protected] |
参照元 shttl::shttl_bitset< N >::any()・shttl::shttl_bitset< N >::flip()・shttl::shttl_bitset< N >::none()・shttl::shttl_bitset< N >::operator &=()・shttl::shttl_bitset< N >::operator!=()・shttl::shttl_bitset< N >::operator<<()・shttl::shttl_bitset< N >::operator<<=()・shttl::shttl_bitset< N >::operator==()・shttl::shttl_bitset< N >::operator>>()・shttl::shttl_bitset< N >::operator>>=()・shttl::shttl_bitset< N >::operator^=()・shttl::shttl_bitset< N >::operator|=()・shttl::shttl_bitset< N >::operator~()・shttl::shttl_bitset< N >::reset()・shttl::shttl_bitset< N >::set()・shttl::shttl_bitset< N >::shttl_bitset()・shttl::shttl_bitset< N >::test()・shttl::shttl_bitset< N >::to_ulong().