<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=CubicSpline%2F1002%2Ftest_lu.py</id>
	<title>CubicSpline/1002/test lu.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.zeropage.org/index.php?action=history&amp;feed=atom&amp;title=CubicSpline%2F1002%2Ftest_lu.py"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=CubicSpline/1002/test_lu.py&amp;action=history"/>
	<updated>2026-05-15T20:58:32Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://mediawiki.zeropage.org/index.php?title=CubicSpline/1002/test_lu.py&amp;diff=31027&amp;oldid=prev</id>
		<title>imported&gt;Unknown at 05:23, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.zeropage.org/index.php?title=CubicSpline/1002/test_lu.py&amp;diff=31027&amp;oldid=prev"/>
		<updated>2021-02-07T05:23:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; import unittest&lt;br /&gt;
 from Numeric import *&lt;br /&gt;
 from Matrix import *&lt;br /&gt;
 from LuDecomposition import *&lt;br /&gt;
 &lt;br /&gt;
 class TestLuDecomposition(unittest.TestCase):&lt;br /&gt;
 	def setUp(self):&lt;br /&gt;
 		self.a = [[1.0,2.0,3.0],[4.0,5.0,6.0],[7.0,8.0,9.0]]&lt;br /&gt;
 		self.matrixA = Matrix(array(self.a))&lt;br /&gt;
 &lt;br /&gt;
 	def testLwrite(self):&lt;br /&gt;
 		ld = LuDecomposition(self.a)&lt;br /&gt;
 		col = 0	&lt;br /&gt;
 		ld._writeL(col)&lt;br /&gt;
 		self.assertEquals(ld._getL(), [[1,0,0],[4,0,0],[7,0,0]])&lt;br /&gt;
 &lt;br /&gt;
 	def testUwrite(self):&lt;br /&gt;
 		ld = LuDecomposition(self.a)&lt;br /&gt;
 		col = 0&lt;br /&gt;
 		ld._writeL(col)&lt;br /&gt;
 		row = 0&lt;br /&gt;
 		ld._writeU(row)&lt;br /&gt;
 		self.assertEquals(ld._getU(), [[1,2.0,3.0],[0,1,0], [0,0,1]])&lt;br /&gt;
 &lt;br /&gt;
 	def testLuDecMore(self):&lt;br /&gt;
 		ld = LuDecomposition(self.a)&lt;br /&gt;
 		ld._writeL(0)&lt;br /&gt;
 		ld._writeU(0)&lt;br /&gt;
 		self.assertEquals(ld._getL(), [[1,0,0],[4,0,0],[7,0,0]])&lt;br /&gt;
 		self.assertEquals(ld._getU(), [[1,2,3],[0,1,0], [0,0,1]])&lt;br /&gt;
 		ld._writeL(1)&lt;br /&gt;
 		ld._writeU(1)&lt;br /&gt;
 		self.assertEquals(ld._getL(), [[1,0,0],[4,-3,0],[7,-6,0]])&lt;br /&gt;
 		self.assertEquals(ld._getU(), [[1,2,3],[0,1,2], [0,0,1]])&lt;br /&gt;
 		ld._writeL(2)&lt;br /&gt;
 		ld._writeU(2)&lt;br /&gt;
 		self.assertEquals(ld._getL(), [[1,0,0],[4,-3,0],[7,-6,0]])&lt;br /&gt;
 		self.assertEquals(ld._getU(), [[1,2,3],[0,1,2], [0,0,1]])&lt;br /&gt;
 &lt;br /&gt;
 	def testLuDecomposition(self):&lt;br /&gt;
 		l, u = LuDecomposition(self.a).perform()&lt;br /&gt;
 		matrixL = Matrix(array(l))&lt;br /&gt;
 		matrixU = Matrix(array(u))&lt;br /&gt;
 		actual = matrixL * matrixU&lt;br /&gt;
 		self.assertEquals(str(actual), str(self.matrixA))&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 if __name__==&amp;quot;__main__&amp;quot;:&lt;br /&gt;
 	unittest.main()&lt;/div&gt;</summary>
		<author><name>imported&gt;Unknown</name></author>
	</entry>
</feed>