Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

colvarmodule::rmatrix Class Reference

2-dimensional array of real numbers with three components along each dimension (works with colvarmodule::rvector) More...

#include <colvartypes.h>

Inheritance diagram for colvarmodule::rmatrix:

colvarmodule::matrix2d< colvarmodule::real, 3, 3 > List of all members.

Public Member Functions

cvm::realxx ()
 Return the xx element.
cvm::realxy ()
 Return the xy element.
cvm::realxz ()
 Return the xz element.
cvm::realyx ()
 Return the yx element.
cvm::realyy ()
 Return the yy element.
cvm::realyz ()
 Return the yz element.
cvm::realzx ()
 Return the zx element.
cvm::realzy ()
 Return the zy element.
cvm::realzz ()
 Return the zz element.
cvm::real xx () const
 Return the xx element.
cvm::real xy () const
 Return the xy element.
cvm::real xz () const
 Return the xz element.
cvm::real yx () const
 Return the yx element.
cvm::real yy () const
 Return the yy element.
cvm::real yz () const
 Return the yz element.
cvm::real zx () const
 Return the zx element.
cvm::real zy () const
 Return the zy element.
cvm::real zz () const
 Return the zz element.
 rmatrix (cvm::real const **m)
 Constructor from a 2-d C array.
 rmatrix ()
 Default constructor.
 rmatrix (cvm::real const &xxi, cvm::real const &xyi, cvm::real const &xzi, cvm::real const &yxi, cvm::real const &yyi, cvm::real const &yzi, cvm::real const &zxi, cvm::real const &zyi, cvm::real const &zzi)
 Constructor component by component.
 ~rmatrix ()
 Destructor.
cvm::real determinant () const
 Return the determinant.
cvm::rmatrix transpose () const

Friends

cvm::rvector operator * (cvm::rmatrix const &m, cvm::rvector const &r)

Detailed Description

2-dimensional array of real numbers with three components along each dimension (works with colvarmodule::rvector)

Definition at line 409 of file colvartypes.h.


Constructor & Destructor Documentation

colvarmodule::rmatrix::rmatrix cvm::real const **  m  )  [inline]
 

Constructor from a 2-d C array.

Definition at line 454 of file colvartypes.h.

References cvm.

00455     : cvm::matrix2d<cvm::real, 3, 3> (m) 
00456   {}

colvarmodule::rmatrix::rmatrix  )  [inline]
 

Default constructor.

Definition at line 459 of file colvartypes.h.

References cvm.

00460     : cvm::matrix2d<cvm::real, 3, 3>()
00461   {}

colvarmodule::rmatrix::rmatrix cvm::real const &  xxi,
cvm::real const &  xyi,
cvm::real const &  xzi,
cvm::real const &  yxi,
cvm::real const &  yyi,
cvm::real const &  yzi,
cvm::real const &  zxi,
cvm::real const &  zyi,
cvm::real const &  zzi
[inline]
 

Constructor component by component.

Definition at line 464 of file colvartypes.h.

References cvm, xx(), xy(), xz(), yx(), yy(), yz(), zx(), zy(), and zz().

00473     : cvm::matrix2d<cvm::real, 3, 3>()
00474   {
00475     this->xx() = xxi;
00476     this->xy() = xyi;
00477     this->xz() = xzi;
00478     this->yx() = yxi;
00479     this->yy() = yyi;
00480     this->yz() = yzi;
00481     this->zx() = zxi;
00482     this->zy() = xyi;
00483     this->zz() = zzi;
00484   }

colvarmodule::rmatrix::~rmatrix  )  [inline]
 

Destructor.

Definition at line 487 of file colvartypes.h.

00488   {}    


Member Function Documentation

cvm::real colvarmodule::rmatrix::determinant  )  const [inline]
 

Return the determinant.

Definition at line 491 of file colvartypes.h.

References xx(), xy(), xz(), yx(), yy(), yz(), zx(), zy(), and zz().

00492   {
00493     return
00494       (  xx() * (yy()*zz() - zy()*yz()))
00495       - (yx() * (xy()*zz() - zy()*xz()))
00496       + (zx() * (xy()*yz() - yy()*xz()));
00497   }

cvm::rmatrix colvarmodule::rmatrix::transpose  )  const [inline]
 

Definition at line 499 of file colvartypes.h.

References xy(), xz(), yx(), yy(), yz(), zx(), zy(), and zz().

00500   {
00501     return cvm::rmatrix (this->xx(),
00502                          this->yx(),
00503                          this->zx(),
00504                          this->xy(),
00505                          this->yy(),
00506                          this->zy(),
00507                          this->xz(),
00508                          this->yz(),
00509                          this->zz());
00510   }

cvm::real colvarmodule::rmatrix::xx  )  const [inline]
 

Return the xx element.

Definition at line 435 of file colvartypes.h.

00435 { return array[0][0]; }

cvm::real& colvarmodule::rmatrix::xx  )  [inline]
 

Return the xx element.

Definition at line 416 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), and colvarmodule::quaternion::rotation_matrix().

00416 { return array[0][0]; }

cvm::real colvarmodule::rmatrix::xy  )  const [inline]
 

Return the xy element.

Definition at line 437 of file colvartypes.h.

00437 { return array[0][1]; }

cvm::real& colvarmodule::rmatrix::xy  )  [inline]
 

Return the xy element.

Definition at line 418 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00418 { return array[0][1]; }

cvm::real colvarmodule::rmatrix::xz  )  const [inline]
 

Return the xz element.

Definition at line 439 of file colvartypes.h.

00439 { return array[0][2]; }

cvm::real& colvarmodule::rmatrix::xz  )  [inline]
 

Return the xz element.

Definition at line 420 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00420 { return array[0][2]; }

cvm::real colvarmodule::rmatrix::yx  )  const [inline]
 

Return the yx element.

Definition at line 441 of file colvartypes.h.

00441 { return array[1][0]; }

cvm::real& colvarmodule::rmatrix::yx  )  [inline]
 

Return the yx element.

Definition at line 422 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00422 { return array[1][0]; }

cvm::real colvarmodule::rmatrix::yy  )  const [inline]
 

Return the yy element.

Definition at line 443 of file colvartypes.h.

00443 { return array[1][1]; }

cvm::real& colvarmodule::rmatrix::yy  )  [inline]
 

Return the yy element.

Definition at line 424 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00424 { return array[1][1]; }

cvm::real colvarmodule::rmatrix::yz  )  const [inline]
 

Return the yz element.

Definition at line 445 of file colvartypes.h.

00445 { return array[1][2]; }

cvm::real& colvarmodule::rmatrix::yz  )  [inline]
 

Return the yz element.

Definition at line 426 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00426 { return array[1][2]; }

cvm::real colvarmodule::rmatrix::zx  )  const [inline]
 

Return the zx element.

Definition at line 447 of file colvartypes.h.

00447 { return array[2][0]; }

cvm::real& colvarmodule::rmatrix::zx  )  [inline]
 

Return the zx element.

Definition at line 428 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00428 { return array[2][0]; }

cvm::real colvarmodule::rmatrix::zy  )  const [inline]
 

Return the zy element.

Definition at line 449 of file colvartypes.h.

00449 { return array[2][1]; }

cvm::real& colvarmodule::rmatrix::zy  )  [inline]
 

Return the zy element.

Definition at line 430 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00430 { return array[2][1]; }

cvm::real colvarmodule::rmatrix::zz  )  const [inline]
 

Return the zz element.

Definition at line 451 of file colvartypes.h.

00451 { return array[2][2]; }

cvm::real& colvarmodule::rmatrix::zz  )  [inline]
 

Return the zz element.

Definition at line 432 of file colvartypes.h.

Referenced by determinant(), operator *(), rmatrix(), colvarmodule::quaternion::rotation_matrix(), and transpose().

00432 { return array[2][2]; }


Friends And Related Function Documentation

cvm::rvector operator * cvm::rmatrix const &  m,
cvm::rvector const &  r
[friend]
 

Definition at line 529 of file colvartypes.h.

00531 {
00532   return cvm::rvector (m.xx()*r.x + m.xy()*r.y + m.xz()*r.z,
00533                        m.yx()*r.x + m.yy()*r.y + m.yz()*r.z,
00534                        m.zx()*r.x + m.zy()*r.y + m.zz()*r.z);
00535 }


The documentation for this class was generated from the following file:
Generated on Tue Nov 24 04:07:48 2009 for NAMD by  doxygen 1.3.9.1