C++QEDCore  2.100.2 (v2 Milestone 10 Development branch)
a framework for simulating open quantum dynamics – core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
quantumdata::ArrayBase< RANK > Class Template Reference

Comprises the common functionalities of StateVector and DensityOperator. More...

#include <ArrayBase.h>

+ Inheritance diagram for quantumdata::ArrayBase< RANK >:
+ Collaboration diagram for quantumdata::ArrayBase< RANK >:

Protected Types

typedef CArray< RANK > ArrayLow
 The underlying storage.
 
typedef linalg::CVector CVector
 

Protected Member Functions

 ArrayBase (const ArrayLow &arrayLow)
 By-reference semantics (basically the copy of a blitz::Array). Apart from this, copying is not possible.
 
ArrayBaseoperator= (const ArrayLow &arrayLow)
 Assignment with by-value semantics (like the assignment of a blitz::Array). More...
 
double frobeniusNorm () const
 The entrywise array norm. More...
 
The underlying ArrayLow
const ArrayLowgetArray () const
 
ArrayLowgetArray ()
 
Naive vector-space operations
void operator+= (const ArrayBase &arrayBase)
 
void operator-= (const ArrayBase &arrayBase)
 
Naive vector-space operations allowing also for mixed-mode arithmetic
template<typename OTHER >
void operator*= (const OTHER &dc)
 
template<typename OTHER >
void operator/= (const OTHER &dc)
 
One-dimensional view of the underlying data
const CVector vectorView () const
 1d view created on the fly via blitzplusplus::unaryArray. More...
 
CVector vectorView ()
 
 

Detailed Description

template<int RANK>
class quantumdata::ArrayBase< RANK >

Comprises the common functionalities of StateVector and DensityOperator.

Definition at line 21 of file ArrayBase.h.

Member Function Documentation

template<int RANK>
double quantumdata::ArrayBase< RANK >::frobeniusNorm ( ) const
inlineprotected

The entrywise array norm.

\[\norm A _{\text{F}}=\sqrt{\sum_i\,\abs{A_i}^2},\]

with $i$ running through all the multi-indices.

Definition at line 76 of file ArrayBase.h.

template<int RANK>
ArrayBase& quantumdata::ArrayBase< RANK >::operator= ( const ArrayLow arrayLow)
inlineprotected

Assignment with by-value semantics (like the assignment of a blitz::Array).

Default assignment synthetised by the compiler ditto.

Definition at line 35 of file ArrayBase.h.

template<int RANK>
const CVector quantumdata::ArrayBase< RANK >::vectorView ( ) const
inlineprotected

1d view created on the fly via blitzplusplus::unaryArray.

Note
This is meant to be used only if the underlying storage is contiguous, which may not be the case since the object may reference arrays of any layout. In debug mode, a non-contiguous storage is detected by the implementing function blitzplusplus::unaryArray, and an exception of type blitzplusplus::NonContiguousStorageException is thrown.

Definition at line 66 of file ArrayBase.h.


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