C++QEDCore  v2 Milestone 10
a framework for simulating open quantum dynamics – core
ComplexArrayExtensions.h
Go to the documentation of this file.
1 // Copyright András Vukics 2006–2014. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.txt)
2 // -*- C++ -*-
4 #ifndef CPPQEDCORE_UTILS_COMPLEXARRAYEXTENSIONS_H_INCLUDED
5 #define CPPQEDCORE_UTILS_COMPLEXARRAYEXTENSIONS_H_INCLUDED
6 
7 #include "BlitzArray.h"
8 #include "CMatrix.h"
9 #include "MathExtensions.h"
10 
11 #include<boost/mpl/bool.hpp>
12 
13 
14 namespace blitzplusplus {
15 
16 
17 inline double sqrAbs(const dcomp& c) {return mathutils::sqrAbs(c);}
18 
19 BZ_DECLARE_FUNCTION_RET(sqrAbs,double) ;
20 
21 
22 
23 template<int TWO_TIMES_RANK>
24 inline
25 void
26 hermitianConjugateSelf(CArray<TWO_TIMES_RANK>&);
27 
28 
29 template<int TWO_TIMES_RANK>
30 inline
32 hermitianConjugate(const CArray<TWO_TIMES_RANK>&);
33 
34 
36 
43 template<bool IS_MULTIPLICATION, int RANK1, int RANK2>
45 doDirect(const CArray<RANK1>&, const CArray<RANK2>&);
46 
47 
48 } // blitzplusplus
49 
50 
51 #endif // CPPQEDCORE_UTILS_COMPLEXARRAYEXTENSIONS_H_INCLUDED
blitz::Array< dcomp,RANK > CArray
A complex array of arbitrary arity.
Definition: BlitzArray.h:16
defines the typedef linalg::CMatrix and some helpers
Defines wrapper functions for mathematical functions taken from libraries, and several other mathemat...
const CArray< RANK1+RANK2 > doDirect(const CArray< RANK1 > &, const CArray< RANK2 > &)
Direct product/sum.
std::complex< double > dcomp
Double-precision complex number.
Comprises our own extensions to Blitz++.
Defines template aliases for real and complex arrays.