Changeset 26108c
- Timestamp:
- Oct 6, 2011, 7:17:47 AM (13 years ago)
- 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:
- dc8827
- Parents:
- 59e063
- git-author:
- Frederik Heber <heber@…> (04/24/11 22:30:42)
- git-committer:
- Frederik Heber <heber@…> (10/06/11 07:17:47)
- Location:
- LinearAlgebra/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
LinearAlgebra/src/LinearAlgebra/MatrixContent.cpp
r59e063 r26108c 29 29 #include <gsl/gsl_vector.h> 30 30 #include <cmath> 31 #include <cassert>32 31 #include <iostream> 33 32 #include <limits> … … 487 486 * \return new matrix that is transposed of this. 488 487 */ 489 MatrixContent MatrixContent::transpose () const488 MatrixContent MatrixContent::transposed() const 490 489 { 491 490 gsl_matrix *res = gsl_matrix_alloc(columns, rows); // column and row dimensions exchanged! … … 539 538 +toString(V.getRows())+"!="+toString(rows)+"."); 540 539 ASSERT(S.getDimension() == columns, 541 "MatrixContent::performSingularValueDecomposition() - Vector S does not have rthe right dimension "540 "MatrixContent::performSingularValueDecomposition() - Vector S does not have the right dimension " 542 541 +toString(S.getDimension())+"!="+toString(columns)+"."); 543 542 gsl_matrix *A = content; -
LinearAlgebra/src/LinearAlgebra/MatrixContent.hpp
r59e063 r26108c 94 94 95 95 // Transformations 96 MatrixContent transpose () const;96 MatrixContent transposed() const; 97 97 MatrixContent &transpose(); 98 98 gsl_vector* transformToEigenbasis(); -
LinearAlgebra/src/LinearAlgebra/RealSpaceMatrix.cpp
r59e063 r26108c 267 267 } 268 268 269 RealSpaceMatrix RealSpaceMatrix::transpose () const270 { 271 RealSpaceMatrix res = RealSpaceMatrix(con st_cast<const MatrixContent *>(content)->transpose());269 RealSpaceMatrix RealSpaceMatrix::transposed() const 270 { 271 RealSpaceMatrix res = RealSpaceMatrix(content->transposed()); 272 272 return res; 273 273 } -
LinearAlgebra/src/LinearAlgebra/RealSpaceMatrix.hpp
r59e063 r26108c 138 138 * Calculate the transpose of the matrix. 139 139 */ 140 RealSpaceMatrix transpose () const;140 RealSpaceMatrix transposed() const; 141 141 RealSpaceMatrix &transpose(); 142 142 -
LinearAlgebra/src/unittests/MatrixContentSymmetricUnitTest.cpp
r59e063 r26108c 225 225 } 226 226 // transpose 227 MatrixContent res = ( (const MatrixContent)*m).transpose();227 MatrixContent res = (*m).transposed(); 228 228 CPPUNIT_ASSERT( *n == res ); 229 229 // second transpose -
LinearAlgebra/src/unittests/MatrixContentUnitTest.cpp
r59e063 r26108c 239 239 } 240 240 // transpose 241 MatrixContent res = ( (const MatrixContent)(*m)).transpose();241 MatrixContent res = (*m).transposed(); 242 242 CPPUNIT_ASSERT( *n == res ); 243 243 // second transpose 244 MatrixContent res2 = ((const MatrixContent)res).transpose();244 MatrixContent res2 = res.transposed(); 245 245 CPPUNIT_ASSERT( *m == res2 ); 246 246 delete n; -
LinearAlgebra/src/unittests/RealSpaceMatrixUnitTest.cpp
r59e063 r26108c 281 281 // ... or transposed 282 282 res.setRotation(M_PI/3.,0.,0.); 283 CPPUNIT_ASSERT_EQUAL(inverse, ((const RealSpaceMatrix) res).transpose());283 CPPUNIT_ASSERT_EQUAL(inverse, res.transposed()); 284 284 } 285 285
Note:
See TracChangeset
for help on using the changeset viewer.