Initial quantum compute and cleaning up win server.
This commit is contained in:
parent
af50eea208
commit
5362b694e0
45 changed files with 884 additions and 429 deletions
12
plugins/math/CMakeLists.txt
Normal file
12
plugins/math/CMakeLists.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
set(PLUGIN_NAME ntk_math)
|
||||
|
||||
list(APPEND math_HEADERS ComplexNumber.h)
|
||||
|
||||
list(APPEND math_LIB_INCLUDES ComplexNumber.cpp)
|
||||
|
||||
add_library(${PLUGIN_NAME} SHARED ${math_LIB_INCLUDES} ${math_HEADERS})
|
||||
|
||||
target_include_directories(${PLUGIN_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_link_libraries(${PLUGIN_NAME} PUBLIC core)
|
||||
set_property(TARGET ${PLUGIN_NAME} PROPERTY FOLDER plugins)
|
||||
set_target_properties( ${PLUGIN_NAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON )
|
28
plugins/math/ComplexNumber.cpp
Normal file
28
plugins/math/ComplexNumber.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "ComplexNumber.h"
|
||||
|
||||
ComplexNumber::ComplexNumber(double real, double imaginary)
|
||||
: mReal(real),
|
||||
mImaginary(imaginary)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
double ComplexNumber::getReal() const
|
||||
{
|
||||
return mReal;
|
||||
}
|
||||
|
||||
double ComplexNumber::getImaginary() const
|
||||
{
|
||||
return mImaginary;
|
||||
}
|
||||
|
||||
void ComplexNumber::setReal(double value)
|
||||
{
|
||||
mReal = value;
|
||||
}
|
||||
|
||||
void ComplexNumber::setImaginary(double value)
|
||||
{
|
||||
mImaginary = value;
|
||||
}
|
19
plugins/math/ComplexNumber.h
Normal file
19
plugins/math/ComplexNumber.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
class ComplexNumber
|
||||
{
|
||||
public:
|
||||
ComplexNumber(double real = 0.0, double imaginary = 0.0);
|
||||
|
||||
double getReal() const;
|
||||
|
||||
double getImaginary() const;
|
||||
|
||||
void setReal(double value);
|
||||
|
||||
void setImaginary(double value);
|
||||
|
||||
private:
|
||||
double mReal{ 0.0 };
|
||||
double mImaginary{ 0.0 };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue