ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
LCAO_domain::ModuleBase::realArray Class Reference

double float array More...

Collaboration diagram for LCAO_domain::ModuleBase::realArray:

Public Member Functions

 realArray (const int d1=1, const int d2=1, const int d3=1)
 realArray (const int d1, const int d2, const int d3, const int d4)
 ~realArray ()
void create (const int d1, const int d2, const int d3)
 create 3 dimensional real array
void create (const int d1, const int d2, const int d3, const int d4)
 realArray (const realArray &cd)
const realArray & operator= (const realArray &right)
 Equal a realArray to another one.
const realArray & operator= (const double &right)
 Set all value of an array to a double float number.
double & operator() (const int d1, const int d2, const int d3)
 Access elements by using operator "()".
double & operator() (const int d1, const int d2, const int d3, const int d4)
const double & operator() (const int d1, const int d2, const int d3) const
 Access elements by using "()" through pointer without changing its elements.
const double & operator() (const int d1, const int d2, const int d3, const int d4) const
void zero_out (void)
 Set all elements of an IntArray to zero.
int getSize () const
 Get the Size object.
int getDim () const
 Get the Dim object i.e. the dimension of a real array.
int getBound1 () const
 Get the Bound1 object i.e. the first dimension size.
int getBound2 () const
int getBound3 () const
int getBound4 () const

Static Public Member Functions

static int getArrayCount (void)
 Get the Array Count object.

Public Attributes

double * ptr = nullptr

Private Member Functions

void freemem ()

Private Attributes

int size
int dim
int bound1
int bound2
int bound3
int bound4

Static Private Attributes

static int arrayCount

Detailed Description

double float array

Constructor & Destructor Documentation

◆ realArray() [1/3]

LCAO_domain::ModuleBase::realArray::realArray ( const int d1 = 1,
const int d2 = 1,
const int d3 = 1 )

◆ realArray() [2/3]

LCAO_domain::ModuleBase::realArray::realArray ( const int d1,
const int d2,
const int d3,
const int d4 )

◆ ~realArray()

LCAO_domain::ModuleBase::realArray::~realArray ( )

◆ realArray() [3/3]

LCAO_domain::ModuleBase::realArray::realArray ( const realArray & cd)

Member Function Documentation

◆ create() [1/2]

void LCAO_domain::ModuleBase::realArray::create ( const int d1,
const int d2,
const int d3 )

create 3 dimensional real array

Parameters
[in]d1The first dimension size
[in]d2The second dimension size
[in]d3The third dimension size

◆ create() [2/2]

void LCAO_domain::ModuleBase::realArray::create ( const int d1,
const int d2,
const int d3,
const int d4 )

◆ freemem()

void LCAO_domain::ModuleBase::realArray::freemem ( )
private

◆ getArrayCount()

int LCAO_domain::ModuleBase::realArray::getArrayCount ( void )
inlinestatic

Get the Array Count object.

Returns
int

◆ getBound1()

int LCAO_domain::ModuleBase::realArray::getBound1 ( ) const
inline

Get the Bound1 object i.e. the first dimension size.

Returns
int

◆ getBound2()

int LCAO_domain::ModuleBase::realArray::getBound2 ( ) const
inline

◆ getBound3()

int LCAO_domain::ModuleBase::realArray::getBound3 ( ) const
inline

◆ getBound4()

int LCAO_domain::ModuleBase::realArray::getBound4 ( ) const
inline

◆ getDim()

int LCAO_domain::ModuleBase::realArray::getDim ( ) const
inline

Get the Dim object i.e. the dimension of a real array.

Returns
int

◆ getSize()

int LCAO_domain::ModuleBase::realArray::getSize ( ) const
inline

Get the Size object.

Returns
int

◆ operator()() [1/4]

double & LCAO_domain::ModuleBase::realArray::operator() ( const int d1,
const int d2,
const int d3 )

Access elements by using operator "()".

Parameters
d1
d2
d3
Returns
double&

◆ operator()() [2/4]

const double & LCAO_domain::ModuleBase::realArray::operator() ( const int d1,
const int d2,
const int d3 ) const

Access elements by using "()" through pointer without changing its elements.

Parameters
d1
d2
d3
Returns
const double&

◆ operator()() [3/4]

double & LCAO_domain::ModuleBase::realArray::operator() ( const int d1,
const int d2,
const int d3,
const int d4 )

◆ operator()() [4/4]

const double & LCAO_domain::ModuleBase::realArray::operator() ( const int d1,
const int d2,
const int d3,
const int d4 ) const

◆ operator=() [1/2]

const realArray & LCAO_domain::ModuleBase::realArray::operator= ( const double & right)

Set all value of an array to a double float number.

Parameters
right
Returns
const realArray&

◆ operator=() [2/2]

const realArray & LCAO_domain::ModuleBase::realArray::operator= ( const realArray & right)

Equal a realArray to another one.

Parameters
right
Returns
const realArray&

◆ zero_out()

void LCAO_domain::ModuleBase::realArray::zero_out ( void )

Set all elements of an IntArray to zero.

Member Data Documentation

◆ arrayCount

int LCAO_domain::ModuleBase::realArray::arrayCount
staticprivate

◆ bound1

int LCAO_domain::ModuleBase::realArray::bound1
private

◆ bound2

int LCAO_domain::ModuleBase::realArray::bound2
private

◆ bound3

int LCAO_domain::ModuleBase::realArray::bound3
private

◆ bound4

int LCAO_domain::ModuleBase::realArray::bound4
private

◆ dim

int LCAO_domain::ModuleBase::realArray::dim
private

◆ ptr

double* LCAO_domain::ModuleBase::realArray::ptr = nullptr

◆ size

int LCAO_domain::ModuleBase::realArray::size
private

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