Index: LinearAlgebra/src/LinearAlgebra/LinearSystemOfEquations.cpp
===================================================================
--- LinearAlgebra/src/LinearAlgebra/LinearSystemOfEquations.cpp	(revision c8b17b55097e09730f211d414d01a4b65d6e8a5b)
+++ LinearAlgebra/src/LinearAlgebra/LinearSystemOfEquations.cpp	(revision c5038eb29dd533dd1cd33dee2c21d56fbd61fcd0)
@@ -97,5 +97,5 @@
 
   // copy solution
-  for (size_t i=0;i<x->dimension;i++) {
+  for (size_t i=0;i<x->getDimension();i++) {
     array[i] = x->at(i);
   }
@@ -113,5 +113,5 @@
 
   // copy solution
-  for (size_t i=0;i<x->dimension;i++)
+  for (size_t i=0;i<x->getDimension();i++)
     v[i] = x->at(i);
   return status;
@@ -128,5 +128,5 @@
   int s;
   if (IsSymmetric) { // use LU
-    gsl_permutation * p = gsl_permutation_alloc (x->dimension);
+    gsl_permutation * p = gsl_permutation_alloc (x->getDimension());
     gsl_linalg_LU_decomp (A->content, p, &s);
     gsl_linalg_LU_solve (A->content, p, b->content, x->content);
Index: LinearAlgebra/src/LinearAlgebra/MatrixContent.cpp
===================================================================
--- LinearAlgebra/src/LinearAlgebra/MatrixContent.cpp	(revision c8b17b55097e09730f211d414d01a4b65d6e8a5b)
+++ LinearAlgebra/src/LinearAlgebra/MatrixContent.cpp	(revision c5038eb29dd533dd1cd33dee2c21d56fbd61fcd0)
@@ -33,6 +33,4 @@
 #include <set>
 
-using namespace std;
-
 
 /** Constructor for class MatrixContent.
@@ -41,9 +39,8 @@
  */
 MatrixContent::MatrixContent(size_t _rows, size_t _columns) :
-    rows(_rows),
-    columns(_columns),
+    MatrixDimension(_rows,_columns),
     free_content_on_exit(true)
 {
-  content = gsl_matrix_calloc(rows, columns);
+  content = gsl_matrix_calloc(getRows(), getColumns());
 }
 
@@ -56,6 +53,5 @@
  */
 MatrixContent::MatrixContent(size_t _rows, size_t _columns, MatrixBaseCase) :
-    rows(_rows),
-    columns(_columns),
+    MatrixDimension(_rows,_columns),
     free_content_on_exit(true)
 {}
@@ -67,9 +63,8 @@
  */
 MatrixContent::MatrixContent(size_t _rows, size_t _columns, const double *src) :
-    rows(_rows),
-    columns(_columns),
+    MatrixDimension(_rows,_columns),
     free_content_on_exit(true)
 {
-  content = gsl_matrix_calloc(rows, columns);
+  content = gsl_matrix_calloc(getRows(), getColumns());
   set(0,0, src[0]);
   set(1,0, src[1]);
@@ -95,11 +90,10 @@
  */
 MatrixContent::MatrixContent(size_t _row, size_t _column, std::istream &inputstream) :
+  MatrixDimension(_row,_column),
   content(NULL),
-  rows(_row),
-  columns(_column),
   free_content_on_exit(true)
 {
    // allocate matrix and set contents
-  content = gsl_matrix_alloc(rows, columns);
+  content = gsl_matrix_alloc(getRows(), getColumns());
 
   size_t row = 0;
@@ -125,18 +119,18 @@
 
     // check number of columns parsed
-    ASSERT(line_of_values.size() == columns,
+    ASSERT(line_of_values.size() == getColumns(),
         "MatrixContent::MatrixContent() - row "
         +toString(row)+" has a different number of columns "
         +toString(line_of_values.size())+" than others before "
-        +toString(columns)+".");
-
-    for (size_t column = 0; column < columns; ++column)
+        +toString(getColumns())+".");
+
+    for (size_t column = 0; column < getColumns(); ++column)
       set(row, column, line_of_values[column]);
     ++row;
   } while (inputstream.good());
   // check number of rows parsed
-  ASSERT(row == rows,
+  ASSERT(row == getRows(),
       "MatrixContent::MatrixContent() - insufficent number of rows "
-      +toString(row)+" < "+toString(rows)+" read.");
+      +toString(row)+" < "+toString(getRows())+" read.");
 }
 
@@ -147,6 +141,5 @@
  */
 MatrixContent::MatrixContent(gsl_matrix *&src) :
-    rows(src->size1),
-    columns(src->size2),
+    MatrixDimension(src->size1,src->size2),
     free_content_on_exit(true)
 {
@@ -161,9 +154,8 @@
  */
 MatrixContent::MatrixContent(const MatrixContent &src) :
-    rows(src.rows),
-    columns(src.columns),
+    MatrixDimension(src.getRows(),src.getColumns()),
     free_content_on_exit(true)
 {
-  content = gsl_matrix_alloc(src.rows, src.columns);
+  content = gsl_matrix_alloc(src.getRows(), src.getColumns());
   gsl_matrix_memcpy(content,src.content);
 }
@@ -173,10 +165,9 @@
  */
 MatrixContent::MatrixContent(const MatrixContent *src) :
-    rows(src->rows),
-    columns(src->columns),
+    MatrixDimension(src->getRows(),src->getColumns()),
     free_content_on_exit(true)
 {
   ASSERT(src != NULL, "MatrixContent::MatrixContent - pointer to source matrix is NULL!");
-  content = gsl_matrix_alloc(src->rows, src->columns);
+  content = gsl_matrix_alloc(src->getRows(), src->getColumns());
   gsl_matrix_memcpy(content,src->content);
 }
@@ -190,20 +181,4 @@
 }
 
-/** Getter for MatrixContent::rows.
- * \return MatrixContent::rows
- */
-const size_t MatrixContent::getRows() const
-{
-  return rows;
-}
-
-/** Getter for MatrixContent::columns.
- * \return MatrixContent::columns
- */
-const size_t MatrixContent::getColumns() const
-{
-  return columns;
-}
-
 /** Return a VectorViewContent of the \a column -th column vector.
  *
@@ -213,7 +188,7 @@
 VectorContent *MatrixContent::getColumnVector(size_t column) const
 {
-  ASSERT(column < columns,
+  ASSERT(column < getColumns(),
       "MatrixContent::getColumnVector() - requested column "+toString(column)
-      +" greater than dimension "+toString(columns));
+      +" greater than dimension "+toString(getColumns()));
   return (new VectorViewContent(gsl_matrix_column(content,column)));
 }
@@ -225,7 +200,7 @@
 VectorContent *MatrixContent::getRowVector(size_t row) const
 {
-  ASSERT(row < rows,
+  ASSERT(row < getRows(),
       "MatrixContent::getColumnVector() - requested row "+toString(row)
-      +" greater than dimension "+toString(rows));
+      +" greater than dimension "+toString(getRows()));
   return (new VectorViewContent(gsl_matrix_row(content,row)));
 }
@@ -243,6 +218,6 @@
 void MatrixContent::setIdentity()
 {
-  for(int i=rows;i--;){
-    for(int j=columns;j--;){
+  for(int i=getRows();i--;){
+    for(int j=getColumns();j--;){
       set(i,j,(double)(i==j));
     }
@@ -254,6 +229,6 @@
 void MatrixContent::setZero()
 {
-  for(int i=rows;i--;){
-    for(int j=columns;j--;){
+  for(int i=getRows();i--;){
+    for(int j=getColumns();j--;){
       set(i,j,0.);
     }
@@ -266,6 +241,6 @@
 void MatrixContent::setValue(double _value)
 {
-  for(int i=rows;i--;){
-    for(int j=columns;j--;){
+  for(int i=getRows();i--;){
+    for(int j=getColumns();j--;){
       set(i,j,_value);
     }
@@ -312,8 +287,8 @@
 const MatrixContent &MatrixContent::operator*=(const MatrixContent &rhs)
 {
-  ASSERT(rhs.columns == rhs.rows,
-      "MatrixContent::operator*=() - rhs matrix is not square: "+toString(rhs.columns)+" != "+toString(rhs.rows)+".");
-  ASSERT(columns == rhs.rows,
-      "MatrixContent::operator*=() - columns dimension differ: "+toString(columns)+" != "+toString(rhs.rows)+".");
+  ASSERT(rhs.getColumns() == rhs.getRows(),
+      "MatrixContent::operator*=() - rhs matrix is not square: "+toString(rhs.getColumns())+" != "+toString(rhs.getRows())+".");
+  ASSERT(getColumns() == rhs.getRows(),
+      "MatrixContent::operator*=() - columns dimension differ: "+toString(getColumns())+" != "+toString(rhs.getRows())+".");
   (*this) = (*this)*rhs;
   return *this;
@@ -326,8 +301,8 @@
 const MatrixContent MatrixContent::operator*(const MatrixContent &rhs) const
 {
-  ASSERT (columns == rhs.rows,
+  ASSERT (getColumns() == rhs.getRows(),
       "MatrixContent::operator*() - dimensions not match for matrix product (a,b)*(b,c) = (a,c):"
-      "("+toString(rows)+","+toString(columns)+")*("+toString(rhs.rows)+","+toString(rhs.columns)+")");
-  gsl_matrix *res = gsl_matrix_alloc(rows, rhs.columns);
+      "("+toString(getRows())+","+toString(getColumns())+")*("+toString(rhs.getRows())+","+toString(rhs.getColumns())+")");
+  gsl_matrix *res = gsl_matrix_alloc(getRows(), rhs.getColumns());
   gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, content, rhs.content, 0.0, res);
   // gsl_matrix is taken over by constructor, hence no free
@@ -344,10 +319,10 @@
 const MatrixContent MatrixContent::operator&(const MatrixContent &rhs) const
 {
-  ASSERT ((rows == rhs.rows) && (columns == rhs.columns),
+  ASSERT ((getRows() == rhs.getRows()) && (getColumns() == rhs.getColumns()),
       "MatrixContent::operator&() - dimensions not match for matrix product (a,b) != (b,c):"
-      "("+toString(rows)+","+toString(columns)+") != ("+toString(rhs.rows)+","+toString(rhs.columns)+")");
-  gsl_matrix *res = gsl_matrix_alloc(rows, rhs.columns);
-  for (size_t i=0;i<rows;++i)
-    for (size_t j=0;j<columns;++j)
+      "("+toString(getRows())+","+toString(getColumns())+") != ("+toString(rhs.getRows())+","+toString(rhs.getColumns())+")");
+  gsl_matrix *res = gsl_matrix_alloc(getRows(), rhs.getColumns());
+  for (size_t i=0;i<getRows();++i)
+    for (size_t j=0;j<getColumns();++j)
       gsl_matrix_set(res, i,j, gsl_matrix_get(content, i,j)*gsl_matrix_get(rhs.content, i,j));
   // gsl_matrix is taken over by constructor, hence no free
@@ -367,9 +342,9 @@
 const MatrixContent &MatrixContent::operator&=(const MatrixContent &rhs)
 {
-  ASSERT ((rows == rhs.rows) && (columns == rhs.columns),
+  ASSERT ((getRows() == rhs.getRows()) && (getColumns() == rhs.getColumns()),
       "MatrixContent::operator&() - dimensions not match for matrix product (a,b) != (b,c):"
-      "("+toString(rows)+","+toString(columns)+") != ("+toString(rhs.rows)+","+toString(rhs.columns)+")");
-  for (size_t i=0;i<rows;++i)
-    for (size_t j=0;j<columns;++j)
+      "("+toString(getRows())+","+toString(getColumns())+") != ("+toString(rhs.getRows())+","+toString(rhs.getColumns())+")");
+  for (size_t i=0;i<getRows();++i)
+    for (size_t j=0;j<getColumns();++j)
       gsl_matrix_set(content, i,j, gsl_matrix_get(content, i,j)*gsl_matrix_get(rhs.content, i,j));
   return *this;
@@ -385,8 +360,8 @@
 double &MatrixContent::at(size_t i, size_t j)
 {
-  ASSERT((i>=0) && (i<rows),
-      "MatrixContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(rows)+"]");
-  ASSERT((j>=0) && (j<columns),
-      "MatrixContent::at() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(columns)+"]");
+  ASSERT((i>=0) && (i<getRows()),
+      "MatrixContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(getRows())+"]");
+  ASSERT((j>=0) && (j<getColumns()),
+      "MatrixContent::at() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(getColumns())+"]");
   return *gsl_matrix_ptr (content, i, j);
 }
@@ -399,8 +374,8 @@
 const double MatrixContent::at(size_t i, size_t j) const
 {
-  ASSERT((i>=0) && (i<rows),
-      "MatrixContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(rows)+"]");
-  ASSERT((j>=0) && (j<columns),
-      "MatrixContent::at() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(columns)+"]");
+  ASSERT((i>=0) && (i<getRows()),
+      "MatrixContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(getRows())+"]");
+  ASSERT((j>=0) && (j<getColumns()),
+      "MatrixContent::at() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(getColumns())+"]");
   return gsl_matrix_get(content, i, j);
 }
@@ -435,8 +410,8 @@
 void MatrixContent::set(size_t i, size_t j, const double value)
 {
-  ASSERT((i>=0) && (i<rows),
-      "MatrixContent::set() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(rows)+"]");
-  ASSERT((j>=0) && (j<columns),
-      "MatrixContent::set() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(columns)+"]");
+  ASSERT((i>=0) && (i<getRows()),
+      "MatrixContent::set() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(getRows())+"]");
+  ASSERT((j>=0) && (j<getColumns()),
+      "MatrixContent::set() - Index j="+toString(j)+" for Matrix access out of range [0,"+toString(getColumns())+"]");
   gsl_matrix_set(content,i,j,value);
 }
@@ -448,5 +423,5 @@
 void MatrixContent::setFromDoubleArray(double * x)
 {
-  gsl_matrix_view m = gsl_matrix_view_array (x, rows, columns);
+  gsl_matrix_view m = gsl_matrix_view_array (x, getRows(), getColumns());
   gsl_matrix_memcpy (content, &m.matrix);
 };
@@ -478,5 +453,5 @@
 bool MatrixContent::SwapRowColumn(size_t i, size_t j)
 {
-  ASSERT (rows == columns,
+  ASSERT (getRows() == getColumns(),
       "MatrixContent::SwapRowColumn() - The matrix must be square for swapping row against column to be possible.");
   return (gsl_matrix_swap_rowcol (content, i, j) == GSL_SUCCESS);
@@ -488,5 +463,5 @@
 MatrixContent MatrixContent::transposed() const
 {
-  gsl_matrix *res = gsl_matrix_alloc(columns, rows);  // column and row dimensions exchanged!
+  gsl_matrix *res = gsl_matrix_alloc(getColumns(), getRows());  // column and row dimensions exchanged!
   gsl_matrix_transpose_memcpy(res, content);
   MatrixContent newContent(res);
@@ -500,9 +475,9 @@
 MatrixContent &MatrixContent::transpose()
 {
-  ASSERT( rows == columns,
-      "MatrixContent::transpose() - cannot transpose onto itself as matrix not square: "+toString(rows)+"!="+toString(columns)+"!");
+  ASSERT( getRows() == getColumns(),
+      "MatrixContent::transpose() - cannot transpose onto itself as matrix not square: "+toString(getRows())+"!="+toString(getColumns())+"!");
   double tmp;
-  for (size_t i=0;i<rows;i++)
-    for (size_t j=i+1;j<rows;j++) {
+  for (size_t i=0;i<getRows();i++)
+    for (size_t j=i+1;j<getRows();j++) {
       tmp = at(j,i);
       at(j,i) = at(i,j);
@@ -519,5 +494,5 @@
  *  -# V is a NxN orthogonal, square matrix.
  *
- * The SVD is only done if MatrixContent::rows is larger equal to MatrixContent::columns, i.e.
+ * The SVD is only done if MatrixDimension::rows is larger equal to MatrixDimension::columns, i.e.
  * N >= M.
  *
@@ -529,17 +504,17 @@
 void MatrixContent::performSingularValueDecomposition(MatrixContent &V, VectorContent &S)
 {
-  ASSERT(rows >= columns,
+  ASSERT(getRows() >= getColumns(),
       "MatrixContent::performSingularValueDecomposition() - row count "
-      +toString(rows)+" must be larger than or equal to column count "+toString(columns)+".");
+      +toString(getRows())+" must be larger than or equal to column count "+toString(getColumns())+".");
   ASSERT(V.getRows() == V.getColumns(),
       "MatrixContent::performSingularValueDecomposition() - Matrix V must be square!");
-  ASSERT(V.getRows() == columns,
+  ASSERT(V.getRows() == getColumns(),
       "MatrixContent::performSingularValueDecomposition() - Given matrix V does not have the right dimension "
-      +toString(V.getRows())+"!="+toString(rows)+".");
-  ASSERT(S.getDimension() == columns,
+      +toString(V.getRows())+"!="+toString(getRows())+".");
+  ASSERT(S.getDimension() == getColumns(),
       "MatrixContent::performSingularValueDecomposition() - Vector S does not have the right dimension "
-      +toString(S.getDimension())+"!="+toString(columns)+".");
+      +toString(S.getDimension())+"!="+toString(getColumns())+".");
   gsl_matrix *A = content;
-  gsl_vector *work = gsl_vector_alloc(columns);
+  gsl_vector *work = gsl_vector_alloc(getColumns());
   gsl_linalg_SV_decomp(A,V.content,S.content,work);
   gsl_vector_free(work);
@@ -548,5 +523,5 @@
 /** Performs a SVD on the contained matrix and solves the linear system \f$Ax=b\f$ with given \a b.
  *
- * The SVD is only done if MatrixContent::rows is larger equal to MatrixContent::columns.
+ * The SVD is only done if MatrixDimension::rows is larger equal to MatrixDimension::columns.
  *
  * \note The matrix content is overwritten in the process.
@@ -559,17 +534,17 @@
 VectorContent MatrixContent::solveOverdeterminedLinearEquation(MatrixContent &V, VectorContent &S, const VectorContent &b)
 {
-  ASSERT(b.getDimension() == rows,
+  ASSERT(b.getDimension() == getRows(),
       "MatrixContent::performSingularValueDecomposition() - Given vector b does not have the right dimension "
-      +toString(b.getDimension())+"!="+toString(rows)+".");
+      +toString(b.getDimension())+"!="+toString(getRows())+".");
   ASSERT(V.getRows() == V.getColumns(),
       "MatrixContent::performSingularValueDecomposition() - Matrix V must be square!");
-  ASSERT(V.getRows() == columns,
+  ASSERT(V.getRows() == getColumns(),
       "MatrixContent::performSingularValueDecomposition() - Given matrix V does not have the right dimension "
-      +toString(V.getRows())+"!="+toString(rows)+".");
-  ASSERT(S.getDimension() == columns,
+      +toString(V.getRows())+"!="+toString(getRows())+".");
+  ASSERT(S.getDimension() == getColumns(),
       "MatrixContent::performSingularValueDecomposition() - Vector S does not haver the right dimension "
-      +toString(S.getDimension())+"!="+toString(columns)+".");
-
-  gsl_vector *x = gsl_vector_alloc(columns);
+      +toString(S.getDimension())+"!="+toString(getColumns())+".");
+
+  gsl_vector *x = gsl_vector_alloc(getColumns());
   gsl_linalg_SV_solve(content,V.content,S.content,b.content,x);
   return VectorContent(x, true);
@@ -578,5 +553,5 @@
 /** Performs a SVD on the contained matrix and solves the linear system \f$Ax=b\f$ with given \a b.
  *
- * The SVD is only done if MatrixContent::rows is larger equal to MatrixContent::columns.
+ * The SVD is only done if MatrixDimension::rows is larger equal to MatrixDimension::columns.
  *
  * \note The matrix content is overwritten in the process.
@@ -587,9 +562,9 @@
 VectorContent MatrixContent::solveOverdeterminedLinearEquation(const VectorContent &b)
 {
-  ASSERT(b.getDimension() == rows,
+  ASSERT(b.getDimension() == getRows(),
       "MatrixContent::performSingularValueDecomposition() - Given vector b does not have the right dimension "
-      +toString(b.getDimension())+"!="+toString(rows)+".");
-  MatrixContent V(columns, columns);
-  VectorContent S(columns);
+      +toString(b.getDimension())+"!="+toString(getRows())+".");
+  MatrixContent V(getColumns(), getColumns());
+  VectorContent S(getColumns());
   performSingularValueDecomposition(V,S);
   return solveOverdeterminedLinearEquation(V,S,b);
@@ -604,8 +579,8 @@
 gsl_vector* MatrixContent::transformToEigenbasis()
 {
-  if (rows == columns) { // symmetric
-    gsl_eigen_symmv_workspace *T = gsl_eigen_symmv_alloc(rows);
-    gsl_vector *eval = gsl_vector_alloc(rows);
-    gsl_matrix *evec = gsl_matrix_alloc(rows, rows);
+  if (getRows() == getColumns()) { // symmetric
+    gsl_eigen_symmv_workspace *T = gsl_eigen_symmv_alloc(getRows());
+    gsl_vector *eval = gsl_vector_alloc(getRows());
+    gsl_matrix *evec = gsl_matrix_alloc(getRows(), getRows());
     gsl_eigen_symmv(content, eval, evec, T);
     gsl_eigen_symmv_free(T);
@@ -615,9 +590,9 @@
   } else { // non-symmetric
     // blow up gsl_matrix in content to square matrix, fill other components with zero
-    const size_t greaterDimension = rows > columns ? rows : columns;
+    const size_t greaterDimension = getRows() > getColumns() ? getRows() : getColumns();
     gsl_matrix *content_square = gsl_matrix_alloc(greaterDimension, greaterDimension);
     for (size_t i=0; i<greaterDimension; i++) {
       for (size_t j=0; j<greaterDimension; j++) {
-        const double value = ((i < rows) && (j < columns)) ? gsl_matrix_get(content,i,j) : 0.;
+        const double value = ((i < getRows()) && (j < getColumns())) ? gsl_matrix_get(content,i,j) : 0.;
         gsl_matrix_set(content_square, i,j, value);
       }
@@ -629,5 +604,5 @@
 
     // solve eigenvalue problem
-    gsl_eigen_nonsymmv_workspace *T = gsl_eigen_nonsymmv_alloc(rows);
+    gsl_eigen_nonsymmv_workspace *T = gsl_eigen_nonsymmv_alloc(getRows());
     gsl_vector_complex *eval = gsl_vector_complex_alloc(greaterDimension);
     gsl_matrix_complex *evec = gsl_matrix_complex_alloc(greaterDimension, greaterDimension);
@@ -656,5 +631,5 @@
 
     // copy real-parts of complex eigenvalues and eigenvectors (column-wise orientation)
-    gsl_vector *eval_real = gsl_vector_alloc(columns);
+    gsl_vector *eval_real = gsl_vector_alloc(getColumns());
     size_t I=0;
     for (size_t i=0; i<greaterDimension; i++) { // only copy real space part
@@ -731,5 +706,5 @@
 bool MatrixContent::IsPositiveDefinite() const
 {
-  if (rows != columns)  // only possible for square matrices.
+  if (getRows() != getColumns())  // only possible for square matrices.
     return false;
   else
@@ -744,7 +719,7 @@
 {
   int signum = 0;
-  ASSERT(rows == columns,
+  ASSERT(getRows() == getColumns(),
       "MatrixContent::Determinant() - determinant can only be calculated for square matrices.");
-  gsl_permutation *p = gsl_permutation_alloc(rows);
+  gsl_permutation *p = gsl_permutation_alloc(getRows());
   gsl_linalg_LU_decomp(content, p, &signum);
   gsl_permutation_free(p);
@@ -815,6 +790,6 @@
 void MatrixContent::write(std::ostream &ost) const
 {
-  for (size_t row = 0; row < rows; ++row) {
-    for (size_t column = 0; column < columns; ++column)
+  for (size_t row = 0; row < getRows(); ++row) {
+    for (size_t column = 0; column < getColumns(); ++column)
       ost << at(row, column) << "\t";
     ost << std::endl;
@@ -863,8 +838,8 @@
 MatrixContent const operator+(const MatrixContent& a, const MatrixContent& b)
 {
-  ASSERT(a.rows == b.rows, "MatrixContent::operator+() - row counts have to match: "
-      +toString(a.rows)+" != "+toString(b.rows)+"!");
-  ASSERT(a.columns == b.columns, "MatrixContent::operator+() - column counts have to match: "
-      +toString(a.columns)+" != "+toString(b.columns)+"!");
+  ASSERT(a.getRows() == b.getRows(), "MatrixContent::operator+() - row counts have to match: "
+      +toString(a.getRows())+" != "+toString(b.getRows())+"!");
+  ASSERT(a.getColumns() == b.getColumns(), "MatrixContent::operator+() - column counts have to match: "
+      +toString(a.getColumns())+" != "+toString(b.getColumns())+"!");
   MatrixContent x(a);
   x += b;
@@ -879,8 +854,8 @@
 MatrixContent const operator-(const MatrixContent& a, const MatrixContent& b)
 {
-  ASSERT(a.rows == b.rows, "MatrixContent::operator+() - row counts have to match: "
-      +toString(a.rows)+" != "+toString(b.rows)+"!");
-  ASSERT(a.columns == b.columns, "MatrixContent::operator+() - column counts have to match: "
-      +toString(a.columns)+" != "+toString(b.columns)+"!");
+  ASSERT(a.getRows() == b.getRows(), "MatrixContent::operator+() - row counts have to match: "
+      +toString(a.getRows())+" != "+toString(b.getRows())+"!");
+  ASSERT(a.getColumns() == b.getColumns(), "MatrixContent::operator+() - column counts have to match: "
+      +toString(a.getColumns())+" != "+toString(b.getColumns())+"!");
   MatrixContent x(a);
   x -= b;
@@ -894,7 +869,7 @@
 bool MatrixContent::operator==(const MatrixContent &rhs) const
     {
-  if ((rows == rhs.rows) && (columns == rhs.columns)) {
-    for(int i=rows;i--;){
-      for(int j=columns;j--;){
+  if ((getRows() == rhs.getRows()) && (getColumns() == rhs.getColumns())) {
+    for(int i=getRows();i--;){
+      for(int j=getColumns();j--;){
         if(fabs(at(i,j)-rhs.at(i,j))>LINALG_MYEPSILON()){
           return false;
@@ -911,11 +886,11 @@
 {
   ost << "\\begin{pmatrix}";
-  for (size_t i=0;i<mat.rows;i++) {
-    for (size_t j=0;j<mat.columns;j++) {
+  for (size_t i=0;i<mat.getRows();i++) {
+    for (size_t j=0;j<mat.getColumns();j++) {
       ost << mat.at(i,j) << " ";
-      if (j != mat.columns-1)
+      if (j != mat.getColumns()-1)
         ost << "& ";
     }
-    if (i != mat.rows-1)
+    if (i != mat.getRows()-1)
       ost << "\\\\ ";
   }
Index: LinearAlgebra/src/LinearAlgebra/MatrixContent.hpp
===================================================================
--- LinearAlgebra/src/LinearAlgebra/MatrixContent.hpp	(revision c8b17b55097e09730f211d414d01a4b65d6e8a5b)
+++ LinearAlgebra/src/LinearAlgebra/MatrixContent.hpp	(revision c5038eb29dd533dd1cd33dee2c21d56fbd61fcd0)
@@ -14,4 +14,5 @@
 #endif
 
+#include "CodePatterns/Assert.hpp"
 
 /** MatrixContent is a wrapper for gsl_matrix.
@@ -46,4 +47,9 @@
 
 class VectorContent;
+namespace boost {
+  namespace serialization {
+    class access;
+  }
+}
 
 /** Dummy structure to create a unique signature.
@@ -52,5 +58,36 @@
 struct MatrixBaseCase{};
 
-class MatrixContent
+/** This class safely stores matrix dimensions away.
+ *
+ * This way we simulate const-ness of the dimensions while still allowing
+ * serialization to modify them.
+ *
+ */
+struct MatrixDimension {
+public:
+  MatrixDimension(size_t _rows, size_t _columns) : rows(_rows), columns(_columns) {}
+
+  size_t getRows() const {return rows;}
+  size_t getColumns() const {return columns;}
+
+private:
+  void setRows(size_t _rows) {rows = _rows;}
+  void setColumns(size_t _columns) {columns = _columns;}
+
+  friend class boost::serialization::access;
+  // serialization (due to gsl_vector separate versions needed)
+  template<class Archive>
+  void serialize(Archive & ar, const unsigned int version)
+  {
+    ar & rows;
+    ar & columns;
+  }
+
+private:
+  size_t rows;      // store for internal purposes
+  size_t columns;  // store for internal purposes
+};
+
+class MatrixContent : public MatrixDimension
 {
   friend std::ostream & operator<<(std::ostream &ost, const MatrixContent &mat);
@@ -121,7 +158,4 @@
   bool operator==(const MatrixContent &rhs) const;
 
-  const size_t getRows() const;
-  const size_t getColumns() const;
-
   VectorContent *getColumnVector(size_t column) const;
   VectorContent *getRowVector(size_t row) const;
@@ -136,6 +170,4 @@
 
   gsl_matrix * content;
-  const size_t rows;      // store for internal purposes
-  const size_t columns;  // store for internal purposes
 
 private:
Index: LinearAlgebra/src/LinearAlgebra/MatrixVector_ops.cpp
===================================================================
--- LinearAlgebra/src/LinearAlgebra/MatrixVector_ops.cpp	(revision c8b17b55097e09730f211d414d01a4b65d6e8a5b)
+++ LinearAlgebra/src/LinearAlgebra/MatrixVector_ops.cpp	(revision c5038eb29dd533dd1cd33dee2c21d56fbd61fcd0)
@@ -36,8 +36,8 @@
 VectorContent const operator*(const VectorContent& vec, const MatrixContent& mat)
 {
-  ASSERT( mat.columns == vec.dimension,
-      "operator*() - column dimension of matrix ("+toString(mat.columns)
-      +") and dimension of this vector ("+toString(vec.dimension)+") not equal!");
-  VectorContent result(mat.rows);
+  ASSERT( mat.getColumns() == vec.getDimension(),
+      "operator*() - column dimension of matrix ("+toString(mat.getColumns())
+      +") and dimension of this vector ("+toString(vec.getDimension())+") not equal!");
+  VectorContent result(mat.getRows());
   gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content, vec.content, 0.0, result.content);
   return result;
@@ -51,8 +51,8 @@
 VectorContent const operator*(const MatrixContent& mat, const VectorContent& vec)
 {
-  ASSERT( mat.columns == vec.dimension,
-      "operator*() - column dimension of this matrix ("+toString(mat.columns)
-      +") and dimension of vector ("+toString(vec.dimension)+") not equal!");
-  VectorContent result(mat.rows);
+  ASSERT( mat.getColumns() == vec.getDimension(),
+      "operator*() - column dimension of this matrix ("+toString(mat.getColumns())
+      +") and dimension of vector ("+toString(vec.getDimension())+") not equal!");
+  VectorContent result(mat.getRows());
   gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content, vec.content, 0.0, result.content);
   return result;
Index: LinearAlgebra/src/LinearAlgebra/VectorContent.cpp
===================================================================
--- LinearAlgebra/src/LinearAlgebra/VectorContent.cpp	(revision c8b17b55097e09730f211d414d01a4b65d6e8a5b)
+++ LinearAlgebra/src/LinearAlgebra/VectorContent.cpp	(revision c5038eb29dd533dd1cd33dee2c21d56fbd61fcd0)
@@ -37,8 +37,8 @@
  */
 VectorContent::VectorContent(size_t _dim) :
-    dimension(_dim),
+    VectorDimension(_dim),
     free_content_on_exit(true)
 {
-  content = gsl_vector_calloc(dimension);
+  content = gsl_vector_calloc(getDimension());
 }
 
@@ -51,4 +51,5 @@
  */
 VectorContent::VectorContent(VectorBaseCase) :
+    VectorDimension(0),
     free_content_on_exit(false)
 {}
@@ -59,8 +60,8 @@
  */
 VectorContent::VectorContent(const VectorContent * const src) :
-    dimension(src->dimension),
+    VectorDimension(src->getDimension()),
     free_content_on_exit(true)
 {
-  content = gsl_vector_alloc(dimension);
+  content = gsl_vector_alloc(getDimension());
   gsl_vector_memcpy (content, src->content);
 };
@@ -71,8 +72,8 @@
  */
 VectorContent::VectorContent(const VectorContent & src) :
-    dimension(src.dimension),
+    VectorDimension(src.getDimension()),
     free_content_on_exit(true)
 {
-  content = gsl_vector_alloc(dimension);
+  content = gsl_vector_alloc(getDimension());
   gsl_vector_memcpy (content, src.content);
 };
@@ -84,10 +85,10 @@
  */
 VectorContent::VectorContent(const size_t _dimension, std::istream &inputstream) :
-  dimension(_dimension),
+  VectorDimension(_dimension),
   content(NULL),
   free_content_on_exit(true)
 {
    // allocate vector and set contents
-  content = gsl_vector_alloc(dimension);
+  content = gsl_vector_alloc(getDimension());
 
   size_t row = 0;
@@ -114,9 +115,9 @@
 
     // check number of columns parsed
-    ASSERT(line_of_values.size()+index <= dimension,
+    ASSERT(line_of_values.size()+index <= getDimension(),
         "VectorContent::VectorContent() - exceedingly many entries in row "
         +toString(row)+": current number is "
         +toString(index)+" and expecting now "
-        +toString(line_of_values.size())+" which exceeds "+toString(dimension)+".");
+        +toString(line_of_values.size())+" which exceeds "+toString(getDimension())+".");
 
     for (std::vector<double>::const_iterator iter = line_of_values.begin();
@@ -126,7 +127,7 @@
   } while (inputstream.good());
   // check number of rows parsed
-  ASSERT(index == dimension,
+  ASSERT(index == getDimension(),
       "VectorContent::VectorContent() - insufficent number of components "
-      +toString(index)+" < "+toString(dimension)+" read.");
+      +toString(index)+" < "+toString(getDimension())+" read.");
 }
 
@@ -138,5 +139,5 @@
  */
 VectorContent::VectorContent(gsl_vector * _src, bool _free_content_on_exit) :
-  dimension(_src->size),
+  VectorDimension(_src->size),
   free_content_on_exit(_free_content_on_exit)
 {
@@ -163,6 +164,6 @@
 double &VectorContent::at(size_t i)
 {
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  ASSERT((i>=0) && (i<getDimension()),
+      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(getDimension())+"]");
   return *gsl_vector_ptr (content, i);
 }
@@ -174,11 +175,11 @@
 const double VectorContent::at(size_t i) const
 {
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  ASSERT((i>=0) && (i<getDimension()),
+      "VectorContent::at() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(getDimension())+"]");
   return gsl_vector_get(content, i);
 }
 
 /** These functions return a pointer to the \a m-th element of a vector.
- *  If \a m lies outside the allowed range of 0 to VectorContent::dimension-1 then the error handler is invoked and a null pointer is returned.
+ *  If \a m lies outside the allowed range of 0 to VectorDimension::dimension-1 then the error handler is invoked and a null pointer is returned.
  * \param m m-th element
  * \return pointer to \a m-th element
@@ -190,5 +191,5 @@
 
 /** These functions return a constant pointer to the \a m-th element of a vector.
- *  If \a m lies outside the allowed range of 0 to VectorContent::dimension-1 then the error handler is invoked and a null pointer is returned.
+ *  If \a m lies outside the allowed range of 0 to VectorDimension::dimension-1 then the error handler is invoked and a null pointer is returned.
  * \param m m-th element
  * \return const pointer to \a m-th element
@@ -205,7 +206,7 @@
 VectorContent& VectorContent::operator=(const VectorContent& src)
 {
-  ASSERT(dimension == src.dimension,
+  ASSERT(getDimension() == src.getDimension(),
       "Dimensions have to be the same to assign VectorContent onto another:"
-      +toString(dimension)+" != "+toString(src.dimension)+"!");
+      +toString(getDimension())+" != "+toString(src.getDimension())+"!");
   // check for self assignment
   if(&src!=this){
@@ -230,5 +231,5 @@
 void VectorContent::setFromDoubleArray(double * x)
 {
-  gsl_vector_view m = gsl_vector_view_array (x, dimension);
+  gsl_vector_view m = gsl_vector_view_array (x, getDimension());
   gsl_vector_memcpy (content, &m.vector);
 };
@@ -285,6 +286,6 @@
 double &VectorContent::operator[](size_t i)
 {
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  ASSERT((i>=0) && (i<getDimension()),
+      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(getDimension())+"]");
   return *gsl_vector_ptr (content, i);
 }
@@ -296,6 +297,6 @@
 const double VectorContent::operator[](size_t i) const
 {
-  ASSERT((i>=0) && (i<dimension),
-      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(dimension)+"]");
+  ASSERT((i>=0) && (i<getDimension()),
+      "VectorContent::operator[]() - Index i="+toString(i)+" for Matrix access out of range [0,"+toString(getDimension())+"]");
   return gsl_vector_get(content, i);
 }
@@ -310,6 +311,8 @@
 {
   bool status = true;
-  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
-  for (size_t i=0;i<dimension;i++)
+  ASSERT(getDimension() == b.getDimension(),
+      "VectorContent::operator==() - Dimensions of VectorContents to compare differ: "
+      +toString(getDimension())+" != "+toString(b.getDimension())+".");
+  for (size_t i=0;i<getDimension();i++)
     status = status && (fabs(at(i) - b.at(i)) <= LINALG_MYEPSILON());
   return status;
@@ -323,6 +326,8 @@
 const VectorContent& VectorContent::operator+=(const VectorContent& b)
 {
-  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
-  for (size_t i=0;i<dimension;i++)
+  ASSERT(getDimension() == b.getDimension(),
+      "VectorContent::operator=+() - Dimensions of VectorContents to compare differ: "
+      +toString(getDimension())+" != "+toString(b.getDimension())+".");
+  for (size_t i=0;i<getDimension();i++)
     at(i) = at(i)+b.at(i);
   return *this;
@@ -336,6 +341,8 @@
 const VectorContent& VectorContent::operator-=(const VectorContent& b)
 {
-  ASSERT(dimension == b.dimension, "Dimenions of VectorContents to compare differ");
-  for (size_t i=0;i<dimension;i++)
+  ASSERT(getDimension() == b.getDimension(),
+      "VectorContent::operator-=() - Dimensions of VectorContents to compare differ: "
+      +toString(getDimension())+" != "+toString(b.getDimension())+".");
+  for (size_t i=0;i<getDimension();i++)
     at(i) = at(i)-b.at(i);
   return *this;
@@ -349,5 +356,5 @@
 const VectorContent& VectorContent::operator*=(const double m)
 {
-  for (size_t i=0;i<dimension;i++)
+  for (size_t i=0;i<getDimension();i++)
     at(i) = at(i)*m;
   return *this;
@@ -361,7 +368,9 @@
 VectorContent const operator+(const VectorContent& a, const VectorContent& b)
 {
-  ASSERT(a.dimension == b.dimension, "VectorContent::operator+() - dimensions have to match: "+toString(a.dimension)+" != "+toString(b.dimension)+"!");
+  ASSERT(a.getDimension() == b.getDimension(),
+      "VectorContent::operator+() - dimensions have to match: "
+      +toString(a.getDimension())+" != "+toString(b.getDimension())+"!");
   VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
+  for (size_t i=0;i<a.getDimension();i++)
     x.at(i) = a.at(i)+b.at(i);
   return x;
@@ -375,7 +384,9 @@
 VectorContent const operator-(const VectorContent& a, const VectorContent& b)
 {
-  ASSERT(a.dimension == b.dimension, "VectorContent::operator-() - dimensions have to match: "+toString(a.dimension)+" != "+toString(b.dimension)+"!");
+  ASSERT(a.getDimension() == b.getDimension(),
+      "VectorContent::operator-() - dimensions have to match: "
+      +toString(a.getDimension())+" != "+toString(b.getDimension())+"!");
   VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
+  for (size_t i=0;i<a.getDimension();i++)
     x.at(i) = a.at(i)-b.at(i);
   return x;
@@ -390,5 +401,5 @@
 {
   VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
+  for (size_t i=0;i<a.getDimension();i++)
     x.at(i) = a.at(i)*m;
   return x;
@@ -403,5 +414,5 @@
 {
   VectorContent x(a);
-  for (size_t i=0;i<a.dimension;i++)
+  for (size_t i=0;i<a.getDimension();i++)
     x.at(i) = a.at(i)*m;
   return x;
@@ -411,7 +422,7 @@
 {
   ost << "[";
-  for (size_t i=0;i<m.dimension;i++) {
+  for (size_t i=0;i<m.getDimension();i++) {
     ost << m.at(i);
-    if (i != m.dimension-1)
+    if (i != m.getDimension()-1)
       ost << " ";
   }
@@ -429,5 +440,5 @@
 {
   double result = 0.;
-  for (size_t i = dimension; i--; )
+  for (size_t i = getDimension(); i--; )
     result += fabs(at(i));
   return (result <= LINALG_MYEPSILON());
@@ -440,5 +451,5 @@
 {
   double NormValue = 0.;
-  for (size_t i=dimension;--i;)
+  for (size_t i=getDimension();--i;)
     NormValue += at(i)*at(i);
   return (fabs(NormValue - 1.) <= LINALG_MYEPSILON());
@@ -484,5 +495,5 @@
 {
   double res = 0.;
-  for (int i=dimension;i--;)
+  for (int i=getDimension();i--;)
     res += (at(i)-y[i])*(at(i)-y[i]);
   return (res);
@@ -570,5 +581,5 @@
 void VectorContent::write(std::ostream &ost) const
 {
-  for (size_t index = 0; index < dimension; ++index)
+  for (size_t index = 0; index < getDimension(); ++index)
     ost << at(index) << "\t";
   ost << std::endl;
@@ -587,10 +598,2 @@
   return res;
 };
-
-/** Getter for VectorContent::dimension.
- * @return VectorContent::dimension
- */
-const size_t VectorContent::getDimension() const
-{
-  return dimension;
-}
Index: LinearAlgebra/src/LinearAlgebra/VectorContent.hpp
===================================================================
--- LinearAlgebra/src/LinearAlgebra/VectorContent.hpp	(revision c8b17b55097e09730f211d414d01a4b65d6e8a5b)
+++ LinearAlgebra/src/LinearAlgebra/VectorContent.hpp	(revision c5038eb29dd533dd1cd33dee2c21d56fbd61fcd0)
@@ -14,4 +14,5 @@
 #endif
 
+#include "CodePatterns/Assert.hpp"
 
 /**
@@ -32,4 +33,38 @@
 class Vector;
 class MatrixContent;
+struct VectorViewContent;
+namespace boost {
+  namespace serialization {
+    class access;
+  }
+}
+
+/** This class safely stores vector dimension away.
+ *
+ * This way we simulate const-ness of the dimension while still allowing
+ * serialization to modify them.
+ *
+ */
+struct VectorDimension {
+  friend struct VectorViewContent;
+public:
+  VectorDimension(size_t _dimension) : dimension(_dimension) {}
+
+  size_t getDimension() const {return dimension;}
+
+private:
+  void setDim(size_t _dimension) {dimension = _dimension;}
+
+  friend class boost::serialization::access;
+  // serialization (due to gsl_vector separate versions needed)
+  template<class Archive>
+  void serialize(Archive & ar, const unsigned int version)
+  {
+    ar & dimension;
+  }
+
+private:
+  size_t dimension;      // store for internal purposes
+};
 
 /** Dummy structure to create a unique signature.
@@ -38,5 +73,6 @@
 struct VectorBaseCase{};
 
-class VectorContent{
+class VectorContent : public VectorDimension
+{
   friend std::ostream & operator<< (std::ostream& ost, const VectorContent &m);
   friend VectorContent const operator*(const VectorContent& a, const double m);
@@ -58,4 +94,6 @@
   virtual ~VectorContent();
 
+  static size_t preparseVectorDimensions(std::istream &inputstream);
+
   // Accessing
   double &at(size_t m);
@@ -65,4 +103,5 @@
   double *Pointer(size_t m) const;
   const double *const_Pointer(size_t m) const;
+  void write(std::ostream &ost) const;
 
   // Assignment operator
@@ -106,10 +145,4 @@
   const double operator*(const VectorContent& b) const;
 
-  const size_t getDimension() const;
-
-  static size_t preparseVectorDimensions(std::istream &inputstream);
-  void write(std::ostream &ost) const;
-
-  size_t dimension;
   gsl_vector *content;
 private:
