Top "Vector" questions

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

How to read a binary file into a vector of unsigned chars

Lately I've been asked to write a function that reads the binary file into the std::vector<BYTE> …

c++ file-io vector binaryfiles
Multiply rows of matrix by vector?

I have a numeric matrix with 25 columns and 23 rows, and a vector of length 25. How can I multiply each row …

r vector matrix multiplication
Test for equality among all elements of a single vector

I'm trying to test whether all elements of a vector are equal to one another. The solutions I have come …

r vector equality
packed vs unpacked vectors in system verilog

Looking at some code I'm maintaining in System Verilog I see some signals that are defined like this: node [range_…

vector system-verilog
C++ convert vector<int> to vector<double>

What is a good clean way to convert a std::vector<int> intVec to std::vector<double&…

c++ stl vector type-conversion
Replacing commas and dots in R

I have a whole column of numbers that include dot separators at the thousands and comma instead of dot as …

r vector numeric
vector<int>::size_type in C++

What is meant by this C++ statement? vector<int>::size_type x; And, what is the use of …

c++ vector size-type
How to divide each row of a matrix by elements of a vector in R

I would like to divide each row of a matrix by a fixed vector. For example mat<-matrix(1,ncol=2,…

r matrix vector
What is a formula to get a vector perpendicular to another vector?

What is a formula to get a three dimensional vector B lying on the plane perpendicular to a vector A? …

math vector formula algebra
find average of input to vector c++

I am trying to write a program where the user inputs as many numbers as they want and then the …

c++ vector average