<?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>Schabby&#039;s Blog &#187; jBLAS</title>
	<atom:link href="http://schabby.de/category/jblas/feed/" rel="self" type="application/rss+xml" />
	<link>http://schabby.de</link>
	<description>OpenGL, Java, Cassandra and other stuff that totally makes the world go round</description>
	<lastBuildDate>Fri, 27 Jan 2012 18:48:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>jBLAS &#8211; Simple Example</title>
		<link>http://schabby.de/jblas-simple-example/</link>
		<comments>http://schabby.de/jblas-simple-example/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 21:20:25 +0000</pubDate>
		<dc:creator>schabby</dc:creator>
				<category><![CDATA[jBLAS]]></category>

		<guid isPermaLink="false">http://schabby.de/?p=26</guid>
		<description><![CDATA[I just downloaded the latest jBLAS version, added it to my classpath and &#8230; it worked! That was easier than expected, because at the time I was involved, we had to compile the native fortran stuff manually for each target OS. Mikio Braun did hell of a job on packing everything in a single JAR. [...]]]></description>
			<content:encoded><![CDATA[<p>I just downloaded the latest <a href="http://jblas.org">jBLAS</a> version, added it to my classpath and &#8230; it worked! That was easier than expected, because at the time I was involved, we had to compile the native fortran stuff manually for each target OS. <a href="http://blog.mikiobraun.de/">Mikio Braun</a> did hell of a job on packing everything in a single JAR. </p>
<p>Here&#8217;s a little code snipped that I got to work out of the box (note that it uses <a href="http://math-atlas.sourceforge.net/">ATLAS</a> under the hood)</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">double</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> data <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">double</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span>
                   <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#123;</span> <span style="color: #cc66cc;">1</span>,  <span style="color: #cc66cc;">2</span>,  <span style="color: #cc66cc;">3</span>,   <span style="color: #cc66cc;">4</span>,   <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#125;</span>,
                    <span style="color: #009900;">&#123;</span> <span style="color: #cc66cc;">6</span>,  <span style="color: #cc66cc;">7</span>,  <span style="color: #cc66cc;">8</span>,   <span style="color: #cc66cc;">9</span>,  <span style="color: #cc66cc;">10</span><span style="color: #009900;">&#125;</span>,
                    <span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">11</span>, <span style="color: #cc66cc;">12</span>, <span style="color: #cc66cc;">13</span>, <span style="color: #cc66cc;">14</span>, <span style="color: #cc66cc;">15</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
	DoubleMatrix matrix <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DoubleMatrix<span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	DoubleMatrix vector <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> DoubleMatrix<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #000066; font-weight: bold;">double</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#123;</span><span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">3</span>, <span style="color: #cc66cc;">3</span>,<span style="color: #cc66cc;">3</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	DoubleMatrix result <span style="color: #339933;">=</span> matrix.<span style="color: #006633;">mmul</span><span style="color: #009900;">&#40;</span>vector<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>result.<span style="color: #006633;">rows</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;x&quot;</span><span style="color: #339933;">+</span>result.<span style="color: #006633;">columns</span><span style="color: #339933;">+</span><span style="color: #0000ff;">&quot;: &quot;</span><span style="color: #339933;">+</span>result<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://schabby.de/jblas-simple-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

