23 #include "vnl/vnl_matrix_fixed.txx"
24 #include "vnl/vnl_transpose.h"
25 #include "vnl/algo/vnl_matrix_inverse.h"
26 #include "vnl/vnl_matrix.h"
27 #include "vnl/algo/vnl_determinant.h"
46 template<
typename T,
unsigned int NRows = 3,
unsigned int NColumns = 3 >
80 vnl_vector_fixed<T,NRows>
operator *(
const vnl_vector_fixed< T, NColumns > & vector)
const;
85 template<
unsigned int OuterDim>
103 vnl_matrix< T >
operator *(
const vnl_matrix< T > & matrix)
const;
109 void operator*=(
const vnl_matrix< T > & matrix);
112 vnl_vector< T >
operator *(
const vnl_vector< T > & matrix)
const;
149 inline const T &
operator()(
unsigned int row,
unsigned int col)
const
185 inline void Fill(
const T & value)
198 inline Matrix(
const vnl_matrix< T > & matrix)
208 for (
unsigned int r = 0; r < NRows; r++ )
210 for (
unsigned int c = 0; c < NColumns; c++ )
247 inline vnl_matrix_fixed< T, NColumns, NRows >
GetInverse(
void)
const
249 if ( vnl_determinant(
m_Matrix) == 0.0 )
251 itkGenericExceptionMacro(<<
"Singular matrix. Determinant is 0.");
253 vnl_matrix< T > temp = vnl_matrix_inverse< T >(
m_Matrix);
274 template<
typename T,
unsigned int NRows,
unsigned int NColumns >
275 std::ostream & operator<<(std::ostream & os, const Matrix< T, NRows, NColumns > & v)
277 os << v.GetVnlMatrix();
282 #ifndef ITK_MANUAL_INSTANTIATION
283 #include "itkMatrix.hxx"
const Self & operator=(const vnl_matrix< T > &matrix)
const Self & operator=(const InternalMatrixType &matrix)
A templated class holding a M x N size Matrix.
void operator*=(const T &value)
Matrix(const Self &matrix)
Self operator-(const Self &matrix) const
bool operator!=(const Self &matrix) const
vnl_matrix_fixed< T, NColumns, NRows > GetInverse(void) const
T & operator()(unsigned int row, unsigned int col)
vnl_matrix_fixed< T, NRows, NColumns > InternalMatrixType
const InternalMatrixType & GetVnlMatrix(void) const
InternalMatrixType m_Matrix
Self operator*(const T &value) const
Vector< T, NRows > operator*(const Vector< T, NColumns > &vector) const
const Self & operator+=(const Self &matrix)
Matrix(const InternalMatrixType &matrix)
Matrix< T, NColumns, NColumns > CompatibleSquareMatrixType
const T & operator()(unsigned int row, unsigned int col) const
const Self & operator=(const Self &matrix)
vnl_matrix_fixed< T, NColumns, NRows > GetTranspose(void) const
Matrix< T, NRows, OuterDim > operator*(const vnl_matrix_fixed< T, NRows, OuterDim > &matrix) const
T * operator[](unsigned int i)
A templated class holding a n-Dimensional vector.
bool operator==(const Self &matrix) const
void operator*=(const CompatibleSquareMatrixType &matrix)
const Self & operator-=(const Self &matrix)
static const unsigned int ColumnDimensions
Self operator/(const T &value) const
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
InternalMatrixType & GetVnlMatrix(void)
static const unsigned int RowDimensions
void Fill(const T &value)
Matrix(const vnl_matrix< T > &matrix)
Self operator+(const Self &matrix) const
Define additional traits for native types such as int or float.
A templated class holding a geometric point in n-Dimensional space.
A templated class holding a n-Dimensional covariant vector.
const T * operator[](unsigned int i) const
void operator/=(const T &value)