Boost.uBlas 1.49
Linear Algebra in C++: matrices, vectors and numeric algorithms

boost::numeric::ublas::identity_matrix< T, ALLOC > Class Template Reference

An identity matrix with values of type T. More...

#include <matrix.hpp>

Inheritance diagram for boost::numeric::ublas::identity_matrix< T, ALLOC >:
Collaboration diagram for boost::numeric::ublas::identity_matrix< T, ALLOC >:

List of all members.

Classes

class  const_iterator1
class  const_iterator2

Public Types

typedef matrix_reference
< self_type
closure_type
typedef const matrix_reference
< const self_type
const_closure_type
typedef const T & const_reference
typedef reverse_iterator_base1
< const_iterator1
const_reverse_iterator1
typedef reverse_iterator_base2
< const_iterator2
const_reverse_iterator2
typedef identity_matrix< T, ALLOC > container_type
typedef ALLOC::difference_type difference_type
typedef identity_matrix< T, ALLOC > expression_type
typedef const_iterator1 iterator1
typedef const_iterator2 iterator2
typedef unknown_orientation_tag orientation_category
typedef T & reference
typedef ALLOC::size_type size_type
typedef sparse_tag storage_category
typedef matrix_tag type_category
typedef T value_type

Public Member Functions

BOOST_UBLAS_INLINE identity_matrix ()
BOOST_UBLAS_INLINE identity_matrix (size_type size)
BOOST_UBLAS_INLINE identity_matrix (const identity_matrix &m)
BOOST_UBLAS_INLINE identity_matrix (size_type size1, size_type size2)
BOOST_UBLAS_INLINE
identity_matrix
assign_temporary (identity_matrix &m)
BOOST_UBLAS_INLINE const_iterator1 begin1 () const
BOOST_UBLAS_INLINE const_iterator2 begin2 () const
BOOST_UBLAS_INLINE const_iterator1 end1 () const
BOOST_UBLAS_INLINE const_iterator2 end2 () const
BOOST_UBLAS_INLINE const_iterator1 find1 (int rank, size_type i, size_type j) const
BOOST_UBLAS_INLINE const_iterator2 find2 (int rank, size_type i, size_type j) const
BOOST_UBLAS_INLINE container_typeoperator() ()
BOOST_UBLAS_INLINE const_reference operator() (size_type i, size_type j) const
BOOST_UBLAS_INLINE const
container_type
operator() () const
BOOST_UBLAS_INLINE
identity_matrix
operator= (const identity_matrix &m)
BOOST_UBLAS_INLINE
const_reverse_iterator1 
rbegin1 () const
BOOST_UBLAS_INLINE
const_reverse_iterator2 
rbegin2 () const
BOOST_UBLAS_INLINE
const_reverse_iterator1 
rend1 () const
BOOST_UBLAS_INLINE
const_reverse_iterator2 
rend2 () const
BOOST_UBLAS_INLINE void resize (size_type size, bool preserve=true)
BOOST_UBLAS_INLINE void resize (size_type size1, size_type size2, bool=true)
template<class Archive >
void serialize (Archive &ar, const unsigned int)
BOOST_UBLAS_INLINE size_type size1 () const
BOOST_UBLAS_INLINE size_type size2 () const
BOOST_UBLAS_INLINE void swap (identity_matrix &m)

Static Public Attributes

static const unsigned complexity

Private Types

typedef const T * const_pointer
typedef size_type const_subiterator_type
typedef identity_matrix< T, ALLOC > self_type

Private Attributes

size_type size1_
size_type size2_
size_type size_common_

Static Private Attributes

static const value_type one_
static const value_type zero_ = T()

Friends

BOOST_UBLAS_INLINE friend void swap (identity_matrix &m1, identity_matrix &m2)

Detailed Description

template<class T, class ALLOC>
class boost::numeric::ublas::identity_matrix< T, ALLOC >

An identity matrix with values of type T.

Elements or cordinates $(i,i)$ are equal to 1 (one) and all others to 0 (zero). Changing values does not affect the matrix, however assigning it to a normal matrix will make the matrix equal to an identity matrix. All accesses are constant du to the trivial values.

Template Parameters:
Tthe type of object stored in the matrix (like double, float, complex, etc...)
ALLOCan allocator for storing the zeros and one elements. By default, a standar allocator is used.

Definition at line 2564 of file matrix.hpp.


Member Typedef Documentation

template<class T, class ALLOC>
typedef const T* boost::numeric::ublas::identity_matrix< T, ALLOC >::const_pointer [private]

Definition at line 2567 of file matrix.hpp.

template<class T, class ALLOC>
typedef identity_matrix<T, ALLOC> boost::numeric::ublas::identity_matrix< T, ALLOC >::self_type [private]
template<class T, class ALLOC>
typedef ALLOC::size_type boost::numeric::ublas::identity_matrix< T, ALLOC >::size_type

Definition at line 2573 of file matrix.hpp.

template<class T, class ALLOC>
typedef ALLOC::difference_type boost::numeric::ublas::identity_matrix< T, ALLOC >::difference_type

Definition at line 2574 of file matrix.hpp.

template<class T, class ALLOC>
typedef T boost::numeric::ublas::identity_matrix< T, ALLOC >::value_type

Definition at line 2575 of file matrix.hpp.

template<class T, class ALLOC>
typedef const T& boost::numeric::ublas::identity_matrix< T, ALLOC >::const_reference

Definition at line 2576 of file matrix.hpp.

template<class T, class ALLOC>
typedef T& boost::numeric::ublas::identity_matrix< T, ALLOC >::reference

Definition at line 2577 of file matrix.hpp.

template<class T, class ALLOC>
typedef const matrix_reference<const self_type> boost::numeric::ublas::identity_matrix< T, ALLOC >::const_closure_type

Definition at line 2578 of file matrix.hpp.

template<class T, class ALLOC>
typedef matrix_reference<self_type> boost::numeric::ublas::identity_matrix< T, ALLOC >::closure_type

Definition at line 2579 of file matrix.hpp.

template<class T, class ALLOC>
typedef sparse_tag boost::numeric::ublas::identity_matrix< T, ALLOC >::storage_category

Definition at line 2580 of file matrix.hpp.

template<class T, class ALLOC>
typedef unknown_orientation_tag boost::numeric::ublas::identity_matrix< T, ALLOC >::orientation_category

Definition at line 2581 of file matrix.hpp.

template<class T, class ALLOC>
typedef size_type boost::numeric::ublas::identity_matrix< T, ALLOC >::const_subiterator_type [private]

Definition at line 2665 of file matrix.hpp.

Definition at line 2669 of file matrix.hpp.

Definition at line 2671 of file matrix.hpp.

template<class T, class ALLOC>
typedef const_iterator1 boost::numeric::ublas::identity_matrix< T, ALLOC >::iterator1

Definition at line 2793 of file matrix.hpp.

template<class T, class ALLOC>
typedef const_iterator2 boost::numeric::ublas::identity_matrix< T, ALLOC >::iterator2

Definition at line 2905 of file matrix.hpp.

Definition at line 488 of file expression_types.hpp.


Constructor & Destructor Documentation

template<class T, class ALLOC>
BOOST_UBLAS_INLINE boost::numeric::ublas::identity_matrix< T, ALLOC >::identity_matrix ( ) [inline]

Definition at line 2585 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE boost::numeric::ublas::identity_matrix< T, ALLOC >::identity_matrix ( size_type  size) [inline]

Definition at line 2589 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE boost::numeric::ublas::identity_matrix< T, ALLOC >::identity_matrix ( size_type  size1,
size_type  size2 
) [inline]

Definition at line 2593 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE boost::numeric::ublas::identity_matrix< T, ALLOC >::identity_matrix ( const identity_matrix< T, ALLOC > &  m) [inline]

Definition at line 2597 of file matrix.hpp.


Member Function Documentation

template<class T, class ALLOC>
BOOST_UBLAS_INLINE size_type boost::numeric::ublas::identity_matrix< T, ALLOC >::size1 ( ) const [inline]

Definition at line 2603 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE size_type boost::numeric::ublas::identity_matrix< T, ALLOC >::size2 ( ) const [inline]

Definition at line 2607 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE void boost::numeric::ublas::identity_matrix< T, ALLOC >::resize ( size_type  size,
bool  preserve = true 
) [inline]

Definition at line 2613 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE void boost::numeric::ublas::identity_matrix< T, ALLOC >::resize ( size_type  size1,
size_type  size2,
bool  = true 
) [inline]

Definition at line 2619 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_reference boost::numeric::ublas::identity_matrix< T, ALLOC >::operator() ( size_type  i,
size_type  j 
) const [inline]

Definition at line 2627 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE identity_matrix& boost::numeric::ublas::identity_matrix< T, ALLOC >::operator= ( const identity_matrix< T, ALLOC > &  m) [inline]

Definition at line 2636 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE identity_matrix& boost::numeric::ublas::identity_matrix< T, ALLOC >::assign_temporary ( identity_matrix< T, ALLOC > &  m) [inline]

Definition at line 2643 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE void boost::numeric::ublas::identity_matrix< T, ALLOC >::swap ( identity_matrix< T, ALLOC > &  m) [inline]

Definition at line 2650 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_iterator1 boost::numeric::ublas::identity_matrix< T, ALLOC >::find1 ( int  rank,
size_type  i,
size_type  j 
) const [inline]

Definition at line 2675 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_iterator2 boost::numeric::ublas::identity_matrix< T, ALLOC >::find2 ( int  rank,
size_type  i,
size_type  j 
) const [inline]

Definition at line 2683 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_iterator1 boost::numeric::ublas::identity_matrix< T, ALLOC >::begin1 ( ) const [inline]

Definition at line 2796 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_iterator1 boost::numeric::ublas::identity_matrix< T, ALLOC >::end1 ( ) const [inline]

Definition at line 2800 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_iterator2 boost::numeric::ublas::identity_matrix< T, ALLOC >::begin2 ( ) const [inline]

Definition at line 2908 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_iterator2 boost::numeric::ublas::identity_matrix< T, ALLOC >::end2 ( ) const [inline]

Definition at line 2912 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_reverse_iterator1 boost::numeric::ublas::identity_matrix< T, ALLOC >::rbegin1 ( ) const [inline]

Definition at line 2919 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_reverse_iterator1 boost::numeric::ublas::identity_matrix< T, ALLOC >::rend1 ( ) const [inline]

Definition at line 2923 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_reverse_iterator2 boost::numeric::ublas::identity_matrix< T, ALLOC >::rbegin2 ( ) const [inline]

Definition at line 2928 of file matrix.hpp.

template<class T, class ALLOC>
BOOST_UBLAS_INLINE const_reverse_iterator2 boost::numeric::ublas::identity_matrix< T, ALLOC >::rend2 ( ) const [inline]

Definition at line 2932 of file matrix.hpp.

template<class T, class ALLOC>
template<class Archive >
void boost::numeric::ublas::identity_matrix< T, ALLOC >::serialize ( Archive &  ar,
const unsigned  int 
) [inline]

Definition at line 2938 of file matrix.hpp.

BOOST_UBLAS_INLINE const container_type& boost::numeric::ublas::matrix_container< identity_matrix< T, ALLOC > >::operator() ( ) const [inline, inherited]
BOOST_UBLAS_INLINE container_type& boost::numeric::ublas::matrix_container< identity_matrix< T, ALLOC > >::operator() ( ) [inline, inherited]

Friends And Related Function Documentation

template<class T, class ALLOC>
BOOST_UBLAS_INLINE friend void swap ( identity_matrix< T, ALLOC > &  m1,
identity_matrix< T, ALLOC > &  m2 
) [friend]

Definition at line 2658 of file matrix.hpp.


Member Data Documentation

template<class T, class ALLOC>
size_type boost::numeric::ublas::identity_matrix< T, ALLOC >::size1_ [private]

Definition at line 2958 of file matrix.hpp.

template<class T, class ALLOC>
size_type boost::numeric::ublas::identity_matrix< T, ALLOC >::size2_ [private]

Definition at line 2959 of file matrix.hpp.

template<class T, class ALLOC>
size_type boost::numeric::ublas::identity_matrix< T, ALLOC >::size_common_ [private]

Definition at line 2960 of file matrix.hpp.

template<class T, class ALLOC>
const identity_matrix< T, ALLOC >::value_type boost::numeric::ublas::identity_matrix< T, ALLOC >::zero_ = T() [static, private]

Definition at line 2961 of file matrix.hpp.

template<class T, class ALLOC>
const identity_matrix< T, ALLOC >::value_type boost::numeric::ublas::identity_matrix< T, ALLOC >::one_ [static, private]

Definition at line 2962 of file matrix.hpp.

const unsigned boost::numeric::ublas::matrix_container< identity_matrix< T, ALLOC > >::complexity [static, inherited]

The documentation for this class was generated from the following file: