Gang Of Coders
Home
About Us
Contact Us
All Vector Solutions on Gang of Coders
Total of 227 Vector Solutions
Adding to a vector of pair
C++
Vector
Std Pair
Does std::vector *have* to move objects when growing capacity? Or, can allocators "reallocate"?
C++
Vector
Realloc
Allocator
Converting a vector<int> to string
C++
String
Vector
Calling a function on every element of a C++ vector
C++
Function
Vector
Creating two dimensional arrays in Rust
Arrays
Vector
Multidimensional Array
Rust
Is it safe to assume that STL vector storage is always contiguous?
C++
Stl
Vector
C++ Erase vector element by value rather than by position?
C++
Vector
Stl
Erase
Erase Remove-Idiom
How to sum up elements of a C++ vector?
C++
Stl
Vector
Template within template: why "`>>' should be `> >' within a nested template argument list"
C++
Templates
Compiler Construction
Vector
Lexicographic
What is the need for normalizing a vector?
Vector
Normalizing
remove the last element of a vector
R
Vector
How to use new std::byte type in places where old-style unsigned char is needed?
C++
Vector
C++17
What are vectors and how are they used in programming?
Computer Science
Vector
Finding the centroid of a polygon?
C++
C
Vector
Vector Graphics
Finding the max value in a map
C++
Dictionary
Vector
Max
Mode
What does the standard say about how calling clear on a vector changes the capacity?
C++
Vector
Language Lawyer
R: removing the last elements of a vector
R
Vector
Elements
2D Euclidean vector rotations
C++
Math
Vector
Rotation
Trigonometry
std::vector, default construction, C++11 and breaking changes
C++
Stl
Vector
C++11
Backwards Compatibility
How is a vector's data aligned?
C++
Vector
Sse
Memory Alignment
Allocator
How to initialize a vector of vectors on a struct?
C++
Vector
array of vectors or vector of arrays?
C++
Arrays
Vector
Does vector::erase() on a vector of object pointers destroy the object itself?
C++
Stl
Vector
Simple way to replace nth element in a vector in clojure?
Vector
Clojure
clearing a vector of pointers
C++
Pointers
Memory Leaks
Vector
How can a sentence or a document be converted to a vector?
Vector
Nlp
Word2vec
Is capacity copied in a vector?
C++
Vector
How can I declare a member vector of the same class?
C++
Templates
Vector
Member
Incomplete Type
C++ - value of uninitialized vector<int>
C++
Vector
Scope
Initialization
Check if two vectors are equal
C++
Vector
Set
Is a moved-from vector always empty?
C++
C++11
Vector
Language Lawyer
Move Semantics
STL vectors with uninitialized storage?
C++
Optimization
Stl
Vector
Cleaning up an STL list/vector of pointers
C++
List
Vector
Stl
size vs capacity of a vector?
C++
Vector
Why is std::vector so much more popular than std::deque?
C++
Vector
Deque
What's the idiomatic way to append a slice to a vector?
Vector
Rust
Memset on vector C++
C++
Vector
array vs vector vs list
C++
Arrays
List
Stl
Vector
Checking whether a vector is empty
C++
Stl
Vector
Resizing a C++ std::vector<char> without initializing data
C++
Stl
Vector
Resize
Return reference to a vector member variable
C++
Vector
Reference
Constants
C++ vector that *doesn't* initialize its members?
C++
Stl
Vector
How do you create vectors with specific intervals in R?
R
Vector
Intervals
How can I get the size of an std::vector as an int?
C++
Vector
Size
Constants
Unsigned Integer
How to change color of vector drawable path on button click
Android
Vector
Vector Graphics
Android Vectordrawable
vector vs. list in STL
C++
List
Vector
Stl
Split a vector into chunks
R
Vector
numpy matrix vector multiplication
Python
Arrays
Numpy
Vector
Matrix
Using arrays or std::vectors in C++, what's the performance gap?
C++
Arrays
Vector
std::vector performance regression when enabling C++11
C++
Performance
Gcc
C++11
Vector
Is std::vector so much slower than plain arrays?
C++
Arrays
Performance
Stl
Vector
C++ STL Vectors: Get iterator from index?
C++
Stl
Vector
Iterator
How do I print the elements of a C++ vector in GDB?
C++
Debugging
Stl
Vector
Gdb
What is the best way to concatenate two vectors?
C++
Vector
Thou shalt not inherit from std::vector
C++
Oop
Inheritance
Stl
Vector
When should I choose Vector in Scala?
Scala
Vector
Scala Collections
How to initialize a vector in C++
C++
Arrays
Vector
Declaration
How to initialize std::vector from C-style array?
C++
Arrays
Vector
Stl
How do I calculate the normal vector of a line segment?
Math
Geometry
Vector
Convert data.frame column to a vector?
R
Dataframe
Vector
Type Conversion
Concatenating two std::vectors
C++
Vector
Stl
Concatenation
Stdvector
When vectors are allocated, do they use memory on the heap or the stack?
C++
Vector
Stl
Heap Memory
Stack Memory
How to find common elements from multiple vectors?
R
Vector
R Faq
Append value to empty vector in R?
R
List
Vector
Append
How do I reverse a C++ vector?
C++
Vector
Stl
Std
Choice between vector::resize() and vector::reserve()
C++
Vector
Fastest way to find second (third...) highest/lowest value in vector or column
R
Vector
Why is a C++ Vector called a Vector?
C++
Stl
Vector
R memory management / cannot allocate vector of size n Mb
R
Matrix
Vector
Memory Management
R Faq
How can I get the maximum or minimum value in a vector?
C++
Vector
Max
Min
Appending a vector to a vector
C++
Stl
Vector
How to get std::vector pointer to the raw data?
C++
Stl
Vector
Is it more efficient to copy a vector by reserving and copying, or by creating and swapping?
C++
Algorithm
Vector
Stl
How to find out if an item is present in a std::vector?
C++
Vector
Std
Initializing a two dimensional std::vector
C++
Vector
Why is Java Vector (and Stack) class considered obsolete or deprecated?
Java
Vector
Stack
Deprecated
Obsolete
In Clojure, when should I use a vector over a list, and the other way around?
List
Vector
Clojure
Sequences
What is the easiest way to initialize a std::vector with hardcoded elements?
C++
Vector
Stl
Initialization
Extract every nth element of a vector
R
Vector
How do I erase an element from std::vector<> by index?
C++
Stl
Vector
Erase
How do you copy the contents of an array to a std::vector in C++ without looping?
C++
Stl
Vector
Copy
What are the differences between vector and list data types in R?
List
R
Vector
Convert a row of a data frame to vector
R
Vector
Dataframe
Iterating C++ vector from the end to the beginning
C++
Vector
Iterator
Is it safe to push_back an element from the same vector?
C++
Vector
Reference
Language Lawyer
Push Back
Test if a vector contains a given element
R
Vector
R Faq
Arrays vs Vectors: Introductory Similarities and Differences
C++
Arrays
Vector
Why isn't vector<bool> a STL container?
C++
Vector
Stl
Containers
Bitvector
Best way to concatenate vectors in Rust
Vector
Rust
Concatenation
Are std::vector elements guaranteed to be contiguous?
C++
Vector
Standards
How to navigate through a vector using iterators? (C++)
C++
Iterator
Vector
Finding quaternion representing the rotation from one vector to another
Math
Vector
Quaternions
Test for equality among all elements of a single numeric vector
R
Vector
Equality
What is the difference between std::array and std::vector? When do you use one over other?
C++
Arrays
Vector
Are vectors passed to functions by value or by reference in C++
C++
Arrays
Vector
Removing item from vector, while in C++11 range 'for' loop?
C++
Vector
For Loop
C++11
Erasing elements from a vector
C++
Vector
Stl
Erase
C++ convert vector<int> to vector<double>
C++
Stl
Vector
Type Conversion
How do I make a matrix from a list of vectors in R?
R
Matrix
Vector
Why is it OK to return a 'vector' from a function?
C++
Vector
Stl
Scope
Standard Library
List distinct values in a vector in R
R
Vector
Distinct Values
R Faq
Why isn't my vector drawable scaling as expected?
Android
Vector
Drawable
Scaling
Convert a vector<int> to a string
C++
Vector
Tostring
What is the simplest way to convert array to vector?
C++
Arrays
Vector
Initial capacity of vector in C++
C++
Memory Management
Stl
Vector
How do I extract just the number from a named number (without the name)?
R
Vector
Named
Lm
Calculating a 2D Vector's Cross Product
Language Agnostic
Math
Vector
2d
How to create an empty R vector to add new items
Python
R
Vector
Rpy2
Convert Named Character Vector to data.frame
R
Dataframe
Vector
Type Conversion
How to enforce move semantics when a vector grows?
C++
Vector
C++11
Resize
Move Semantics
Alternative to vector<bool>
C++
Stl
Vector
Boolean
Angles between two n-dimensional vectors in Python
Python
Vector
Angle
Subtracting 2 lists in Python
Python
List
Tuples
Vector
What is the ideal growth rate for a dynamically allocated array?
Arrays
Math
Vector
Arraylist
Dynamic Arrays
In C++ check if std::vector<string> contains a certain value
C++
Vector
Std
Stdvector
Why can't I create a vector of lambdas (of the same type) in C++11?
C++
Vector
Lambda
C++11
Using android vector Drawables on pre Lollipop crash
Android
Vector
Android Support-Library
Android Drawable
Android Compatibility
How to tell what is in one vector and not another?
R
Vector
Octave / Matlab: Extend a vector making it repeat itself?
Matlab
Vector
Octave
How to create a numeric vector of zero length in R
R
Vector
Numeric
Zero
How to randomize a vector
R
Vector
Random
Shuffle
Counting the number of elements with the values of x in a vector
R
Vector
Count
R Faq
How to read a binary file into a vector of unsigned chars
C++
File Io
Vector
Binaryfiles
Why is libc++'s vector<bool>::const_reference not bool?
C++
Vector
C++ Standard-Library
Libc++
Std Bitset
How do I get a slice of a Vec<T> in Rust?
Vector
Rust
Using std::vector as view on to raw memory
C++
C++11
Vector
Stdvector
How to pass a vector to a function?
C++
Function
Vector
Does C++11 allow vector<const T>?
C++
Vector
C++11
Constants
Vector of structs initialization
C++
Vector
Struct
Push Back
Why would I prefer using vector to deque
C++
Stl
Vector
Deque
C# equivalent of C++ vector, with contiguous memory?
C#
C++
Vector
std::vector::resize() vs. std::vector::reserve()
C++
Stl
Vector
Python: Differentiating between row and column vectors
Python
Arrays
Numpy
Vector
Scipy
VectorDrawable - is it available somehow for pre-Lollipop versions of Android?
Android
Gradle
Vector
Android Vectordrawable
How to convert vector to array
C++
Arrays
Vector
Extract a column from a data.table as a vector, by position
R
Vector
Indexing
data.table
Convert a dataframe to a vector (by rows)
R
Dataframe
Vector
R Faq
Can't include C++ headers like vector in Android NDK
Android
Stl
Vector
Android Ndk
dplyr::select one column and output as vector
R
Select
Vector
Dataframe
Dplyr
Example to use shared_ptr?
C++
Boost
Vector
Shared Ptr
Smart Pointers
C++ for each, pulling from vector elements
C++
For Loop
Vector
Each
Converting two columns of a data frame to a named vector
R
Vector
Dataframe
Coercion
Why can't I make a vector of references?
C++
Vector
Reference
Stl
Container Data-Type
QVector vs QList
C++
Qt
List
Vector
Rotation of 3D vector?
Python
Vector
Rotation
How do I pass multiple ints into a vector at once?
C++
C++11
Vector
Push Back
How to create a vector of user defined size but with no predefined values?
C++
Vector
Correct way to work with vector of arrays
C++
Arrays
Vector
Stdvector
Vector: initialization or reserve?
C++
Vector
Convert R vector to string vector of 1 element
String
R
Vector
Arguments
System
Obtaining list of keys and values from unordered_map
C++
Vector
C++11
Std
Unordered Map
Moving elements from std::vector to another one
C++
Vector
Multiply rows of matrix by vector?
R
Vector
Matrix
Multiplication
Vector erase iterator
C++
Vector
Iterator
Octave/Matlab: Adding new elements to a vector
Matlab
Vector
Octave
Element
What are the differences between ArrayList and Vector?
Java
Vector
Arraylist
How to use an iterator?
C++
Pointers
Vector
Iterator
Using Statement
sorting a vector of structs
C++
Sorting
Vector
How to turn a vector into a matrix in R?
R
Vector
Matrix
How to copy std::string into std::vector<char>?
C++
String
Vector
Copy
Remove elements of a vector inside the loop
C++
Vector
Erase
Why doesn't emplace_back() use uniform initialization?
C++
Vector
C++11
Uniform Initialization
Using std::max_element on a vector<double>
C++
Vector
Max
Min
How to reverse order a vector?
R
Sorting
Vector
Reverse
What happens if you increment an iterator that is equal to the end iterator of an STL container
C++
Stl
Vector
Iterator
How to avoid memory leaks when using a vector of pointers to dynamically allocated objects in C++?
C++
Stl
Pointers
Vector
Derived
Looking for C++ STL-like vector class but using stack storage
C++
Data Structures
Stl
Vector
Dereference vector pointer to access element
C++
Vector
Dereference
How to access the contents of a vector from a pointer to the vector in C++?
C++
Pointers
Vector
iterate vector, remove certain items as I go
C++
Data Structures
Vector
Loops
Iterator
Vector of Vectors to create matrix
C++
Vector
Matrix
Using atan2 to find angle between two vectors
Math
Vector
Geometry
What is the difference between cbegin and begin for vector?
C++
Vector
Stl
Iterator
How to convert vector to set?
C++
Vector
Set
How to divide each row of a matrix by elements of a vector in R
R
Matrix
Vector
How do I convert a Vec<String> to Vec<&str>?
String
Vector
Rust
Type Conversion
Android Selector Drawable with VectorDrawables srcCompat
Android
Vector
Android Support-Library
Android Appcompat
Android Vectordrawable
C++ trying to swap values in a vector
C++
Vector
Swap
What's the benefit of std::back_inserter over std::inserter?
C++
Vector
Stl
Iterator
Containers
How to change a particular element of a C++ STL vector
C++
Stl
Vector
Constant-sized vector
C++
Stl
Vector
Rotating a Vector in 3D Space
Math
Vector
3d
Rotation
Linear Algebra
How to merge 2 vectors alternating indexes?
R
Vector
Merge
How do I print out the contents of a vector?
C++
Vector
Output
Stdvector
Cout
How can I insert element into beginning of vector?
C++
Visual C++
Vector
Std
Signed angle between two 3D vectors with same origin within the same plane
Math
Vector
3d
Geometry
std vector C++ -- deep or shallow copy
C++
Vector
Copy
Std
Deep Copy
C++ std::vector emplace vs insert
C++
Vector
Stl
Sorting a vector in descending order
C++
Sorting
Stl
Vector
Iterator
vector<int>::size_type in C++
C++
Vector
Size Type
Why use QVector(Qt) instead of std::vector
C++
Qt
Vector
C++ delete vector, objects, free memory
C++
Vector
Delete Operator
Iterating through vector<unique_ptr<mytype>> using C++11 for() loops
C++
C++11
Vector
Unique Ptr
Best way to extract a subvector from a vector?
C++
Stl
Vector
Range
Slicing a vector in C++
Python
C++
Vector
Slice
C++ extend a vector with another vector
C++
Vector
Is there a sorted_vector class, which supports insert() etc.?
C++
Stl
Vector
Sorting
Set
Why there is no pop_front method in C++ std::vector?
C++
Vector
How can I get a field from the last element of a vector in C++?
C++
Vector
Structure
Delete all items from a c++ std::vector
C++
Stl
Vector
Replace an element into a specific position of a vector
C++
Visual C++
Vector
Stl
Insert
Using C++ vector::insert() to add to end of vector
C++
Stl
Vector
Iterator
How to convert a list consisting of vector of different lengths to a usable data frame in R?
R
Vector
Dataframe
std::vector versus std::array in C++
C++
Arrays
Vector
How to access the last value in a vector?
R
Dataframe
Vector
What's faster, iterating an STL vector with vector::iterator or with at()?
C++
Performance
Stl
Vector
Iterator
What's the most efficient way to erase duplicates and sort a vector?
C++
Sorting
Vector
Stl
Duplicates
pop_back() return value?
C++
Vector
Can I use ' == ' to compare two vectors. I tried it and seems to be working fine. But I don't know whether it will work in more complex situations
C++
Vector
Operator Overloading
Equality
What is the idiomatic way to prepend to a vector in Clojure?
Vector
Clojure
Append
Prepend
check if a std::vector contains a certain object?
C++
Vector
R + combine a list of vectors into a single vector
R
List
Vector
Append
Sapply
How can i add padding vector file in android
Android
Vector
How do I sort a std::vector by the values of a different std::vector?
C++
Stl
Boost
Vector
Sorting
Convert iterator to pointer?
C++
Stl
Pointers
Vector
Iterator
Convert Mat to Array/Vector in OpenCV
C++
Arrays
Opencv
Vector
Synthesis
How to cbind or rbind different lengths vectors without repeating the elements of the shorter vectors?
R
Vector
how do you insert the value in a sorted vector?
C++
Sorting
Vector
Stl
Insertion Sort
How do I sum a vector using fold?
Vector
Rust
Android : Rotate Vector Image to 90 degree
Android
Vector
Rotation
Drawable
What is the most efficient way to append one std::vector to the end of another?
C++
Performance
Stl
Vector
How to cin values into a vector
C++
Function
Templates
Vector
Cin
Vectors in Arduino
C++
Vector
Arduino
Build HashSet from a vector in Rust
Vector
Rust
Hashset
Select every other element from a vector
R
Vector
Seq
Is std::vector memory freed upon a clear?
C++
Optimization
Memory
Vector
How to find a value in a sorted C++ vector in the most efficient way?
C++
Sorting
Search
Vector
Find