]> www.ginac.de Git - ginac.git/blobdiff - ginac/matrix.cpp
- put everything in "GiNaC" namespace
[ginac.git] / ginac / matrix.cpp
index 59863ea5e206f0492ce9268f9006d8ded0582922..3fd31fcb739791425b6ae41a17fc008ad5bb98e9 100644 (file)
@@ -1,7 +1,8 @@
 /** @file matrix.cpp
  *
- *  Implementation of symbolic matrices
- *
+ *  Implementation of symbolic matrices */
+
+/*
  *  GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
 #include <algorithm>
 #include <stdexcept>
 
-#include "ginac.h"
+#include "matrix.h"
+#include "debugmsg.h"
+
+namespace GiNaC {
 
 //////////
 // default constructor, destructor, copy constructor, assignment operator
@@ -33,7 +37,7 @@
 
 /** Default ctor.  Initializes to 1 x 1-dimensional zero-matrix. */
 matrix::matrix()
-    : basic(TINFO_MATRIX), row(1), col(1)
+    : basic(TINFO_matrix), row(1), col(1)
 {
     debugmsg("matrix default constructor",LOGLEVEL_CONSTRUCT);
     m.push_back(exZERO());
@@ -86,7 +90,7 @@ void matrix::destroy(bool call_parent)
  *  @param r number of rows
  *  @param c number of cols */
 matrix::matrix(int r, int c)
-    : basic(TINFO_MATRIX), row(r), col(c)
+    : basic(TINFO_matrix), row(r), col(c)
 {
     debugmsg("matrix constructor from int,int",LOGLEVEL_CONSTRUCT);
     m.resize(r*c, exZERO());
@@ -96,7 +100,7 @@ matrix::matrix(int r, int c)
 
 /** Ctor from representation, for internal use only. */
 matrix::matrix(int r, int c, vector<ex> const & m2)
-    : basic(TINFO_MATRIX), row(r), col(c), m(m2)
+    : basic(TINFO_matrix), row(r), col(c), m(m2)
 {
     debugmsg("matrix constructor from int,int,vector<ex>",LOGLEVEL_CONSTRUCT);
 }
@@ -867,3 +871,5 @@ int matrix::pivot(int ro)
 
 const matrix some_matrix;
 type_info const & typeid_matrix=typeid(some_matrix);
+
+} // namespace GiNaC