Index: src/LinearAlgebra/Line.cpp
===================================================================
--- src/LinearAlgebra/Line.cpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ src/LinearAlgebra/Line.cpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -28,5 +28,5 @@
 #include "Helpers/Log.hpp"
 #include "Helpers/Verbose.hpp"
-#include "LinearAlgebra/gslmatrix.hpp"
+#include "LinearAlgebra/MatrixContent.hpp"
 #include "Helpers/Info.hpp"
 #include "Exceptions/LinearDependenceException.hpp"
@@ -116,12 +116,12 @@
   Vector res;
 
-  auto_ptr<GSLMatrix> M = auto_ptr<GSLMatrix>(new GSLMatrix(4,4));
-
-  M->SetAll(1.);
+  auto_ptr<MatrixContent> M = auto_ptr<MatrixContent>(new MatrixContent(4,4));
+
+  M->setValue(1.);
   for (int i=0;i<3;i++) {
-    M->Set(0, i, Line1a[i]);
-    M->Set(1, i, Line1b[i]);
-    M->Set(2, i, Line2a[i]);
-    M->Set(3, i, Line2b[i]);
+    M->set(0, i, Line1a[i]);
+    M->set(1, i, Line1b[i]);
+    M->set(2, i, Line2a[i]);
+    M->set(3, i, Line2b[i]);
   }
 
Index: src/LinearAlgebra/MatrixContent.cpp
===================================================================
--- src/LinearAlgebra/MatrixContent.cpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ src/LinearAlgebra/MatrixContent.cpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -25,4 +25,5 @@
 #include <gsl/gsl_blas.h>
 #include <gsl/gsl_eigen.h>
+#include <gsl/gsl_linalg.h>
 #include <gsl/gsl_matrix.h>
 #include <gsl/gsl_multimin.h>
@@ -131,4 +132,16 @@
     for(int j=columns;j--;){
       set(i,j,0.);
+    }
+  }
+}
+
+/** Set all matrix components to a given value.
+ * \param _value value to set each component to
+ */
+void MatrixContent::setValue(double _value)
+{
+  for(int i=rows;i--;){
+    for(int j=columns;j--;){
+      set(i,j,_value);
     }
   }
@@ -196,4 +209,6 @@
 }
 
+/* ========================== Accessing =============================== */
+
 /** Accessor for manipulating component (i,j).
  * \param i row number
@@ -224,4 +239,26 @@
 }
 
+/** These functions return a pointer to the \a m-th element of a matrix.
+ *  If \a m or \a n lies outside the allowed range of 0 to GSLMatrix::dimension-1 then the error handler is invoked and a null pointer is returned.
+ * \param m index
+ * \return pointer to \a m-th element
+ */
+double *MatrixContent::Pointer(size_t m, size_t n)
+{
+  return gsl_matrix_ptr (content, m, n);
+};
+
+/** These functions return a constant pointer to the \a m-th element of a matrix.
+ *  If \a m or \a n lies outside the allowed range of 0 to GSLMatrix::dimension-1 then the error handler is invoked and a null pointer is returned.
+ * \param m index
+ * \return const pointer to \a m-th element
+ */
+const double *MatrixContent::const_Pointer(size_t m, size_t n) const
+{
+  return gsl_matrix_const_ptr (content, m, n);
+};
+
+/* ========================== Initializing =============================== */
+
 /** Setter for component (i,j).
  * \param i row numbr
@@ -238,4 +275,44 @@
 }
 
+/** This function sets the matrix from a double array.
+ * Creates a matrix view of the array and performs a memcopy.
+ * \param *x array of values (no dimension check is performed)
+ */
+void MatrixContent::setFromDoubleArray(double * x)
+{
+  gsl_matrix_view m = gsl_matrix_view_array (x, rows, columns);
+  gsl_matrix_memcpy (content, &m.matrix);
+};
+
+/* ====================== Exchanging elements ============================ */
+/** This function exchanges the \a i-th and \a j-th row of the matrix in-place.
+ * \param i i-th row to swap with ...
+ * \param j ... j-th row to swap against
+ */
+bool MatrixContent::SwapRows(size_t i, size_t j)
+{
+  return (gsl_matrix_swap_rows (content, i, j) == GSL_SUCCESS);
+};
+
+/** This function exchanges the \a i-th and \a j-th column of the matrix in-place.
+ * \param i i-th column to swap with ...
+ * \param j ... j-th column to swap against
+ */
+bool MatrixContent::SwapColumns(size_t i, size_t j)
+{
+  return (gsl_matrix_swap_columns (content, i, j) == GSL_SUCCESS);
+};
+
+/** This function exchanges the \a i-th row and \a j-th column of the matrix in-place.
+ * The matrix must be square for this operation to be possible.
+ * \param i i-th row to swap with ...
+ * \param j ... j-th column to swap against
+ */
+bool MatrixContent::SwapRowColumn(size_t i, size_t j)
+{
+  assert (rows == columns && "The matrix must be square for swapping row against column to be possible.");
+  return (gsl_matrix_swap_rowcol (content, i, j) == GSL_SUCCESS);
+};
+
 /** Return transposed matrix.
  * \return new matrix that is transposed of this.
@@ -244,5 +321,5 @@
 {
   std::cout << "const MatrixContent::transpose()." << std::endl;
-  gsl_matrix *res = gsl_matrix_alloc(rows, columns);
+  gsl_matrix *res = gsl_matrix_alloc(columns, rows);  // column and row dimensions exchanged!
   gsl_matrix_transpose_memcpy(res, content);
   MatrixContent newContent(res);
@@ -286,4 +363,65 @@
   return eval;
 }
+
+/* ============================ Properties ============================== */
+/** Checks whether matrix' elements are strictly null.
+ * \return true - is null, false - else
+ */
+bool MatrixContent::IsNull() const
+{
+  return gsl_matrix_isnull (content);
+};
+
+/** Checks whether matrix' elements are strictly positive.
+ * \return true - is positive, false - else
+ */
+bool MatrixContent::IsPositive() const
+{
+  return gsl_matrix_ispos (content);
+};
+
+/** Checks whether matrix' elements are strictly negative.
+ * \return true - is negative, false - else
+ */
+bool MatrixContent::IsNegative() const
+{
+  return gsl_matrix_isneg (content);
+};
+
+/** Checks whether matrix' elements are strictly non-negative.
+ * \return true - is non-negative, false - else
+ */
+bool MatrixContent::IsNonNegative() const
+{
+  return gsl_matrix_isnonneg (content);
+};
+
+/** This function performs a Cholesky decomposition to determine whether matrix is positive definite.
+ * We check whether GSL returns GSL_EDOM as error, indicating that decomposition failed due to matrix not being positive-definite.
+ * \return true - matrix is positive-definite, false - else
+ */
+bool MatrixContent::IsPositiveDefinite() const
+{
+  if (rows != columns)  // only possible for square matrices.
+    return false;
+  else
+    return (gsl_linalg_cholesky_decomp (content) != GSL_EDOM);
+};
+
+
+/** Calculates the determinant of the matrix.
+ * if matrix is square, uses LU decomposition.
+ */
+double MatrixContent::Determinant() const
+{
+  int signum = 0;
+  assert (rows == columns && "Determinant can only be calculated for square matrices.");
+  gsl_permutation *p = gsl_permutation_alloc(rows);
+  gsl_linalg_LU_decomp(content, p, &signum);
+  gsl_permutation_free(p);
+  return gsl_linalg_LU_det(content, signum);
+};
+
+/* ============================= Operators =============================== */
 
 /** Scalar multiplication operator.
Index: src/LinearAlgebra/MatrixContent.hpp
===================================================================
--- src/LinearAlgebra/MatrixContent.hpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ src/LinearAlgebra/MatrixContent.hpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -41,4 +41,8 @@
   friend Vector operator*(const MatrixContent &mat,const Vector &vec);
   friend class RealSpaceMatrix;
+  friend class LinearSystemOfEquations;
+
+  friend class MatrixContentTest;
+  friend class MatrixContentSymmetricTest;
 public:
   MatrixContent(size_t rows, size_t columns);
@@ -53,4 +57,10 @@
   const double at(size_t i, size_t j) const;
   void set(size_t i, size_t j, const double value);
+  void setFromDoubleArray(double * x);
+
+  // Exchanging elements
+  bool SwapRows(size_t i, size_t j);
+  bool SwapColumns(size_t i, size_t j);
+  bool SwapRowColumn(size_t i, size_t j);
 
   // Transformations
@@ -59,7 +69,16 @@
   gsl_vector* transformToEigenbasis();
 
+  // Properties
+  bool IsNull() const;
+  bool IsPositive() const;
+  bool IsNegative() const;
+  bool IsNonNegative() const;
+  bool IsPositiveDefinite() const;
+  double Determinant() const;
+
   // Initializing
   void setIdentity();
   void setZero();
+  void setValue(double _value);
 
   // Operators
@@ -72,4 +91,7 @@
   bool operator==(const MatrixContent &rhs) const;
 
+protected:
+  double *Pointer(size_t m, size_t n);
+  const double *const_Pointer(size_t m, size_t n) const;
 
 private:
Index: src/LinearAlgebra/linearsystemofequations.cpp
===================================================================
--- src/LinearAlgebra/linearsystemofequations.cpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ src/LinearAlgebra/linearsystemofequations.cpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -21,5 +21,5 @@
 
 #include "defs.hpp"
-#include "LinearAlgebra/gslmatrix.hpp"
+#include "LinearAlgebra/MatrixContent.hpp"
 #include "LinearAlgebra/gslvector.hpp"
 #include "LinearAlgebra/linearsystemofequations.hpp"
@@ -37,5 +37,5 @@
 LinearSystemOfEquations::LinearSystemOfEquations(int m, int n) : rows(m), columns(n), IsSymmetric(false)
 {
-  A = new GSLMatrix(m, n);
+  A = new MatrixContent(m, n);
   b = new GSLVector(m);
   x = new GSLVector(n);
@@ -85,5 +85,5 @@
 void LinearSystemOfEquations::SetA(double *x)
 {
-  A->SetFromDoubleArray(x);
+  A->setFromDoubleArray(x);
 };
 
@@ -129,11 +129,11 @@
   if (IsSymmetric) { // use LU
     gsl_permutation * p = gsl_permutation_alloc (x->dimension);
-    gsl_linalg_LU_decomp (A->matrix, p, &s);
-    gsl_linalg_LU_solve (A->matrix, p, b->vector, x->vector);
+    gsl_linalg_LU_decomp (A->content, p, &s);
+    gsl_linalg_LU_solve (A->content, p, b->vector, x->vector);
     gsl_permutation_free (p);
   } else {  // use Householder
-    //GSLMatrix *backup = new GSLMatrix(rows,columns);
+    //MatrixContent *backup = new MatrixContent(rows,columns);
     //*backup = *A;
-    gsl_linalg_HH_solve (A->matrix, b->vector, x->vector);
+    gsl_linalg_HH_solve (A->content, b->vector, x->vector);
     //*A = *backup;
     //delete(backup);
Index: src/LinearAlgebra/linearsystemofequations.hpp
===================================================================
--- src/LinearAlgebra/linearsystemofequations.hpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ src/LinearAlgebra/linearsystemofequations.hpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -21,5 +21,5 @@
 
 class Vector;
-class GSLMatrix;
+class MatrixContent;
 class GSLVector;
 
@@ -46,5 +46,5 @@
   GSLVector *b;
   GSLVector *x;
-  GSLMatrix *A;
+  MatrixContent *A;
 
 private:
Index: src/unittests/Makefile.am
===================================================================
--- src/unittests/Makefile.am	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ src/unittests/Makefile.am	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -22,6 +22,4 @@
   CountBondsUnitTest \
   FormulaUnittest \
-  GSLMatrixSymmetricUnitTest \
-  GSLMatrixUnitTest \
   GSLVectorUnitTest \
   InfoUnitTest \
@@ -32,4 +30,6 @@
   LogUnitTest \
   manipulateAtomsTest \
+  MatrixContentSymmetricUnitTest \
+  MatrixContentUnitTest \
   MatrixUnittest \
   MenuDescriptionUnitTest \
@@ -82,6 +82,4 @@
   CountBondsUnitTest.cpp \
   FormulaUnittest.cpp \
-  gslmatrixsymmetricunittest.cpp \
-  gslmatrixunittest.cpp \
   gslvectorunittest.cpp \
   infounittest.cpp \
@@ -91,4 +89,6 @@
   listofbondsunittest.cpp \
   logunittest.cpp \
+  MatrixContentSymmetricUnittest.cpp \
+  MatrixContentUnittest.cpp \
   MatrixUnittest.cpp \
   manipulateAtomsTest.cpp \
@@ -122,6 +122,4 @@
   CountBondsUnitTest.hpp \
   FormulaUnittest.hpp \
-  gslmatrixsymmetricunittest.hpp \
-  gslmatrixunittest.hpp \
   gslvectorunittest.hpp \
   infounittest.hpp \
@@ -132,4 +130,6 @@
   logunittest.hpp \
   manipulateAtomsTest.hpp \
+  MatrixContentSymmetricUnittest.hpp \
+  MatrixContentUnittest.hpp \
   MatrixUnittest.hpp \
   MenuDescriptionUnitTest.hpp \
@@ -187,9 +187,9 @@
 FormulaUnittest_LDADD = ${ALLLIBS}
 
-GSLMatrixSymmetricUnitTest_SOURCES = UnitTestMain.cpp gslmatrixsymmetricunittest.cpp gslmatrixsymmetricunittest.hpp
-GSLMatrixSymmetricUnitTest_LDADD = ${ALLLIBS}
-
-GSLMatrixUnitTest_SOURCES = UnitTestMain.cpp gslmatrixunittest.cpp gslmatrixunittest.hpp
-GSLMatrixUnitTest_LDADD = ${ALLLIBS}
+MatrixContentSymmetricUnitTest_SOURCES = UnitTestMain.cpp MatrixContentSymmetricUnittest.cpp MatrixContentSymmetricUnittest
+MatrixContentSymmetricUnitTest_LDADD = ${ALLLIBS}
+
+MatrixContentUnitTest_SOURCES = UnitTestMain.cpp MatrixContentUnittest.cpp MatrixContentUnittest.hpp
+MatrixContentUnitTest_LDADD = ${ALLLIBS}
 
 GSLVectorUnitTest_SOURCES = UnitTestMain.cpp gslvectorunittest.cpp gslvectorunittest.hpp
Index: src/unittests/MatrixContentSymmetricUnittest.cpp
===================================================================
--- src/unittests/MatrixContentSymmetricUnittest.cpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
+++ src/unittests/MatrixContentSymmetricUnittest.cpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -0,0 +1,284 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * MatrixContentSymmetricUnittest.cpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+using namespace std;
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "MatrixContentSymmetricUnittest.hpp"
+
+#include "LinearAlgebra/MatrixContent.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( MatrixContentSymmetricTest );
+
+
+void MatrixContentSymmetricTest::setUp()
+{
+  m = new MatrixContent(3,3);
+};
+
+void MatrixContentSymmetricTest::tearDown()
+{
+  delete(m);
+};
+
+/** Unit Test for accessing matrix elements.
+ *
+ */
+void MatrixContentSymmetricTest::AccessTest()
+{
+  // check whether all elements are initially zero
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
+
+  // set
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, i*3+j );
+
+  // and check
+  double *ptr = NULL;
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++) {
+      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), m->at(i,j) );
+      ptr = m->Pointer(i,j);
+      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), *ptr );
+    }
+
+  // assignment
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, i*3+j );
+  MatrixContent *dest = new MatrixContent(3,3);
+  *dest = *m;
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( dest->at(i,j), m->at(i,j) );
+  delete(dest);
+
+  // out of bounds
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(4,2) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(2,17) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(1024,140040) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,0) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(0,-1) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,-1) );
+};
+
+/** Unit Test for initializating matrices.
+ *
+ */
+void MatrixContentSymmetricTest::InitializationTest()
+{
+  // set zero
+  m->setZero();
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
+
+  // set all
+  m->setValue(1.5);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( 1.5, m->at(i,j) );
+
+  // set basis
+  m->setIdentity();
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
+
+  // set from array
+  double array[] = { 1., 0., 0.,
+                     0., 1., 0.,
+                     0., 0., 1. };
+  m->setFromDoubleArray(array);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
+
+};
+
+/** Unit Test for copying matrices.
+ *
+ */
+void MatrixContentSymmetricTest::CopyTest()
+{
+  // set basis
+  MatrixContent *dest = NULL;
+  for (int i=0;i<3;i++) {
+    m->setValue(i);
+    dest = new MatrixContent(m);
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( m->at(i,j) , dest->at(i,j) );
+
+    delete(dest);
+  }
+};
+
+/** Unit Test for exchanging rows and columns.
+ *
+ */
+void MatrixContentSymmetricTest::ExchangeTest()
+{
+  // set to 1,1,1,2, ...
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, i+1 );
+
+  // swap such that nothing happens
+  m->SwapColumns(1,2);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
+
+  // swap two rows
+  m->SwapRows(1,2);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      switch (j) {
+        case 0:
+          CPPUNIT_ASSERT_EQUAL( 1., m->at(j,i) );
+          break;
+        case 1:
+          CPPUNIT_ASSERT_EQUAL( 3., m->at(j,i) );
+          break;
+        case 2:
+          CPPUNIT_ASSERT_EQUAL( 2., m->at(j,i) );
+          break;
+        default:
+          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
+      }
+  // check that op is reversable
+  m->SwapRows(1,2);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
+
+  // set to 1,2,3,1, ...
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, j+1. );
+
+  // swap such that nothing happens
+  m->SwapRows(0,2);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
+
+  // swap two columns
+  m->SwapColumns(0,2);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      switch (j) {
+        case 0:
+          CPPUNIT_ASSERT_EQUAL( 3., m->at(i,j) );
+          break;
+        case 1:
+          CPPUNIT_ASSERT_EQUAL( 2., m->at(i,j) );
+          break;
+        case 2:
+          CPPUNIT_ASSERT_EQUAL( 1., m->at(i,j) );
+          break;
+        default:
+          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
+      }
+  // check that op is reversable
+  m->SwapColumns(0,2);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
+
+
+  // set to 1,2,3, ...
+  MatrixContent *n =  new MatrixContent(3,3);
+  for (int i=0;i<3;i++)
+    for (int j=0;j<3;j++) {
+      m->set(i,j, 3*i+j+1 );
+      n->set(i,j, 3*j+i+1 );
+    }
+  // transpose
+  MatrixContent res = ((const MatrixContent)*m).transpose();
+  CPPUNIT_ASSERT( *n == res );
+  // second transpose
+  res.transpose();
+  CPPUNIT_ASSERT( *m == res );
+};
+
+/** Unit Test for matrix properties.
+ *
+ */
+void MatrixContentSymmetricTest::PropertiesTest()
+{
+  // is zero
+  m->setZero();
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNull() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
+
+  // is positive
+  m->setValue(0.5);
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsPositive() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
+
+  // is negative
+  m->setValue(-0.1);
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNegative() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNonNegative() );
+
+  // is positive definite
+  double array[] = { 1., 0., 0.,
+                     0., 1., 1.,
+                     0., 0., 1. };
+  m->setFromDoubleArray(array);
+  CPPUNIT_ASSERT_EQUAL( true, m->IsPositiveDefinite() );
+
+  //determinant
+  m->setIdentity();
+  CPPUNIT_ASSERT_EQUAL( 1., m->Determinant() );
+
+  m->setZero();
+  CPPUNIT_ASSERT_EQUAL( 0., m->Determinant() );
+
+  m->set( 0, 0, 1.);
+  m->set( 1, 1, 1.);
+  m->set( 2, 1, 1.);
+  CPPUNIT_ASSERT_EQUAL( 0., m->Determinant() );
+  
+  double array2[] = { 2., 0., 1.,
+                     -3., 1., 1.,
+                     1., 5.5, 1. };
+  m->setFromDoubleArray(array2);
+  CPPUNIT_ASSERT_EQUAL( -26.5, m->Determinant() );
+};
Index: src/unittests/MatrixContentSymmetricUnittest.hpp
===================================================================
--- src/unittests/MatrixContentSymmetricUnittest.hpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
+++ src/unittests/MatrixContentSymmetricUnittest.hpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -0,0 +1,42 @@
+/*
+ * MatrixContentSymmetricUnittest.hpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+#ifndef MATRIXCONTENTSYMMETRICUNITTEST_HPP_
+#define MATRIXCONTENTSYMMETRICUNITTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+class MatrixContent;
+
+/********************************************** Test classes **************************************/
+
+class MatrixContentSymmetricTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( MatrixContentSymmetricTest) ;
+    CPPUNIT_TEST (AccessTest );
+    CPPUNIT_TEST (InitializationTest );
+    CPPUNIT_TEST (CopyTest );
+    CPPUNIT_TEST (ExchangeTest );
+    CPPUNIT_TEST (PropertiesTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+    void setUp();
+    void tearDown();
+
+    void AccessTest();
+    void InitializationTest();
+    void CopyTest();
+    void ExchangeTest();
+    void PropertiesTest();
+
+private:
+    MatrixContent *m;
+};
+
+
+#endif /* MATRIXCONTENTSYMMETRICUNITTEST_HPP_ */
Index: src/unittests/MatrixContentUnittest.cpp
===================================================================
--- src/unittests/MatrixContentUnittest.cpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
+++ src/unittests/MatrixContentUnittest.cpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -0,0 +1,266 @@
+/*
+ * Project: MoleCuilder
+ * Description: creates and alters molecular systems
+ * Copyright (C)  2010 University of Bonn. All rights reserved.
+ * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
+ */
+
+/*
+ * MatrixContentUnittest.cpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+// include config.h
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+using namespace std;
+
+#include <cppunit/CompilerOutputter.h>
+#include <cppunit/extensions/TestFactoryRegistry.h>
+#include <cppunit/ui/text/TestRunner.h>
+
+#include "MatrixContentUnittest.hpp"
+
+#include "LinearAlgebra/MatrixContent.hpp"
+
+#ifdef HAVE_TESTRUNNER
+#include "UnitTestMain.hpp"
+#endif /*HAVE_TESTRUNNER*/
+
+/********************************************** Test classes **************************************/
+
+// Registers the fixture into the 'registry'
+CPPUNIT_TEST_SUITE_REGISTRATION( MatrixContentTest );
+
+
+void MatrixContentTest::setUp()
+{
+  m = new MatrixContent(4,3);
+};
+
+void MatrixContentTest::tearDown()
+{
+  delete(m);
+};
+
+/** Unit Test for accessing matrix elements.
+ *
+ */
+void MatrixContentTest::AccessTest()
+{
+  // check whether all elements are initially zero
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
+
+  // set
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, i*3+j );
+
+  // and check
+  double *ptr = NULL;
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++) {
+      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), m->at(i,j) );
+      ptr = m->Pointer(i,j);
+      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), *ptr );
+    }
+
+  // assignment
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, i*3+j );
+  MatrixContent *dest = new MatrixContent(4,3);
+  *dest = *m;
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( dest->at(i,j), m->at(i,j) );
+  delete(dest);
+
+  // out of bounds
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(5,2) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(2,17) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(1024,140040) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,0) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(0,-1) );
+  //CPPUNIT_ASSERT_EQUAL(0., v->at(-1,-1) );
+};
+
+/** Unit Test for initializating matrices.
+ *
+ */
+void MatrixContentTest::InitializationTest()
+{
+  // set zero
+  m->setZero();
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( 0., m->at(i,j) );
+
+  // set all
+  m->setValue(1.5);
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( 1.5, m->at(i,j) );
+
+  // set basis
+  m->setIdentity();
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
+
+  // set from array
+  double array[] = { 1., 0., 0.,
+                     0., 1., 0.,
+                     0., 0., 1.,
+                     0., 0., 0. };
+  m->setFromDoubleArray(array);
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->at(i,j) );
+
+};
+
+/** Unit Test for copying matrices.
+ *
+ */
+void MatrixContentTest::CopyTest()
+{
+  // set basis
+  MatrixContent *dest = NULL;
+  for (int i=0;i<4;i++) {
+    m->setValue(i);
+    dest = new MatrixContent(m);
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( m->at(i,j) , dest->at(i,j) );
+
+    delete(dest);
+  }
+};
+
+/** Unit Test for exchanging rows and columns.
+ *
+ */
+void MatrixContentTest::ExchangeTest()
+{
+  // set to 1,1,1,2, ...
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, i+1 );
+
+  // swap such that nothing happens
+  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(1,2) );
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
+
+  // swap two rows
+  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(1,2) );
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      switch (i) {
+        case 0:
+          CPPUNIT_ASSERT_EQUAL( 1., m->at(i,j) );
+          break;
+        case 1:
+          CPPUNIT_ASSERT_EQUAL( 3., m->at(i,j) );
+          break;
+        case 2:
+          CPPUNIT_ASSERT_EQUAL( 2., m->at(i,j) );
+          break;
+        case 3:
+          CPPUNIT_ASSERT_EQUAL( 4., m->at(i,j) );
+          break;
+        default:
+          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
+      }
+  // check that op is reversable
+  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(1,2) );
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->at(i,j) );
+
+  // set to 1,2,3,1, ...
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      m->set(i,j, j+1. );
+
+  // swap such that nothing happens
+  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(0,2) );
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
+
+  // swap two columns
+  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(0,2) );
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      switch (j) {
+        case 0:
+          CPPUNIT_ASSERT_EQUAL( 3., m->at(i,j) );
+          break;
+        case 1:
+          CPPUNIT_ASSERT_EQUAL( 2., m->at(i,j) );
+          break;
+        case 2:
+          CPPUNIT_ASSERT_EQUAL( 1., m->at(i,j) );
+          break;
+        default:
+          CPPUNIT_ASSERT_EQUAL( -1., m->at(i,j) );
+      }
+  // check that op is reversable
+  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(0,2) );
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++)
+      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->at(i,j) );
+
+
+  // set to 1,2,3,4, ...
+  MatrixContent *n =  new MatrixContent(3,4);
+  for (int i=0;i<4;i++)
+    for (int j=0;j<3;j++) {
+      m->set(i,j, 3*i+j+1 );
+      n->set(j,i, 3*i+j+1 );
+    }
+  // transpose
+  MatrixContent res = ((const MatrixContent)(*m)).transpose();
+  CPPUNIT_ASSERT( *n == res );
+  // second transpose
+  MatrixContent res2 = ((const MatrixContent)res).transpose();
+  CPPUNIT_ASSERT( *m == res2 );
+};
+
+/** Unit Test for matrix properties.
+ *
+ */
+void MatrixContentTest::PropertiesTest()
+{
+  // is zero
+  m->setZero();
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNull() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
+
+  // is positive
+  m->setValue(0.5);
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsPositive() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
+
+  // is negative
+  m->setValue(-0.1);
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
+  CPPUNIT_ASSERT_EQUAL( true, m->IsNegative() );
+  CPPUNIT_ASSERT_EQUAL( false, m->IsNonNegative() );
+
+  // is positive definite
+  CPPUNIT_ASSERT_EQUAL( false, m->IsPositiveDefinite() );
+};
Index: src/unittests/MatrixContentUnittest.hpp
===================================================================
--- src/unittests/MatrixContentUnittest.hpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
+++ src/unittests/MatrixContentUnittest.hpp	(revision 0d4424de796ea0eb6de8098859070b5acdb6edae)
@@ -0,0 +1,42 @@
+/*
+ * MatrixContentUnittest.hpp
+ *
+ *  Created on: Jan 8, 2010
+ *      Author: heber
+ */
+
+#ifndef MATRIXCONTENTUNITTEST_HPP_
+#define MATRIXCONTENTUNITTEST_HPP_
+
+#include <cppunit/extensions/HelperMacros.h>
+
+class MatrixContent;
+
+/********************************************** Test classes **************************************/
+
+class MatrixContentTest : public CppUnit::TestFixture
+{
+    CPPUNIT_TEST_SUITE( MatrixContentTest) ;
+    CPPUNIT_TEST (AccessTest );
+    CPPUNIT_TEST (InitializationTest );
+    CPPUNIT_TEST (CopyTest );
+    CPPUNIT_TEST (ExchangeTest );
+    CPPUNIT_TEST (PropertiesTest );
+    CPPUNIT_TEST_SUITE_END();
+
+public:
+    void setUp();
+    void tearDown();
+
+    void AccessTest();
+    void InitializationTest();
+    void CopyTest();
+    void ExchangeTest();
+    void PropertiesTest();
+
+private:
+    MatrixContent *m;
+};
+
+
+#endif /* MATRIXCONTENTUNITTEST_HPP_ */
Index: c/unittests/gslmatrixsymmetricunittest.cpp
===================================================================
--- src/unittests/gslmatrixsymmetricunittest.cpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ 	(revision )
@@ -1,283 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * gslmatrixunittest.cpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-using namespace std;
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include "gslmatrixsymmetricunittest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( GSLMatrixSymmetricTest );
-
-
-void GSLMatrixSymmetricTest::setUp()
-{
-  m = new GSLMatrix(3,3);
-};
-
-void GSLMatrixSymmetricTest::tearDown()
-{
-  delete(m);
-};
-
-/** Unit Test for accessing matrix elements.
- *
- */
-void GSLMatrixSymmetricTest::AccessTest()
-{
-  // check whether all elements are initially zero
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->Get(i,j) );
-
-  // set
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, i*3+j );
-
-  // and check
-  double *ptr = NULL;
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++) {
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), m->Get(i,j) );
-      ptr = m->Pointer(i,j);
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), *ptr );
-    }
-
-  // assignment
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, i*3+j );
-  GSLMatrix *dest = new GSLMatrix(3,3);
-  *dest = *m;
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( dest->Get(i,j), m->Get(i,j) );
-  delete(dest);
-
-  // out of bounds
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(4,2) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(2,17) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(1024,140040) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(-1,0) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(0,-1) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(-1,-1) );
-};
-
-/** Unit Test for initializating matrices.
- *
- */
-void GSLMatrixSymmetricTest::InitializationTest()
-{
-  // set zero
-  m->SetZero();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->Get(i,j) );
-
-  // set all
-  m->SetAll(1.5);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 1.5, m->Get(i,j) );
-
-  // set basis
-  m->SetIdentity();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->Get(i,j) );
-
-  // set from array
-  double array[] = { 1., 0., 0.,
-                     0., 1., 0.,
-                     0., 0., 1. };
-  m->SetFromDoubleArray(array);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->Get(i,j) );
-
-};
-
-/** Unit Test for copying matrices.
- *
- */
-void GSLMatrixSymmetricTest::CopyTest()
-{
-  // set basis
-  GSLMatrix *dest = NULL;
-  for (int i=0;i<3;i++) {
-    m->SetAll(i);
-    dest = new GSLMatrix(m);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( m->Get(i,j) , dest->Get(i,j) );
-
-    delete(dest);
-  }
-};
-
-/** Unit Test for exchanging rows and columns.
- *
- */
-void GSLMatrixSymmetricTest::ExchangeTest()
-{
-  // set to 1,1,1,2, ...
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, i+1 );
-
-  // swap such that nothing happens
-  m->SwapColumns(1,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->Get(i,j) );
-
-  // swap two rows
-  m->SwapRows(1,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      switch (j) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 1., m->Get(j,i) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 3., m->Get(j,i) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 2., m->Get(j,i) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->Get(i,j) );
-      }
-  // check that op is reversable
-  m->SwapRows(1,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->Get(i,j) );
-
-  // set to 1,2,3,1, ...
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, j+1. );
-
-  // swap such that nothing happens
-  m->SwapRows(0,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->Get(i,j) );
-
-  // swap two columns
-  m->SwapColumns(0,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      switch (j) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 3., m->Get(i,j) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 2., m->Get(i,j) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 1., m->Get(i,j) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->Get(i,j) );
-      }
-  // check that op is reversable
-  m->SwapColumns(0,2);
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->Get(i,j) );
-
-
-  // set to 1,2,3,4, ...
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, 3*i+j+1 );
-  // transpose
-  m->Transpose();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)(3*i+j+1), m->Get(j,i) );
-  // second transpose
-  m->Transpose();
-  for (int i=0;i<3;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)(3*i+j+1), m->Get(i,j) );
-};
-
-/** Unit Test for matrix properties.
- *
- */
-void GSLMatrixSymmetricTest::PropertiesTest()
-{
-  // is zero
-  m->SetZero();
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is positive
-  m->SetAll(0.5);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is negative
-  m->SetAll(-0.1);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNonNegative() );
-
-  // is positive definite
-  double array[] = { 1., 0., 0.,
-                     0., 1., 1.,
-                     0., 0., 1. };
-  m->SetFromDoubleArray(array);
-  CPPUNIT_ASSERT_EQUAL( true, m->IsPositiveDefinite() );
-
-  //determinant
-  m->SetIdentity();
-  CPPUNIT_ASSERT_EQUAL( 1., m->Determinant() );
-
-  m->SetZero();
-  CPPUNIT_ASSERT_EQUAL( 0., m->Determinant() );
-
-  m->Set( 0, 0, 1.);
-  m->Set( 1, 1, 1.);
-  m->Set( 2, 1, 1.);
-  CPPUNIT_ASSERT_EQUAL( 0., m->Determinant() );
-  
-  double array2[] = { 2., 0., 1.,
-                     -3., 1., 1.,
-                     1., 5.5, 1. };
-  m->SetFromDoubleArray(array2);
-  CPPUNIT_ASSERT_EQUAL( -26.5, m->Determinant() );
-};
Index: c/unittests/gslmatrixsymmetricunittest.hpp
===================================================================
--- src/unittests/gslmatrixsymmetricunittest.hpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * gslmatrixunittest.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef GSLMATRIXUNITTEST_HPP_
-#define GSLMATRIXUNITTEST_HPP_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/gslmatrix.hpp"
-
-/********************************************** Test classes **************************************/
-
-class GSLMatrixSymmetricTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( GSLMatrixSymmetricTest) ;
-    CPPUNIT_TEST (AccessTest );
-    CPPUNIT_TEST (InitializationTest );
-    CPPUNIT_TEST (CopyTest );
-    CPPUNIT_TEST (ExchangeTest );
-    CPPUNIT_TEST (PropertiesTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void AccessTest();
-    void InitializationTest();
-    void CopyTest();
-    void ExchangeTest();
-    void PropertiesTest();
-
-private:
-    GSLMatrix *m;
-};
-
-
-#endif /* GSLMATRIXUNITTEST_HPP_ */
Index: c/unittests/gslmatrixunittest.cpp
===================================================================
--- src/unittests/gslmatrixunittest.cpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ 	(revision )
@@ -1,265 +1,0 @@
-/*
- * Project: MoleCuilder
- * Description: creates and alters molecular systems
- * Copyright (C)  2010 University of Bonn. All rights reserved.
- * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
- */
-
-/*
- * gslmatrixunittest.cpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-// include config.h
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-using namespace std;
-
-#include <cppunit/CompilerOutputter.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <cppunit/ui/text/TestRunner.h>
-
-#include "gslmatrixunittest.hpp"
-
-#ifdef HAVE_TESTRUNNER
-#include "UnitTestMain.hpp"
-#endif /*HAVE_TESTRUNNER*/
-
-/********************************************** Test classes **************************************/
-
-// Registers the fixture into the 'registry'
-CPPUNIT_TEST_SUITE_REGISTRATION( GSLMatrixTest );
-
-
-void GSLMatrixTest::setUp()
-{
-  m = new GSLMatrix(4,3);
-};
-
-void GSLMatrixTest::tearDown()
-{
-  delete(m);
-};
-
-/** Unit Test for accessing matrix elements.
- *
- */
-void GSLMatrixTest::AccessTest()
-{
-  // check whether all elements are initially zero
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->Get(i,j) );
-
-  // set
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, i*3+j );
-
-  // and check
-  double *ptr = NULL;
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++) {
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), m->Get(i,j) );
-      ptr = m->Pointer(i,j);
-      CPPUNIT_ASSERT_EQUAL( (double)(i*3+j), *ptr );
-    }
-
-  // assignment
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, i*3+j );
-  GSLMatrix *dest = new GSLMatrix(4,3);
-  *dest = *m;
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( dest->Get(i,j), m->Get(i,j) );
-  delete(dest);
-
-  // out of bounds
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(5,2) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(2,17) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(1024,140040) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(-1,0) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(0,-1) );
-  //CPPUNIT_ASSERT_EQUAL(0., v->Get(-1,-1) );
-};
-
-/** Unit Test for initializating matrices.
- *
- */
-void GSLMatrixTest::InitializationTest()
-{
-  // set zero
-  m->SetZero();
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 0., m->Get(i,j) );
-
-  // set all
-  m->SetAll(1.5);
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( 1.5, m->Get(i,j) );
-
-  // set basis
-  m->SetIdentity();
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->Get(i,j) );
-
-  // set from array
-  double array[] = { 1., 0., 0.,
-                     0., 1., 0.,
-                     0., 0., 1.,
-                     0., 0., 0. };
-  m->SetFromDoubleArray(array);
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( i == j ? 1. : 0. , m->Get(i,j) );
-
-};
-
-/** Unit Test for copying matrices.
- *
- */
-void GSLMatrixTest::CopyTest()
-{
-  // set basis
-  GSLMatrix *dest = NULL;
-  for (int i=0;i<4;i++) {
-    m->SetAll(i);
-    dest = new GSLMatrix(m);
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( m->Get(i,j) , dest->Get(i,j) );
-
-    delete(dest);
-  }
-};
-
-/** Unit Test for exchanging rows and columns.
- *
- */
-void GSLMatrixTest::ExchangeTest()
-{
-  // set to 1,1,1,2, ...
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, i+1 );
-
-  // swap such that nothing happens
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(1,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->Get(i,j) );
-
-  // swap two rows
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(1,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      switch (i) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 1., m->Get(i,j) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 3., m->Get(i,j) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 2., m->Get(i,j) );
-          break;
-        case 3:
-          CPPUNIT_ASSERT_EQUAL( 4., m->Get(i,j) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->Get(i,j) );
-      }
-  // check that op is reversable
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(1,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)i+1., m->Get(i,j) );
-
-  // set to 1,2,3,1, ...
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, j+1. );
-
-  // swap such that nothing happens
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapRows(0,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->Get(i,j) );
-
-  // swap two columns
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(0,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      switch (j) {
-        case 0:
-          CPPUNIT_ASSERT_EQUAL( 3., m->Get(i,j) );
-          break;
-        case 1:
-          CPPUNIT_ASSERT_EQUAL( 2., m->Get(i,j) );
-          break;
-        case 2:
-          CPPUNIT_ASSERT_EQUAL( 1., m->Get(i,j) );
-          break;
-        default:
-          CPPUNIT_ASSERT_EQUAL( -1., m->Get(i,j) );
-      }
-  // check that op is reversable
-  CPPUNIT_ASSERT_EQUAL( true, m->SwapColumns(0,2) );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)j+1., m->Get(i,j) );
-
-
-  // set to 1,2,3,4, ...
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      m->Set(i,j, 3*i+j+1 );
-  // transpose
-  CPPUNIT_ASSERT_EQUAL( true, m->Transpose() );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)(3*i+j+1), m->Get(j,i) );
-  // second transpose
-  CPPUNIT_ASSERT_EQUAL( true, m->Transpose() );
-  for (int i=0;i<4;i++)
-    for (int j=0;j<3;j++)
-      CPPUNIT_ASSERT_EQUAL( (double)(3*i+j+1), m->Get(i,j) );
-};
-
-/** Unit Test for matrix properties.
- *
- */
-void GSLMatrixTest::PropertiesTest()
-{
-  // is zero
-  m->SetZero();
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is positive
-  m->SetAll(0.5);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNonNegative() );
-
-  // is negative
-  m->SetAll(-0.1);
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNull() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositive() );
-  CPPUNIT_ASSERT_EQUAL( true, m->IsNegative() );
-  CPPUNIT_ASSERT_EQUAL( false, m->IsNonNegative() );
-
-  // is positive definite
-  CPPUNIT_ASSERT_EQUAL( false, m->IsPositiveDefinite() );
-};
Index: c/unittests/gslmatrixunittest.hpp
===================================================================
--- src/unittests/gslmatrixunittest.hpp	(revision cca9efb7bf18583f35d0380acb97e9034c42bbe7)
+++ 	(revision )
@@ -1,42 +1,0 @@
-/*
- * gslmatrixunittest.hpp
- *
- *  Created on: Jan 8, 2010
- *      Author: heber
- */
-
-#ifndef GSLMATRIXUNITTEST_HPP_
-#define GSLMATRIXUNITTEST_HPP_
-
-#include <cppunit/extensions/HelperMacros.h>
-
-#include "LinearAlgebra/gslmatrix.hpp"
-
-/********************************************** Test classes **************************************/
-
-class GSLMatrixTest : public CppUnit::TestFixture
-{
-    CPPUNIT_TEST_SUITE( GSLMatrixTest) ;
-    CPPUNIT_TEST (AccessTest );
-    CPPUNIT_TEST (InitializationTest );
-    CPPUNIT_TEST (CopyTest );
-    CPPUNIT_TEST (ExchangeTest );
-    CPPUNIT_TEST (PropertiesTest );
-    CPPUNIT_TEST_SUITE_END();
-
-public:
-    void setUp();
-    void tearDown();
-
-    void AccessTest();
-    void InitializationTest();
-    void CopyTest();
-    void ExchangeTest();
-    void PropertiesTest();
-
-private:
-    GSLMatrix *m;
-};
-
-
-#endif /* GSLMATRIXUNITTEST_HPP_ */
