/*! @file: AdditionalIceUtils.h adds some from to ICE */ #ifndef ADDITIONALICEUTILS_H #define ADDITIONALICEUTILS_H #include "optimization/Opt_Namespace.h" namespace opt=optimization; /*! adds val to every element of mat @param mat matrix @param val the value to add @return mat */ opt::matrix_type& MatrixAddVal ( opt::matrix_type & mat, double val ); /*! sums up all elements of the matrix @param mat matrix @return $\sum_{i,j} mat(i,j)$ */ double MatrixSum(const opt::matrix_type & mat); /*! Wrapper to solve linear equation A*x=b @param A matrix @param x solution @param b nx1 matrix (inhomogenity) */ void linSolve(const opt::matrix_type &A, opt::matrix_type &x, const opt::matrix_type b); /*! Wrapper to get eigen values of a matrix @param A matrix @param L lambda vector with eigenvalues @param V marix, whose columns are the corresponding eigen vector */ void getEig(const opt::matrix_type &A, opt::matrix_type &L, opt::matrix_type &V); #endif //ADDITIONALICEUTILS_H