Changeset 6c438f for src/LinearAlgebra


Ignore:
Timestamp:
Aug 28, 2010, 3:21:11 AM (15 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
a6e6b5, f8982c
Parents:
2ad482 (diff), fd4905 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Frederik Heber <heber@…> (08/28/10 03:17:48)
git-committer:
Frederik Heber <heber@…> (08/28/10 03:21:11)
Message:

Merge branch 'StructureRefactoring' into Shapes

Conflicts:

src/Box.cpp
src/Box.hpp
src/Descriptors/AtomShapeDescriptor.cpp
src/Descriptors/AtomShapeDescriptor.hpp
src/Descriptors/AtomShapeDescriptor_impl.hpp
src/LinearAlgebra/Line.cpp
src/LinearAlgebra/Line.hpp
src/LinearAlgebra/Matrix.cpp
src/LinearAlgebra/Matrix.hpp
src/Makefile.am
src/Shapes/BaseShapes.cpp
src/Shapes/BaseShapes_impl.hpp
src/Shapes/Shape.cpp
src/Shapes/Shape.hpp
src/Shapes/ShapeOps_impl.hpp
src/Shapes/Shape_impl.hpp
src/unittests/ShapeUnittest.cpp

Location:
src/LinearAlgebra
Files:
5 added
25 moved

Legend:

Unmodified
Added
Removed
  • src/LinearAlgebra/Line.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * Line.cpp
     
    613 */
    714
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    820#include "Helpers/MemDebug.hpp"
    921
    10 #include "Line.hpp"
     22#include "LinearAlgebra/Line.hpp"
    1123
    1224#include <cmath>
    13 
    14 #include "vector.hpp"
    15 #include "log.hpp"
    16 #include "verbose.hpp"
    17 #include "gslmatrix.hpp"
    18 #include "info.hpp"
     25#include <iostream>
     26
     27#include "LinearAlgebra/Vector.hpp"
     28#include "Helpers/Log.hpp"
     29#include "Helpers/Verbose.hpp"
     30#include "LinearAlgebra/gslmatrix.hpp"
     31#include "Helpers/Info.hpp"
    1932#include "Exceptions/LinearDependenceException.hpp"
    2033#include "Exceptions/SkewException.hpp"
    21 #include "Plane.hpp"
     34#include "LinearAlgebra/Plane.hpp"
    2235
    2336using namespace std;
     
    294307}
    295308
    296 
    297309/******************************** Points on the line ********************/
    298310
     
    339351  return x.param<y.param;
    340352}
     353
     354ostream& operator<<(ostream& ost, const Line& m)
     355{
     356  const Vector origin = m.getOrigin();
     357  const Vector direction = m.getDirection();
     358  ost << "(";
     359  for (int i=0;i<NDIM;i++) {
     360    ost << origin[i];
     361    if (i != 2)
     362      ost << ",";
     363  }
     364  ost << ") -> (";
     365  for (int i=0;i<NDIM;i++) {
     366    ost << direction[i];
     367    if (i != 2)
     368      ost << ",";
     369  }
     370  ost << ")";
     371  return ost;
     372};
     373
  • src/LinearAlgebra/Line.hpp

    r2ad482 r6c438f  
    99#define LINE_HPP_
    1010
    11 #include "Space.hpp"
     11#include "LinearAlgebra/Space.hpp"
    1212
     13#include <iosfwd>
    1314#include <memory>
    1415#include <vector>
     
    6061bool operator==(const Line&,const Line&);
    6162
     63std::ostream & operator << (std::ostream& ost, const Line &m);
     64
    6265/**
    6366 * Named constructor to make a line through two points
  • src/LinearAlgebra/LineSegment.cpp

    r2ad482 r6c438f  
    66 */
    77
    8 #include "LineSegment.hpp"
     8#include "LinearAlgebra/LineSegment.hpp"
    99#include "Helpers/Assert.hpp"
    1010
    1111#include "Line.hpp"
    12 #include "vector.hpp"
     12#include "LinearAlgebra/Vector.hpp"
    1313
    1414using namespace std;
  • src/LinearAlgebra/LineSegmentSet.cpp

    r2ad482 r6c438f  
    66 */
    77
    8 #include "LineSegmentSet.hpp"
     8#include "LinearAlgebra/LineSegmentSet.hpp"
    99
    1010#include "Helpers/Assert.hpp"
    11 #include "Line.hpp"
    12 #include "LineSegment.hpp"
     11#include "LinearAlgebra/Line.hpp"
     12#include "LinearAlgebra/LineSegment.hpp"
    1313
    1414#include "Helpers/Range.hpp"
  • src/LinearAlgebra/Matrix.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * Matrix.cpp
     
    613 */
    714
    8 #include "Matrix.hpp"
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
     20#include "Helpers/MemDebug.hpp"
     21
     22#include "LinearAlgebra/Matrix.hpp"
    923#include "Helpers/Assert.hpp"
    1024#include "Exceptions/NotInvertibleException.hpp"
    1125#include "Helpers/fast_functions.hpp"
    1226#include "Helpers/Assert.hpp"
    13 #include "vector.hpp"
     27#include "LinearAlgebra/Vector.hpp"
    1428#include "VectorContent.hpp"
    1529#include "MatrixContent.hpp"
    1630
    1731#include <gsl/gsl_blas.h>
     32#include <gsl/gsl_eigen.h>
     33#include <gsl/gsl_matrix.h>
     34#include <gsl/gsl_multimin.h>
     35#include <gsl/gsl_vector.h>
    1836#include <cmath>
    1937#include <iostream>
     
    96114}
    97115
     116void Matrix::zero(){
     117  for(int i=NDIM;i--;){
     118    for(int j=NDIM;j--;){
     119      set(i,j,0.);
     120    }
     121  }
     122}
     123
     124void Matrix::rotation(const double x, const double y, const double z)
     125{
     126  set(0,0, cos(y)*cos(z));
     127  set(0,1, cos(z)*sin(x)*sin(y) - cos(x)*sin(z));
     128  set(0,2, cos(x)*cos(z)*sin(y) + sin(x) * sin(z));
     129  set(1,0, cos(y)*sin(z));
     130  set(1,1, cos(x)*cos(z) + sin(x)*sin(y)*sin(z));
     131  set(1,2, -cos(z)*sin(x) + cos(x)*sin(y)*sin(z));
     132  set(2,0, -sin(y));
     133  set(2,1, cos(y)*sin(x));
     134  set(2,2, cos(x)*cos(y));
     135}
     136
    98137Matrix &Matrix::operator=(const Matrix &src){
    99138  if(&src!=this){
     
    103142}
    104143
    105 Matrix &Matrix::operator+=(const Matrix &rhs){
     144const Matrix &Matrix::operator+=(const Matrix &rhs){
    106145  gsl_matrix_add(content->content, rhs.content->content);
    107146  return *this;
    108147}
    109148
    110 Matrix &Matrix::operator-=(const Matrix &rhs){
     149const Matrix &Matrix::operator-=(const Matrix &rhs){
    111150  gsl_matrix_sub(content->content, rhs.content->content);
    112151  return *this;
    113152}
    114153
    115 Matrix &Matrix::operator*=(const Matrix &rhs){
     154const Matrix &Matrix::operator*=(const Matrix &rhs){
    116155  (*this) = (*this)*rhs;
    117156  return *this;
    118157}
    119158
    120 Matrix Matrix::operator+(const Matrix &rhs) const{
     159const Matrix Matrix::operator+(const Matrix &rhs) const{
    121160  Matrix tmp = *this;
    122161  tmp+=rhs;
     
    124163}
    125164
    126 Matrix Matrix::operator-(const Matrix &rhs) const{
     165const Matrix Matrix::operator-(const Matrix &rhs) const{
    127166  Matrix tmp = *this;
    128167  tmp-=rhs;
     
    130169}
    131170
    132 Matrix Matrix::operator*(const Matrix &rhs) const{
     171const Matrix Matrix::operator*(const Matrix &rhs) const{
    133172  gsl_matrix *res = gsl_matrix_alloc(NDIM, NDIM);
    134173  gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, content->content, rhs.content->content, 0.0, res);
     
    192231       - at(2,2)*at(1,0)*at(0,1);
    193232}
     233
    194234
    195235Matrix Matrix::invert() const{
     
    215255Matrix Matrix::transpose() const{
    216256  MatrixContent *newContent = new MatrixContent();
     257  newContent->content = gsl_matrix_alloc(NDIM, NDIM);
    217258  gsl_matrix_transpose_memcpy(newContent->content, content->content);
    218259  Matrix res = Matrix(newContent);
     
    220261}
    221262
    222 Matrix &Matrix::operator*=(const double factor){
     263Matrix &Matrix::transpose()
     264{
     265  double tmp;
     266  for (int i=0;i<NDIM;i++)
     267    for (int j=i+1;j<NDIM;j++) {
     268      tmp = at(j,i);
     269      at(j,i) = at(i,j);
     270      at(i,j) = tmp;
     271    }
     272  return *this;
     273}
     274
     275
     276Vector Matrix::transformToEigenbasis()
     277{
     278  gsl_eigen_symmv_workspace *T = gsl_eigen_symmv_alloc(NDIM);
     279  gsl_vector *eval = gsl_vector_alloc(NDIM);
     280  gsl_matrix *evec = gsl_matrix_alloc(NDIM, NDIM);
     281  gsl_eigen_symmv(content->content, eval, evec, T);
     282  gsl_eigen_symmv_free(T);
     283  gsl_matrix_memcpy(content->content, evec);
     284  gsl_matrix_free(evec);
     285  Vector evalues(gsl_vector_get(eval,0), gsl_vector_get(eval,1), gsl_vector_get(eval,2));
     286  gsl_vector_free(eval);
     287  return evalues;
     288}
     289
     290const Matrix &Matrix::operator*=(const double factor){
    223291  gsl_matrix_scale(content->content, factor);
    224292  return *this;
    225293}
    226294
    227 Matrix operator*(const double factor,const Matrix& mat){
     295const Matrix operator*(const double factor,const Matrix& mat){
    228296  Matrix tmp = mat;
    229297  tmp*=factor;
     
    231299}
    232300
    233 Matrix operator*(const Matrix &mat,const double factor){
     301const Matrix operator*(const Matrix &mat,const double factor){
    234302  return factor*mat;
    235303}
     
    278346
    279347Vector operator*(const Matrix &mat,const Vector &vec){
    280   gsl_vector *res = gsl_vector_calloc(NDIM);
    281   gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content->content, vec.content->content, 0.0, res);
    282   VectorContent *content = new VectorContent();
    283   content->content = res;
    284   return Vector(content);
     348  Vector res;
     349  gsl_blas_dgemv( CblasNoTrans, 1.0, mat.content->content, vec.content->content, 0.0, res.content->content);
     350  return res;
    285351}
    286352
  • src/LinearAlgebra/Matrix.hpp

    r2ad482 r6c438f  
    5151
    5252  /**
     53   * Set all matrix entries to zero.
     54   */
     55  void zero();
     56
     57  /**
     58   * Sets all matrix corresponding to a rotation matrix,
     59   * first around the x-, then the y-, finally the z-axis
     60   * with given angles.
     61   */
     62  void rotation(const double x, const double y, const double z);
     63
     64  /**
    5365   * Access the matrix at index (i,j)
    5466   */
     
    96108  Matrix invert() const;
    97109
     110  /**
     111   * Diagonalizes a matrix and sets its rows to the resulting eigenvalues.
     112   * The eigenvalues are returned as a vector.
     113   *
     114   * Rather costly, so use precomputation as often as possible.
     115   */
     116  Vector transformToEigenbasis();
     117
     118  /**
     119   * Calculate the transpose of the matrix.
     120   */
    98121  Matrix transpose() const;
     122  Matrix &transpose();
    99123
    100124  // operators
    101125  Matrix &operator=(const Matrix&);
    102126
    103   Matrix &operator+=(const Matrix&);
    104   Matrix &operator-=(const Matrix&);
    105   Matrix &operator*=(const Matrix&);
     127  const Matrix &operator+=(const Matrix&);
     128  const Matrix &operator-=(const Matrix&);
     129  const Matrix &operator*=(const Matrix&);
    106130
    107   Matrix &operator*=(const double);
     131  const Matrix &operator*=(const double);
    108132
    109   Matrix operator+(const Matrix&) const;
    110   Matrix operator-(const Matrix&) const;
    111   Matrix operator*(const Matrix&) const;
     133  const Matrix operator+(const Matrix&) const;
     134  const Matrix operator-(const Matrix&) const;
     135  const Matrix operator*(const Matrix&) const;
    112136
    113137  bool operator==(const Matrix&) const;
     
    123147};
    124148
    125 Matrix operator*(const double,const Matrix&);
    126 Matrix operator*(const Matrix&,const double);
     149const Matrix operator*(const double,const Matrix&);
     150const Matrix operator*(const Matrix&,const double);
    127151
    128152/**
  • src/LinearAlgebra/Plane.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * Plane.cpp
     
    613 */
    714
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    820#include "Helpers/MemDebug.hpp"
    921
    10 #include "Plane.hpp"
    11 #include "vector.hpp"
     22#include "LinearAlgebra/Plane.hpp"
     23#include "LinearAlgebra/Vector.hpp"
    1224#include "defs.hpp"
    13 #include "info.hpp"
    14 #include "log.hpp"
    15 #include "verbose.hpp"
     25#include "Helpers/Info.hpp"
     26#include "Helpers/Log.hpp"
     27#include "Helpers/Verbose.hpp"
    1628#include "Helpers/Assert.hpp"
    17 #include "helpers.hpp"
     29#include "Helpers/helpers.hpp"
    1830#include <cmath>
    19 #include "Line.hpp"
     31#include "LinearAlgebra/Line.hpp"
    2032#include "Exceptions/MultipleSolutionsException.hpp"
    2133
  • src/LinearAlgebra/Plane.hpp

    r2ad482 r6c438f  
    1212#include <vector>
    1313#include <iosfwd>
    14 #include "Space.hpp"
     14#include "LinearAlgebra/Space.hpp"
    1515#include "Exceptions/LinearDependenceException.hpp"
    1616#include "Exceptions/ZeroVectorException.hpp"
  • src/LinearAlgebra/Space.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * Space.cpp
     
    613 */
    714
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    820#include "Helpers/MemDebug.hpp"
    921
    10 #include "Space.hpp"
    11 #include "vector.hpp"
     22#include "LinearAlgebra/Space.hpp"
     23#include "LinearAlgebra/Vector.hpp"
    1224
    1325Space::Space()
  • src/LinearAlgebra/Vector.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/** \file vector.cpp
    29 *
     
    512 */
    613
     14// include config.h
     15#ifdef HAVE_CONFIG_H
     16#include <config.h>
     17#endif
     18
    719#include "Helpers/MemDebug.hpp"
    820
    9 #include "vector.hpp"
     21#include "LinearAlgebra/Vector.hpp"
    1022#include "VectorContent.hpp"
    11 #include "verbose.hpp"
     23#include "Helpers/Verbose.hpp"
    1224#include "World.hpp"
    1325#include "Helpers/Assert.hpp"
     
    1729#include <iostream>
    1830#include <gsl/gsl_blas.h>
     31#include <gsl/gsl_vector.h>
    1932
    2033
     
    5164};
    5265
     66/** Constructor of class vector.
     67 */
     68Vector::Vector(const double x[3])
     69{
     70  content = new VectorContent();
     71  gsl_vector_set(content->content,0,x[0]);
     72  gsl_vector_set(content->content,1,x[1]);
     73  gsl_vector_set(content->content,2,x[2]);
     74};
     75
    5376Vector::Vector(VectorContent *_content) :
    5477  content(_content)
     
    92115  return (sqrt(DistanceSquared(y)));
    93116};
     117
     118size_t Vector::GreatestComponent() const
     119{
     120  int greatest = 0;
     121  for (int i=1;i<NDIM;i++) {
     122    if (at(i) > at(greatest))
     123      greatest = i;
     124  }
     125  return greatest;
     126}
     127
     128size_t Vector::SmallestComponent() const
     129{
     130  int smallest = 0;
     131  for (int i=1;i<NDIM;i++) {
     132    if (at(i) < at(smallest))
     133      smallest = i;
     134  }
     135  return smallest;
     136}
     137
    94138
    95139Vector Vector::getClosestPoint(const Vector &point) const{
  • src/LinearAlgebra/Vector.hpp

    r2ad482 r6c438f  
    1717
    1818#include "defs.hpp"
    19 #include "Space.hpp"
     19#include "LinearAlgebra/Space.hpp"
    2020
    2121/********************************************** declarations *******************************/
     
    3636  Vector();
    3737  Vector(const double x1, const double x2, const double x3);
     38  Vector(const double x[3]);
    3839  Vector(const Vector& src);
    3940  virtual ~Vector();
     
    6364  std::pair<Vector,Vector> partition(const Vector&) const;
    6465  std::pair<pointset,Vector> partition(const pointset&) const;
     66  size_t GreatestComponent() const;
     67  size_t SmallestComponent() const;
    6568
    6669  // Accessors ussually come in pairs... and sometimes even more than that
  • src/LinearAlgebra/VectorContent.hpp

    r2ad482 r6c438f  
    1414 * Because of this the pointer to the gsl_vector struct is wrapped inside another
    1515 * (dumb) object that allows for forward definitions.
     16 *
     17 * DO NOT USE OUTSIDE OF VECTOR UNLESS YOU ABSOLUTELY HAVE TO AND KNOW WHAT YOU ARE DOING.
    1618 */
    1719
  • src/LinearAlgebra/VectorSet.hpp

    r2ad482 r6c438f  
    2020 */
    2121
    22 #include "vector.hpp"
     22#include "LinearAlgebra/Vector.hpp"
    2323#include <list>
    2424
  • src/LinearAlgebra/gslmatrix.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * gslmatrix.cpp
     
    613 */
    714
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    820#include "Helpers/MemDebug.hpp"
    921
    1022using namespace std;
    1123
    12 #include "gslmatrix.hpp"
    13 #include "helpers.hpp"
     24#include "LinearAlgebra/gslmatrix.hpp"
     25#include "Helpers/helpers.hpp"
    1426#include "Helpers/fast_functions.hpp"
    1527
  • src/LinearAlgebra/gslvector.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * gslvector.cpp
     
    613 */
    714
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    820#include "Helpers/MemDebug.hpp"
    921
     
    1224#include <iostream>
    1325
    14 #include "gslvector.hpp"
     26#include "LinearAlgebra/gslvector.hpp"
    1527#include "defs.hpp"
    16 #include "vector.hpp"
     28#include "LinearAlgebra/Vector.hpp"
    1729#include "VectorContent.hpp"
    1830
  • src/LinearAlgebra/linearsystemofequations.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * linearsystemofequations.cpp
     
    613 */
    714
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    820#include "Helpers/MemDebug.hpp"
    921
    1022#include "defs.hpp"
    11 #include "gslmatrix.hpp"
    12 #include "gslvector.hpp"
    13 #include "linearsystemofequations.hpp"
    14 #include "logger.hpp"
    15 #include "vector.hpp"
     23#include "LinearAlgebra/gslmatrix.hpp"
     24#include "LinearAlgebra/gslvector.hpp"
     25#include "LinearAlgebra/linearsystemofequations.hpp"
     26#include "Helpers/logger.hpp"
     27#include "LinearAlgebra/Vector.hpp"
    1628
    1729#include <cassert>
  • src/LinearAlgebra/linearsystemofequations.hpp

    r2ad482 r6c438f  
    66 */
    77
    8 using namespace std;
     8#ifndef LINEARSYSTEMSOFEQUATIONS_HPP
     9#define LINEARSYSTEMSOFEQUATIONS_HPP
    910
    1011/*********************************************** includes ***********************************/
     
    5556  bool IsSymmetric;
    5657};
     58
     59#endif /* LINEARSYSTEMSOFEQUATIONS_HPP */
  • src/LinearAlgebra/vector_ops.cpp

    r2ad482 r6c438f  
     1/*
     2 * Project: MoleCuilder
     3 * Description: creates and alters molecular systems
     4 * Copyright (C)  2010 University of Bonn. All rights reserved.
     5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
     6 */
     7
    18/*
    29 * vector_ops.cpp
     
    613 */
    714
     15// include config.h
     16#ifdef HAVE_CONFIG_H
     17#include <config.h>
     18#endif
     19
    820#include "Helpers/MemDebug.hpp"
    921
    10 #include "vector.hpp"
    11 #include "Plane.hpp"
    12 #include "log.hpp"
    13 #include "verbose.hpp"
    14 #include "gslmatrix.hpp"
     22#include "LinearAlgebra/Vector.hpp"
     23#include "LinearAlgebra/Plane.hpp"
     24#include "Helpers/Log.hpp"
     25#include "Helpers/Verbose.hpp"
     26#include "LinearAlgebra/gslmatrix.hpp"
    1527#include "leastsquaremin.hpp"
    16 #include "info.hpp"
     28#include "Helpers/Info.hpp"
    1729#include "Helpers/fast_functions.hpp"
    1830#include "Exceptions/LinearDependenceException.hpp"
Note: See TracChangeset for help on using the changeset viewer.