Top "Vector" questions

A vector is a single-dimensional array: it contains components that can be accessed using an integral index.

Remove elements of a vector inside the loop

I know that there are similar questions to this one, but I didn’t manage to find the way on …

c++ vector erase
How to make a vector using a for loop

I'm very new to R (and programming in general) and I've been stuck on this (probably very easy) question for …

r loops vector indexing sequence
C++ Help finding the max value in a map

I've been doing a basic program to find the max, min, median, variance, mode etc. of a vector. Everything went …

c++ dictionary vector max mode
vector of vectors push_back

I'm designing a multilevel queue process simulator in C++ but I've got a problem when trying to implement several queues (…

c++ vector process push-back multi-level
Is std::vector so much slower than plain arrays?

I've always thought it's the general wisdom that std::vector is "implemented as an array," blah blah blah. Today I …

c++ arrays performance stl vector
Obtaining list of keys and values from unordered_map

What is the most efficient way of obtaining lists (as a vector) of the keys and values from an unordered_…

c++ vector c++11 std unordered-map
Dereference vector pointer to access element

If i have in C++ a pointer to a vector: vector<int>* vecPtr; And i'd like to access …

c++ vector dereference
How to randomize a vector

I would like to randomly reorganize the order of the numbers in a vector, in a simple one-line command? My …

r vector random shuffle
Fill a vector with random numbers c++

I've got a vector that I'm trying to fill up with random numbers. I keep running into an issue however …

c++ random vector srand
Finding quaternion representing the rotation from one vector to another

I have two vectors u and v. Is there a way of finding a quaternion representing the rotation from u …

math vector quaternions