|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
A basic type of data for complex array. More...
#include <complexarray.h>
Public Member Functions | |
| ComplexArray (const int bnd1=0, const int bnd2=1, const int bnd3=1, const int bnd4=1) | |
| ~ComplexArray () | |
| void | freemem () |
| void | create (const int bnd1=0, const int bnd2=1, const int bnd3=1, const int bnd4=1) |
| ComplexArray (const ComplexArray &cd) | |
| ComplexArray (ComplexArray &&cd) | |
| ComplexArray & | operator= (ComplexArray &&cd) |
| ComplexArray & | operator= (const ComplexArray &cd) |
| void | operator= (std::complex< double > c) |
| Assignment of scalar: all entries set to c. | |
| ComplexArray | operator+ (const ComplexArray &cd) |
| Add two ComplexArray. | |
| void | operator+= (const ComplexArray &cd) |
| Accumulate sum of ComplexArray. | |
| ComplexArray | operator- (const ComplexArray &cd) |
| Subtract two ComplexArray. | |
| void | operator-= (const ComplexArray &cd) |
| Accumulate difference of arrays. | |
| ComplexArray | operator* (const double r) |
| Scale a ComplexArray by real r. | |
| ComplexArray | operator* (const std::complex< double > c) |
| Scale a ComplexArray by a std::complex number c. | |
| void | operator*= (const double r) |
| Scale a ComplexArray by real number in place. | |
| void | operator*= (const std::complex< double > c) |
| Scale a ComplexArray by std::complex c in place. | |
| void | operator*= (const ComplexArray &cd) |
| accumulate pointwise multiply | |
| bool | operator== (const ComplexArray &cd2) const |
| Judge if two ComplexArray is equal. | |
| bool | operator!= (const ComplexArray &cd2) const |
| Judge if two ComplexArray is not equal. | |
| std::complex< double > & | operator() (const int ind1=0, const int ind2=0, const int ind3=0, const int ind4=0) |
| overloaded subscript operator for non-const std::complex Array const reference return creates an lvakue | |
| const std::complex< double > & | operator() (const int ind1=0, const int ind2=0, const int ind3=0, const int ind4=0) const |
| overloaded subscript operator for const std::complex Array const reference return creates an cvakue | |
| void | zero_out (void) |
| set all elements to be {0.0,0.0} | |
| void | negate (void) |
| Negates all the entries in the array. | |
| void | randomize (void) |
| set all elements to a random number whose real/image is between [-0.5,0.5). | |
| int | getBound1 () const |
| int | getBound2 () const |
| int | getBound3 () const |
| int | getBound4 () const |
| int | getSize () const |
Public Attributes | |
| std::complex< double > * | ptr =nullptr |
Private Member Functions | |
| void | init (const int size) |
Private Attributes | |
| int | bound1 |
| int | bound2 |
| int | bound3 |
| int | bound4 |
A basic type of data for complex array.
| ModuleBase::ComplexArray::ComplexArray | ( | const int | bnd1 = 0, |
| const int | bnd2 = 1, |
||
| const int | bnd3 = 1, |
||
| const int | bnd4 = 1 |
||
| ) |
| ModuleBase::ComplexArray::~ComplexArray | ( | ) |
| ModuleBase::ComplexArray::ComplexArray | ( | const ComplexArray & | cd | ) |
| ModuleBase::ComplexArray::ComplexArray | ( | ComplexArray && | cd | ) |
| void ModuleBase::ComplexArray::create | ( | const int | bnd1 = 0, |
| const int | bnd2 = 1, |
||
| const int | bnd3 = 1, |
||
| const int | bnd4 = 1 |
||
| ) |
| void ModuleBase::ComplexArray::freemem | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
| void ModuleBase::ComplexArray::negate | ( | void | ) |
Negates all the entries in the array.
| bool ModuleBase::ComplexArray::operator!= | ( | const ComplexArray & | cd2 | ) | const |
|
inline |
overloaded subscript operator for non-const std::complex Array const reference return creates an lvakue
|
inline |
overloaded subscript operator for const std::complex Array const reference return creates an cvakue
| ComplexArray ModuleBase::ComplexArray::operator* | ( | const double | r | ) |
| ComplexArray ModuleBase::ComplexArray::operator* | ( | const std::complex< double > | c | ) |
| void ModuleBase::ComplexArray::operator*= | ( | const ComplexArray & | cd | ) |
accumulate pointwise multiply
| void ModuleBase::ComplexArray::operator*= | ( | const double | r | ) |
| void ModuleBase::ComplexArray::operator*= | ( | const std::complex< double > | c | ) |
| ComplexArray ModuleBase::ComplexArray::operator+ | ( | const ComplexArray & | cd | ) |
| void ModuleBase::ComplexArray::operator+= | ( | const ComplexArray & | cd | ) |
| ComplexArray ModuleBase::ComplexArray::operator- | ( | const ComplexArray & | cd | ) |
| void ModuleBase::ComplexArray::operator-= | ( | const ComplexArray & | cd | ) |
Accumulate difference of arrays.
| ComplexArray & ModuleBase::ComplexArray::operator= | ( | ComplexArray && | cd | ) |
| ComplexArray & ModuleBase::ComplexArray::operator= | ( | const ComplexArray & | cd | ) |
| void ModuleBase::ComplexArray::operator= | ( | std::complex< double > | c | ) |
Assignment of scalar: all entries set to c.
| bool ModuleBase::ComplexArray::operator== | ( | const ComplexArray & | cd2 | ) | const |
| void ModuleBase::ComplexArray::randomize | ( | void | ) |
set all elements to a random number whose real/image is between [-0.5,0.5).
| void ModuleBase::ComplexArray::zero_out | ( | void | ) |
set all elements to be {0.0,0.0}
|
private |
|
private |
|
private |
|
private |
| std::complex<double>* ModuleBase::ComplexArray::ptr =nullptr |