<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>UJMP&#187; Universal Java Matrix Package &#187; Collections</title>
	<atom:link href="http://www.ujmp.org/tag/collections/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ujmp.org</link>
	<description>Universal Java Matrix Package</description>
	<lastBuildDate>Mon, 15 Feb 2010 11:40:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Collections</title>
		<link>http://www.ujmp.org/collections/</link>
		<comments>http://www.ujmp.org/collections/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 12:42:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[ListMatrix]]></category>
		<category><![CDATA[MapMatrix]]></category>

		<guid isPermaLink="false">http://www.ujmp.org/wp/?p=101</guid>
		<description><![CDATA[You can also create a ListMatrix instead of an ArrayList. A ListMatrix behaves like a java.List but is a Matrix at the same time:

ListMatrix S = new DefaultListMatrix&#40;&#41;;
// List methods:
S.add&#40;0.5&#41;;
S.clear&#40;&#41;;
// Matrix methods:
S.exportToFile&#40;someFile&#41;;
S.showGUI&#40;&#41;;
Matrix P = S.plus&#40;5&#41;.times&#40;2&#41;;
// but: P is not a ListMatrix anymore

The same works also for maps:

MapMatrix map = new DefaultMapMatrix();
map.put(key,o);

]]></description>
			<content:encoded><![CDATA[<p>You can also create a <code>ListMatrix</code> instead of an <code>ArrayList</code>. A <code>ListMatrix</code> behaves like a <code>java.List</code> but is a <code>Matrix</code> at the same time:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">ListMatrix S <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DefaultListMatrix<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// List methods:</span>
S.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0.5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
S.<span style="color: #006633;">clear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Matrix methods:</span>
S.<span style="color: #006633;">exportToFile</span><span style="color: #009900;">&#40;</span>someFile<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
S.<span style="color: #006633;">showGUI</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
Matrix P <span style="color: #339933;">=</span> S.<span style="color: #006633;">plus</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">times</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// but: P is not a ListMatrix anymore</span></pre></div></div>

<p>The same works also for maps:</p>
<p><code><br />
MapMatrix map = new DefaultMapMatrix();<br />
map.put(key,o);<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ujmp.org/collections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
