71 return iterator !=
getMixerMap()->end() ? iterator->second(algorithm)
76 static std::map<std::string,
82 new std::map<std::string,
98template <
typename F,
typename MixerType>
100 return NEW(MixerType, algorithm);
108template <
typename F,
typename MixerType>
127#define MIXER_REGISTRAR_DECLARATION(NAME) \
128 virtual std::string getName() { return #NAME; } \
129 static MixerRegistrar<F, NAME<F>> registrar_
137#define MIXER_REGISTRAR_DEFINITION(NAME) \
138 template <typename F> \
139 MixerRegistrar<F, NAME<F>> NAME<F>::registrar_(#NAME)
#define NEW(TYPE,...)
Definition SharedPointer.hpp:10
#define PTR(TYPE)
Definition SharedPointer.hpp:8
Definition Algorithm.hpp:26
Represents the direct sum of Tensors and provides the vector space operations of addition,...
Definition FockVector.hpp:26
static std::map< std::string, std::function< std::shared_ptr< Mixer< F > >(Algorithm *algorithm)> > * getMixerMap()
Definition Mixer.hpp:78
static std::shared_ptr< Mixer< F > > create(std::string const &name, Algorithm *algorithm)
Creates a mixer object of the mixer type specified by the given name. The instantiated mixer must be ...
Definition Mixer.hpp:69
static std::map< std::string, std::function< std::shared_ptr< Mixer< F > >(Algorithm *)> > * mixerMap
Definition Mixer.hpp:86
Class to be statically instantiated by a mixer to register it in the MixerFactory....
Definition Mixer.hpp:109
MixerRegistrar(std::string const &name)
Constructs the registrating instance. The mixer type must be given as template argument,...
Definition Mixer.hpp:116
virtual void append(const std::shared_ptr< FockVector< F > > &A, const std::shared_ptr< FockVector< F > > &R)=0
Appends the given pair (A,R) of FockVectors to the mixer, where R is the residuum when using the ampl...
Algorithm * algorithm
Definition Mixer.hpp:50
virtual ~Mixer()
Definition Mixer.cxx:11
virtual std::shared_ptr< const FockVector< F > > getResiduum()=0
Returns the estimated residuum of the current best estimate of the amplitdues according to previously...
virtual std::shared_ptr< const FockVector< F > > get()=0
Returns the current best estimate of the amplitudes according to previously given pairs of amplitudes...
virtual std::string getName()=0
Returns the name of the implenting mixer.
Definition Algorithm.hpp:10
std::shared_ptr< Mixer< F > > createMixer(Algorithm *algorithm)
template function creating an instance of the given class.
Definition Mixer.hpp:99