ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
ModuleBase::IntArray Class Reference

Integer array. More...

#include <intarray.h>

Collaboration diagram for ModuleBase::IntArray:

Public Member Functions

 IntArray (const int d1=1, const int d2=1)
 Construct a new Int Array object.
 
 IntArray (const int d1, const int d2, const int d3)
 
 IntArray (const int d1, const int d2, const int d3, const int d4)
 
 IntArray (const int d1, const int d2, const int d3, const int d4, const int d5)
 
 IntArray (const int d1, const int d2, const int d3, const int d4, const int d5, const int d6)
 
 ~IntArray ()
 
void create (const int d1, const int d2)
 Create integer arrays.
 
void create (const int d1, const int d2, const int d3)
 
void create (const int d1, const int d2, const int d3, const int d4)
 
void create (const int d1, const int d2, const int d3, const int d4, const int d5)
 
void create (const int d1, const int d2, const int d3, const int d4, const int d5, const int d6)
 
IntArrayoperator= (const IntArray &other)
 copy assignment
 
const IntArrayoperator= (const int &right)
 Equal all elements of an IntArray to an integer.
 
int & operator() (const int d1, const int d2)
 Access elements by using operator "()".
 
int & operator() (const int d1, const int d2, const int d3)
 
int & operator() (const int d1, const int d2, const int d3, const int d4)
 
int & operator() (const int d1, const int d2, const int d3, const int d4, const int d5)
 
int & operator() (const int d1, const int d2, const int d3, const int d4, const int d5, const int d6)
 
const int & operator() (const int d1, const int d2) const
 Access elements by using "()" through pointer without changing its elements.
 
const int & operator() (const int d1, const int d2, const int d3) const
 
const int & operator() (const int d1, const int d2, const int d3, const int d4) const
 
const int & operator() (const int d1, const int d2, const int d3, const int d4, const int d5) const
 
const int & operator() (const int d1, const int d2, const int d3, const int d4, const int d5, const int d6) const
 
void zero_out (void)
 Set all elements of an IntArray to zero.
 
int getSize () const
 
int getDim () const
 
int getBound1 () const
 
int getBound2 () const
 
int getBound3 () const
 
int getBound4 () const
 
int getBound5 () const
 
int getBound6 () const
 

Public Attributes

int * ptr
 

Private Member Functions

void freemem ()
 

Private Attributes

int size =0
 
int dim =0
 
int bound1 =0
 
int bound2 =0
 
int bound3 =0
 
int bound4 =0
 
int bound5 =0
 
int bound6 =0
 

Detailed Description

Integer array.

Constructor & Destructor Documentation

◆ IntArray() [1/5]

ModuleBase::IntArray::IntArray ( const int  d1 = 1,
const int  d2 = 1 
)

Construct a new Int Array object.

Parameters
d1The first dimension size
d2The second dimension size
Here is the call graph for this function:

◆ IntArray() [2/5]

ModuleBase::IntArray::IntArray ( const int  d1,
const int  d2,
const int  d3 
)
Here is the call graph for this function:

◆ IntArray() [3/5]

ModuleBase::IntArray::IntArray ( const int  d1,
const int  d2,
const int  d3,
const int  d4 
)
Here is the call graph for this function:

◆ IntArray() [4/5]

ModuleBase::IntArray::IntArray ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5 
)
Here is the call graph for this function:

◆ IntArray() [5/5]

ModuleBase::IntArray::IntArray ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5,
const int  d6 
)
Here is the call graph for this function:

◆ ~IntArray()

ModuleBase::IntArray::~IntArray ( )

Member Function Documentation

◆ create() [1/5]

void ModuleBase::IntArray::create ( const int  d1,
const int  d2 
)

Create integer arrays.

Parameters
[in]d1
[in]d2
Here is the call graph for this function:
Here is the caller graph for this function:

◆ create() [2/5]

void ModuleBase::IntArray::create ( const int  d1,
const int  d2,
const int  d3 
)
Here is the call graph for this function:

◆ create() [3/5]

void ModuleBase::IntArray::create ( const int  d1,
const int  d2,
const int  d3,
const int  d4 
)
Here is the call graph for this function:

◆ create() [4/5]

void ModuleBase::IntArray::create ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5 
)
Here is the call graph for this function:

◆ create() [5/5]

void ModuleBase::IntArray::create ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5,
const int  d6 
)
Here is the call graph for this function:

◆ freemem()

void ModuleBase::IntArray::freemem ( )
private

◆ getBound1()

int ModuleBase::IntArray::getBound1 ( ) const
inline
Here is the caller graph for this function:

◆ getBound2()

int ModuleBase::IntArray::getBound2 ( ) const
inline
Here is the caller graph for this function:

◆ getBound3()

int ModuleBase::IntArray::getBound3 ( ) const
inline
Here is the caller graph for this function:

◆ getBound4()

int ModuleBase::IntArray::getBound4 ( ) const
inline
Here is the caller graph for this function:

◆ getBound5()

int ModuleBase::IntArray::getBound5 ( ) const
inline
Here is the caller graph for this function:

◆ getBound6()

int ModuleBase::IntArray::getBound6 ( ) const
inline
Here is the caller graph for this function:

◆ getDim()

int ModuleBase::IntArray::getDim ( ) const
inline

◆ getSize()

int ModuleBase::IntArray::getSize ( ) const
inline
Here is the caller graph for this function:

◆ operator()() [1/10]

int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2 
)
inline

Access elements by using operator "()".

Parameters
d1
d2
Returns
int&

◆ operator()() [2/10]

const int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2 
) const
inline

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

Parameters
d1
d2
Returns
const int&

◆ operator()() [3/10]

int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3 
)
inline

◆ operator()() [4/10]

const int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3 
) const
inline

◆ operator()() [5/10]

int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3,
const int  d4 
)
inline

◆ operator()() [6/10]

const int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3,
const int  d4 
) const
inline

◆ operator()() [7/10]

int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5 
)
inline

◆ operator()() [8/10]

const int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5 
) const
inline

◆ operator()() [9/10]

int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5,
const int  d6 
)
inline

◆ operator()() [10/10]

const int & ModuleBase::IntArray::operator() ( const int  d1,
const int  d2,
const int  d3,
const int  d4,
const int  d5,
const int  d6 
) const
inline

◆ operator=() [1/2]

const IntArray & ModuleBase::IntArray::operator= ( const int &  right)
inline

Equal all elements of an IntArray to an integer.

Parameters
right
Returns
const IntArray&

◆ operator=() [2/2]

IntArray & ModuleBase::IntArray::operator= ( const IntArray other)
inline

copy assignment

Parameters
right
Returns
const IntArray&

◆ zero_out()

void ModuleBase::IntArray::zero_out ( void  )

Set all elements of an IntArray to zero.

Here is the caller graph for this function:

Member Data Documentation

◆ bound1

int ModuleBase::IntArray::bound1 =0
private

◆ bound2

int ModuleBase::IntArray::bound2 =0
private

◆ bound3

int ModuleBase::IntArray::bound3 =0
private

◆ bound4

int ModuleBase::IntArray::bound4 =0
private

◆ bound5

int ModuleBase::IntArray::bound5 =0
private

◆ bound6

int ModuleBase::IntArray::bound6 =0
private

◆ dim

int ModuleBase::IntArray::dim =0
private

◆ ptr

int* ModuleBase::IntArray::ptr

◆ size

int ModuleBase::IntArray::size =0
private

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