ALPS MPS Codes
Reference documentation.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
OPTable< Matrix, SymmGroup > Class Template Reference

#include <op_handler.h>

Inheritance diagram for OPTable< Matrix, SymmGroup >:

Public Types

typedef tag_detail::tag_type tag_type
 
typedef block_matrix< Matrix,
SymmGroup > 
op_t
 

Public Member Functions

tag_type register_op (op_t const &op_)
 
std::pair< tag_type, mvalue_type > checked_register (op_t const &sample)
 

Public Attributes

elements
 

Detailed Description

template<class Matrix, class SymmGroup>
class OPTable< Matrix, SymmGroup >

Definition at line 43 of file op_handler.h.

Member Typedef Documentation

template<class Matrix, class SymmGroup>
typedef block_matrix<Matrix, SymmGroup> OPTable< Matrix, SymmGroup >::op_t

Definition at line 47 of file op_handler.h.

template<class Matrix, class SymmGroup>
typedef tag_detail::tag_type OPTable< Matrix, SymmGroup >::tag_type

Definition at line 46 of file op_handler.h.

Member Function Documentation

template<class Matrix , class SymmGroup >
std::pair< typename OPTable< Matrix, SymmGroup >::tag_type, typename OPTable< Matrix, SymmGroup >::mvalue_type > OPTable< Matrix, SymmGroup >::checked_register ( op_t const &  sample)

Definition at line 42 of file op_handler.hpp.

43 {
44  std::pair<bool, mvalue_type> cmp_result;
45  typename std::vector<op_t>::iterator it_pt = this->begin();
46  for (; it_pt != this->end(); ++it_pt) {
47  cmp_result = tag_detail::equal(*it_pt, sample);
48  if (cmp_result.first)
49  break;
50  }
51 
52  if (it_pt == this->end()) {
53  return std::make_pair(this->register_op(sample), 1.0);
54  } else
55  return std::make_pair(it_pt - this->begin(), cmp_result.second);
56 
57 }
tag_type register_op(op_t const &op_)
Definition: op_handler.hpp:33
std::pair< bool, typename Matrix::value_type > equal(block_matrix< Matrix, SymmGroup > const &reference, block_matrix< Matrix, SymmGroup > const &sample)
Definition: tag_detail.h:120
template<class Matrix , class SymmGroup >
OPTable< Matrix, SymmGroup >::tag_type OPTable< Matrix, SymmGroup >::register_op ( op_t const &  op_)

Definition at line 33 of file op_handler.hpp.

34 {
35  tag_type ret = this->size();
36  this->push_back(op_);
37  return ret;
38 }
tag_detail::tag_type tag_type
Definition: op_handler.h:46

Member Data Documentation

T std::vector< T >::elements
inherited

STL member.


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