Example #1
0
 def testUTSolve(self):
     for m, s in self.data:
         U = ni.upper_tri_sp(m, m, s)
         b = ni.vect(ni.np.arange(m, dtype=ni.np.float64))
         x = cppsparse.dvec(b)
         U.utsolve(x)
         self.verifySolve(U, b, True, x)
Example #2
0
 def testUTSolve(self):
     for m, s in self.data:
         U = ni.upper_tri_sp(m, m, s)
         b = ni.vect(ni.np.arange(m, dtype=ni.np.float64))
         x = cppsparse.dvec(b)
         U.utsolve(x)
         self.verifySolve(U, b, True, x)
Example #3
0
 def testLTSolve(self):
     for m, s in self.data:
         L = ni.lower_tri_sp(m, m, s)
         b = ni.vect(ni.np.arange(m, dtype=ni.np.float64))
         x = cppsparse.dvec(b)
         L.ltsolve(x)
         self.verifySolve(L, b, True, x)
Example #4
0
 def testLTSolve(self):
     for m, s in self.data:
         L = ni.lower_tri_sp(m, m, s)
         b = ni.vect(ni.np.arange(m, dtype=ni.np.float64))
         x = cppsparse.dvec(b)
         L.ltsolve(x)
         self.verifySolve(L, b, True, x)