Used to calculate the determinant, the eigenvalues and eigenvectors of the symmetric matrix "amatA". More...
#include <cmath>#include <SharkDefs.h>#include <LinAlg/LinAlg.h>Go to the source code of this file.
Functions | |
| double | detsymm (Array2D< double > &amatA, Array2D< double > &vmatA, Array< double > &dvecA) |
| Calculates the determinate of the symmetric matrix "amatA". | |
| double | logdetsymm (Array2D< double > &amatA, Array2D< double > &vmatA, Array< double > &dvecA) |
| Calculates logarithm of the determinant of the symmetric matrix "amatA". | |
Used to calculate the determinant, the eigenvalues and eigenvectors of the symmetric matrix "amatA".
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Definition in file detsymm.cpp.
| double detsymm | ( | Array2D< double > & | amatA, | |
| Array2D< double > & | vmatA, | |||
| Array< double > & | dvecA | |||
| ) |
Calculates the determinate of the symmetric matrix "amatA".
Calculates the determinant of the symmetric matrix "amatA".
Calculates the determinate of matrix amatA by using its n eigenvalues
that first will be calculated. The determinate is then given as:

| amatA | matrix, which is symmetric, so only the bottom triangular matrix must contain values. At the end of the function amatA always contains the full matrix. | |
| vmatA | matrix, that will contain the scaled eigenvectors at the end of the function. | |
| dvecA | n-dimensional vector that will contain the eigenvalues at the end of the function. |
| SharkException | the type of the eception will be "size mismatch" and indicates that amatA is not a square matrix |
Please follow the link to view the source code of the example. The example can be executed in the example directory of package LinAlg.
Definition at line 94 of file detsymm.cpp.
References eigensymm_intermediate().
Referenced by Matrix::detSymm().
| double logdetsymm | ( | Array2D< double > & | amatA, | |
| Array2D< double > & | vmatA, | |||
| Array< double > & | dvecA | |||
| ) |
Calculates logarithm of the determinant of the symmetric matrix "amatA".
Calculates the log of the determinant of the symmetric matrix "amatA".
Calculates the logarithm of the determinate of matrix amatA by using its n eigenvalues
that first will be calculated. The determinate is then given as:

| amatA | matrix, which is symmetric, so only the bottom triangular matrix must contain values. At the end of the function amatA always contains the full matrix. | |
| vmatA | matrix, that will contain the scaled eigenvectors at the end of the function. | |
| dvecA | n-dimensional vector that will contain the eigenvalues at the end of the function. |
| SharkException | the type of the eception will be "size mismatch" and indicates that amatA is not a square matrix |
Please follow the link to view the source code of the example. The example can be executed in the example directory of package LinAlg.
Definition at line 176 of file detsymm.cpp.
References eigensymm_intermediate().
Referenced by Matrix::logDetSymm().