]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.cpp
container.pl: can now generate constructors for an arbitary number
[ginac.git] / ginac / matrix.cpp
index 9bcab8bd21a66c8dca0b8b6ea5e8de8c24b7c679..e15feb6d71ee2db2dafff99014327ac483fdca89 100644 (file)
@@ -28,9 +28,9 @@
 #include "utils.h"
 #include "debugmsg.h"
 
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
 namespace GiNaC {
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC
 
 GINAC_IMPLEMENT_REGISTERED_CLASS(matrix, basic)
 
@@ -463,7 +463,7 @@ ex determinant_numeric(const matrix & M)
 
 // Compute the sign of a permutation of a vector of things, used internally
 // by determinant_symbolic_perm() where it is instantiated for int.
-template <class T>
+template <typename T>
 int permutation_sign(vector<T> s)
 {
     if (s.size() < 2)
@@ -726,6 +726,12 @@ matrix matrix::fraction_free_elim(const matrix & vars,
     
     matrix a(*this); // make a copy of the matrix
     matrix b(rhs);     // make a copy of the rhs vector
+
+    /*
+    cout << "before" << endl;
+    cout << "a=" << a << endl;
+    cout << "b=" << b << endl;
+    */
     
     // given an m x n matrix a, reduce it to upper echelon form
     unsigned m=a.row;
@@ -793,6 +799,12 @@ matrix matrix::fraction_free_elim(const matrix & vars,
         zero_in_last_row=zero_in_this_row;
     }
 #endif // def DO_GINAC_ASSERT
+
+    /*
+    cout << "after" << endl;
+    cout << "a=" << a << endl;
+    cout << "b=" << b << endl;
+    */
     
     // assemble solution
     matrix sol(n,1);
@@ -833,6 +845,8 @@ matrix matrix::fraction_free_elim(const matrix & vars,
         cout << vars.ffe_get(c,1) << "->" << sol.ffe_get(c,1) << endl;
     }
     */
+
+    // cout << "sol=" << sol << endl;
     
 #ifdef DO_GINAC_ASSERT
     // test solution with echelon matrix
@@ -959,6 +973,6 @@ int matrix::pivot(unsigned ro)
 const matrix some_matrix;
 const type_info & typeid_matrix=typeid(some_matrix);
 
-#ifndef NO_GINAC_NAMESPACE
+#ifndef NO_NAMESPACE_GINAC
 } // namespace GiNaC
-#endif // ndef NO_GINAC_NAMESPACE
+#endif // ndef NO_NAMESPACE_GINAC