3 #ifndef CPPQEDELEMENTS_UTILS_AVERAGINGUTILS_H_INCLUDED
4 #define CPPQEDELEMENTS_UTILS_AVERAGINGUTILS_H_INCLUDED
6 #include "AveragingUtilsFwd.h"
12 #include <boost/assign/list_of.hpp>
14 #include <boost/ptr_container/ptr_list.hpp>
28 typedef typename Base::KeyLabels KeyLabels;
34 ReducedDensityOperator(
const std::string&,
const Dimensions&,
bool offDiagonals=
false,
const KeyLabels& =KeyLabels());
37 static const KeyLabels helper(
const Dimensions&,
bool offDiagonals,
const KeyLabels&);
45 const bool offDiagonals_;
50 template<
int RANK,
typename V>
62 : Base(label,dim,
true,boost::assign::list_of(
"negativity")) {}
66 void process_v( Averages& )
const;
74 template<
int RANK,
bool IS_TIME_DEPENDENT>
82 typedef boost::ptr_list<Element> Collection;
84 typedef typename Base::KeyLabels KeyLabels;
87 typedef typename Base::LazyDensityOperator LazyDensityOperator;
89 typedef typename Base::Time Time;
95 Base*
const do_clone()
const {
return new Collecting(*
this);}
97 const Averages average_v(Time,
const LazyDensityOperator&)
const;
99 void process_v(Averages&)
const;
101 const Collection collection_;
107 template<
int RANKFROM,
int RANKTO,
bool IS_TIME_DEPENDENT>
118 typedef typename Base::LazyDensityOperator LazyDensityOperator;
120 typedef typename Base::Time Time;
125 Transferring(AveragedToPtr averaged,
const LazyDensityOperatorTo& ldo)
126 : averaged_(averaged), ldo_(ldo) {}
129 std::ostream& displayKey_v(std::ostream& os,
size_t& n)
const {
return averaged_->displayKey(os,n);}
131 void process_v(Averages& averages)
const {averaged_->process(averages);}
133 std::ostream& display_v(
const Averages& averages, std::ostream& os,
int n)
const {
return averaged_->display(averages,os,n);}
135 size_t nAvr_v()
const {
return averaged_->nAvr();}
137 const Averages average_v(Time t,
const LazyDensityOperator&)
const;
139 const AveragedToPtr averaged_;
140 const LazyDensityOperatorTo& ldo_;
148 #endif // CPPQEDELEMENTS_UTILS_AVERAGINGUTILS_H_INCLUDED
const Dimensions & getDimensions() const
ExtTiny< RANK > Dimensions
size_t getTotalDimension() const
LiouvilleanAveragedCommon::DArray1D Averages