Category "vector"

Is using a vector of boolean values slower than a dynamic bitset?

Is using a vector of boolean values slower than a dynamic bitset? I just heard about boost's dynamic bitset, and I was wondering is it worth the trouble. Can I

how do you insert the value in a sorted vector?

ALL, This question is a continuation of this one. I think that STL misses this functionality, but it just my IMHO. Now, to the question. Consider following c

Is it possible to split a vector into groups of 10 with iterators?

I have let my_vec = (0..25).collect::<Vec<_>>() and I would like to split my_vec into iterators of groups of 10: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; [1

C++ STL vector for existing data

Can I create an std::vector using my pre-existing data instead of it allocating new memory and copying the data? To be clearer, if I have a memory area (either

Adding a vector to matrix rows in numpy

Is there a fast way in numpy to add a vector to every row or column of a matrix. Lately, I have been tiling the vector to the size of the matrix, which can use

How to create matrix from java vector of vectors (Multidimentional Vector)

am trying to create vector of Vectors(2d) in java like multidimensional array. then to assign values to specific position in that matrix like what we do using m

How can I check if a matrix is an element of a list of matrices? in R

I'm pretty new to programming in R. I have a matrix of numbers mat, as well as a list of matrices matlist. I want to check if the matrix mat matches with (i.e

How is a Vector of Vector aligned in memory?

I understand as Set size of vector of vectors at run time describes, one can declare vector of vector as vector<vector<int> > ref; then resize t

comparator for sorting a vector contatining pointers to objects of custom class

By this question I am also trying to understand fundamentals of C++, as I am very new to C++. There are many good answers to problem of sorting a vector/list of

A way to get the local minima and maxima of a vector

I've been trying to retrieve the extrema of a vector that looks like this : [![First case][1]][1](source: noelshack.com) or like this : [![Second case][2]][2](s