Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » NTL container equivalent to STL bitset
NTL container equivalent to STL bitset [message #37691] Fri, 02 November 2012 22:48 Go to next message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
Is there anything within NTL or U++ equivalent to STL container bitset?

Thanks,

Javier
Re: NTL container equivalent to STL bitset [message #37692 is a reply to message #37691] Fri, 02 November 2012 23:04 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

281264 wrote on Fri, 02 November 2012 22:48

Is there anything within NTL or U++ equivalent to STL container bitset?

Thanks,

Javier

Hi Javier,

I think you are looking for Bits Wink

Best regards,
Honza
Re: NTL container equivalent to STL bitset [message #37694 is a reply to message #37692] Sat, 03 November 2012 11:25 Go to previous messageGo to next message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
Honza,

Yes, Bits looks fine. Any hint about its use?

M Thanks,

Javier
Re: NTL container equivalent to STL bitset [message #37695 is a reply to message #37694] Sat, 03 November 2012 12:12 Go to previous messageGo to next message
281264 is currently offline  281264
Messages: 270
Registered: June 2010
Location: Spain
Experienced Member
Vector<bool> looks suitable as well.

Javier
Re: NTL container equivalent to STL bitset [message #37696 is a reply to message #37695] Sat, 03 November 2012 13:06 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

281264 wrote on Sat, 03 November 2012 12:12

Vector<bool> looks suitable as well.

Javier

IIRC, Upp::Vector<bool> is NOT optimized for lower memory footprint (unlike std::vector<bool>), but I guess it might be slightly faster. So if you need to optimize memory use, you can use Bits and if you prefer speed, you can use Vector<bool>.

There is not much special about Bits... the interface is simple, basically just Set, Get, Clear and operator[] methods Smile It behaves the same as other U++ containers - it is moveable, so it can be picked, otherwise, it is basically just a simple array Smile

Honza

Previous Topic: Xmlize has problem with WithDeepCopy<Array<...
Next Topic: string replacer utility functor
Goto Forum:
  


Current Time: Thu Mar 28 23:36:39 CET 2024

Total time taken to generate the page: 0.01195 seconds