You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
2.7 KiB
C

/**
*
* @file FITKNumberComplex.h
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*
*/
#ifndef _FITK_COMPLEX_NUMBER_H___
#define _FITK_COMPLEX_NUMBER_H___
#include "FITKCoreAPI.h"
namespace Core
{
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
class FITKCoreAPI FITKNumberComplex
{
public:
/**
* @brief Construct a new FITKNumberComplex object
* @param[i] R
* @param[i] I
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
FITKNumberComplex(const double& R, const double & I);
/**
* @brief Construct a new FITKNumberComplex object
* @param[i] number
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
FITKNumberComplex(const FITKNumberComplex& number);
/**
* @brief Construct a new FITKNumberComplex object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
FITKNumberComplex() = default;
/**
* @brief Destroy the FITKNumberComplex object
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
virtual ~FITKNumberComplex() = default;
/**
* @brief
* @return double
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
double getReal() const;
/**
* @brief
* @param[i] r
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
void setReal(const double& r);
/**
* @brief
* @return double
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
double getImaginary() const;
/**
* @brief
* @param[i] i
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
void setImaginary(const double& i);
/**
* @brief
* @return double
* @author LiBaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
double getNorm() const;
private:
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
double _real{ 0 };
/**
* @brief
* @author libaojun (libaojunqd@foxmail.com)
* @date 2024-10-21
*/
double _imaginary{ 0 };
};
}
#endif