<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Hilfe bei Boost multi_array]]></title><description><![CDATA[<p>Hi,<br />
Ich probiere schon einige Zeit durch ein boost::multi_array zu iterieren. In der Dokumentation steht dazu auch nichts. Also folgendes habe ich probiert, was aber nicht klappt:</p>
<pre><code class="language-cpp">typedef boost::multi_array&lt;float, 2&gt; float_multiarray;
float_multiarray myarray(extents[dimX][dimY]);
//Die Frage lautet, wenn ich dimX und dimY nicht mehr habe, wie ich dann durch
//das array iterieren kann
for (float_multiarray::index i = 0; i &lt; myarray.size(); ++i) 
myarray[i] = 0.; //So geht das nicht
//Mit Iteratoren hab ichs auch probiert ging aber auch nicht.
</code></pre>
<p>Kann mir jemand helfen?<br />
Danke für alle Antworten.</p>
<p>Tschau</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/157570/hilfe-bei-boost-multi_array</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 02:33:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157570.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 27 Aug 2006 14:25:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe bei Boost multi_array on Sun, 27 Aug 2006 14:25:19 GMT]]></title><description><![CDATA[<p>Hi,<br />
Ich probiere schon einige Zeit durch ein boost::multi_array zu iterieren. In der Dokumentation steht dazu auch nichts. Also folgendes habe ich probiert, was aber nicht klappt:</p>
<pre><code class="language-cpp">typedef boost::multi_array&lt;float, 2&gt; float_multiarray;
float_multiarray myarray(extents[dimX][dimY]);
//Die Frage lautet, wenn ich dimX und dimY nicht mehr habe, wie ich dann durch
//das array iterieren kann
for (float_multiarray::index i = 0; i &lt; myarray.size(); ++i) 
myarray[i] = 0.; //So geht das nicht
//Mit Iteratoren hab ichs auch probiert ging aber auch nicht.
</code></pre>
<p>Kann mir jemand helfen?<br />
Danke für alle Antworten.</p>
<p>Tschau</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125414</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125414</guid><dc:creator><![CDATA[Cappo]]></dc:creator><pubDate>Sun, 27 Aug 2006 14:25:19 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Boost multi_array on Sun, 27 Aug 2006 14:32:55 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">for (int x = 0; x &lt; myarray.size(); ++x)
for (int y = 0; y &lt; myarray.size(); ++y)
{
   myarray[x][y] = 0;
}
</code></pre>
<p>So in der Art sollte es gehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125420</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125420</guid><dc:creator><![CDATA[Riddick_]]></dc:creator><pubDate>Sun, 27 Aug 2006 14:32:55 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe bei Boost multi_array on Sun, 27 Aug 2006 14:47:15 GMT]]></title><description><![CDATA[<p>Hi,<br />
so geht es: ist aber nicht besonders schön...</p>
<pre><code class="language-cpp">for (index i = 0; i &lt; myarray.size(); ++i)
for (index j = 0; j &lt; myarray[0].size(); ++j)
{
   myarray[i][j] = 0;
}
</code></pre>
<p>Weiß jemand vielleicht eine bessere Methode?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125431</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125431</guid><dc:creator><![CDATA[Cappo]]></dc:creator><pubDate>Sun, 27 Aug 2006 14:47:15 GMT</pubDate></item></channel></rss>