21 May 10:06
boost:multi_array and assign
From: Lars Schouw <schouwla <at> yahoo.com>
Subject: boost:multi_array and assign
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-21 08:07:40 GMT
Subject: boost:multi_array and assign
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-21 08:07:40 GMT
Is there any easy way to assign values to a boost::multi_array?
boost::multi_array<double, 2> abd(boost::extents[4][33]);
abd[0][0] = 1.00; abd[0][1] = 0.00; abd[0][2] = 0.00; abd[0][3] = 0.10;
..
I would like to do
abd = boost::assign::list_of(1.00)(0.00)(0.00)(0.10)
But realize this might be a little more tricky with higher dimensions but still possible.
Lars
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed