Ignore:
Timestamp:
Dec 4, 2010, 11:54:32 PM (14 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:
cca9ef
Parents:
9eb7580
git-author:
Frederik Heber <heber@…> (11/15/10 12:36:18)
git-committer:
Frederik Heber <heber@…> (12/04/10 23:54:32)
Message:

Extended MatrixContent class.

  • MatrixContent formerly has been just a structure to contain the gsl_matrix due to forward declaration reasons.
  • now MatrixContent is a true wrapper to gsl_matrix, i.e. all functionality that is now specific to 3 dimensions has been shifted from Matrix over to MatrixContent.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/LinearAlgebra/gslmatrix.hpp

    r9eb7580 r3bc926  
    99#define GSLMATRIX_HPP_
    1010
    11 using namespace std;
    12 
    1311/*********************************************** includes ***********************************/
    1412
     
    1816#endif
    1917
     18#include <iosfwd>
     19
    2020#include <gsl/gsl_matrix.h>
     21
    2122
    2223/****************************************** forward declarations *****************************/
     
    2829class GSLMatrix {
    2930  friend class LinearSystemOfEquations;
     31  friend std::ostream &operator<<(std::ostream &ost,const GSLMatrix &mat);
    3032
    3133public:
    3234  GSLMatrix(size_t m, size_t n);
    3335  GSLMatrix(const GSLMatrix * const src);
     36  GSLMatrix(size_t m, size_t n, gsl_matrix *&src);
    3437  ~GSLMatrix();
    3538
    3639  // Accessing
    3740  void SetFromDoubleArray(double * x);
    38   double Get(size_t m, size_t n);
     41  double Get(size_t m, size_t n) const;
    3942  void Set(size_t m, size_t n, double x);
    4043  double *Pointer(size_t m, size_t n);
    41   const double *const_Pointer(size_t m, size_t n);
     44  const double *const_Pointer(size_t m, size_t n) const;
     45  size_t getRowCount() const;
     46  size_t getColumnCount() const;
    4247
    4348  // Initializing
     
    5055  bool SwapColumns(size_t i, size_t j);
    5156  bool SwapRowColumn(size_t i, size_t j);
     57
     58  // Properties
    5259  bool Transpose();
    53   bool IsNull();
    54   bool IsPositive();
    55   bool IsNegative();
    56   bool IsNonNegative();
    57   bool IsPositiveDefinite();
    58   double Determinant();
     60  bool IsNull() const;
     61  bool IsPositive() const;
     62  bool IsNegative() const;
     63  bool IsNonNegative() const;
     64  bool IsPositiveDefinite() const;
     65  double Determinant() const;
    5966
    60   GSLMatrix& operator=(const GSLMatrix& rhs);
     67  // Operators
     68  GSLMatrix &operator=(const GSLMatrix &src);
     69  const GSLMatrix &operator+=(const GSLMatrix &rhs);
     70  const GSLMatrix &operator-=(const GSLMatrix &rhs);
     71  const GSLMatrix &operator*=(const GSLMatrix &rhs);
     72  const GSLMatrix operator+(const GSLMatrix &rhs) const;
     73  const GSLMatrix operator-(const GSLMatrix &rhs) const;
     74  const GSLMatrix operator*(const GSLMatrix &rhs) const;
    6175
    6276private:
     
    6781};
    6882
     83std::ostream &operator<<(std::ostream &ost,const GSLMatrix &mat);
    6984
    7085#endif /* GSLMATRIX_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.