ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Friends | List of all members
maquis::dmrg::one_matrix< T > Class Template Reference

#include <one_matrix.hpp>

Public Types

typedef T value_type
 
typedef T & reference
 
typedef T const & const_reference
 
typedef std::size_t size_type
 
typedef std::ptrdiff_t difference_type
 
typedef reference element_iterator
 
typedef const_reference const_element_iterator
 

Public Member Functions

 one_matrix (size_type rows=1, size_type cols=1, T init_value=T())
 
void swap (one_matrix &r)
 
value_typeoperator() (const size_type i, const size_type j)
 
value_type const & operator() (const size_type i, const size_type j) const
 
bool operator== (one_matrix const &rhs) const
 
one_matrix< T > & operator+= (one_matrix const &rhs)
 
one_matrix< T > & operator-= (one_matrix const &rhs)
 
template<typename T2 >
one_matrix< T > & operator*= (T2 const &t)
 
template<typename T2 >
one_matrix< T > & operator/= (T2 const &t)
 
bool empty () const
 
size_type num_rows () const
 
size_type num_cols () const
 
std::pair< element_iterator,
element_iterator
elements ()
 
std::pair
< const_element_iterator,
const_element_iterator
elements () const
 

Friends

void swap (one_matrix &x, one_matrix &y)
 

Detailed Description

template<typename T>
class maquis::dmrg::one_matrix< T >

Definition at line 36 of file one_matrix.hpp.

Member Typedef Documentation

Definition at line 45 of file one_matrix.hpp.

template<typename T>
typedef T const& maquis::dmrg::one_matrix< T >::const_reference

Definition at line 40 of file one_matrix.hpp.

template<typename T>
typedef std::ptrdiff_t maquis::dmrg::one_matrix< T >::difference_type

Definition at line 42 of file one_matrix.hpp.

template<typename T>
typedef reference maquis::dmrg::one_matrix< T >::element_iterator

Definition at line 44 of file one_matrix.hpp.

template<typename T>
typedef T& maquis::dmrg::one_matrix< T >::reference

Definition at line 39 of file one_matrix.hpp.

template<typename T>
typedef std::size_t maquis::dmrg::one_matrix< T >::size_type

Definition at line 41 of file one_matrix.hpp.

template<typename T>
typedef T maquis::dmrg::one_matrix< T >::value_type

Definition at line 38 of file one_matrix.hpp.

Constructor & Destructor Documentation

template<typename T>
maquis::dmrg::one_matrix< T >::one_matrix ( size_type  rows = 1,
size_type  cols = 1,
init_value = T() 
)
inlineexplicit

Definition at line 47 of file one_matrix.hpp.

47  {
48  assert(cols==1 && rows==1);
49  val_ = init_value;
50  }

Member Function Documentation

template<typename T>
std::pair<element_iterator, element_iterator> maquis::dmrg::one_matrix< T >::elements ( )
inline

Definition at line 84 of file one_matrix.hpp.

84 { return std::make_pair(val_, NULL); }
template<typename T>
std::pair<const_element_iterator, const_element_iterator> maquis::dmrg::one_matrix< T >::elements ( ) const
inline

Definition at line 85 of file one_matrix.hpp.

85 { return std::make_pair(val_, NULL); }
template<typename T>
bool maquis::dmrg::one_matrix< T >::empty ( ) const
inline

Definition at line 79 of file one_matrix.hpp.

79 { return false; }
template<typename T>
size_type maquis::dmrg::one_matrix< T >::num_cols ( ) const
inline

Definition at line 82 of file one_matrix.hpp.

82 { return 1; }
template<typename T>
size_type maquis::dmrg::one_matrix< T >::num_rows ( ) const
inline

Definition at line 81 of file one_matrix.hpp.

81 { return 1; }
template<typename T>
value_type& maquis::dmrg::one_matrix< T >::operator() ( const size_type  i,
const size_type  j 
)
inline

Definition at line 59 of file one_matrix.hpp.

59  {
60  assert(i==0 && j==0);
61  return val_;
62  }
template<typename T>
value_type const& maquis::dmrg::one_matrix< T >::operator() ( const size_type  i,
const size_type  j 
) const
inline

Definition at line 63 of file one_matrix.hpp.

63  {
64  assert(i==0 && j==0);
65  return val_;
66  }
template<typename T>
template<typename T2 >
one_matrix<T>& maquis::dmrg::one_matrix< T >::operator*= ( T2 const &  t)
inline

Definition at line 74 of file one_matrix.hpp.

74 { this->val_ *= t; return *this; }
template<typename T>
one_matrix<T>& maquis::dmrg::one_matrix< T >::operator+= ( one_matrix< T > const &  rhs)
inline

Definition at line 70 of file one_matrix.hpp.

70 { this->val_ += rhs(0,0); return *this; }
template<typename T>
one_matrix<T>& maquis::dmrg::one_matrix< T >::operator-= ( one_matrix< T > const &  rhs)
inline

Definition at line 71 of file one_matrix.hpp.

71 { this->val_ -= rhs(0,0); return *this; }
template<typename T>
template<typename T2 >
one_matrix<T>& maquis::dmrg::one_matrix< T >::operator/= ( T2 const &  t)
inline

Definition at line 77 of file one_matrix.hpp.

77 { this->val_ /= t; return *this; }
template<typename T>
bool maquis::dmrg::one_matrix< T >::operator== ( one_matrix< T > const &  rhs) const
inline

Definition at line 68 of file one_matrix.hpp.

68 { return this->val_ == rhs(0,0); }
template<typename T>
void maquis::dmrg::one_matrix< T >::swap ( one_matrix< T > &  r)
inline

Definition at line 52 of file one_matrix.hpp.

52 { std::swap((*this)(0,0), r(0,0)); }
void swap(MPSTensor< Matrix, SymmGroup > &x, MPSTensor< Matrix, SymmGroup > &y)

Friends And Related Function Documentation

template<typename T>
void swap ( one_matrix< T > &  x,
one_matrix< T > &  y 
)
friend

Definition at line 54 of file one_matrix.hpp.

55  {
56  x.swap(y);
57  }

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