Subversion Repositories gelsvn

Rev

Rev 45 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 45 Rev 595
-
 
1
/* ----------------------------------------------------------------------- *
-
 
2
 * This file is part of GEL, http://www.imm.dtu.dk/GEL
-
 
3
 * Copyright (C) the authors and DTU Informatics
-
 
4
 * For license and list of authors, see ../../doc/intro.pdf
-
 
5
 * ----------------------------------------------------------------------- */
-
 
6
 
-
 
7
/** @file eigensolution.h
-
 
8
 * @brief Compute eigensolutions for symmetric CGLA matrices.
-
 
9
 */
-
 
10
 
1
#ifndef __CGLA_EIGENSOLUTION_H__
11
#ifndef __CGLA_EIGENSOLUTION_H__
2
#define __CGLA_EIGENSOLUTION_H__
12
#define __CGLA_EIGENSOLUTION_H__
3
 
13
 
4
namespace CGLA
14
namespace CGLA
5
{
15
{
6
	/** Use the power method to obtain an eigensolution.
16
	/** Use the power method to obtain an eigensolution.
7
			Given a matrix A, the function returns the number
17
			Given a matrix A, the function returns the number
8
			of eigensolutions found, and the eigenvectors are
18
			of eigensolutions found, and the eigenvectors are
9
			stored in Q as the rows, and the corresponding 
19
			stored in Q as the rows, and the corresponding 
10
			values are stored in the diagonal of L upon return of 
20
			values are stored in the diagonal of L upon return of 
11
			the function.
21
			the function.
12
 
22
 
13
			The so called power method is used to find the dominant 
23
			The so called power method is used to find the dominant 
14
			eigenvalue, and the method of deflation is used to find
24
			eigenvalue, and the method of deflation is used to find
15
			the following values. This restricts this function to
25
			the following values. This restricts this function to
16
			work only on symmetric matrices. 
26
			work only on symmetric matrices. 
17
 
27
 
18
			DO NOT CALL THIS FUNCTION WITH AN UNSYMMETRIC MATRIX.
28
			DO NOT CALL THIS FUNCTION WITH AN UNSYMMETRIC MATRIX.
19
 
29
 
20
			The final argument is the number of solutions to find. If only
30
			The final argument is the number of solutions to find. If only
21
			a number of solutions are interesting, use this argument to save
31
			a number of solutions are interesting, use this argument to save
22
			cycles.
32
			cycles.
23
	*/
33
	*/
24
	template <class MT>
34
	template <class MT>
25
	int power_eigensolution(const MT& A, MT& Q, MT& L, unsigned int max_sol=1000);
35
	int power_eigensolution(const MT& A, MT& Q, MT& L, unsigned int max_sol=1000);
26
}
36
}
27
#endif
37
#endif
28
 
38