MINT2
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MINT::ComplexProduct Class Reference

#include <ComplexProduct.h>

Inheritance diagram for MINT::ComplexProduct:
MINT::IComplexFitParDependent MINT::FitParDependent MINT::IReturnComplex MINT::IFitParDependent MINT::IFitParRegister MINT::PolymorphVector< FitParRef > MINT::IFitParDependent

Public Member Functions

 ComplexProduct (IFitParRegister *daddy=0)
 
 ComplexProduct (double initVal, IFitParRegister *daddy=0)
 
 ComplexProduct (const std::complex< double > &z, IFitParRegister *daddy=0)
 
 ComplexProduct (const ComplexProduct &other, IFitParRegister *newDaddy=0)
 
void multiply (const ComplexProduct &multiplyWith)
 
void addTerm (double val)
 
void addTerm (const std::complex< double > &z)
 
void addTerm (const counted_ptr< IReturnComplex > &irc)
 
void addTerm (const counted_ptr< IComplexFitParDependent > &irc)
 
ComplexProductoperator *= (double val)
 
ComplexProductoperator *= (const std::complex< double > &z)
 
ComplexProductoperator *= (const counted_ptr< IComplexFitParDependent > &irc)
 
ComplexProductoperator *= (const counted_ptr< IReturnComplex > &irc)
 
ComplexProductoperator *= (const ComplexProduct &cp)
 
std::complex< double > ComplexVal ()
 
- Public Member Functions inherited from MINT::IReturnComplex
virtual ~IReturnComplex ()
 
- Public Member Functions inherited from MINT::FitParDependent
virtual unsigned int size () const
 
virtual const FitParRefoperator[] (unsigned int i) const
 
virtual FitParRefoperator[] (unsigned int i)
 
virtual bool changedSinceLastCall () const
 
virtual void rememberFitParValues ()
 
virtual bool registerFitParDependence (const IFitParDependent &fpd)
 
bool registerFitParDependence (const FitParRef &fpr)
 
void removeAllFitParDependencies ()
 
 FitParDependent (IFitParRegister *daddy=0)
 
 FitParDependent (const FitParDependent &other, IFitParRegister *newDaddy=0)
 
void listFitParDependencies (std::ostream &os=std::cout) const
 
- Public Member Functions inherited from MINT::PolymorphVector< FitParRef >
 PolymorphVector ()
 
 PolymorphVector (unsigned int N)
 
 PolymorphVector (unsigned int N, const FitParRef &c)
 
 PolymorphVector (const PolymorphVector &other)
 
 PolymorphVector (const typename std::vector< FitParRef > &other)
 
virtual ~PolymorphVector ()
 
std::vector< FitParRef > & theVector ()
 
const std::vector< FitParRef > & theVector () const
 
FitParRefoperator[] (unsigned int i)
 
const FitParRefoperator[] (unsigned int i) const
 
FitParRefat (unsigned int i)
 
const FitParRefat (unsigned int i) const
 
std::vector< FitParRef >::iterator begin ()
 
std::vector< FitParRef >::const_iterator begin () const
 
std::vector< FitParRef >::iterator end ()
 
std::vector< FitParRef >::const_iterator end () const
 
std::vector< FitParRef >::iterator find (const FitParRef &c)
 
std::vector< FitParRef >::const_iterator find (const FitParRef &c) const
 
FitParReffront ()
 
const FitParReffront () const
 
FitParRefback ()
 
const FitParRefback () const
 
unsigned int size () const
 
bool empty () const
 
void push_back (const FitParRef &c)
 
void pop_back ()
 
void erase (typename std::vector< FitParRef >::iterator pos)
 
void erase (typename std::vector< FitParRef >::iterator first, typename std::vector< FitParRef >::iterator last)
 
PolymorphVector< FitParRef > & operator= (const PolymorphVector< FitParRef > &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const FitParRef &c)
 
 operator const typename std::vector< FitParRef > & () const
 
 operator typename std::vector< FitParRef > & ()
 
bool operator== (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator!= (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator< (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator> (const MINT::PolymorphVector< FitParRef > &v2) const
 

Protected Member Functions

double fixedRealProduct ()
 
std::complex< double > fixedComplexProduct ()
 
std::complex< double > complexProduct ()
 
void setToUnity ()
 
- Protected Member Functions inherited from MINT::IReturnComplex
 IReturnComplex ()
 

Protected Attributes

std::vector< counted_ptr< IReturnComplex > > _facVec
 
std::vector< double > _fixedDoubleVec
 
std::vector< std::complex< double > > _fixedComplexVec
 
- Protected Attributes inherited from MINT::PolymorphVector< FitParRef >
std::vector< FitParRef_vec
 

Detailed Description

Definition at line 14 of file ComplexProduct.h.

Constructor & Destructor Documentation

◆ ComplexProduct() [1/4]

ComplexProduct::ComplexProduct ( IFitParRegister daddy = 0)

Definition at line 8 of file ComplexProduct.cpp.

10 {
11 }
FitParDependent(IFitParRegister *daddy=0)
std::vector< double > _fixedDoubleVec
std::vector< counted_ptr< IReturnComplex > > _facVec
std::vector< std::complex< double > > _fixedComplexVec

◆ ComplexProduct() [2/4]

ComplexProduct::ComplexProduct ( double  initVal,
IFitParRegister daddy = 0 
)

Definition at line 12 of file ComplexProduct.cpp.

14 {
15  addTerm(initVal);
16 }
FitParDependent(IFitParRegister *daddy=0)
std::vector< double > _fixedDoubleVec
void addTerm(double val)
std::vector< counted_ptr< IReturnComplex > > _facVec
std::vector< std::complex< double > > _fixedComplexVec

◆ ComplexProduct() [3/4]

ComplexProduct::ComplexProduct ( const std::complex< double > &  z,
IFitParRegister daddy = 0 
)

Definition at line 18 of file ComplexProduct.cpp.

20 {
21  addTerm(z);
22 }
FitParDependent(IFitParRegister *daddy=0)
std::vector< double > _fixedDoubleVec
void addTerm(double val)
std::vector< counted_ptr< IReturnComplex > > _facVec
std::vector< std::complex< double > > _fixedComplexVec

◆ ComplexProduct() [4/4]

ComplexProduct::ComplexProduct ( const ComplexProduct other,
IFitParRegister newDaddy = 0 
)

Definition at line 24 of file ComplexProduct.cpp.

25  : FitParDependent(other, newDaddy)
26  , _facVec(other._facVec)
29 {
30 }
FitParDependent(IFitParRegister *daddy=0)
std::vector< double > _fixedDoubleVec
std::vector< counted_ptr< IReturnComplex > > _facVec
std::vector< std::complex< double > > _fixedComplexVec

Member Function Documentation

◆ addTerm() [1/4]

void ComplexProduct::addTerm ( double  val)

Definition at line 55 of file ComplexProduct.cpp.

55  {
56  _fixedDoubleVec.push_back(val);
57 }
std::vector< double > _fixedDoubleVec

◆ addTerm() [2/4]

void ComplexProduct::addTerm ( const std::complex< double > &  z)

Definition at line 59 of file ComplexProduct.cpp.

59  {
60  // counted_ptr<IReturnComplex> bz(new BasicComplex(z));
61  // addTerm(bz);
62  _fixedComplexVec.push_back(z);
63 }
std::vector< std::complex< double > > _fixedComplexVec

◆ addTerm() [3/4]

void ComplexProduct::addTerm ( const counted_ptr< IReturnComplex > &  irc)

Definition at line 76 of file ComplexProduct.cpp.

76  {
77  bool dbThis=false;
78  _facVec.push_back(irc);
79  if(dbThis){
80  cout << "ComplexProduct::addTerm as pointer"
81  << " just got: " << irc->ComplexVal()
82  << " taking me to prod = " << ComplexVal()
83  << endl;
84  }
85 }
virtual std::complex< double > ComplexVal()=0
std::complex< double > ComplexVal()
std::vector< counted_ptr< IReturnComplex > > _facVec

◆ addTerm() [4/4]

void ComplexProduct::addTerm ( const counted_ptr< IComplexFitParDependent > &  irc)

Definition at line 65 of file ComplexProduct.cpp.

65  {
66  bool dbThis=false;
68  _facVec.push_back(irc);
69  if(dbThis){
70  cout << "ComplexProduct::addTerm as pointer"
71  << " just got: " << irc->ComplexVal()
72  << " taking me to prod = " << ComplexVal()
73  << endl;
74  }
75 }
virtual std::complex< double > ComplexVal()=0
std::complex< double > ComplexVal()
virtual bool registerFitParDependence(const IFitParDependent &fpd)
std::vector< counted_ptr< IReturnComplex > > _facVec

◆ complexProduct()

std::complex<double> MINT::ComplexProduct::complexProduct ( )
inlineprotected

Definition at line 35 of file ComplexProduct.h.

35  {
36  std::complex<double> prod(1,0);
37  for(unsigned i = 0; i < _facVec.size(); i++){
38  prod *= (_facVec[i])->ComplexVal();
39  }
40  return prod;
41  }
std::complex< double > ComplexVal()
std::vector< counted_ptr< IReturnComplex > > _facVec

◆ ComplexVal()

std::complex<double> MINT::ComplexProduct::ComplexVal ( )
inlinevirtual

Implements MINT::IReturnComplex.

Definition at line 64 of file ComplexProduct.h.

64  {
66  }
std::complex< double > fixedComplexProduct()
std::complex< double > complexProduct()

◆ fixedComplexProduct()

std::complex<double> MINT::ComplexProduct::fixedComplexProduct ( )
inlineprotected

Definition at line 27 of file ComplexProduct.h.

27  {
28  std::complex<double> prod(1, 0);
29  for(unsigned i = 0; i < _fixedComplexVec.size(); i++){
30  prod *= _fixedComplexVec[i];
31  }
32  return prod;
33  }
std::vector< std::complex< double > > _fixedComplexVec

◆ fixedRealProduct()

double MINT::ComplexProduct::fixedRealProduct ( )
inlineprotected

Definition at line 20 of file ComplexProduct.h.

20  {
21  double prod(1);
22  for(unsigned i = 0; i < _fixedDoubleVec.size(); i++){
23  prod *= _fixedDoubleVec[i];
24  }
25  return prod;
26  }
std::vector< double > _fixedDoubleVec

◆ multiply()

void ComplexProduct::multiply ( const ComplexProduct multiplyWith)

Definition at line 40 of file ComplexProduct.cpp.

41 {
42  registerFitParDependence(multiplyWith);
43  for(unsigned int i=0; i< multiplyWith._facVec.size(); i++){
44  addTerm(multiplyWith._facVec[i]);
45  }
46  for(unsigned int i=0; i< multiplyWith._fixedDoubleVec.size(); i++){
47  addTerm(multiplyWith._fixedDoubleVec[i]);
48  }
49  for(unsigned int i=0; i< multiplyWith._fixedComplexVec.size(); i++){
50  addTerm(multiplyWith._fixedComplexVec[i]);
51  }
52 }
std::vector< double > _fixedDoubleVec
virtual bool registerFitParDependence(const IFitParDependent &fpd)
void addTerm(double val)
std::vector< counted_ptr< IReturnComplex > > _facVec
std::vector< std::complex< double > > _fixedComplexVec

◆ operator *=() [1/5]

ComplexProduct & ComplexProduct::operator *= ( double  val)

Definition at line 87 of file ComplexProduct.cpp.

87  {
88  addTerm(val);
89  return *this;
90 }
void addTerm(double val)

◆ operator *=() [2/5]

ComplexProduct & ComplexProduct::operator *= ( const std::complex< double > &  z)

Definition at line 91 of file ComplexProduct.cpp.

91  {
92  addTerm(z);
93  return *this;
94 }
void addTerm(double val)

◆ operator *=() [3/5]

ComplexProduct& MINT::ComplexProduct::operator *= ( const counted_ptr< IComplexFitParDependent > &  irc)

◆ operator *=() [4/5]

ComplexProduct & ComplexProduct::operator *= ( const counted_ptr< IReturnComplex > &  irc)

Definition at line 95 of file ComplexProduct.cpp.

96  {
97  addTerm(irc);
98  return *this;
99 }
void addTerm(double val)

◆ operator *=() [5/5]

ComplexProduct & ComplexProduct::operator *= ( const ComplexProduct cp)

Definition at line 101 of file ComplexProduct.cpp.

101  {
102  multiply(cp);
103  return *this;
104 }
void multiply(const ComplexProduct &multiplyWith)

◆ setToUnity()

void ComplexProduct::setToUnity ( )
protected

Definition at line 32 of file ComplexProduct.cpp.

32  {
33  _facVec.clear();
34  _fixedDoubleVec.clear();
35  _fixedComplexVec.clear();
37 }
std::vector< double > _fixedDoubleVec
std::vector< counted_ptr< IReturnComplex > > _facVec
std::vector< std::complex< double > > _fixedComplexVec

Member Data Documentation

◆ _facVec

std::vector< counted_ptr<IReturnComplex> > MINT::ComplexProduct::_facVec
protected

Definition at line 16 of file ComplexProduct.h.

◆ _fixedComplexVec

std::vector< std::complex<double> > MINT::ComplexProduct::_fixedComplexVec
protected

Definition at line 18 of file ComplexProduct.h.

◆ _fixedDoubleVec

std::vector< double > MINT::ComplexProduct::_fixedDoubleVec
protected

Definition at line 17 of file ComplexProduct.h.


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