eigen.c 576 B

1234567891011121314151617181920
  1. /* eigen.c CCMATH mathematics library source code.
  2. *
  3. * Copyright (C) 2000 Daniel A. Atkinson All rights reserved.
  4. * This code may be redistributed under the terms of the GNU library
  5. * public license (LGPL). ( See the lgpl.license file for details.)
  6. * ------------------------------------------------------------------------
  7. */
  8. #include <stdlib.h>
  9. #include "ccmath.h"
  10. void eigen(double *a, double *ev, int n)
  11. {
  12. double *dp;
  13. dp = (double *)calloc(n, sizeof(double));
  14. housev(a, ev, dp, n);
  15. qrevec(ev, a, dp, n);
  16. trnm(a, n);
  17. free(dp);
  18. }