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

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

A matrix with all values of type T equal to the same value. More...

#include <matrix.hpp>

Inheritance diagram for boost::numeric::ublas::scalar_matrix< T, ALLOC >:
Collaboration diagram for boost::numeric::ublas::scalar_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 scalar_matrix< T, ALLOC > container_type
typedef std::ptrdiff_t difference_type
typedef scalar_matrix< T, ALLOC > expression_type
typedef const_iterator1 iterator1
typedef const_iterator2 iterator2
typedef unknown_orientation_tag orientation_category
typedef T & reference
typedef std::size_t size_type
typedef dense_tag storage_category
typedef matrix_tag type_category
typedef T value_type

Public Member Functions

BOOST_UBLAS_INLINE scalar_matrix ()
BOOST_UBLAS_INLINE scalar_matrix (size_type size1, size_type size2, const value_type &value=value_type(1))
BOOST_UBLAS_INLINE scalar_matrix (const scalar_matrix &m)
BOOST_UBLAS_INLINE scalar_matrixassign_temporary (scalar_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, size_type i, size_type j) const
BOOST_UBLAS_INLINE const_iterator2 find2 (int, size_type i, size_type j) const
BOOST_UBLAS_INLINE container_typeoperator() ()
BOOST_UBLAS_INLINE const
container_type
operator() () const
BOOST_UBLAS_INLINE const_reference operator() (size_type, size_type) const
BOOST_UBLAS_INLINE scalar_matrixoperator= (const scalar_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 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 (scalar_matrix &m)

Static Public Attributes

static const unsigned complexity

Private Types

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

Private Attributes

size_type size1_
size_type size2_
value_type value_

Friends

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

Detailed Description

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

A matrix with all values of type T equal to the same value.

Changing one value has the effect of changing all the values. Assigning it to a normal matrix will copy the same value everywhere in this matrix. All accesses are constant time, due to the trivial value.

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

Definition at line 2980 of file matrix.hpp.


Member Typedef Documentation

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

Definition at line 2983 of file matrix.hpp.

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

Definition at line 2989 of file matrix.hpp.

template<class T , class ALLOC >
typedef std::ptrdiff_t boost::numeric::ublas::scalar_matrix< T, ALLOC >::difference_type

Definition at line 2990 of file matrix.hpp.

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

Definition at line 2991 of file matrix.hpp.

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

Definition at line 2992 of file matrix.hpp.

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

Definition at line 2993 of file matrix.hpp.

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

Definition at line 2994 of file matrix.hpp.

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

Definition at line 2995 of file matrix.hpp.

template<class T , class ALLOC >
typedef dense_tag boost::numeric::ublas::scalar_matrix< T, ALLOC >::storage_category

Definition at line 2996 of file matrix.hpp.

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

Definition at line 2997 of file matrix.hpp.

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

Definition at line 3067 of file matrix.hpp.

Definition at line 3077 of file matrix.hpp.

Definition at line 3080 of file matrix.hpp.

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

Definition at line 3226 of file matrix.hpp.

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

Definition at line 3371 of file matrix.hpp.

typedef scalar_matrix< T, ALLOC > boost::numeric::ublas::matrix_container< scalar_matrix< T, ALLOC > >::container_type [inherited]

Definition at line 488 of file expression_types.hpp.


Constructor & Destructor Documentation

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

Definition at line 3001 of file matrix.hpp.

template<class T , class ALLOC >
BOOST_UBLAS_INLINE boost::numeric::ublas::scalar_matrix< T, ALLOC >::scalar_matrix ( size_type  size1,
size_type  size2,
const value_type value = value_type(1) 
) [inline]

Definition at line 3005 of file matrix.hpp.

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

Definition at line 3009 of file matrix.hpp.


Member Function Documentation

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

Definition at line 3015 of file matrix.hpp.

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

Definition at line 3019 of file matrix.hpp.

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

Definition at line 3025 of file matrix.hpp.

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

Definition at line 3032 of file matrix.hpp.

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

Definition at line 3038 of file matrix.hpp.

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

Definition at line 3045 of file matrix.hpp.

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

Definition at line 3052 of file matrix.hpp.

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

Definition at line 3084 of file matrix.hpp.

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

Definition at line 3088 of file matrix.hpp.

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

Definition at line 3230 of file matrix.hpp.

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

Definition at line 3234 of file matrix.hpp.

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

Definition at line 3375 of file matrix.hpp.

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

Definition at line 3379 of file matrix.hpp.

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

Definition at line 3386 of file matrix.hpp.

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

Definition at line 3390 of file matrix.hpp.

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

Definition at line 3395 of file matrix.hpp.

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

Definition at line 3399 of file matrix.hpp.

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

Definition at line 3405 of file matrix.hpp.

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

Friends And Related Function Documentation

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

Definition at line 3060 of file matrix.hpp.


Member Data Documentation

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

Definition at line 3426 of file matrix.hpp.

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

Definition at line 3427 of file matrix.hpp.

template<class T , class ALLOC >
value_type boost::numeric::ublas::scalar_matrix< T, ALLOC >::value_ [private]

Definition at line 3428 of file matrix.hpp.

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

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