Functions
core/vnl/vnl_power.h File Reference

Calculates nth power of a small vnl_matrix_fixed (not using svd) More...

#include <vnl/vnl_matrix_fixed.h>
#include <vnl/vnl_matrix.h>
#include <vnl/vnl_inverse.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Functions

template<class T , unsigned int d>
vnl_matrix_fixed< T, d, d > vnl_power (vnl_matrix_fixed< T, d, d > const &m, int n)
 Calculates nth power of a vnl_matrix_fixed (not using svd).
template<class T >
vnl_matrix< T > vnl_power (vnl_matrix< T > const &m, int n)
 Calculates nth power of a square vnl_matrix (not using svd).

Detailed Description

Calculates nth power of a small vnl_matrix_fixed (not using svd)

Author:
Peter Vanroose
Date:
21 July 2009
    Modifications
     <none yet>
   

Definition in file vnl_power.h.


Function Documentation

template<class T , unsigned int d>
vnl_matrix_fixed< T, d, d > vnl_power ( vnl_matrix_fixed< T, d, d > const &  m,
int  n 
)

Calculates nth power of a vnl_matrix_fixed (not using svd).

This allows you to write e.g.

x = vnl_power(A,7) * vnl_power(B,-4) * b;

Note that this function is inlined (except for the call to vnl_inverse()), which makes it much faster than a full-fledged square matrix power implementation using svd, which belongs in vnl/algo.

Definition at line 32 of file vnl_power.h.

template<class T >
vnl_matrix< T > vnl_power ( vnl_matrix< T > const &  m,
int  n 
)

Calculates nth power of a square vnl_matrix (not using svd).

This allows you to write e.g.

x = vnl_power(A,7) * vnl_power(B,-4) * b;

Note that this function is inlined (except for the call to vnl_inverse()), which makes it much faster than a full-fledged square matrix power implementation using svd, which belongs in vnl/algo.

Definition at line 59 of file vnl_power.h.