Problem creating mapping from string to vector_expression
SHIVAM MITTAL via ublas <[email protected]>
| Newsgroups | gmane.comp.lib.boost.ublas,gmane.comp.lib.boost.devel |
|---|---|
| Message-ID | <CAB+z5yrJHiHFgpGBt_kg5tyLVrCtUGp4VgMbMs2V+b_Wnb4k9w@mail.gmail.com> |
Hi,
I have been trying to create a mapping from string to
ublas::vector_expression.
template <class T>
boost::unordered_map<std::string, vector_expression <T> > c;
vector<int> v (10);
for (unsigned i = 0; i < v.size (); ++ i)
v (i) = i;
c <int>["first"] = v;
I have been getting this error :
error: no match for ‘operator=’ (operand types are
‘boost::unordered::unordered_map<std::__cxx11::basic_string<char>,
boost::numeric::ublas::vector_expression<int>,
boost::hash<std::__cxx11::basic_string<char> >,
std::equal_to<std::__cxx11::basic_string<char> >,
std::allocator<std::pair<const std::__cxx11::basic_string<char>,
boost::numeric::ublas::vector_expression<int> > > >::mapped_type {aka
boost::numeric::ublas::vector_expression<int>}’ and
‘boost::numeric::ublas::vector<int>’)
columns <int>["first"] = v;
Please help.