File: eigen.h

package info (click to toggle)
phast 1.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,008 kB
  • sloc: ansic: 54,195; makefile: 358; sh: 337; perl: 321
file content (38 lines) | stat: -rw-r--r-- 1,490 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/***************************************************************************
 * PHAST: PHylogenetic Analysis with Space/Time models
 * Copyright (c) 2002-2005 University of California, 2006-2010 Cornell 
 * University.  All rights reserved.
 *
 * This source code is distributed under a BSD-style license.  See the
 * file LICENSE.txt for details.
 ***************************************************************************/

/** @file eigen.h
   Eigenvalue computation and matrix diagonalization.  CLAPACK is used.
   @ingroup base
*/

#ifndef EIG_H
#define EIG_H

#include <matrix.h>
#include <complex_vector.h>
#include <complex_matrix.h>

/** Diagonalize a square, real, non-symmetric matrix.
  @param[in,out] M Input matrix to diagonalize (n x n)
  @param[out] eval Eigen values computed from diagonalization preallocate dimension n
  @param[out] revect Normalized matrix of right eigen vectors from diagonalization preallocate dimension (n x n)
  @param[out] levect Normalized matrix of left eigen vectors from diagonalization preallocate dimension (n x n)
  @result 0 on success, otherwise failure
*/
int mat_diagonalize(Matrix *M, Zvector *eval, Zmatrix *revect, Zmatrix *levect);

/** Compute eigenvalues only of square, real non-symmetric matrix.
  @param[in,out] M Input matrix to find eigen values from dimension (n x n)
  @param[out] eval Eigen values, preallocate dimension n
  @result 0 on success, otherwise failure
*/
int mat_eigenvals(Matrix *M, Zvector *evals);

#endif