4 #ifndef CPPQEDCORE_STRUCTURE_INTERACTION_H_INCLUDED
5 #define CPPQEDCORE_STRUCTURE_INTERACTION_H_INCLUDED
7 #include "InteractionFwd.h"
15 #include <boost/bind.hpp>
17 #include <boost/range/adaptor/transformed.hpp>
18 #include <boost/range/algorithm/copy.hpp>
41 typedef boost::shared_ptr<const Interaction> Ptr;
45 typedef blitz::TinyVector<Free::Ptr,RANK>
Frees;
57 Interaction(
const Frees& frees, RealFreqsInitializer rf, ComplexFreqsInitializer cf={}) : Interaction(frees,
RealFreqs(rf),
ComplexFreqs(cf)) {}
58 Interaction(
const Frees& frees, ComplexFreqsInitializer cf) : Interaction(frees,RealFreqsInitializer(),cf) {}
59 Interaction(
const Frees& frees,
RF rf,
CF cf=
CF()) : Interaction(frees,RealFreqsInitializer{rf}, cf==
CF() ? ComplexFreqsInitializer{} : ComplexFreqsInitializer{cf}) {}
60 Interaction(
const Frees& frees,
CF cf) : Interaction(frees,ComplexFreqsInitializer{cf}) {}
61 Interaction(
const Frees& frees, RealFreqsInitializer rf,
CF cf) : Interaction(frees,rf,{cf}) {}
62 Interaction(
const Frees& frees,
RF rf, ComplexFreqsInitializer cf) : Interaction(frees,{rf},cf) {}
64 template<
typename F0,
typename F1,
typename... RCF_type>
65 Interaction(
const F0& f0,
const F1& f1,
const RCF_type&... realAndComplexFreqs)
68 const Frees& getFrees()
const {
return frees_;}
75 template<
typename... Pack>
78 operator const Frees&()
const {
return frees_;}
85 static const Dimensions extractDimensions(
const Frees& frees)
99 #endif // CPPQEDCORE_STRUCTURE_INTERACTION_H_INCLUDED
Defines class of the same name.
blitz::TinyVector< Free::Ptr, RANK > Frees
A tiny vector of shared pointers to the Free objects between which the interaction is defined...
Describes interaction of Free elements.
std::tuple< std::string, dcomp,double > CF
same for complex
Namespace comprising otherwise hard-to-classify generic utilities.
const boost::shared_ptr< T > sharedPointerize(boost::shared_ptr< T > t)
Part of a bundle of functions providing a unified interface to wrap objects into the shared-pointer i...
std::list< CF > ComplexFreqs
same for complex
Shared-pointerizes the elements passed as Frees.
Comprises modules for describing quantum systems.
Stores and manipulates dimensions of constructs over composite Hilbert spaces of arbitrary arity...
Provides services for dealing with frequency-like parameters, both real and complex, for all elements, frees and interactions alike, which are hence all derived from this class.
Defines class of the same name.
std::list< RF > RealFreqs
list of real frequency-like parameters
Defines template aliases for blitz::TinyVectors used for characterising the size of multi-arrays and ...
Tools for creating non-owning shared pointers.
std::tuple< std::string, double, double > RF
name-value-multiplier tuple for a real frequency-like parameter
blitz::TinyVector< F, RANK > FreesTemplate
F must be convertible to Free::Ptr by cpputils::sharedPointerize
size_t getTotalDimension() const
Get the total dimension of a system of arbitrary arity.