AdditionalIceUtils.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*!
  2. @file: AdditionalIceUtils.h
  3. adds some from to ICE
  4. */
  5. #ifndef ADDITIONALICEUTILS_H
  6. #define ADDITIONALICEUTILS_H
  7. #include "core/optimization/blackbox/Definitions_core_opt.h"
  8. namespace opt=OPTIMIZATION;
  9. /*!
  10. adds val to every element of mat
  11. @param mat matrix
  12. @param val the value to add
  13. @return mat
  14. */
  15. OPTIMIZATION::matrix_type& MatrixAddVal ( OPTIMIZATION::matrix_type & mat, double val );
  16. /*!
  17. sums up all elements of the matrix
  18. @param mat matrix
  19. @return $\sum_{i,j} mat(i,j)$
  20. */
  21. double MatrixSum(const OPTIMIZATION::matrix_type & mat);
  22. /*!
  23. Wrapper to solve linear equation A*x=b
  24. @param A matrix
  25. @param x solution
  26. @param b nx1 matrix (inhomogenity)
  27. */
  28. void linSolve(const OPTIMIZATION::matrix_type &A, OPTIMIZATION::matrix_type &x, const OPTIMIZATION::matrix_type b);
  29. /*!
  30. Wrapper to get eigen values of a matrix
  31. @param A matrix
  32. @param L lambda vector with eigenvalues
  33. @param V marix, whose columns are the corresponding eigen vector
  34. */
  35. void getEig(const OPTIMIZATION::matrix_type &A, OPTIMIZATION::matrix_type &L, OPTIMIZATION::matrix_type &V);
  36. #endif //ADDITIONALICEUTILS_H