位矢量和bitset [英] Bit vector and bitset

查看:183
本文介绍了位矢量和bitset的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

bit-vector和bitl容器的区别是什么?请解释。
我的理解bitset是bitvector的概念的实现我是对还是错?实现位向量的其他方法是什么?

What is the difference between bit-vector and bitset container of stl ? Please explain. To my understanding bitset is the implementation of the concept of bitvector am I right or wrong? What are the other ways to implement bit vector?

推荐答案

bit_vector std :: vector 相同的接口,并针对空间进行了优化。它不是标准C ++的一部分。此文档声称它接近于STL 向量< bool> ,这可能是非常接近标准的C ++ std :: vector< bool>

bit_vector has the same interface as an std::vector, and is optimised for space. It not a part of standard C++. This documentation claims it is close to an STL vector<bool>, which presumably is quite close to a standard C++ std::vector<bool>.

std :: bitset 的大小固定,并且具有不同的界面。

std::bitset is fixed size, and has a different interface.

这篇关于位矢量和bitset的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆