c++ - cannot convert from 'double' to 'const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<double>>>' -


i trying convert cusp based code plain c++ code.

original cusp code

typedef typename cusp::array1d<double> arr; typedef typename arr::iterator it; typedef cusp::array1d_view<it> view; 

i wrote equivalent in c++ as:

typedef typename std::vector<real> arr; typedef typename arr::iterator it; typedef std::vector<it> view; view x_view; 

the purpose of view store coordinates , related properties (velocities etc.) of multiple objects , use as:

x_view = view(x.begin(), x.end()); 

then x_view used inside cusp function cusp::blas::axpbypcz. there alternative function in plain c++ or boost.

in cusp array1d_view class 1d vector container wraps data various iterators in array1d datatype. want convert in equivalent stl.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -