colorfull is hosted by Hepforge, IPPP Durham
ColorFull  1.1
/data/Documents/eclipse/workspace/ColorFull/Orthogonal_basis.h
Go to the documentation of this file.
1 /*
2  * Orthogonal_basis.h
3  * Contains the declarations of the class Orthogonal_basis, related types and operators.
4  * Created on: May 25, 2013
5  * Author: Malin Sjodahl
6  */
7 
8 #ifndef COLORFULL_Orthogonal_basis_h
9 #define COLORFULL_Orthogonal_basis_h
10 
11 
12 #include "Col_basis.h"
13 
14 
15 namespace ColorFull {
16 
23 
24 public:
28  orthogonal_basis = true;
29  }
30 
34 
38 
39 
40  /******************** Functions for scalar products **********************/
41 
45  void scalar_product_matrix();
46 
52  void diagonal_scalar_product_matrix( bool save_P_diagonal_spm, bool save_d_diagonal_spm, bool use_mem );
53 
57  Poly_vec decompose( const Col_amp & Ca );
58 
64  Polynomial scalar_product( const Col_amp & Ca1, const Col_amp & Ca2 );
65 
72  cnum scalar_product_num( const Col_amp & Ca1, const Col_amp & Ca2 );
73 
78  cnum scalar_product_num( const cvec & v1, const cvec & v2 );
79 
80 
81  /******************** Functions for reading and writing **********************/
82 
86  std::string diagonal_spm_file_name( const bool leading, const bool poly ) const;
87 
89  void write_out_diagonal_d_spm( std::string filename ) const;
90 
92  void write_out_diagonal_d_spm( ) const;
93 
95  void write_out_diagonal_P_spm( std::string filename ) const;
96 
98  void write_out_diagonal_P_spm( ) const;
99 
104  void write_out_diagonal_spm( const dvec & dv, const bool leading ) const;
105 
110  void write_out_diagonal_spm( const Poly_vec & pv, const bool leading ) const;
111 
112 private:
113 
120  void scalar_product_matrix( bool save_P_spm, bool save_d_spm, bool use_mem );
121 
122 
123 };// end class Orthogonal_basis
124 
125 }// end namespace ColorFull
126 
127 
128 #endif /* COLORFULL_Orthogonal_basis_h */
Orthogonal_basis()
Definition: Orthogonal_basis.h:27
Poly_vec decompose(const Col_amp &Ca)
Definition: Col_amp.h:24
void write_out_diagonal_d_spm() const
Writes out diagonal_d_spm to the standard filename, see diagonal_spm_file_name.
std::vector< cnum > cvec
A vector of complex numbers.
Definition: types.h:23
dvec diagonal_d_spm
Definition: Orthogonal_basis.h:33
Definition: Poly_vec.h:25
std::string diagonal_spm_file_name(const bool leading, const bool poly) const
Definition: Col_basis.h:24
Poly_vec diagonal_P_spm
Definition: Orthogonal_basis.h:37
Definition: Col_amp.h:15
Definition: Polynomial.h:30
void diagonal_scalar_product_matrix(bool save_P_diagonal_spm, bool save_d_diagonal_spm, bool use_mem)
void write_out_diagonal_spm(const dvec &dv, const bool leading) const
std::complex< double > cnum
A complex number, needed as amplitudes in general are complex.
Definition: types.h:20
std::vector< double > dvec
A vector of double numbers.
Definition: types.h:29
Definition: Orthogonal_basis.h:22
void write_out_diagonal_P_spm() const
Writes out diagonal_P_spm to the standard filename, see diagonal_spm_file_name.
cnum scalar_product_num(const Col_amp &Ca1, const Col_amp &Ca2)
Polynomial scalar_product(const Col_amp &Ca1, const Col_amp &Ca2)
bool orthogonal_basis
Definition: Col_basis.h:349