<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Math DSL beginning</title>
	<atom:link href="http://www.warneronstine.com/2007/11/23/math-dsl-beginning/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.warneronstine.com/2007/11/23/math-dsl-beginning/</link>
	<description>Where technology and art disappear</description>
	<lastBuildDate>Wed, 17 Nov 2010 10:52:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Yann Richet</title>
		<link>http://www.warneronstine.com/2007/11/23/math-dsl-beginning/comment-page-1/#comment-133</link>
		<dc:creator>Yann Richet</dc:creator>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<guid isPermaLink="false"></guid>
		<description>Hi,

I&#039;ve started to work on similar issues (math dsl) a few weeks ago. You can get my work named groovylab on the front page of groovy project.

It also includes a simple plotter and is based on a pure java API to perform math calculations (to reduce performance issues).

Here is a little preview of what is already possible with groovylab:

Following access (i.e. set/get) are possible:
		x = M[1][2]
		x = M[-1][2]		// where -1 stands for last row index
		x = M[1][-2]		// where -2 stands for last column index
		x = M[-1][2]		// where -1 stands for last row index
		x = M[-1][-2]		// where -1 stands for last row index, -2 stands for last column index
		X = M[1..4][2..3]
		X = M[4..1][2..3]	// thus reverting rows order
		X = M[1..-1][-2..3]
		X = diagonal(Matrix)			// get diagonal of Matrix, alias to diag(Matrix)
		X = diagonal(Matrix, int order)		// get order diagonal of Matrix, alias to diag(Matrix, int)

		M[1][2] = x			// set x value at first row, second column
		M[-1][2] = x		// set x value at last row, second column
		M[1..2][2..5] = [[1.1,1.2,1.3,1.4],[2.1,2.2,2.3,2.4]]
		M[2..1][2..5] = [[1.1,1.2,1.3,1.4],[2.1,2.2,2.3,2.4]]	// thus reverting rows order

	Following operators are available:
		Matrix + Matrix
		Matrix + Number
		Matrix - Matrix
		Matrix - Number
		Matrix * Matrix
		Matrix * Number
		Matrix / Matrix
		Matrix / Number
		Matrix ** int&quot;

	Following static operations are available:
		sum(Matrix)
		prod(Matrix)
		cumsum(Matrix)
		cumprod(Matrix)
		inverse(Matrix)
		solve(Matrix A, Matrix b)	//returns X Matrix verifying A*X = b. if
		rank(Matrix)
		trace(Matrix)
		det(Matrix)
		cond(Matrix)
		norm1(Matrix)
		norm2(Matrix)
		normF(Matrix)
		normInf(Matrix)

	Following static Linear Algebra (from JAMA) are available:
		Cholesky decomposition:
			Cholesky_L(Matrix)
			Cholesky_SPD(Matrix)
		QR decomposition:
			QR_Q(Matrix)
			QR_H(Matrix)
			QR_R(Matrix)
		LU decomposition:
			LU_L(Matrix)
			LU_U(Matrix)
			LU_P(Matrix)
		Singular values decomposition:
			Singular_S(Matrix)
			Singular_U(Matrix)
			Singular_V(Matrix)
			Singular_values(Matrix)
		Eigenvalues decomposition:
			Eigen_D(Matrix)
			Eigen_V(Matrix)

	Following static constructors are available:
		matrix(double[][])
		matrix(double[])	// one row Matrix constructor
		matrix(ArrayList)	// compatible with ArrayList of Numbers or ArrayList of ArrayList of Numbers

		identity(int n)			// identity Matrix of size n*n alias to id(int n)
		diagonal(int, double)	// diagonal Matrix of constant values, alias to diag(int, double)
		diagonal(double[])		// diagonal Matrix with given diagonal values, alias to diag(double[])
		one(int, int)			// constant Matrix of given size, filled with 1.0 values
		fill(int, int, double)	// constant Matrix of given size, filled with given values
		increment(int, int, double begin, double pitch) // Matrix of given size with row incrementing values from given beginning value wsith given pitch increment
		increment(int, int, double[] begin, double[] pitch) // Matrix of given size with row incrementing values from given beginning values wsith given pitchs increment

	Following statistic sample constructors are available (random generator from RngPack):
		random(int, int)								// independant random values (between 0.0 and 1.0) Matrix of given size, alias to rand(int, int)
		random(int, int, double min, double max)		// independant random values (between min and max) Matrix of given size, alias to rand(int, int, double min, double max)
		randomUniform(int m, int n, double min, double max)
		randomDirac(int m, int n, double[] values, double[] prob)
		randomNormal(int m, int n, double mu, double sigma)
		randomChi2(int m, int n, int d)
		randomLogNormal(int m, int n, double mu, double sigma)
		randomExponential(int m, int n, double lambda)
		randomTriangular(int m, int n, double min, double max)
		randomTriangular(int m, int n, double min, double med, double max)
		randomBeta(int m, int n, double a, double b)
		randomCauchy(int m, int n, double mu, double sigma)
		randomWeibull(int m, int n, double lambda, double c)

	Following static sort/find methods are available:
		sort(Matrix)
		sort(Matrix, int columnIndex)
		min(Matrix)
		max(Matrix)

	Following static transformation methods are available:
		transpose(Matrix)	// alias to t(Matrix)
		resize(Matrix, int, int)
		rowsMatrix &gt;&gt; Matrix	// appends rowsMatrix to Matrix at last position (i.e. add last row)
		columnsMatrix &gt;&gt;&gt; Matrix	// appends columnsMatrix to Matrix at last position (i.e. add last column)
		Matrix &lt;&lt; rowsMatrix	// appends rowsMatrix to Matrix at first position (i.e. add first row)

	Following static statistic sample methods are available:
		mean(Matrix)
		variance(Matrix)
		covariance(Matrix,Matrix)
		correlation(Matrix,Matrix)</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve started to work on similar issues (math dsl) a few weeks ago. You can get my work named groovylab on the front page of groovy project.</p>
<p>It also includes a simple plotter and is based on a pure java API to perform math calculations (to reduce performance issues).</p>
<p>Here is a little preview of what is already possible with groovylab:</p>
<p>Following access (i.e. set/get) are possible:<br />
		x = M[1][2]<br />
		x = M[-1][2]		// where -1 stands for last row index<br />
		x = M[1][-2]		// where -2 stands for last column index<br />
		x = M[-1][2]		// where -1 stands for last row index<br />
		x = M[-1][-2]		// where -1 stands for last row index, -2 stands for last column index<br />
		X = M[1..4][2..3]<br />
		X = M[4..1][2..3]	// thus reverting rows order<br />
		X = M[1..-1][-2..3]<br />
		X = diagonal(Matrix)			// get diagonal of Matrix, alias to diag(Matrix)<br />
		X = diagonal(Matrix, int order)		// get order diagonal of Matrix, alias to diag(Matrix, int)</p>
<p>		M[1][2] = x			// set x value at first row, second column<br />
		M[-1][2] = x		// set x value at last row, second column<br />
		M[1..2][2..5] = [[1.1,1.2,1.3,1.4],[2.1,2.2,2.3,2.4]]<br />
		M[2..1][2..5] = [[1.1,1.2,1.3,1.4],[2.1,2.2,2.3,2.4]]	// thus reverting rows order</p>
<p>	Following operators are available:<br />
		Matrix + Matrix<br />
		Matrix + Number<br />
		Matrix &#8211; Matrix<br />
		Matrix &#8211; Number<br />
		Matrix * Matrix<br />
		Matrix * Number<br />
		Matrix / Matrix<br />
		Matrix / Number<br />
		Matrix ** int&#8221;</p>
<p>	Following static operations are available:<br />
		sum(Matrix)<br />
		prod(Matrix)<br />
		cumsum(Matrix)<br />
		cumprod(Matrix)<br />
		inverse(Matrix)<br />
		solve(Matrix A, Matrix b)	//returns X Matrix verifying A*X = b. if<br />
		rank(Matrix)<br />
		trace(Matrix)<br />
		det(Matrix)<br />
		cond(Matrix)<br />
		norm1(Matrix)<br />
		norm2(Matrix)<br />
		normF(Matrix)<br />
		normInf(Matrix)</p>
<p>	Following static Linear Algebra (from JAMA) are available:<br />
		Cholesky decomposition:<br />
			Cholesky_L(Matrix)<br />
			Cholesky_SPD(Matrix)<br />
		QR decomposition:<br />
			QR_Q(Matrix)<br />
			QR_H(Matrix)<br />
			QR_R(Matrix)<br />
		LU decomposition:<br />
			LU_L(Matrix)<br />
			LU_U(Matrix)<br />
			LU_P(Matrix)<br />
		Singular values decomposition:<br />
			Singular_S(Matrix)<br />
			Singular_U(Matrix)<br />
			Singular_V(Matrix)<br />
			Singular_values(Matrix)<br />
		Eigenvalues decomposition:<br />
			Eigen_D(Matrix)<br />
			Eigen_V(Matrix)</p>
<p>	Following static constructors are available:<br />
		matrix(double[][])<br />
		matrix(double[])	// one row Matrix constructor<br />
		matrix(ArrayList)	// compatible with ArrayList of Numbers or ArrayList of ArrayList of Numbers</p>
<p>		identity(int n)			// identity Matrix of size n*n alias to id(int n)<br />
		diagonal(int, double)	// diagonal Matrix of constant values, alias to diag(int, double)<br />
		diagonal(double[])		// diagonal Matrix with given diagonal values, alias to diag(double[])<br />
		one(int, int)			// constant Matrix of given size, filled with 1.0 values<br />
		fill(int, int, double)	// constant Matrix of given size, filled with given values<br />
		increment(int, int, double begin, double pitch) // Matrix of given size with row incrementing values from given beginning value wsith given pitch increment<br />
		increment(int, int, double[] begin, double[] pitch) // Matrix of given size with row incrementing values from given beginning values wsith given pitchs increment</p>
<p>	Following statistic sample constructors are available (random generator from RngPack):<br />
		random(int, int)								// independant random values (between 0.0 and 1.0) Matrix of given size, alias to rand(int, int)<br />
		random(int, int, double min, double max)		// independant random values (between min and max) Matrix of given size, alias to rand(int, int, double min, double max)<br />
		randomUniform(int m, int n, double min, double max)<br />
		randomDirac(int m, int n, double[] values, double[] prob)<br />
		randomNormal(int m, int n, double mu, double sigma)<br />
		randomChi2(int m, int n, int d)<br />
		randomLogNormal(int m, int n, double mu, double sigma)<br />
		randomExponential(int m, int n, double lambda)<br />
		randomTriangular(int m, int n, double min, double max)<br />
		randomTriangular(int m, int n, double min, double med, double max)<br />
		randomBeta(int m, int n, double a, double b)<br />
		randomCauchy(int m, int n, double mu, double sigma)<br />
		randomWeibull(int m, int n, double lambda, double c)</p>
<p>	Following static sort/find methods are available:<br />
		sort(Matrix)<br />
		sort(Matrix, int columnIndex)<br />
		min(Matrix)<br />
		max(Matrix)</p>
<p>	Following static transformation methods are available:<br />
		transpose(Matrix)	// alias to t(Matrix)<br />
		resize(Matrix, int, int)<br />
		rowsMatrix >> Matrix	// appends rowsMatrix to Matrix at last position (i.e. add last row)<br />
		columnsMatrix >>> Matrix	// appends columnsMatrix to Matrix at last position (i.e. add last column)<br />
		Matrix << rowsMatrix	// appends rowsMatrix to Matrix at first position (i.e. add first row)</p>
<p>	Following static statistic sample methods are available:<br />
		mean(Matrix)<br />
		variance(Matrix)<br />
		covariance(Matrix,Matrix)<br />
		correlation(Matrix,Matrix)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

