Is there a preexisting library that will let me create array-like objects which have the following properties:
- Run time size specification (chosen at instantition, not grown or shrunk afterwards)
- Operators overloaded to perform element wise operations (i.e.
c=a+bwill result in a vectorcwithc[i]=a[i]+b[i]for alli, and similarly for*,-,/, etc) - A good set of functions which act elementwise, for example
x=sqrt(vec)will have elementsx[i]=sqrt(vec[i]) - Provide "summarising" functions such as
sum(vec),mean(vec)etc - (Optional) Operations can be sent to a GPU for processing.
Basically something like the way arrays work in Fortran, with all of the implementation hidden. Currently I am using vector from the STL and manually overloading the operators, but I feel like this is probably a solved problem.