detsymm.cpp File Reference

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".

Detailed Description

Used to calculate the determinant, the eigenvalues and eigenvectors of the symmetric matrix "amatA".

Author:
M. Kreutz
Date:
1998
Copyright (c) 1998-2000:
Institut für Neuroinformatik
Ruhr-Universität Bochum
D-44780 Bochum, Germany
Phone: +49-234-32-25558
Fax: +49-234-32-14209
eMail: Shark-admin@neuroinformatik.ruhr-uni-bochum.de
www: http://www.neuroinformatik.ruhr-uni-bochum.de

Project:
LinAlg




This file is part of LinAlg. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

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.


Function Documentation

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 $ x_j $ that first will be calculated. The determinate is then given as:

$ \prod_{j=1}^n x_j $

Parameters:
amatA $ n \times n $ 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 $ n \times n $ 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.
Returns:
The determinate of matrix amatA.
Exceptions:
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.

Author:
M. Kreutz
Date:
1998
Changes
2003/10/02 by S. Wiegand due to name change of 'eigensymm';
Status
stable
Examples:
detsymm_test.cpp.

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 $ x_j $ that first will be calculated. The determinate is then given as:

$ \prod_{j=1}^n x_j $

Parameters:
amatA $ n \times n $ 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 $ n \times n $ 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.
Returns:
The logarithm of the determinate of matrix amatA.
Exceptions:
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.

Author:
C.Igel
Date:
2007
Status
stable

Definition at line 176 of file detsymm.cpp.

References eigensymm_intermediate().

Referenced by Matrix::logDetSymm().