There are a couple of loose ends I'd like to tie up. Nothing important you understand.One more question, as Lt Colombo says: can you recommend a good algorithm to compute the exponential of a complex matrix?
class MatrixOde
{
private:
// dB/dt = A*B, B(0) = C;
boost::numeric::ublas::matrix<value_type> A_;
boost::numeric::ublas::matrix<value_type> C_;
public:
MatrixOdePde(const boost::numeric::ublas::matrix<value_type>& A, const boost::numeric::ublas::matrix<value_type>& IC)
: A_(A), C_(IC) {}
void operator()( const state_type &x , state_type &dxdt , double t ) const
{
for( std::size_t i=0 ; i < x.size1();++i )
{
for( std::size_t j=0 ; j < x.size2(); ++j )
{
dxdt(i, j) = 0.0;
for (std::size_t k = 0; k < x.size2(); ++k)
{
dxdt(i, j) += A_(i.k)*x(k.j);
}
}
}
}
};
Al-Mohy, A. H. and N. J. Higham, “A new scaling and squaring algorithm for the matrix exponential,” SIAM J. Matrix Anal. Appl., 31(3) (2009), pp. 970–989.One more question, as Lt Colombo says: can you recommend a good algorithm to compute the exponential of a complex matrix?
Your COMPLEX function should satisfy the Cauchy-Riemann equations to be differentiable.Simple question which stumps me: I have a complex square matrix H. There are some nice methods for calculating exp(H). What about calculating the derivative of exp(H) over elements of H? To be precise: let M = exp(H). I want to calculate dM_{jk} / dH_{mn} numerically, accurately and (relatively) quickly.
AFAIR this is the same as saying that the function is holomorphic. A restrictive assumption. How would you compute the Hessian?Your COMPLEX function should satisfy the Cauchy-Riemann equations to be differentiable.Simple question which stumps me: I have a complex square matrix H. There are some nice methods for calculating exp(H). What about calculating the derivative of exp(H) over elements of H? To be precise: let M = exp(H). I want to calculate dM_{jk} / dH_{mn} numerically, accurately and (relatively) quickly.
Why not?The Hessian of a complex function?
if it's diagonalizable,One more question, as Lt Colombo says: can you recommend a good algorithm to compute the exponential of a complex matrix?