Subversion Repositories gelsvn

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
660 khor 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
 
11
#ifndef __CGLA_EIGENSOLUTION_H__
12
#define __CGLA_EIGENSOLUTION_H__
13
 
14
namespace CGLA
15
{
16
	/** Use the power method to obtain an eigensolution.
17
			Given a matrix A, the function returns the number
18
			of eigensolutions found, and the eigenvectors are
19
			stored in Q as the rows, and the corresponding 
20
			values are stored in the diagonal of L upon return of 
21
			the function.
22
 
23
			The so called power method is used to find the dominant 
24
			eigenvalue, and the method of deflation is used to find
25
			the following values. This restricts this function to
26
			work only on symmetric matrices. 
27
 
28
			DO NOT CALL THIS FUNCTION WITH AN UNSYMMETRIC MATRIX.
29
 
30
			The final argument is the number of solutions to find. If only
31
			a number of solutions are interesting, use this argument to save
32
			cycles.
33
	*/
34
	template <class MT>
35
	int power_eigensolution(const MT& A, MT& Q, MT& L, unsigned int max_sol=1000);
36
}
37
#endif