Ignore:
Timestamp:
Dec 4, 2010, 11:54:32 PM (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, Candidate_v1.7.0, 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:
0d4424
Parents:
3bc926
git-author:
Frederik Heber <heber@…> (11/15/10 12:58:27)
git-committer:
Frederik Heber <heber@…> (12/04/10 23:54:32)
Message:

Renamed Matrix to RealSpaceMatrix.

  • class Matrix only represents 3x3 matrices, whereas we are now going to extend the class MatrixContent to contain arbritrary dimensions.
  • renamed class and file
File:
1 moved

Legend:

Unmodified
Added
Removed
  • src/LinearAlgebra/RealSpaceMatrix.hpp

    r3bc926 rcca9ef  
    11/*
    2  * Matrix.hpp
     2 * RealSpaceMatrix.hpp
    33 *
    44 *  Created on: Jun 25, 2010
     
    66 */
    77
    8 #ifndef MATRIX_HPP_
    9 #define MATRIX_HPP_
     8#ifndef REALSPACEMATRIX_HPP_
     9#define REALSPACEMATRIX_HPP_
    1010
    1111#include <iosfwd>
     
    1919class MatrixContent;
    2020
    21 class Matrix
     21/** 3x3 Matrix class.
     22 * This class has some specific features for 3D space such as rotations or
     23 * hard-coded determinants.
     24 */
     25class RealSpaceMatrix
    2226{
    23   friend Vector operator*(const Matrix&,const Vector&);
     27  friend Vector operator*(const RealSpaceMatrix&,const Vector&);
    2428public:
    25   Matrix();
     29  RealSpaceMatrix();
    2630
    2731  /**
     
    4145   *
    4246   */
    43   Matrix(const double*);
    44   Matrix(const Matrix&);
    45   Matrix(const MatrixContent&);
    46   virtual ~Matrix();
     47  RealSpaceMatrix(const double*);
     48  RealSpaceMatrix(const RealSpaceMatrix&);
     49  RealSpaceMatrix(const MatrixContent&);
     50  virtual ~RealSpaceMatrix();
    4751
    4852  /**
     
    107111   * Rather costly, so use precomputation as often as possible.
    108112   */
    109   Matrix invert() const;
     113  RealSpaceMatrix invert() const;
    110114
    111115  /**
     
    120124   * Calculate the transpose of the matrix.
    121125   */
    122   Matrix transpose() const;
    123   Matrix &transpose();
     126  RealSpaceMatrix transpose() const;
     127  RealSpaceMatrix &transpose();
    124128
    125129  // operators
    126   Matrix &operator=(const Matrix&);
     130  RealSpaceMatrix &operator=(const RealSpaceMatrix&);
    127131
    128   const Matrix &operator+=(const Matrix&);
    129   const Matrix &operator-=(const Matrix&);
    130   const Matrix &operator*=(const Matrix&);
     132  const RealSpaceMatrix &operator+=(const RealSpaceMatrix&);
     133  const RealSpaceMatrix &operator-=(const RealSpaceMatrix&);
     134  const RealSpaceMatrix &operator*=(const RealSpaceMatrix&);
    131135
    132   const Matrix &operator*=(const double);
     136  const RealSpaceMatrix &operator*=(const double);
    133137
    134   const Matrix operator+(const Matrix&) const;
    135   const Matrix operator-(const Matrix&) const;
    136   const Matrix operator*(const Matrix&) const;
     138  const RealSpaceMatrix operator+(const RealSpaceMatrix&) const;
     139  const RealSpaceMatrix operator-(const RealSpaceMatrix&) const;
     140  const RealSpaceMatrix operator*(const RealSpaceMatrix&) const;
    137141
    138   bool operator==(const Matrix&) const;
     142  bool operator==(const RealSpaceMatrix&) const;
    139143
    140144private:
    141   Matrix(MatrixContent*);
     145  RealSpaceMatrix(MatrixContent*);
    142146  void createViews();
    143147  MatrixContent *content;
     
    148152};
    149153
    150 const Matrix operator*(const double,const Matrix&);
    151 const Matrix operator*(const Matrix&,const double);
     154const RealSpaceMatrix operator*(const double,const RealSpaceMatrix&);
     155const RealSpaceMatrix operator*(const RealSpaceMatrix&,const double);
    152156
    153157/**
     
    165169 * 5 -> (2,2)
    166170 */
    167 Matrix ReturnFullMatrixforSymmetric(const double * const cell_size);
     171RealSpaceMatrix ReturnFullMatrixforSymmetric(const double * const cell_size);
    168172
    169 std::ostream &operator<<(std::ostream&,const Matrix&);
    170 Vector operator*(const Matrix&,const Vector&);
    171 Vector& operator*=(Vector&,const Matrix&);
     173std::ostream &operator<<(std::ostream&,const RealSpaceMatrix&);
     174Vector operator*(const RealSpaceMatrix&,const Vector&);
     175Vector& operator*=(Vector&,const RealSpaceMatrix&);
    172176
    173 #endif /* MATRIX_HPP_ */
     177#endif /* REALSPACEMATRIX_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.