ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
complexarray_test.cpp File Reference
#include "../complexarray.h"
#include "gtest/gtest.h"
#include "gmock/gmock.h"
Include dependency graph for complexarray_test.cpp:

Classes

class  ComplexArray_test
 

Namespaces

namespace  ModuleBase
 

Functions

void EXPECT_COMPLEX_EQUAL (const std::complex< double > &a, const std::complex< double > &b)
 
void ModuleBase::complexArrayxAlloc ()
 
 TEST (ComplexArray, constructor_bnd1234_test)
 
 TEST (ComplexArray, constructor_copy_test)
 
 TEST (ComplexArray, constructor_rvalue_test)
 
 TEST_F (ComplexArray_test, operator_equal_complex)
 
 TEST_F (ComplexArray_test, operator_equal_ComplexArray)
 
 TEST_F (ComplexArray_test, operator_equal_ComplexArray_rvalue)
 
 TEST_F (ComplexArray_test, operator_plus)
 
 TEST_F (ComplexArray_test, operator_plus_equal)
 
 TEST_F (ComplexArray_test, operator_minus)
 
 TEST_F (ComplexArray_test, operator_minus_equal)
 
 TEST_F (ComplexArray_test, operator_multiply_double)
 
 TEST_F (ComplexArray_test, operator_multiply_complex)
 
 TEST_F (ComplexArray_test, operator_multiply_equal_double)
 
 TEST_F (ComplexArray_test, operator_multiply_equal_complex)
 
 TEST_F (ComplexArray_test, operator_multiply_equal_ComplexArray)
 
 TEST_F (ComplexArray_test, operator_equalequal)
 
 TEST_F (ComplexArray_test, operator_notequal)
 
 TEST_F (ComplexArray_test, operator_parentheses)
 
 TEST_F (ComplexArray_test, zero_out)
 
 TEST_F (ComplexArray_test, negate)
 
 TEST (ComplexArray, randomize)
 
 TEST (ComplexArray, getBoundSize)
 
 TEST_F (ComplexArray_test, create)
 
 TEST_F (ComplexArray_test, operator_double_multiply)
 
 TEST_F (ComplexArray_test, operator_complex_multiply)
 
 TEST (ComplexArray, abs2)
 
 TEST (ComplexArray, dot)
 
 TEST_F (ComplexArray_test, scale_accumulate_double)
 
 TEST_F (ComplexArray_test, scale_accumulate_complex)
 
 TEST_F (ComplexArray_test, scaled_sum)
 
 TEST_F (ComplexArray_test, point_mult)
 
 TEST_F (ComplexArray_test, xAlloc)
 
 TEST_F (ComplexArray_test, scaled_sum_2)
 
 TEST_F (ComplexArray_test, operator_parentheses_const)
 

Function Documentation

◆ EXPECT_COMPLEX_EQUAL()

void EXPECT_COMPLEX_EQUAL ( const std::complex< double > &  a,
const std::complex< double > &  b 
)
  • Tested functions of class ComplexArray:

    • constructor:
      • ComplexArray(const int bnd1=0, const int bnd2=1, const int bnd3=1, const int bnd4=1)
      • ComplexArray(const ComplexArray &cd)
      • ComplexArray(ComplexArray &&cd)
    • operator "=":
      • assign a complex to all elements of a ComplexArray
      • assign a ComplexArray to another ComplexArray
      • rvalue reference to a ComplexArray
    • operator "+":
      • one ComplexArray plus another ComplexArray that has the same dimension.
      • throw error when one ComplexArray plus another ComplexArray that has different dimension.
    • operator "+=":
      • one ComplexArray plus another ComplexArray, and assign the value to first ComplexArray
      • throw error when one ComplexArray plus another ComplexArray that has different dimension.
    • operator "-":
      • one ComplexArray minus another ComplexArray that has the same dimension.
      • throw error when one ComplexArray minus another ComplexArray that has different dimension.
    • operator "-=":
      • one ComplexArray minus another ComplexArray, and assign the value to first ComplexArray
      • throw error when one ComplexArray minus another ComplexArray that has different dimension.
    • operator "*":
      • one ComplexArray is multiplied by a double
      • one ComplexArray is multiplied by a complex
      • one ComplexArray is multiplied by another ComplexArray that has same dimension
      • throw error when one ComplexArray is miltiplied by another ComplexArray that has different dimension.
    • operator "*=": similar as "*"
    • operator "==": judge if two ComplexArray is equal, all element is equal.
    • operator "!=": judge if two ComplexArray is not equal
    • oprator "()":
      • access the element
    • function zero_out, negate, randomize, getBound/Size, create.

    Test relative functions:

    • overloading of operator "*". a double/complex multiply a Class ComplexArray.
    • functon abs2(), return the sum of squares of all elements
    • function dot()
    • function scale_accumulate()
    • function scaled_sum()
    • function point_mult()
    • function complexArrayxAlloc
    • overloading of the function scaled_sum(). Does cd3 = c1*cd1 + c2*cd2. c1 and c2 are complex numbers.
    • overloading of operator "()". The operator is effectively overload by "const".
Here is the caller graph for this function:

◆ TEST() [1/7]

TEST ( ComplexArray  ,
abs2   
)

◆ TEST() [2/7]

TEST ( ComplexArray  ,
constructor_bnd1234_test   
)
Here is the call graph for this function:

◆ TEST() [3/7]

TEST ( ComplexArray  ,
constructor_copy_test   
)
Here is the call graph for this function:

◆ TEST() [4/7]

TEST ( ComplexArray  ,
constructor_rvalue_test   
)
Here is the call graph for this function:

◆ TEST() [5/7]

TEST ( ComplexArray  ,
dot   
)
Here is the call graph for this function:

◆ TEST() [6/7]

TEST ( ComplexArray  ,
getBoundSize   
)
Here is the call graph for this function:

◆ TEST() [7/7]

TEST ( ComplexArray  ,
randomize   
)
Here is the call graph for this function:

◆ TEST_F() [1/27]

TEST_F ( ComplexArray_test  ,
create   
)

◆ TEST_F() [2/27]

TEST_F ( ComplexArray_test  ,
negate   
)
Here is the call graph for this function:

◆ TEST_F() [3/27]

TEST_F ( ComplexArray_test  ,
operator_complex_multiply   
)
Here is the call graph for this function:

◆ TEST_F() [4/27]

TEST_F ( ComplexArray_test  ,
operator_double_multiply   
)
Here is the call graph for this function:

◆ TEST_F() [5/27]

TEST_F ( ComplexArray_test  ,
operator_equal_complex   
)
Here is the call graph for this function:

◆ TEST_F() [6/27]

TEST_F ( ComplexArray_test  ,
operator_equal_ComplexArray   
)
Here is the call graph for this function:

◆ TEST_F() [7/27]

TEST_F ( ComplexArray_test  ,
operator_equal_ComplexArray_rvalue   
)
Here is the call graph for this function:

◆ TEST_F() [8/27]

TEST_F ( ComplexArray_test  ,
operator_equalequal   
)

◆ TEST_F() [9/27]

TEST_F ( ComplexArray_test  ,
operator_minus   
)
Here is the call graph for this function:

◆ TEST_F() [10/27]

TEST_F ( ComplexArray_test  ,
operator_minus_equal   
)
Here is the call graph for this function:

◆ TEST_F() [11/27]

TEST_F ( ComplexArray_test  ,
operator_multiply_complex   
)
Here is the call graph for this function:

◆ TEST_F() [12/27]

TEST_F ( ComplexArray_test  ,
operator_multiply_double   
)
Here is the call graph for this function:

◆ TEST_F() [13/27]

TEST_F ( ComplexArray_test  ,
operator_multiply_equal_complex   
)
Here is the call graph for this function:

◆ TEST_F() [14/27]

TEST_F ( ComplexArray_test  ,
operator_multiply_equal_ComplexArray   
)
Here is the call graph for this function:

◆ TEST_F() [15/27]

TEST_F ( ComplexArray_test  ,
operator_multiply_equal_double   
)
Here is the call graph for this function:

◆ TEST_F() [16/27]

TEST_F ( ComplexArray_test  ,
operator_notequal   
)

◆ TEST_F() [17/27]

TEST_F ( ComplexArray_test  ,
operator_parentheses   
)
Here is the call graph for this function:

◆ TEST_F() [18/27]

TEST_F ( ComplexArray_test  ,
operator_parentheses_const   
)
Here is the call graph for this function:

◆ TEST_F() [19/27]

TEST_F ( ComplexArray_test  ,
operator_plus   
)
Here is the call graph for this function:

◆ TEST_F() [20/27]

TEST_F ( ComplexArray_test  ,
operator_plus_equal   
)
Here is the call graph for this function:

◆ TEST_F() [21/27]

TEST_F ( ComplexArray_test  ,
point_mult   
)
Here is the call graph for this function:

◆ TEST_F() [22/27]

TEST_F ( ComplexArray_test  ,
scale_accumulate_complex   
)
Here is the call graph for this function:

◆ TEST_F() [23/27]

TEST_F ( ComplexArray_test  ,
scale_accumulate_double   
)
Here is the call graph for this function:

◆ TEST_F() [24/27]

TEST_F ( ComplexArray_test  ,
scaled_sum   
)
Here is the call graph for this function:

◆ TEST_F() [25/27]

TEST_F ( ComplexArray_test  ,
scaled_sum_2   
)
Here is the call graph for this function:

◆ TEST_F() [26/27]

TEST_F ( ComplexArray_test  ,
xAlloc   
)
Here is the call graph for this function:

◆ TEST_F() [27/27]

TEST_F ( ComplexArray_test  ,
zero_out   
)
Here is the call graph for this function: