diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 5d9871f..7cef3e8 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,8 @@ - + + @@ -12,12 +13,433 @@ + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -66,12 +489,21 @@ - - + + + + + + + + + + @@ -120,6 +552,7 @@ + diff --git a/CMakeLists.txt b/CMakeLists.txt index f8881ff..5d92e84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,71 +1,14 @@ cmake_minimum_required(VERSION 3.11) -project(General) -set(MINGW_PATH $ENV{MINGW_TOOLCHAIN}) -message("path is " ${MINGW_PATH}) -message( "libevent path " ${CONAN_LIBEVENT_ROOT}) -message( "current compiler " ${CMAKE_CXX_COMPILER_ID}) +project(generallib) +add_subdirectory(general) -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - # using Clang -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # using GCC -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") - # using Intel C++ -elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - # using Visual Studio C++ -endif() +SET(SRC_SDK sdk_main.c )#生成动态库需要至少包含一个源文件 +add_library(generallib STATIC $ ${SRC_SDK}) -SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/obj) -set(CMAKE_CXX_STANDARD 11) -INCLUDE_DIRECTORIES (./) -INCLUDE_DIRECTORIES (inc) -INCLUDE_DIRECTORIES (encrypt) -INCLUDE_DIRECTORIES (pattern) -include_directories(third/include) -aux_source_directory(src DIRSRCS) -aux_source_directory(src/pattern PaternSrc) - - -add_library(General ${DIRSRCS} ${PaternSrc} src/pattern/signleton.h src/pattern/Observer.h src/pattern/stratergy.h src/pattern/adapter.h src/encrypt/base64.cpp src/encrypt/base64.h src/encrypt/aes.cpp src/encrypt/aes.h src/encrypt/rsa.cpp - src/math/BigInt.hpp src/net/TcpClient.cpp src/net/TcpClient.h src/net/PackageReceiver.cpp src/net/PackageReceiver.h) -set_target_properties(General PROPERTIES LINKER_LANGUAGE CXX) -target_link_libraries(General -Wl,--whole-archive third/lib/libevent.a third/lib/libevent_core.a) - -set(COPYITEM inc) -file(GLOB INCLUDES ${PROJECT_SOURCE_DIR}/inc/*) -file(COPY ${INCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) -message("include dir " ${INCLUDES}) - -file(GLOB PatternINCLUDES ${PROJECT_SOURCE_DIR}/src/pattern/*.h) -file(COPY ${PatternINCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) -message( "copy pattern library" ${PatternINCLUDES}) -file(GLOB EncryptINCLUDES ${PROJECT_SOURCE_DIR}/src/encrypt/*.h) -file(COPY ${EncryptINCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) -file(GLOB MathINCLUDES ${PROJECT_SOURCE_DIR}/src/math/*.hpp) -message( "copy math library" ${MathINCLUDES}) -file(COPY ${MathINCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/ - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) -file(GLOB EIGENLIBS ${PROJECT_SOURCE_DIR}/src/math/eigin/*) -message( "copy eigen library" ${EIGENLIBS}) -message( "copy third library") -file(GLOB THIRD ${PROJECT_SOURCE_DIR}/third/include/*) -file(COPY ${THIRD} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/third/ - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) -message( "copy net ") - -file(GLOB NET ${PROJECT_SOURCE_DIR}/src/net/*.h) -file(COPY ${NET} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/ - FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) -IF (WIN32) - -ELSEIF (UNIX) -add_custom_command( - TARGET General PRE_BUILD - COMMAND cp.exe -r - ${CMAKE_CURRENT_SOURCE_DIR}/src/math/Eigen - ${CMAKE_CURRENT_SOURCE_DIR}/obj/inc/ +link_directories(general/third/lib) +set_target_properties(generallib PROPERTIES LINKER_LANGUAGE CXX) +target_link_libraries(generallib public + -Wl,--whole-archive + libevent.a + -Wl,--no-whole-archive ) -ENDIF () \ No newline at end of file diff --git a/cmake-build-debug/CMakeCache.txt b/cmake-build-debug/CMakeCache.txt index 9a963b6..af1c683 100644 --- a/cmake-build-debug/CMakeCache.txt +++ b/cmake-build-debug/CMakeCache.txt @@ -156,7 +156,7 @@ CMAKE_PROJECT_DESCRIPTION:STATIC= CMAKE_PROJECT_HOMEPAGE_URL:STATIC= //Value Computed by CMake -CMAKE_PROJECT_NAME:STATIC=General +CMAKE_PROJECT_NAME:STATIC=generallib //Path to a program. CMAKE_RANLIB:FILEPATH=C:/msys64/mingw64/bin/ranlib.exe @@ -236,13 +236,37 @@ CMAKE_STRIP:FILEPATH=C:/msys64/mingw64/bin/strip.exe CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE //Value Computed by CMake -General_BINARY_DIR:STATIC=D:/project/c++/generallib/cmake-build-debug - -//Dependencies for the target -General_LIB_DEPENDS:STATIC=general;-Wl,--whole-archive;general;third/lib/libevent.a;general;third/lib/libevent_core.a; +General_BINARY_DIR:STATIC=D:/project/c++/generallib/cmake-build-debug/general //Value Computed by CMake -General_SOURCE_DIR:STATIC=D:/project/c++/generallib +General_SOURCE_DIR:STATIC=D:/project/c++/generallib/general + +//Value Computed by CMake +ProjectName_BINARY_DIR:STATIC=D:/project/c++/generallib/cmake-build-debug + +//Value Computed by CMake +ProjectName_SOURCE_DIR:STATIC=D:/project/c++/generallib + +//Value Computed by CMake +Project_BINARY_DIR:STATIC=D:/project/c++/generallib/cmake-build-debug + +//Value Computed by CMake +Project_SOURCE_DIR:STATIC=D:/project/c++/generallib + +//Value Computed by CMake +general_BINARY_DIR:STATIC=D:/project/c++/generallib/cmake-build-debug + +//Value Computed by CMake +general_SOURCE_DIR:STATIC=D:/project/c++/generallib + +//Value Computed by CMake +generallib_BINARY_DIR:STATIC=D:/project/c++/generallib/cmake-build-debug + +//Dependencies for the target +generallib_LIB_DEPENDS:STATIC=general;public;general;-Wl,--whole-archive;general;libevent.a;general;-Wl,--no-whole-archive; + +//Value Computed by CMake +generallib_SOURCE_DIR:STATIC=D:/project/c++/generallib ######################## @@ -351,7 +375,7 @@ CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_NM CMAKE_NM-ADVANCED:INTERNAL=1 //number of local generators -CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=2 //ADVANCED property for variable: CMAKE_OBJCOPY CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 //ADVANCED property for variable: CMAKE_OBJDUMP diff --git a/cmake-build-debug/CMakeFiles/Makefile.cmake b/cmake-build-debug/CMakeFiles/Makefile.cmake index 47eab00..2a0e6dd 100644 --- a/cmake-build-debug/CMakeFiles/Makefile.cmake +++ b/cmake-build-debug/CMakeFiles/Makefile.cmake @@ -38,6 +38,7 @@ set(CMAKE_MAKEFILE_DEPENDS "CMakeFiles/3.15.3/CMakeCXXCompiler.cmake" "CMakeFiles/3.15.3/CMakeRCCompiler.cmake" "CMakeFiles/3.15.3/CMakeSystem.cmake" + "../general/CMakeLists.txt" ) # The corresponding makefile is: @@ -49,9 +50,11 @@ set(CMAKE_MAKEFILE_OUTPUTS # Byproducts of CMake generate step: set(CMAKE_MAKEFILE_PRODUCTS "CMakeFiles/CMakeDirectoryInformation.cmake" + "general/CMakeFiles/CMakeDirectoryInformation.cmake" ) # Dependency information for all targets: set(CMAKE_DEPEND_INFO_FILES - "CMakeFiles/General.dir/DependInfo.cmake" + "CMakeFiles/generallib.dir/DependInfo.cmake" + "general/CMakeFiles/General.dir/DependInfo.cmake" ) diff --git a/cmake-build-debug/CMakeFiles/Makefile2 b/cmake-build-debug/CMakeFiles/Makefile2 index ab4fd1a..14fdfca 100644 --- a/cmake-build-debug/CMakeFiles/Makefile2 +++ b/cmake-build-debug/CMakeFiles/Makefile2 @@ -52,46 +52,93 @@ CMAKE_BINARY_DIR = D:\project\c++\generallib\cmake-build-debug # Directory level rules for the build root directory # The main recursive "all" target. -all: CMakeFiles/General.dir/all +all: CMakeFiles/generallib.dir/all +all: general/all .PHONY : all # The main recursive "clean" target. -clean: CMakeFiles/General.dir/clean +clean: CMakeFiles/generallib.dir/clean +clean: general/clean .PHONY : clean # The main recursive "preinstall" target. -preinstall: +preinstall: general/preinstall .PHONY : preinstall #============================================================================= -# Target rules for target CMakeFiles/General.dir +# Target rules for target CMakeFiles/generallib.dir # All Build rule for target. -CMakeFiles/General.dir/all: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/depend - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/build - @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=1,2,3,4,5,6,7,8,9 "Built target General" -.PHONY : CMakeFiles/General.dir/all +CMakeFiles/generallib.dir/all: general/CMakeFiles/General.dir/all + $(MAKE) -f CMakeFiles\generallib.dir\build.make CMakeFiles/generallib.dir/depend + $(MAKE) -f CMakeFiles\generallib.dir\build.make CMakeFiles/generallib.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=9,10 "Built target generallib" +.PHONY : CMakeFiles/generallib.dir/all # Build rule for subdir invocation for target. -CMakeFiles/General.dir/rule: cmake_check_build_system - $(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 9 - $(MAKE) -f CMakeFiles\Makefile2 CMakeFiles/General.dir/all +CMakeFiles/generallib.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 10 + $(MAKE) -f CMakeFiles\Makefile2 CMakeFiles/generallib.dir/all $(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 0 -.PHONY : CMakeFiles/General.dir/rule +.PHONY : CMakeFiles/generallib.dir/rule # Convenience name for target. -General: CMakeFiles/General.dir/rule +generallib: CMakeFiles/generallib.dir/rule + +.PHONY : generallib + +# clean rule for target. +CMakeFiles/generallib.dir/clean: + $(MAKE) -f CMakeFiles\generallib.dir\build.make CMakeFiles/generallib.dir/clean +.PHONY : CMakeFiles/generallib.dir/clean + +#============================================================================= +# Directory level rules for directory general + +# Recursive "all" directory target. +general/all: general/CMakeFiles/General.dir/all + +.PHONY : general/all + +# Recursive "clean" directory target. +general/clean: general/CMakeFiles/General.dir/clean + +.PHONY : general/clean + +# Recursive "preinstall" directory target. +general/preinstall: + +.PHONY : general/preinstall + +#============================================================================= +# Target rules for target general/CMakeFiles/General.dir + +# All Build rule for target. +general/CMakeFiles/General.dir/all: + $(MAKE) -f general\CMakeFiles\General.dir\build.make general/CMakeFiles/General.dir/depend + $(MAKE) -f general\CMakeFiles\General.dir\build.make general/CMakeFiles/General.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=D:\project\c++\generallib\cmake-build-debug\CMakeFiles --progress-num=1,2,3,4,5,6,7,8 "Built target General" +.PHONY : general/CMakeFiles/General.dir/all + +# Build rule for subdir invocation for target. +general/CMakeFiles/General.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 8 + $(MAKE) -f CMakeFiles\Makefile2 general/CMakeFiles/General.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start D:\project\c++\generallib\cmake-build-debug\CMakeFiles 0 +.PHONY : general/CMakeFiles/General.dir/rule + +# Convenience name for target. +General: general/CMakeFiles/General.dir/rule .PHONY : General # clean rule for target. -CMakeFiles/General.dir/clean: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/clean -.PHONY : CMakeFiles/General.dir/clean +general/CMakeFiles/General.dir/clean: + $(MAKE) -f general\CMakeFiles\General.dir\build.make general/CMakeFiles/General.dir/clean +.PHONY : general/CMakeFiles/General.dir/clean #============================================================================= # Special targets to cleanup operation of make. diff --git a/cmake-build-debug/CMakeFiles/TargetDirectories.txt b/cmake-build-debug/CMakeFiles/TargetDirectories.txt index 975ce46..0c5b6c3 100644 --- a/cmake-build-debug/CMakeFiles/TargetDirectories.txt +++ b/cmake-build-debug/CMakeFiles/TargetDirectories.txt @@ -1,3 +1,6 @@ -D:/project/c++/generallib/cmake-build-debug/CMakeFiles/General.dir +D:/project/c++/generallib/cmake-build-debug/CMakeFiles/generallib.dir D:/project/c++/generallib/cmake-build-debug/CMakeFiles/edit_cache.dir D:/project/c++/generallib/cmake-build-debug/CMakeFiles/rebuild_cache.dir +D:/project/c++/generallib/cmake-build-debug/general/CMakeFiles/General.dir +D:/project/c++/generallib/cmake-build-debug/general/CMakeFiles/edit_cache.dir +D:/project/c++/generallib/cmake-build-debug/general/CMakeFiles/rebuild_cache.dir diff --git a/cmake-build-debug/CMakeFiles/progress.marks b/cmake-build-debug/CMakeFiles/progress.marks index ec63514..f599e28 100644 --- a/cmake-build-debug/CMakeFiles/progress.marks +++ b/cmake-build-debug/CMakeFiles/progress.marks @@ -1 +1 @@ -9 +10 diff --git a/cmake-build-debug/Makefile b/cmake-build-debug/Makefile index 2ad7079..7038979 100644 --- a/cmake-build-debug/Makefile +++ b/cmake-build-debug/Makefile @@ -109,6 +109,19 @@ depend: $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 1 .PHONY : depend +#============================================================================= +# Target rules for targets named generallib + +# Build rule for target. +generallib: cmake_check_build_system + $(MAKE) -f CMakeFiles\Makefile2 generallib +.PHONY : generallib + +# fast build rule for target. +generallib/fast: + $(MAKE) -f CMakeFiles\generallib.dir\build.make CMakeFiles/generallib.dir/build +.PHONY : generallib/fast + #============================================================================= # Target rules for targets named General @@ -119,224 +132,35 @@ General: cmake_check_build_system # fast build rule for target. General/fast: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/build + $(MAKE) -f general\CMakeFiles\General.dir\build.make general/CMakeFiles/General.dir/build .PHONY : General/fast -src/debug.obj: src/debug.cpp.obj +sdk_main.obj: sdk_main.c.obj -.PHONY : src/debug.obj +.PHONY : sdk_main.obj # target to build an object file -src/debug.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/debug.cpp.obj -.PHONY : src/debug.cpp.obj +sdk_main.c.obj: + $(MAKE) -f CMakeFiles\generallib.dir\build.make CMakeFiles/generallib.dir/sdk_main.c.obj +.PHONY : sdk_main.c.obj -src/debug.i: src/debug.cpp.i +sdk_main.i: sdk_main.c.i -.PHONY : src/debug.i +.PHONY : sdk_main.i # target to preprocess a source file -src/debug.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/debug.cpp.i -.PHONY : src/debug.cpp.i +sdk_main.c.i: + $(MAKE) -f CMakeFiles\generallib.dir\build.make CMakeFiles/generallib.dir/sdk_main.c.i +.PHONY : sdk_main.c.i -src/debug.s: src/debug.cpp.s +sdk_main.s: sdk_main.c.s -.PHONY : src/debug.s +.PHONY : sdk_main.s # target to generate assembly for a file -src/debug.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/debug.cpp.s -.PHONY : src/debug.cpp.s - -src/encrypt/aes.obj: src/encrypt/aes.cpp.obj - -.PHONY : src/encrypt/aes.obj - -# target to build an object file -src/encrypt/aes.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/aes.cpp.obj -.PHONY : src/encrypt/aes.cpp.obj - -src/encrypt/aes.i: src/encrypt/aes.cpp.i - -.PHONY : src/encrypt/aes.i - -# target to preprocess a source file -src/encrypt/aes.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/aes.cpp.i -.PHONY : src/encrypt/aes.cpp.i - -src/encrypt/aes.s: src/encrypt/aes.cpp.s - -.PHONY : src/encrypt/aes.s - -# target to generate assembly for a file -src/encrypt/aes.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/aes.cpp.s -.PHONY : src/encrypt/aes.cpp.s - -src/encrypt/base64.obj: src/encrypt/base64.cpp.obj - -.PHONY : src/encrypt/base64.obj - -# target to build an object file -src/encrypt/base64.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/base64.cpp.obj -.PHONY : src/encrypt/base64.cpp.obj - -src/encrypt/base64.i: src/encrypt/base64.cpp.i - -.PHONY : src/encrypt/base64.i - -# target to preprocess a source file -src/encrypt/base64.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/base64.cpp.i -.PHONY : src/encrypt/base64.cpp.i - -src/encrypt/base64.s: src/encrypt/base64.cpp.s - -.PHONY : src/encrypt/base64.s - -# target to generate assembly for a file -src/encrypt/base64.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/base64.cpp.s -.PHONY : src/encrypt/base64.cpp.s - -src/encrypt/rsa.obj: src/encrypt/rsa.cpp.obj - -.PHONY : src/encrypt/rsa.obj - -# target to build an object file -src/encrypt/rsa.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/rsa.cpp.obj -.PHONY : src/encrypt/rsa.cpp.obj - -src/encrypt/rsa.i: src/encrypt/rsa.cpp.i - -.PHONY : src/encrypt/rsa.i - -# target to preprocess a source file -src/encrypt/rsa.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/rsa.cpp.i -.PHONY : src/encrypt/rsa.cpp.i - -src/encrypt/rsa.s: src/encrypt/rsa.cpp.s - -.PHONY : src/encrypt/rsa.s - -# target to generate assembly for a file -src/encrypt/rsa.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/encrypt/rsa.cpp.s -.PHONY : src/encrypt/rsa.cpp.s - -src/loger.obj: src/loger.cpp.obj - -.PHONY : src/loger.obj - -# target to build an object file -src/loger.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/loger.cpp.obj -.PHONY : src/loger.cpp.obj - -src/loger.i: src/loger.cpp.i - -.PHONY : src/loger.i - -# target to preprocess a source file -src/loger.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/loger.cpp.i -.PHONY : src/loger.cpp.i - -src/loger.s: src/loger.cpp.s - -.PHONY : src/loger.s - -# target to generate assembly for a file -src/loger.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/loger.cpp.s -.PHONY : src/loger.cpp.s - -src/net/PackageReceiver.obj: src/net/PackageReceiver.cpp.obj - -.PHONY : src/net/PackageReceiver.obj - -# target to build an object file -src/net/PackageReceiver.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/PackageReceiver.cpp.obj -.PHONY : src/net/PackageReceiver.cpp.obj - -src/net/PackageReceiver.i: src/net/PackageReceiver.cpp.i - -.PHONY : src/net/PackageReceiver.i - -# target to preprocess a source file -src/net/PackageReceiver.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/PackageReceiver.cpp.i -.PHONY : src/net/PackageReceiver.cpp.i - -src/net/PackageReceiver.s: src/net/PackageReceiver.cpp.s - -.PHONY : src/net/PackageReceiver.s - -# target to generate assembly for a file -src/net/PackageReceiver.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/PackageReceiver.cpp.s -.PHONY : src/net/PackageReceiver.cpp.s - -src/net/TcpClient.obj: src/net/TcpClient.cpp.obj - -.PHONY : src/net/TcpClient.obj - -# target to build an object file -src/net/TcpClient.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/TcpClient.cpp.obj -.PHONY : src/net/TcpClient.cpp.obj - -src/net/TcpClient.i: src/net/TcpClient.cpp.i - -.PHONY : src/net/TcpClient.i - -# target to preprocess a source file -src/net/TcpClient.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/TcpClient.cpp.i -.PHONY : src/net/TcpClient.cpp.i - -src/net/TcpClient.s: src/net/TcpClient.cpp.s - -.PHONY : src/net/TcpClient.s - -# target to generate assembly for a file -src/net/TcpClient.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/net/TcpClient.cpp.s -.PHONY : src/net/TcpClient.cpp.s - -src/utils.obj: src/utils.cpp.obj - -.PHONY : src/utils.obj - -# target to build an object file -src/utils.cpp.obj: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/utils.cpp.obj -.PHONY : src/utils.cpp.obj - -src/utils.i: src/utils.cpp.i - -.PHONY : src/utils.i - -# target to preprocess a source file -src/utils.cpp.i: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/utils.cpp.i -.PHONY : src/utils.cpp.i - -src/utils.s: src/utils.cpp.s - -.PHONY : src/utils.s - -# target to generate assembly for a file -src/utils.cpp.s: - $(MAKE) -f CMakeFiles\General.dir\build.make CMakeFiles/General.dir/src/utils.cpp.s -.PHONY : src/utils.cpp.s +sdk_main.c.s: + $(MAKE) -f CMakeFiles\generallib.dir\build.make CMakeFiles/generallib.dir/sdk_main.c.s +.PHONY : sdk_main.c.s # Help Target help: @@ -344,33 +168,13 @@ help: @echo ... all (the default if no target is provided) @echo ... clean @echo ... depend - @echo ... General + @echo ... generallib @echo ... edit_cache @echo ... rebuild_cache - @echo ... src/debug.obj - @echo ... src/debug.i - @echo ... src/debug.s - @echo ... src/encrypt/aes.obj - @echo ... src/encrypt/aes.i - @echo ... src/encrypt/aes.s - @echo ... src/encrypt/base64.obj - @echo ... src/encrypt/base64.i - @echo ... src/encrypt/base64.s - @echo ... src/encrypt/rsa.obj - @echo ... src/encrypt/rsa.i - @echo ... src/encrypt/rsa.s - @echo ... src/loger.obj - @echo ... src/loger.i - @echo ... src/loger.s - @echo ... src/net/PackageReceiver.obj - @echo ... src/net/PackageReceiver.i - @echo ... src/net/PackageReceiver.s - @echo ... src/net/TcpClient.obj - @echo ... src/net/TcpClient.i - @echo ... src/net/TcpClient.s - @echo ... src/utils.obj - @echo ... src/utils.i - @echo ... src/utils.s + @echo ... General + @echo ... sdk_main.obj + @echo ... sdk_main.i + @echo ... sdk_main.s .PHONY : help diff --git a/cmake-build-debug/cmake_install.cmake b/cmake-build-debug/cmake_install.cmake index 667f948..3c821bb 100644 --- a/cmake-build-debug/cmake_install.cmake +++ b/cmake-build-debug/cmake_install.cmake @@ -32,6 +32,12 @@ if(NOT DEFINED CMAKE_CROSSCOMPILING) set(CMAKE_CROSSCOMPILING "FALSE") endif() +if(NOT CMAKE_INSTALL_LOCAL_ONLY) + # Include the install script for each subdirectory. + include("D:/project/c++/generallib/cmake-build-debug/general/cmake_install.cmake") + +endif() + if(CMAKE_INSTALL_COMPONENT) set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") else() diff --git a/general/CMakeLists.txt b/general/CMakeLists.txt new file mode 100644 index 0000000..65bd4ae --- /dev/null +++ b/general/CMakeLists.txt @@ -0,0 +1,69 @@ +cmake_minimum_required(VERSION 3.11) +project(General) +set(MINGW_PATH $ENV{MINGW_TOOLCHAIN}) +message("path is " ${MINGW_PATH}) +message( "libevent path " ${CONAN_LIBEVENT_ROOT}) +message( "current compiler " ${CMAKE_CXX_COMPILER_ID}) + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # using Clang +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + # using GCC +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") + # using Intel C++ +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + # using Visual Studio C++ +endif() + +SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/obj) +set(CMAKE_CXX_STANDARD 11) +INCLUDE_DIRECTORIES (./) +INCLUDE_DIRECTORIES (inc) +INCLUDE_DIRECTORIES (encrypt) +INCLUDE_DIRECTORIES (pattern) +include_directories(third/include) +aux_source_directory(src DIRSRCS) +aux_source_directory(src/pattern PaternSrc) + + +add_library(General OBJECT ${DIRSRCS} ${PaternSrc} src/pattern/signleton.h src/pattern/Observer.h src/pattern/stratergy.h src/pattern/adapter.h src/encrypt/base64.cpp src/encrypt/base64.h src/encrypt/aes.cpp src/encrypt/aes.h src/encrypt/rsa.cpp + src/math/BigInt.hpp src/net/TcpClient.cpp src/net/TcpClient.h src/net/PackageReceiver.cpp src/net/PackageReceiver.h) + +set(COPYITEM inc) +file(GLOB INCLUDES ${PROJECT_SOURCE_DIR}/inc/*) +file(COPY ${INCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) +message("include dir " ${INCLUDES}) + +file(GLOB PatternINCLUDES ${PROJECT_SOURCE_DIR}/src/pattern/*.h) +file(COPY ${PatternINCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) +message( "copy pattern library" ${PatternINCLUDES}) +file(GLOB EncryptINCLUDES ${PROJECT_SOURCE_DIR}/src/encrypt/*.h) +file(COPY ${EncryptINCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) +file(GLOB MathINCLUDES ${PROJECT_SOURCE_DIR}/src/math/*.hpp) +message( "copy math library" ${MathINCLUDES}) +file(COPY ${MathINCLUDES} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/ + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) +file(GLOB EIGENLIBS ${PROJECT_SOURCE_DIR}/src/math/eigin/*) +message( "copy eigen library" ${EIGENLIBS}) +message( "copy third library") +file(GLOB THIRD ${PROJECT_SOURCE_DIR}/third/include/*) +file(COPY ${THIRD} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/third/ + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) +message( "copy net ") + +file(GLOB NET ${PROJECT_SOURCE_DIR}/src/net/*.h) +file(COPY ${NET} DESTINATION ${LIBRARY_OUTPUT_PATH}/inc/ + FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_WRITE GROUP_READ WORLD_READ) +IF (WIN32) + +ELSEIF (UNIX) +add_custom_command( + TARGET General PRE_BUILD + COMMAND cp.exe -r + ${CMAKE_CURRENT_SOURCE_DIR}/src/math/Eigen + ${CMAKE_CURRENT_SOURCE_DIR}/obj/inc/ +) +ENDIF () \ No newline at end of file diff --git a/inc/debug.h b/general/inc/debug.h similarity index 100% rename from inc/debug.h rename to general/inc/debug.h diff --git a/inc/glad/include/KHR/khrplatform.h b/general/inc/glad/include/KHR/khrplatform.h similarity index 100% rename from inc/glad/include/KHR/khrplatform.h rename to general/inc/glad/include/KHR/khrplatform.h diff --git a/inc/glad/include/glad/glad.h b/general/inc/glad/include/glad/glad.h similarity index 100% rename from inc/glad/include/glad/glad.h rename to general/inc/glad/include/glad/glad.h diff --git a/inc/glad/src/glad.c b/general/inc/glad/src/glad.c similarity index 100% rename from inc/glad/src/glad.c rename to general/inc/glad/src/glad.c diff --git a/inc/loger.h b/general/inc/loger.h similarity index 100% rename from inc/loger.h rename to general/inc/loger.h diff --git a/inc/utils.h b/general/inc/utils.h similarity index 100% rename from inc/utils.h rename to general/inc/utils.h diff --git a/src/debug.cpp b/general/src/debug.cpp similarity index 100% rename from src/debug.cpp rename to general/src/debug.cpp diff --git a/src/encrypt/aes.cpp b/general/src/encrypt/aes.cpp similarity index 100% rename from src/encrypt/aes.cpp rename to general/src/encrypt/aes.cpp diff --git a/obj/inc/aes.h b/general/src/encrypt/aes.h similarity index 100% rename from obj/inc/aes.h rename to general/src/encrypt/aes.h diff --git a/src/encrypt/base64.cpp b/general/src/encrypt/base64.cpp similarity index 100% rename from src/encrypt/base64.cpp rename to general/src/encrypt/base64.cpp diff --git a/obj/inc/base64.h b/general/src/encrypt/base64.h similarity index 100% rename from obj/inc/base64.h rename to general/src/encrypt/base64.h diff --git a/src/encrypt/rsa.cpp b/general/src/encrypt/rsa.cpp similarity index 100% rename from src/encrypt/rsa.cpp rename to general/src/encrypt/rsa.cpp diff --git a/src/encrypt/rsa.h b/general/src/encrypt/rsa.h similarity index 100% rename from src/encrypt/rsa.h rename to general/src/encrypt/rsa.h diff --git a/src/loger.cpp b/general/src/loger.cpp similarity index 100% rename from src/loger.cpp rename to general/src/loger.cpp diff --git a/obj/inc/BigInt.hpp b/general/src/math/BigInt.hpp similarity index 100% rename from obj/inc/BigInt.hpp rename to general/src/math/BigInt.hpp diff --git a/src/math/eigen/CMakeLists.txt b/general/src/math/Eigen/CMakeLists.txt similarity index 100% rename from src/math/eigen/CMakeLists.txt rename to general/src/math/Eigen/CMakeLists.txt diff --git a/src/math/eigen/Cholesky b/general/src/math/Eigen/Cholesky similarity index 100% rename from src/math/eigen/Cholesky rename to general/src/math/Eigen/Cholesky diff --git a/src/math/eigen/CholmodSupport b/general/src/math/Eigen/CholmodSupport similarity index 100% rename from src/math/eigen/CholmodSupport rename to general/src/math/Eigen/CholmodSupport diff --git a/src/math/eigen/Core b/general/src/math/Eigen/Core similarity index 100% rename from src/math/eigen/Core rename to general/src/math/Eigen/Core diff --git a/src/math/eigen/Dense b/general/src/math/Eigen/Dense similarity index 100% rename from src/math/eigen/Dense rename to general/src/math/Eigen/Dense diff --git a/src/math/eigen/Eigen b/general/src/math/Eigen/Eigen similarity index 100% rename from src/math/eigen/Eigen rename to general/src/math/Eigen/Eigen diff --git a/src/math/eigen/Eigenvalues b/general/src/math/Eigen/Eigenvalues similarity index 100% rename from src/math/eigen/Eigenvalues rename to general/src/math/Eigen/Eigenvalues diff --git a/src/math/eigen/Geometry b/general/src/math/Eigen/Geometry similarity index 100% rename from src/math/eigen/Geometry rename to general/src/math/Eigen/Geometry diff --git a/src/math/eigen/Householder b/general/src/math/Eigen/Householder similarity index 100% rename from src/math/eigen/Householder rename to general/src/math/Eigen/Householder diff --git a/src/math/eigen/IterativeLinearSolvers b/general/src/math/Eigen/IterativeLinearSolvers similarity index 100% rename from src/math/eigen/IterativeLinearSolvers rename to general/src/math/Eigen/IterativeLinearSolvers diff --git a/src/math/eigen/Jacobi b/general/src/math/Eigen/Jacobi similarity index 100% rename from src/math/eigen/Jacobi rename to general/src/math/Eigen/Jacobi diff --git a/src/math/eigen/KLUSupport b/general/src/math/Eigen/KLUSupport similarity index 100% rename from src/math/eigen/KLUSupport rename to general/src/math/Eigen/KLUSupport diff --git a/src/math/eigen/LU b/general/src/math/Eigen/LU similarity index 100% rename from src/math/eigen/LU rename to general/src/math/Eigen/LU diff --git a/src/math/eigen/MetisSupport b/general/src/math/Eigen/MetisSupport similarity index 100% rename from src/math/eigen/MetisSupport rename to general/src/math/Eigen/MetisSupport diff --git a/src/math/eigen/OrderingMethods b/general/src/math/Eigen/OrderingMethods similarity index 100% rename from src/math/eigen/OrderingMethods rename to general/src/math/Eigen/OrderingMethods diff --git a/src/math/eigen/PaStiXSupport b/general/src/math/Eigen/PaStiXSupport similarity index 100% rename from src/math/eigen/PaStiXSupport rename to general/src/math/Eigen/PaStiXSupport diff --git a/src/math/eigen/PardisoSupport b/general/src/math/Eigen/PardisoSupport similarity index 100% rename from src/math/eigen/PardisoSupport rename to general/src/math/Eigen/PardisoSupport diff --git a/src/math/eigen/QR b/general/src/math/Eigen/QR similarity index 100% rename from src/math/eigen/QR rename to general/src/math/Eigen/QR diff --git a/src/math/eigen/QtAlignedMalloc b/general/src/math/Eigen/QtAlignedMalloc similarity index 100% rename from src/math/eigen/QtAlignedMalloc rename to general/src/math/Eigen/QtAlignedMalloc diff --git a/src/math/eigen/SPQRSupport b/general/src/math/Eigen/SPQRSupport similarity index 100% rename from src/math/eigen/SPQRSupport rename to general/src/math/Eigen/SPQRSupport diff --git a/src/math/eigen/SVD b/general/src/math/Eigen/SVD similarity index 100% rename from src/math/eigen/SVD rename to general/src/math/Eigen/SVD diff --git a/src/math/eigen/Sparse b/general/src/math/Eigen/Sparse similarity index 100% rename from src/math/eigen/Sparse rename to general/src/math/Eigen/Sparse diff --git a/src/math/eigen/SparseCholesky b/general/src/math/Eigen/SparseCholesky similarity index 100% rename from src/math/eigen/SparseCholesky rename to general/src/math/Eigen/SparseCholesky diff --git a/src/math/eigen/SparseCore b/general/src/math/Eigen/SparseCore similarity index 100% rename from src/math/eigen/SparseCore rename to general/src/math/Eigen/SparseCore diff --git a/src/math/eigen/SparseLU b/general/src/math/Eigen/SparseLU similarity index 100% rename from src/math/eigen/SparseLU rename to general/src/math/Eigen/SparseLU diff --git a/src/math/eigen/SparseQR b/general/src/math/Eigen/SparseQR similarity index 100% rename from src/math/eigen/SparseQR rename to general/src/math/Eigen/SparseQR diff --git a/src/math/eigen/StdDeque b/general/src/math/Eigen/StdDeque similarity index 100% rename from src/math/eigen/StdDeque rename to general/src/math/Eigen/StdDeque diff --git a/src/math/eigen/StdList b/general/src/math/Eigen/StdList similarity index 100% rename from src/math/eigen/StdList rename to general/src/math/Eigen/StdList diff --git a/src/math/eigen/StdVector b/general/src/math/Eigen/StdVector similarity index 100% rename from src/math/eigen/StdVector rename to general/src/math/Eigen/StdVector diff --git a/src/math/eigen/SuperLUSupport b/general/src/math/Eigen/SuperLUSupport similarity index 100% rename from src/math/eigen/SuperLUSupport rename to general/src/math/Eigen/SuperLUSupport diff --git a/src/math/eigen/UmfPackSupport b/general/src/math/Eigen/UmfPackSupport similarity index 100% rename from src/math/eigen/UmfPackSupport rename to general/src/math/Eigen/UmfPackSupport diff --git a/src/math/eigen/src/Cholesky/LDLT.h b/general/src/math/Eigen/src/Cholesky/LDLT.h similarity index 100% rename from src/math/eigen/src/Cholesky/LDLT.h rename to general/src/math/Eigen/src/Cholesky/LDLT.h diff --git a/src/math/eigen/src/Cholesky/LLT.h b/general/src/math/Eigen/src/Cholesky/LLT.h similarity index 100% rename from src/math/eigen/src/Cholesky/LLT.h rename to general/src/math/Eigen/src/Cholesky/LLT.h diff --git a/src/math/eigen/src/Cholesky/LLT_LAPACKE.h b/general/src/math/Eigen/src/Cholesky/LLT_LAPACKE.h similarity index 100% rename from src/math/eigen/src/Cholesky/LLT_LAPACKE.h rename to general/src/math/Eigen/src/Cholesky/LLT_LAPACKE.h diff --git a/src/math/eigen/src/CholmodSupport/CholmodSupport.h b/general/src/math/Eigen/src/CholmodSupport/CholmodSupport.h similarity index 100% rename from src/math/eigen/src/CholmodSupport/CholmodSupport.h rename to general/src/math/Eigen/src/CholmodSupport/CholmodSupport.h diff --git a/src/math/eigen/src/Core/ArithmeticSequence.h b/general/src/math/Eigen/src/Core/ArithmeticSequence.h similarity index 100% rename from src/math/eigen/src/Core/ArithmeticSequence.h rename to general/src/math/Eigen/src/Core/ArithmeticSequence.h diff --git a/src/math/eigen/src/Core/Array.h b/general/src/math/Eigen/src/Core/Array.h similarity index 100% rename from src/math/eigen/src/Core/Array.h rename to general/src/math/Eigen/src/Core/Array.h diff --git a/src/math/eigen/src/Core/ArrayBase.h b/general/src/math/Eigen/src/Core/ArrayBase.h similarity index 100% rename from src/math/eigen/src/Core/ArrayBase.h rename to general/src/math/Eigen/src/Core/ArrayBase.h diff --git a/src/math/eigen/src/Core/ArrayWrapper.h b/general/src/math/Eigen/src/Core/ArrayWrapper.h similarity index 100% rename from src/math/eigen/src/Core/ArrayWrapper.h rename to general/src/math/Eigen/src/Core/ArrayWrapper.h diff --git a/src/math/eigen/src/Core/Assign.h b/general/src/math/Eigen/src/Core/Assign.h similarity index 100% rename from src/math/eigen/src/Core/Assign.h rename to general/src/math/Eigen/src/Core/Assign.h diff --git a/src/math/eigen/src/Core/AssignEvaluator.h b/general/src/math/Eigen/src/Core/AssignEvaluator.h similarity index 100% rename from src/math/eigen/src/Core/AssignEvaluator.h rename to general/src/math/Eigen/src/Core/AssignEvaluator.h diff --git a/src/math/eigen/src/Core/Assign_MKL.h b/general/src/math/Eigen/src/Core/Assign_MKL.h similarity index 100% rename from src/math/eigen/src/Core/Assign_MKL.h rename to general/src/math/Eigen/src/Core/Assign_MKL.h diff --git a/src/math/eigen/src/Core/BandMatrix.h b/general/src/math/Eigen/src/Core/BandMatrix.h similarity index 100% rename from src/math/eigen/src/Core/BandMatrix.h rename to general/src/math/Eigen/src/Core/BandMatrix.h diff --git a/src/math/eigen/src/Core/Block.h b/general/src/math/Eigen/src/Core/Block.h similarity index 100% rename from src/math/eigen/src/Core/Block.h rename to general/src/math/Eigen/src/Core/Block.h diff --git a/src/math/eigen/src/Core/BooleanRedux.h b/general/src/math/Eigen/src/Core/BooleanRedux.h similarity index 100% rename from src/math/eigen/src/Core/BooleanRedux.h rename to general/src/math/Eigen/src/Core/BooleanRedux.h diff --git a/src/math/eigen/src/Core/CommaInitializer.h b/general/src/math/Eigen/src/Core/CommaInitializer.h similarity index 100% rename from src/math/eigen/src/Core/CommaInitializer.h rename to general/src/math/Eigen/src/Core/CommaInitializer.h diff --git a/src/math/eigen/src/Core/ConditionEstimator.h b/general/src/math/Eigen/src/Core/ConditionEstimator.h similarity index 100% rename from src/math/eigen/src/Core/ConditionEstimator.h rename to general/src/math/Eigen/src/Core/ConditionEstimator.h diff --git a/src/math/eigen/src/Core/CoreEvaluators.h b/general/src/math/Eigen/src/Core/CoreEvaluators.h similarity index 100% rename from src/math/eigen/src/Core/CoreEvaluators.h rename to general/src/math/Eigen/src/Core/CoreEvaluators.h diff --git a/src/math/eigen/src/Core/CoreIterators.h b/general/src/math/Eigen/src/Core/CoreIterators.h similarity index 100% rename from src/math/eigen/src/Core/CoreIterators.h rename to general/src/math/Eigen/src/Core/CoreIterators.h diff --git a/src/math/eigen/src/Core/CwiseBinaryOp.h b/general/src/math/Eigen/src/Core/CwiseBinaryOp.h similarity index 100% rename from src/math/eigen/src/Core/CwiseBinaryOp.h rename to general/src/math/Eigen/src/Core/CwiseBinaryOp.h diff --git a/src/math/eigen/src/Core/CwiseNullaryOp.h b/general/src/math/Eigen/src/Core/CwiseNullaryOp.h similarity index 100% rename from src/math/eigen/src/Core/CwiseNullaryOp.h rename to general/src/math/Eigen/src/Core/CwiseNullaryOp.h diff --git a/src/math/eigen/src/Core/CwiseTernaryOp.h b/general/src/math/Eigen/src/Core/CwiseTernaryOp.h similarity index 100% rename from src/math/eigen/src/Core/CwiseTernaryOp.h rename to general/src/math/Eigen/src/Core/CwiseTernaryOp.h diff --git a/src/math/eigen/src/Core/CwiseUnaryOp.h b/general/src/math/Eigen/src/Core/CwiseUnaryOp.h similarity index 100% rename from src/math/eigen/src/Core/CwiseUnaryOp.h rename to general/src/math/Eigen/src/Core/CwiseUnaryOp.h diff --git a/src/math/eigen/src/Core/CwiseUnaryView.h b/general/src/math/Eigen/src/Core/CwiseUnaryView.h similarity index 100% rename from src/math/eigen/src/Core/CwiseUnaryView.h rename to general/src/math/Eigen/src/Core/CwiseUnaryView.h diff --git a/src/math/eigen/src/Core/DenseBase.h b/general/src/math/Eigen/src/Core/DenseBase.h similarity index 100% rename from src/math/eigen/src/Core/DenseBase.h rename to general/src/math/Eigen/src/Core/DenseBase.h diff --git a/src/math/eigen/src/Core/DenseCoeffsBase.h b/general/src/math/Eigen/src/Core/DenseCoeffsBase.h similarity index 100% rename from src/math/eigen/src/Core/DenseCoeffsBase.h rename to general/src/math/Eigen/src/Core/DenseCoeffsBase.h diff --git a/src/math/eigen/src/Core/DenseStorage.h b/general/src/math/Eigen/src/Core/DenseStorage.h similarity index 100% rename from src/math/eigen/src/Core/DenseStorage.h rename to general/src/math/Eigen/src/Core/DenseStorage.h diff --git a/src/math/eigen/src/Core/Diagonal.h b/general/src/math/Eigen/src/Core/Diagonal.h similarity index 100% rename from src/math/eigen/src/Core/Diagonal.h rename to general/src/math/Eigen/src/Core/Diagonal.h diff --git a/src/math/eigen/src/Core/DiagonalMatrix.h b/general/src/math/Eigen/src/Core/DiagonalMatrix.h similarity index 100% rename from src/math/eigen/src/Core/DiagonalMatrix.h rename to general/src/math/Eigen/src/Core/DiagonalMatrix.h diff --git a/src/math/eigen/src/Core/DiagonalProduct.h b/general/src/math/Eigen/src/Core/DiagonalProduct.h similarity index 100% rename from src/math/eigen/src/Core/DiagonalProduct.h rename to general/src/math/Eigen/src/Core/DiagonalProduct.h diff --git a/src/math/eigen/src/Core/Dot.h b/general/src/math/Eigen/src/Core/Dot.h similarity index 100% rename from src/math/eigen/src/Core/Dot.h rename to general/src/math/Eigen/src/Core/Dot.h diff --git a/src/math/eigen/src/Core/EigenBase.h b/general/src/math/Eigen/src/Core/EigenBase.h similarity index 100% rename from src/math/eigen/src/Core/EigenBase.h rename to general/src/math/Eigen/src/Core/EigenBase.h diff --git a/src/math/eigen/src/Core/ForceAlignedAccess.h b/general/src/math/Eigen/src/Core/ForceAlignedAccess.h similarity index 100% rename from src/math/eigen/src/Core/ForceAlignedAccess.h rename to general/src/math/Eigen/src/Core/ForceAlignedAccess.h diff --git a/src/math/eigen/src/Core/Fuzzy.h b/general/src/math/Eigen/src/Core/Fuzzy.h similarity index 100% rename from src/math/eigen/src/Core/Fuzzy.h rename to general/src/math/Eigen/src/Core/Fuzzy.h diff --git a/src/math/eigen/src/Core/GeneralProduct.h b/general/src/math/Eigen/src/Core/GeneralProduct.h similarity index 100% rename from src/math/eigen/src/Core/GeneralProduct.h rename to general/src/math/Eigen/src/Core/GeneralProduct.h diff --git a/src/math/eigen/src/Core/GenericPacketMath.h b/general/src/math/Eigen/src/Core/GenericPacketMath.h similarity index 100% rename from src/math/eigen/src/Core/GenericPacketMath.h rename to general/src/math/Eigen/src/Core/GenericPacketMath.h diff --git a/src/math/eigen/src/Core/GlobalFunctions.h b/general/src/math/Eigen/src/Core/GlobalFunctions.h similarity index 100% rename from src/math/eigen/src/Core/GlobalFunctions.h rename to general/src/math/Eigen/src/Core/GlobalFunctions.h diff --git a/src/math/eigen/src/Core/IO.h b/general/src/math/Eigen/src/Core/IO.h similarity index 100% rename from src/math/eigen/src/Core/IO.h rename to general/src/math/Eigen/src/Core/IO.h diff --git a/src/math/eigen/src/Core/IndexedView.h b/general/src/math/Eigen/src/Core/IndexedView.h similarity index 100% rename from src/math/eigen/src/Core/IndexedView.h rename to general/src/math/Eigen/src/Core/IndexedView.h diff --git a/src/math/eigen/src/Core/Inverse.h b/general/src/math/Eigen/src/Core/Inverse.h similarity index 100% rename from src/math/eigen/src/Core/Inverse.h rename to general/src/math/Eigen/src/Core/Inverse.h diff --git a/src/math/eigen/src/Core/Map.h b/general/src/math/Eigen/src/Core/Map.h similarity index 100% rename from src/math/eigen/src/Core/Map.h rename to general/src/math/Eigen/src/Core/Map.h diff --git a/src/math/eigen/src/Core/MapBase.h b/general/src/math/Eigen/src/Core/MapBase.h similarity index 100% rename from src/math/eigen/src/Core/MapBase.h rename to general/src/math/Eigen/src/Core/MapBase.h diff --git a/src/math/eigen/src/Core/MathFunctions.h b/general/src/math/Eigen/src/Core/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/MathFunctions.h rename to general/src/math/Eigen/src/Core/MathFunctions.h diff --git a/src/math/eigen/src/Core/MathFunctionsImpl.h b/general/src/math/Eigen/src/Core/MathFunctionsImpl.h similarity index 100% rename from src/math/eigen/src/Core/MathFunctionsImpl.h rename to general/src/math/Eigen/src/Core/MathFunctionsImpl.h diff --git a/src/math/eigen/src/Core/Matrix.h b/general/src/math/Eigen/src/Core/Matrix.h similarity index 100% rename from src/math/eigen/src/Core/Matrix.h rename to general/src/math/Eigen/src/Core/Matrix.h diff --git a/src/math/eigen/src/Core/MatrixBase.h b/general/src/math/Eigen/src/Core/MatrixBase.h similarity index 100% rename from src/math/eigen/src/Core/MatrixBase.h rename to general/src/math/Eigen/src/Core/MatrixBase.h diff --git a/src/math/eigen/src/Core/NestByValue.h b/general/src/math/Eigen/src/Core/NestByValue.h similarity index 100% rename from src/math/eigen/src/Core/NestByValue.h rename to general/src/math/Eigen/src/Core/NestByValue.h diff --git a/src/math/eigen/src/Core/NoAlias.h b/general/src/math/Eigen/src/Core/NoAlias.h similarity index 100% rename from src/math/eigen/src/Core/NoAlias.h rename to general/src/math/Eigen/src/Core/NoAlias.h diff --git a/src/math/eigen/src/Core/NumTraits.h b/general/src/math/Eigen/src/Core/NumTraits.h similarity index 100% rename from src/math/eigen/src/Core/NumTraits.h rename to general/src/math/Eigen/src/Core/NumTraits.h diff --git a/src/math/eigen/src/Core/PartialReduxEvaluator.h b/general/src/math/Eigen/src/Core/PartialReduxEvaluator.h similarity index 100% rename from src/math/eigen/src/Core/PartialReduxEvaluator.h rename to general/src/math/Eigen/src/Core/PartialReduxEvaluator.h diff --git a/src/math/eigen/src/Core/PermutationMatrix.h b/general/src/math/Eigen/src/Core/PermutationMatrix.h similarity index 100% rename from src/math/eigen/src/Core/PermutationMatrix.h rename to general/src/math/Eigen/src/Core/PermutationMatrix.h diff --git a/src/math/eigen/src/Core/PlainObjectBase.h b/general/src/math/Eigen/src/Core/PlainObjectBase.h similarity index 100% rename from src/math/eigen/src/Core/PlainObjectBase.h rename to general/src/math/Eigen/src/Core/PlainObjectBase.h diff --git a/src/math/eigen/src/Core/Product.h b/general/src/math/Eigen/src/Core/Product.h similarity index 100% rename from src/math/eigen/src/Core/Product.h rename to general/src/math/Eigen/src/Core/Product.h diff --git a/src/math/eigen/src/Core/ProductEvaluators.h b/general/src/math/Eigen/src/Core/ProductEvaluators.h similarity index 100% rename from src/math/eigen/src/Core/ProductEvaluators.h rename to general/src/math/Eigen/src/Core/ProductEvaluators.h diff --git a/src/math/eigen/src/Core/Random.h b/general/src/math/Eigen/src/Core/Random.h similarity index 100% rename from src/math/eigen/src/Core/Random.h rename to general/src/math/Eigen/src/Core/Random.h diff --git a/src/math/eigen/src/Core/Redux.h b/general/src/math/Eigen/src/Core/Redux.h similarity index 100% rename from src/math/eigen/src/Core/Redux.h rename to general/src/math/Eigen/src/Core/Redux.h diff --git a/src/math/eigen/src/Core/Ref.h b/general/src/math/Eigen/src/Core/Ref.h similarity index 100% rename from src/math/eigen/src/Core/Ref.h rename to general/src/math/Eigen/src/Core/Ref.h diff --git a/src/math/eigen/src/Core/Replicate.h b/general/src/math/Eigen/src/Core/Replicate.h similarity index 100% rename from src/math/eigen/src/Core/Replicate.h rename to general/src/math/Eigen/src/Core/Replicate.h diff --git a/src/math/eigen/src/Core/Reshaped.h b/general/src/math/Eigen/src/Core/Reshaped.h similarity index 100% rename from src/math/eigen/src/Core/Reshaped.h rename to general/src/math/Eigen/src/Core/Reshaped.h diff --git a/src/math/eigen/src/Core/ReturnByValue.h b/general/src/math/Eigen/src/Core/ReturnByValue.h similarity index 100% rename from src/math/eigen/src/Core/ReturnByValue.h rename to general/src/math/Eigen/src/Core/ReturnByValue.h diff --git a/src/math/eigen/src/Core/Reverse.h b/general/src/math/Eigen/src/Core/Reverse.h similarity index 100% rename from src/math/eigen/src/Core/Reverse.h rename to general/src/math/Eigen/src/Core/Reverse.h diff --git a/src/math/eigen/src/Core/Select.h b/general/src/math/Eigen/src/Core/Select.h similarity index 100% rename from src/math/eigen/src/Core/Select.h rename to general/src/math/Eigen/src/Core/Select.h diff --git a/src/math/eigen/src/Core/SelfAdjointView.h b/general/src/math/Eigen/src/Core/SelfAdjointView.h similarity index 100% rename from src/math/eigen/src/Core/SelfAdjointView.h rename to general/src/math/Eigen/src/Core/SelfAdjointView.h diff --git a/src/math/eigen/src/Core/SelfCwiseBinaryOp.h b/general/src/math/Eigen/src/Core/SelfCwiseBinaryOp.h similarity index 100% rename from src/math/eigen/src/Core/SelfCwiseBinaryOp.h rename to general/src/math/Eigen/src/Core/SelfCwiseBinaryOp.h diff --git a/src/math/eigen/src/Core/Solve.h b/general/src/math/Eigen/src/Core/Solve.h similarity index 100% rename from src/math/eigen/src/Core/Solve.h rename to general/src/math/Eigen/src/Core/Solve.h diff --git a/src/math/eigen/src/Core/SolveTriangular.h b/general/src/math/Eigen/src/Core/SolveTriangular.h similarity index 100% rename from src/math/eigen/src/Core/SolveTriangular.h rename to general/src/math/Eigen/src/Core/SolveTriangular.h diff --git a/src/math/eigen/src/Core/SolverBase.h b/general/src/math/Eigen/src/Core/SolverBase.h similarity index 100% rename from src/math/eigen/src/Core/SolverBase.h rename to general/src/math/Eigen/src/Core/SolverBase.h diff --git a/src/math/eigen/src/Core/StableNorm.h b/general/src/math/Eigen/src/Core/StableNorm.h similarity index 100% rename from src/math/eigen/src/Core/StableNorm.h rename to general/src/math/Eigen/src/Core/StableNorm.h diff --git a/src/math/eigen/src/Core/StlIterators.h b/general/src/math/Eigen/src/Core/StlIterators.h similarity index 100% rename from src/math/eigen/src/Core/StlIterators.h rename to general/src/math/Eigen/src/Core/StlIterators.h diff --git a/src/math/eigen/src/Core/Stride.h b/general/src/math/Eigen/src/Core/Stride.h similarity index 100% rename from src/math/eigen/src/Core/Stride.h rename to general/src/math/Eigen/src/Core/Stride.h diff --git a/src/math/eigen/src/Core/Swap.h b/general/src/math/Eigen/src/Core/Swap.h similarity index 100% rename from src/math/eigen/src/Core/Swap.h rename to general/src/math/Eigen/src/Core/Swap.h diff --git a/src/math/eigen/src/Core/Transpose.h b/general/src/math/Eigen/src/Core/Transpose.h similarity index 100% rename from src/math/eigen/src/Core/Transpose.h rename to general/src/math/Eigen/src/Core/Transpose.h diff --git a/src/math/eigen/src/Core/Transpositions.h b/general/src/math/Eigen/src/Core/Transpositions.h similarity index 100% rename from src/math/eigen/src/Core/Transpositions.h rename to general/src/math/Eigen/src/Core/Transpositions.h diff --git a/src/math/eigen/src/Core/TriangularMatrix.h b/general/src/math/Eigen/src/Core/TriangularMatrix.h similarity index 100% rename from src/math/eigen/src/Core/TriangularMatrix.h rename to general/src/math/Eigen/src/Core/TriangularMatrix.h diff --git a/src/math/eigen/src/Core/VectorBlock.h b/general/src/math/Eigen/src/Core/VectorBlock.h similarity index 100% rename from src/math/eigen/src/Core/VectorBlock.h rename to general/src/math/Eigen/src/Core/VectorBlock.h diff --git a/src/math/eigen/src/Core/VectorwiseOp.h b/general/src/math/Eigen/src/Core/VectorwiseOp.h similarity index 100% rename from src/math/eigen/src/Core/VectorwiseOp.h rename to general/src/math/Eigen/src/Core/VectorwiseOp.h diff --git a/src/math/eigen/src/Core/Visitor.h b/general/src/math/Eigen/src/Core/Visitor.h similarity index 100% rename from src/math/eigen/src/Core/Visitor.h rename to general/src/math/Eigen/src/Core/Visitor.h diff --git a/src/math/eigen/src/Core/arch/AVX/Complex.h b/general/src/math/Eigen/src/Core/arch/AVX/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/AVX/Complex.h rename to general/src/math/Eigen/src/Core/arch/AVX/Complex.h diff --git a/src/math/eigen/src/Core/arch/AVX/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/AVX/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/AVX/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/AVX/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/AVX/PacketMath.h b/general/src/math/Eigen/src/Core/arch/AVX/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/AVX/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/AVX/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/AVX/TypeCasting.h b/general/src/math/Eigen/src/Core/arch/AVX/TypeCasting.h similarity index 100% rename from src/math/eigen/src/Core/arch/AVX/TypeCasting.h rename to general/src/math/Eigen/src/Core/arch/AVX/TypeCasting.h diff --git a/src/math/eigen/src/Core/arch/AVX512/Complex.h b/general/src/math/Eigen/src/Core/arch/AVX512/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/AVX512/Complex.h rename to general/src/math/Eigen/src/Core/arch/AVX512/Complex.h diff --git a/src/math/eigen/src/Core/arch/AVX512/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/AVX512/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/AVX512/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/AVX512/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/AVX512/PacketMath.h b/general/src/math/Eigen/src/Core/arch/AVX512/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/AVX512/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/AVX512/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/AltiVec/Complex.h b/general/src/math/Eigen/src/Core/arch/AltiVec/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/AltiVec/Complex.h rename to general/src/math/Eigen/src/Core/arch/AltiVec/Complex.h diff --git a/src/math/eigen/src/Core/arch/AltiVec/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/AltiVec/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/AltiVec/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/AltiVec/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/AltiVec/PacketMath.h b/general/src/math/Eigen/src/Core/arch/AltiVec/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/AltiVec/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/AltiVec/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/CUDA/Complex.h b/general/src/math/Eigen/src/Core/arch/CUDA/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/CUDA/Complex.h rename to general/src/math/Eigen/src/Core/arch/CUDA/Complex.h diff --git a/src/math/eigen/src/Core/arch/Default/ConjHelper.h b/general/src/math/Eigen/src/Core/arch/Default/ConjHelper.h similarity index 100% rename from src/math/eigen/src/Core/arch/Default/ConjHelper.h rename to general/src/math/Eigen/src/Core/arch/Default/ConjHelper.h diff --git a/src/math/eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/general/src/math/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/Default/GenericPacketMathFunctions.h rename to general/src/math/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h diff --git a/src/math/eigen/src/Core/arch/Default/Settings.h b/general/src/math/Eigen/src/Core/arch/Default/Settings.h similarity index 100% rename from src/math/eigen/src/Core/arch/Default/Settings.h rename to general/src/math/Eigen/src/Core/arch/Default/Settings.h diff --git a/src/math/eigen/src/Core/arch/GPU/Half.h b/general/src/math/Eigen/src/Core/arch/GPU/Half.h similarity index 100% rename from src/math/eigen/src/Core/arch/GPU/Half.h rename to general/src/math/Eigen/src/Core/arch/GPU/Half.h diff --git a/src/math/eigen/src/Core/arch/GPU/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/GPU/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/GPU/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/GPU/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/GPU/PacketMath.h b/general/src/math/Eigen/src/Core/arch/GPU/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/GPU/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/GPU/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/GPU/PacketMathHalf.h b/general/src/math/Eigen/src/Core/arch/GPU/PacketMathHalf.h similarity index 100% rename from src/math/eigen/src/Core/arch/GPU/PacketMathHalf.h rename to general/src/math/Eigen/src/Core/arch/GPU/PacketMathHalf.h diff --git a/src/math/eigen/src/Core/arch/GPU/TypeCasting.h b/general/src/math/Eigen/src/Core/arch/GPU/TypeCasting.h similarity index 100% rename from src/math/eigen/src/Core/arch/GPU/TypeCasting.h rename to general/src/math/Eigen/src/Core/arch/GPU/TypeCasting.h diff --git a/src/math/eigen/src/Core/arch/HIP/hcc/math_constants.h b/general/src/math/Eigen/src/Core/arch/HIP/hcc/math_constants.h similarity index 100% rename from src/math/eigen/src/Core/arch/HIP/hcc/math_constants.h rename to general/src/math/Eigen/src/Core/arch/HIP/hcc/math_constants.h diff --git a/src/math/eigen/src/Core/arch/MSA/Complex.h b/general/src/math/Eigen/src/Core/arch/MSA/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/MSA/Complex.h rename to general/src/math/Eigen/src/Core/arch/MSA/Complex.h diff --git a/src/math/eigen/src/Core/arch/MSA/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/MSA/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/MSA/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/MSA/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/MSA/PacketMath.h b/general/src/math/Eigen/src/Core/arch/MSA/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/MSA/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/MSA/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/NEON/Complex.h b/general/src/math/Eigen/src/Core/arch/NEON/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/NEON/Complex.h rename to general/src/math/Eigen/src/Core/arch/NEON/Complex.h diff --git a/src/math/eigen/src/Core/arch/NEON/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/NEON/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/NEON/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/NEON/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/NEON/PacketMath.h b/general/src/math/Eigen/src/Core/arch/NEON/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/NEON/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/NEON/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/NEON/TypeCasting.h b/general/src/math/Eigen/src/Core/arch/NEON/TypeCasting.h similarity index 100% rename from src/math/eigen/src/Core/arch/NEON/TypeCasting.h rename to general/src/math/Eigen/src/Core/arch/NEON/TypeCasting.h diff --git a/src/math/eigen/src/Core/arch/SSE/Complex.h b/general/src/math/Eigen/src/Core/arch/SSE/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/SSE/Complex.h rename to general/src/math/Eigen/src/Core/arch/SSE/Complex.h diff --git a/src/math/eigen/src/Core/arch/SSE/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/SSE/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/SSE/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/SSE/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/SSE/PacketMath.h b/general/src/math/Eigen/src/Core/arch/SSE/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/SSE/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/SSE/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/SSE/TypeCasting.h b/general/src/math/Eigen/src/Core/arch/SSE/TypeCasting.h similarity index 100% rename from src/math/eigen/src/Core/arch/SSE/TypeCasting.h rename to general/src/math/Eigen/src/Core/arch/SSE/TypeCasting.h diff --git a/src/math/eigen/src/Core/arch/SYCL/InteropHeaders.h b/general/src/math/Eigen/src/Core/arch/SYCL/InteropHeaders.h similarity index 100% rename from src/math/eigen/src/Core/arch/SYCL/InteropHeaders.h rename to general/src/math/Eigen/src/Core/arch/SYCL/InteropHeaders.h diff --git a/src/math/eigen/src/Core/arch/SYCL/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/SYCL/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/SYCL/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/SYCL/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/SYCL/PacketMath.h b/general/src/math/Eigen/src/Core/arch/SYCL/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/SYCL/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/SYCL/PacketMath.h diff --git a/src/math/eigen/src/Core/arch/SYCL/SyclMemoryModel.h b/general/src/math/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h similarity index 100% rename from src/math/eigen/src/Core/arch/SYCL/SyclMemoryModel.h rename to general/src/math/Eigen/src/Core/arch/SYCL/SyclMemoryModel.h diff --git a/src/math/eigen/src/Core/arch/SYCL/TypeCasting.h b/general/src/math/Eigen/src/Core/arch/SYCL/TypeCasting.h similarity index 100% rename from src/math/eigen/src/Core/arch/SYCL/TypeCasting.h rename to general/src/math/Eigen/src/Core/arch/SYCL/TypeCasting.h diff --git a/src/math/eigen/src/Core/arch/ZVector/Complex.h b/general/src/math/Eigen/src/Core/arch/ZVector/Complex.h similarity index 100% rename from src/math/eigen/src/Core/arch/ZVector/Complex.h rename to general/src/math/Eigen/src/Core/arch/ZVector/Complex.h diff --git a/src/math/eigen/src/Core/arch/ZVector/MathFunctions.h b/general/src/math/Eigen/src/Core/arch/ZVector/MathFunctions.h similarity index 100% rename from src/math/eigen/src/Core/arch/ZVector/MathFunctions.h rename to general/src/math/Eigen/src/Core/arch/ZVector/MathFunctions.h diff --git a/src/math/eigen/src/Core/arch/ZVector/PacketMath.h b/general/src/math/Eigen/src/Core/arch/ZVector/PacketMath.h similarity index 100% rename from src/math/eigen/src/Core/arch/ZVector/PacketMath.h rename to general/src/math/Eigen/src/Core/arch/ZVector/PacketMath.h diff --git a/src/math/eigen/src/Core/functors/AssignmentFunctors.h b/general/src/math/Eigen/src/Core/functors/AssignmentFunctors.h similarity index 100% rename from src/math/eigen/src/Core/functors/AssignmentFunctors.h rename to general/src/math/Eigen/src/Core/functors/AssignmentFunctors.h diff --git a/src/math/eigen/src/Core/functors/BinaryFunctors.h b/general/src/math/Eigen/src/Core/functors/BinaryFunctors.h similarity index 100% rename from src/math/eigen/src/Core/functors/BinaryFunctors.h rename to general/src/math/Eigen/src/Core/functors/BinaryFunctors.h diff --git a/src/math/eigen/src/Core/functors/NullaryFunctors.h b/general/src/math/Eigen/src/Core/functors/NullaryFunctors.h similarity index 100% rename from src/math/eigen/src/Core/functors/NullaryFunctors.h rename to general/src/math/Eigen/src/Core/functors/NullaryFunctors.h diff --git a/src/math/eigen/src/Core/functors/StlFunctors.h b/general/src/math/Eigen/src/Core/functors/StlFunctors.h similarity index 100% rename from src/math/eigen/src/Core/functors/StlFunctors.h rename to general/src/math/Eigen/src/Core/functors/StlFunctors.h diff --git a/src/math/eigen/src/Core/functors/TernaryFunctors.h b/general/src/math/Eigen/src/Core/functors/TernaryFunctors.h similarity index 100% rename from src/math/eigen/src/Core/functors/TernaryFunctors.h rename to general/src/math/Eigen/src/Core/functors/TernaryFunctors.h diff --git a/src/math/eigen/src/Core/functors/UnaryFunctors.h b/general/src/math/Eigen/src/Core/functors/UnaryFunctors.h similarity index 100% rename from src/math/eigen/src/Core/functors/UnaryFunctors.h rename to general/src/math/Eigen/src/Core/functors/UnaryFunctors.h diff --git a/src/math/eigen/src/Core/products/GeneralBlockPanelKernel.h b/general/src/math/Eigen/src/Core/products/GeneralBlockPanelKernel.h similarity index 100% rename from src/math/eigen/src/Core/products/GeneralBlockPanelKernel.h rename to general/src/math/Eigen/src/Core/products/GeneralBlockPanelKernel.h diff --git a/src/math/eigen/src/Core/products/GeneralMatrixMatrix.h b/general/src/math/Eigen/src/Core/products/GeneralMatrixMatrix.h similarity index 100% rename from src/math/eigen/src/Core/products/GeneralMatrixMatrix.h rename to general/src/math/Eigen/src/Core/products/GeneralMatrixMatrix.h diff --git a/src/math/eigen/src/Core/products/GeneralMatrixMatrixTriangular.h b/general/src/math/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h similarity index 100% rename from src/math/eigen/src/Core/products/GeneralMatrixMatrixTriangular.h rename to general/src/math/Eigen/src/Core/products/GeneralMatrixMatrixTriangular.h diff --git a/src/math/eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h b/general/src/math/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h rename to general/src/math/Eigen/src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h diff --git a/src/math/eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h b/general/src/math/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h rename to general/src/math/Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h diff --git a/src/math/eigen/src/Core/products/GeneralMatrixVector.h b/general/src/math/Eigen/src/Core/products/GeneralMatrixVector.h similarity index 100% rename from src/math/eigen/src/Core/products/GeneralMatrixVector.h rename to general/src/math/Eigen/src/Core/products/GeneralMatrixVector.h diff --git a/src/math/eigen/src/Core/products/GeneralMatrixVector_BLAS.h b/general/src/math/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/GeneralMatrixVector_BLAS.h rename to general/src/math/Eigen/src/Core/products/GeneralMatrixVector_BLAS.h diff --git a/src/math/eigen/src/Core/products/Parallelizer.h b/general/src/math/Eigen/src/Core/products/Parallelizer.h similarity index 100% rename from src/math/eigen/src/Core/products/Parallelizer.h rename to general/src/math/Eigen/src/Core/products/Parallelizer.h diff --git a/src/math/eigen/src/Core/products/SelfadjointMatrixMatrix.h b/general/src/math/Eigen/src/Core/products/SelfadjointMatrixMatrix.h similarity index 100% rename from src/math/eigen/src/Core/products/SelfadjointMatrixMatrix.h rename to general/src/math/Eigen/src/Core/products/SelfadjointMatrixMatrix.h diff --git a/src/math/eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h b/general/src/math/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h rename to general/src/math/Eigen/src/Core/products/SelfadjointMatrixMatrix_BLAS.h diff --git a/src/math/eigen/src/Core/products/SelfadjointMatrixVector.h b/general/src/math/Eigen/src/Core/products/SelfadjointMatrixVector.h similarity index 100% rename from src/math/eigen/src/Core/products/SelfadjointMatrixVector.h rename to general/src/math/Eigen/src/Core/products/SelfadjointMatrixVector.h diff --git a/src/math/eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h b/general/src/math/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h rename to general/src/math/Eigen/src/Core/products/SelfadjointMatrixVector_BLAS.h diff --git a/src/math/eigen/src/Core/products/SelfadjointProduct.h b/general/src/math/Eigen/src/Core/products/SelfadjointProduct.h similarity index 100% rename from src/math/eigen/src/Core/products/SelfadjointProduct.h rename to general/src/math/Eigen/src/Core/products/SelfadjointProduct.h diff --git a/src/math/eigen/src/Core/products/SelfadjointRank2Update.h b/general/src/math/Eigen/src/Core/products/SelfadjointRank2Update.h similarity index 100% rename from src/math/eigen/src/Core/products/SelfadjointRank2Update.h rename to general/src/math/Eigen/src/Core/products/SelfadjointRank2Update.h diff --git a/src/math/eigen/src/Core/products/TriangularMatrixMatrix.h b/general/src/math/Eigen/src/Core/products/TriangularMatrixMatrix.h similarity index 100% rename from src/math/eigen/src/Core/products/TriangularMatrixMatrix.h rename to general/src/math/Eigen/src/Core/products/TriangularMatrixMatrix.h diff --git a/src/math/eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h b/general/src/math/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h rename to general/src/math/Eigen/src/Core/products/TriangularMatrixMatrix_BLAS.h diff --git a/src/math/eigen/src/Core/products/TriangularMatrixVector.h b/general/src/math/Eigen/src/Core/products/TriangularMatrixVector.h similarity index 100% rename from src/math/eigen/src/Core/products/TriangularMatrixVector.h rename to general/src/math/Eigen/src/Core/products/TriangularMatrixVector.h diff --git a/src/math/eigen/src/Core/products/TriangularMatrixVector_BLAS.h b/general/src/math/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/TriangularMatrixVector_BLAS.h rename to general/src/math/Eigen/src/Core/products/TriangularMatrixVector_BLAS.h diff --git a/src/math/eigen/src/Core/products/TriangularSolverMatrix.h b/general/src/math/Eigen/src/Core/products/TriangularSolverMatrix.h similarity index 100% rename from src/math/eigen/src/Core/products/TriangularSolverMatrix.h rename to general/src/math/Eigen/src/Core/products/TriangularSolverMatrix.h diff --git a/src/math/eigen/src/Core/products/TriangularSolverMatrix_BLAS.h b/general/src/math/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h similarity index 100% rename from src/math/eigen/src/Core/products/TriangularSolverMatrix_BLAS.h rename to general/src/math/Eigen/src/Core/products/TriangularSolverMatrix_BLAS.h diff --git a/src/math/eigen/src/Core/products/TriangularSolverVector.h b/general/src/math/Eigen/src/Core/products/TriangularSolverVector.h similarity index 100% rename from src/math/eigen/src/Core/products/TriangularSolverVector.h rename to general/src/math/Eigen/src/Core/products/TriangularSolverVector.h diff --git a/src/math/eigen/src/Core/util/BlasUtil.h b/general/src/math/Eigen/src/Core/util/BlasUtil.h similarity index 100% rename from src/math/eigen/src/Core/util/BlasUtil.h rename to general/src/math/Eigen/src/Core/util/BlasUtil.h diff --git a/src/math/eigen/src/Core/util/ConfigureVectorization.h b/general/src/math/Eigen/src/Core/util/ConfigureVectorization.h similarity index 100% rename from src/math/eigen/src/Core/util/ConfigureVectorization.h rename to general/src/math/Eigen/src/Core/util/ConfigureVectorization.h diff --git a/src/math/eigen/src/Core/util/Constants.h b/general/src/math/Eigen/src/Core/util/Constants.h similarity index 100% rename from src/math/eigen/src/Core/util/Constants.h rename to general/src/math/Eigen/src/Core/util/Constants.h diff --git a/src/math/eigen/src/Core/util/DisableStupidWarnings.h b/general/src/math/Eigen/src/Core/util/DisableStupidWarnings.h similarity index 100% rename from src/math/eigen/src/Core/util/DisableStupidWarnings.h rename to general/src/math/Eigen/src/Core/util/DisableStupidWarnings.h diff --git a/src/math/eigen/src/Core/util/ForwardDeclarations.h b/general/src/math/Eigen/src/Core/util/ForwardDeclarations.h similarity index 100% rename from src/math/eigen/src/Core/util/ForwardDeclarations.h rename to general/src/math/Eigen/src/Core/util/ForwardDeclarations.h diff --git a/src/math/eigen/src/Core/util/IndexedViewHelper.h b/general/src/math/Eigen/src/Core/util/IndexedViewHelper.h similarity index 100% rename from src/math/eigen/src/Core/util/IndexedViewHelper.h rename to general/src/math/Eigen/src/Core/util/IndexedViewHelper.h diff --git a/src/math/eigen/src/Core/util/IntegralConstant.h b/general/src/math/Eigen/src/Core/util/IntegralConstant.h similarity index 100% rename from src/math/eigen/src/Core/util/IntegralConstant.h rename to general/src/math/Eigen/src/Core/util/IntegralConstant.h diff --git a/src/math/eigen/src/Core/util/MKL_support.h b/general/src/math/Eigen/src/Core/util/MKL_support.h similarity index 100% rename from src/math/eigen/src/Core/util/MKL_support.h rename to general/src/math/Eigen/src/Core/util/MKL_support.h diff --git a/src/math/eigen/src/Core/util/Macros.h b/general/src/math/Eigen/src/Core/util/Macros.h similarity index 100% rename from src/math/eigen/src/Core/util/Macros.h rename to general/src/math/Eigen/src/Core/util/Macros.h diff --git a/src/math/eigen/src/Core/util/Memory.h b/general/src/math/Eigen/src/Core/util/Memory.h similarity index 100% rename from src/math/eigen/src/Core/util/Memory.h rename to general/src/math/Eigen/src/Core/util/Memory.h diff --git a/src/math/eigen/src/Core/util/Meta.h b/general/src/math/Eigen/src/Core/util/Meta.h similarity index 100% rename from src/math/eigen/src/Core/util/Meta.h rename to general/src/math/Eigen/src/Core/util/Meta.h diff --git a/src/math/eigen/src/Core/util/NonMPL2.h b/general/src/math/Eigen/src/Core/util/NonMPL2.h similarity index 100% rename from src/math/eigen/src/Core/util/NonMPL2.h rename to general/src/math/Eigen/src/Core/util/NonMPL2.h diff --git a/src/math/eigen/src/Core/util/ReenableStupidWarnings.h b/general/src/math/Eigen/src/Core/util/ReenableStupidWarnings.h similarity index 100% rename from src/math/eigen/src/Core/util/ReenableStupidWarnings.h rename to general/src/math/Eigen/src/Core/util/ReenableStupidWarnings.h diff --git a/src/math/eigen/src/Core/util/ReshapedHelper.h b/general/src/math/Eigen/src/Core/util/ReshapedHelper.h similarity index 100% rename from src/math/eigen/src/Core/util/ReshapedHelper.h rename to general/src/math/Eigen/src/Core/util/ReshapedHelper.h diff --git a/src/math/eigen/src/Core/util/StaticAssert.h b/general/src/math/Eigen/src/Core/util/StaticAssert.h similarity index 100% rename from src/math/eigen/src/Core/util/StaticAssert.h rename to general/src/math/Eigen/src/Core/util/StaticAssert.h diff --git a/src/math/eigen/src/Core/util/SymbolicIndex.h b/general/src/math/Eigen/src/Core/util/SymbolicIndex.h similarity index 100% rename from src/math/eigen/src/Core/util/SymbolicIndex.h rename to general/src/math/Eigen/src/Core/util/SymbolicIndex.h diff --git a/src/math/eigen/src/Core/util/XprHelper.h b/general/src/math/Eigen/src/Core/util/XprHelper.h similarity index 100% rename from src/math/eigen/src/Core/util/XprHelper.h rename to general/src/math/Eigen/src/Core/util/XprHelper.h diff --git a/src/math/eigen/src/Eigenvalues/ComplexEigenSolver.h b/general/src/math/Eigen/src/Eigenvalues/ComplexEigenSolver.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/ComplexEigenSolver.h rename to general/src/math/Eigen/src/Eigenvalues/ComplexEigenSolver.h diff --git a/src/math/eigen/src/Eigenvalues/ComplexSchur.h b/general/src/math/Eigen/src/Eigenvalues/ComplexSchur.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/ComplexSchur.h rename to general/src/math/Eigen/src/Eigenvalues/ComplexSchur.h diff --git a/src/math/eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h b/general/src/math/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h rename to general/src/math/Eigen/src/Eigenvalues/ComplexSchur_LAPACKE.h diff --git a/src/math/eigen/src/Eigenvalues/EigenSolver.h b/general/src/math/Eigen/src/Eigenvalues/EigenSolver.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/EigenSolver.h rename to general/src/math/Eigen/src/Eigenvalues/EigenSolver.h diff --git a/src/math/eigen/src/Eigenvalues/GeneralizedEigenSolver.h b/general/src/math/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/GeneralizedEigenSolver.h rename to general/src/math/Eigen/src/Eigenvalues/GeneralizedEigenSolver.h diff --git a/src/math/eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h b/general/src/math/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h rename to general/src/math/Eigen/src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h diff --git a/src/math/eigen/src/Eigenvalues/HessenbergDecomposition.h b/general/src/math/Eigen/src/Eigenvalues/HessenbergDecomposition.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/HessenbergDecomposition.h rename to general/src/math/Eigen/src/Eigenvalues/HessenbergDecomposition.h diff --git a/src/math/eigen/src/Eigenvalues/MatrixBaseEigenvalues.h b/general/src/math/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/MatrixBaseEigenvalues.h rename to general/src/math/Eigen/src/Eigenvalues/MatrixBaseEigenvalues.h diff --git a/src/math/eigen/src/Eigenvalues/RealQZ.h b/general/src/math/Eigen/src/Eigenvalues/RealQZ.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/RealQZ.h rename to general/src/math/Eigen/src/Eigenvalues/RealQZ.h diff --git a/src/math/eigen/src/Eigenvalues/RealSchur.h b/general/src/math/Eigen/src/Eigenvalues/RealSchur.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/RealSchur.h rename to general/src/math/Eigen/src/Eigenvalues/RealSchur.h diff --git a/src/math/eigen/src/Eigenvalues/RealSchur_LAPACKE.h b/general/src/math/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/RealSchur_LAPACKE.h rename to general/src/math/Eigen/src/Eigenvalues/RealSchur_LAPACKE.h diff --git a/src/math/eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/general/src/math/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/SelfAdjointEigenSolver.h rename to general/src/math/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h diff --git a/src/math/eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h b/general/src/math/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h rename to general/src/math/Eigen/src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h diff --git a/src/math/eigen/src/Eigenvalues/Tridiagonalization.h b/general/src/math/Eigen/src/Eigenvalues/Tridiagonalization.h similarity index 100% rename from src/math/eigen/src/Eigenvalues/Tridiagonalization.h rename to general/src/math/Eigen/src/Eigenvalues/Tridiagonalization.h diff --git a/src/math/eigen/src/Geometry/AlignedBox.h b/general/src/math/Eigen/src/Geometry/AlignedBox.h similarity index 100% rename from src/math/eigen/src/Geometry/AlignedBox.h rename to general/src/math/Eigen/src/Geometry/AlignedBox.h diff --git a/src/math/eigen/src/Geometry/AngleAxis.h b/general/src/math/Eigen/src/Geometry/AngleAxis.h similarity index 100% rename from src/math/eigen/src/Geometry/AngleAxis.h rename to general/src/math/Eigen/src/Geometry/AngleAxis.h diff --git a/src/math/eigen/src/Geometry/EulerAngles.h b/general/src/math/Eigen/src/Geometry/EulerAngles.h similarity index 100% rename from src/math/eigen/src/Geometry/EulerAngles.h rename to general/src/math/Eigen/src/Geometry/EulerAngles.h diff --git a/src/math/eigen/src/Geometry/Homogeneous.h b/general/src/math/Eigen/src/Geometry/Homogeneous.h similarity index 100% rename from src/math/eigen/src/Geometry/Homogeneous.h rename to general/src/math/Eigen/src/Geometry/Homogeneous.h diff --git a/src/math/eigen/src/Geometry/Hyperplane.h b/general/src/math/Eigen/src/Geometry/Hyperplane.h similarity index 100% rename from src/math/eigen/src/Geometry/Hyperplane.h rename to general/src/math/Eigen/src/Geometry/Hyperplane.h diff --git a/src/math/eigen/src/Geometry/OrthoMethods.h b/general/src/math/Eigen/src/Geometry/OrthoMethods.h similarity index 100% rename from src/math/eigen/src/Geometry/OrthoMethods.h rename to general/src/math/Eigen/src/Geometry/OrthoMethods.h diff --git a/src/math/eigen/src/Geometry/ParametrizedLine.h b/general/src/math/Eigen/src/Geometry/ParametrizedLine.h similarity index 100% rename from src/math/eigen/src/Geometry/ParametrizedLine.h rename to general/src/math/Eigen/src/Geometry/ParametrizedLine.h diff --git a/src/math/eigen/src/Geometry/Quaternion.h b/general/src/math/Eigen/src/Geometry/Quaternion.h similarity index 100% rename from src/math/eigen/src/Geometry/Quaternion.h rename to general/src/math/Eigen/src/Geometry/Quaternion.h diff --git a/src/math/eigen/src/Geometry/Rotation2D.h b/general/src/math/Eigen/src/Geometry/Rotation2D.h similarity index 100% rename from src/math/eigen/src/Geometry/Rotation2D.h rename to general/src/math/Eigen/src/Geometry/Rotation2D.h diff --git a/src/math/eigen/src/Geometry/RotationBase.h b/general/src/math/Eigen/src/Geometry/RotationBase.h similarity index 100% rename from src/math/eigen/src/Geometry/RotationBase.h rename to general/src/math/Eigen/src/Geometry/RotationBase.h diff --git a/src/math/eigen/src/Geometry/Scaling.h b/general/src/math/Eigen/src/Geometry/Scaling.h similarity index 100% rename from src/math/eigen/src/Geometry/Scaling.h rename to general/src/math/Eigen/src/Geometry/Scaling.h diff --git a/src/math/eigen/src/Geometry/Transform.h b/general/src/math/Eigen/src/Geometry/Transform.h similarity index 100% rename from src/math/eigen/src/Geometry/Transform.h rename to general/src/math/Eigen/src/Geometry/Transform.h diff --git a/src/math/eigen/src/Geometry/Translation.h b/general/src/math/Eigen/src/Geometry/Translation.h similarity index 100% rename from src/math/eigen/src/Geometry/Translation.h rename to general/src/math/Eigen/src/Geometry/Translation.h diff --git a/src/math/eigen/src/Geometry/Umeyama.h b/general/src/math/Eigen/src/Geometry/Umeyama.h similarity index 100% rename from src/math/eigen/src/Geometry/Umeyama.h rename to general/src/math/Eigen/src/Geometry/Umeyama.h diff --git a/src/math/eigen/src/Geometry/arch/Geometry_SSE.h b/general/src/math/Eigen/src/Geometry/arch/Geometry_SSE.h similarity index 100% rename from src/math/eigen/src/Geometry/arch/Geometry_SSE.h rename to general/src/math/Eigen/src/Geometry/arch/Geometry_SSE.h diff --git a/src/math/eigen/src/Householder/BlockHouseholder.h b/general/src/math/Eigen/src/Householder/BlockHouseholder.h similarity index 100% rename from src/math/eigen/src/Householder/BlockHouseholder.h rename to general/src/math/Eigen/src/Householder/BlockHouseholder.h diff --git a/src/math/eigen/src/Householder/Householder.h b/general/src/math/Eigen/src/Householder/Householder.h similarity index 100% rename from src/math/eigen/src/Householder/Householder.h rename to general/src/math/Eigen/src/Householder/Householder.h diff --git a/src/math/eigen/src/Householder/HouseholderSequence.h b/general/src/math/Eigen/src/Householder/HouseholderSequence.h similarity index 100% rename from src/math/eigen/src/Householder/HouseholderSequence.h rename to general/src/math/Eigen/src/Householder/HouseholderSequence.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/BasicPreconditioners.h b/general/src/math/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/BasicPreconditioners.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/BiCGSTAB.h b/general/src/math/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/BiCGSTAB.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/BiCGSTAB.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/ConjugateGradient.h b/general/src/math/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/ConjugateGradient.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/IncompleteCholesky.h b/general/src/math/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/IncompleteCholesky.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/IncompleteLUT.h b/general/src/math/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/IncompleteLUT.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/IncompleteLUT.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/IterativeSolverBase.h b/general/src/math/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/IterativeSolverBase.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h b/general/src/math/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/LeastSquareConjugateGradient.h diff --git a/src/math/eigen/src/IterativeLinearSolvers/SolveWithGuess.h b/general/src/math/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h similarity index 100% rename from src/math/eigen/src/IterativeLinearSolvers/SolveWithGuess.h rename to general/src/math/Eigen/src/IterativeLinearSolvers/SolveWithGuess.h diff --git a/src/math/eigen/src/Jacobi/Jacobi.h b/general/src/math/Eigen/src/Jacobi/Jacobi.h similarity index 100% rename from src/math/eigen/src/Jacobi/Jacobi.h rename to general/src/math/Eigen/src/Jacobi/Jacobi.h diff --git a/src/math/eigen/src/KLUSupport/KLUSupport.h b/general/src/math/Eigen/src/KLUSupport/KLUSupport.h similarity index 100% rename from src/math/eigen/src/KLUSupport/KLUSupport.h rename to general/src/math/Eigen/src/KLUSupport/KLUSupport.h diff --git a/src/math/eigen/src/LU/Determinant.h b/general/src/math/Eigen/src/LU/Determinant.h similarity index 100% rename from src/math/eigen/src/LU/Determinant.h rename to general/src/math/Eigen/src/LU/Determinant.h diff --git a/src/math/eigen/src/LU/FullPivLU.h b/general/src/math/Eigen/src/LU/FullPivLU.h similarity index 100% rename from src/math/eigen/src/LU/FullPivLU.h rename to general/src/math/Eigen/src/LU/FullPivLU.h diff --git a/src/math/eigen/src/LU/InverseImpl.h b/general/src/math/Eigen/src/LU/InverseImpl.h similarity index 100% rename from src/math/eigen/src/LU/InverseImpl.h rename to general/src/math/Eigen/src/LU/InverseImpl.h diff --git a/src/math/eigen/src/LU/PartialPivLU.h b/general/src/math/Eigen/src/LU/PartialPivLU.h similarity index 100% rename from src/math/eigen/src/LU/PartialPivLU.h rename to general/src/math/Eigen/src/LU/PartialPivLU.h diff --git a/src/math/eigen/src/LU/PartialPivLU_LAPACKE.h b/general/src/math/Eigen/src/LU/PartialPivLU_LAPACKE.h similarity index 100% rename from src/math/eigen/src/LU/PartialPivLU_LAPACKE.h rename to general/src/math/Eigen/src/LU/PartialPivLU_LAPACKE.h diff --git a/src/math/eigen/src/LU/arch/Inverse_SSE.h b/general/src/math/Eigen/src/LU/arch/Inverse_SSE.h similarity index 100% rename from src/math/eigen/src/LU/arch/Inverse_SSE.h rename to general/src/math/Eigen/src/LU/arch/Inverse_SSE.h diff --git a/src/math/eigen/src/MetisSupport/MetisSupport.h b/general/src/math/Eigen/src/MetisSupport/MetisSupport.h similarity index 100% rename from src/math/eigen/src/MetisSupport/MetisSupport.h rename to general/src/math/Eigen/src/MetisSupport/MetisSupport.h diff --git a/src/math/eigen/src/OrderingMethods/Amd.h b/general/src/math/Eigen/src/OrderingMethods/Amd.h similarity index 100% rename from src/math/eigen/src/OrderingMethods/Amd.h rename to general/src/math/Eigen/src/OrderingMethods/Amd.h diff --git a/src/math/eigen/src/OrderingMethods/Eigen_Colamd.h b/general/src/math/Eigen/src/OrderingMethods/Eigen_Colamd.h similarity index 100% rename from src/math/eigen/src/OrderingMethods/Eigen_Colamd.h rename to general/src/math/Eigen/src/OrderingMethods/Eigen_Colamd.h diff --git a/src/math/eigen/src/OrderingMethods/Ordering.h b/general/src/math/Eigen/src/OrderingMethods/Ordering.h similarity index 100% rename from src/math/eigen/src/OrderingMethods/Ordering.h rename to general/src/math/Eigen/src/OrderingMethods/Ordering.h diff --git a/src/math/eigen/src/PaStiXSupport/PaStiXSupport.h b/general/src/math/Eigen/src/PaStiXSupport/PaStiXSupport.h similarity index 100% rename from src/math/eigen/src/PaStiXSupport/PaStiXSupport.h rename to general/src/math/Eigen/src/PaStiXSupport/PaStiXSupport.h diff --git a/src/math/eigen/src/PardisoSupport/PardisoSupport.h b/general/src/math/Eigen/src/PardisoSupport/PardisoSupport.h similarity index 100% rename from src/math/eigen/src/PardisoSupport/PardisoSupport.h rename to general/src/math/Eigen/src/PardisoSupport/PardisoSupport.h diff --git a/src/math/eigen/src/QR/ColPivHouseholderQR.h b/general/src/math/Eigen/src/QR/ColPivHouseholderQR.h similarity index 100% rename from src/math/eigen/src/QR/ColPivHouseholderQR.h rename to general/src/math/Eigen/src/QR/ColPivHouseholderQR.h diff --git a/src/math/eigen/src/QR/ColPivHouseholderQR_LAPACKE.h b/general/src/math/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h similarity index 100% rename from src/math/eigen/src/QR/ColPivHouseholderQR_LAPACKE.h rename to general/src/math/Eigen/src/QR/ColPivHouseholderQR_LAPACKE.h diff --git a/src/math/eigen/src/QR/CompleteOrthogonalDecomposition.h b/general/src/math/Eigen/src/QR/CompleteOrthogonalDecomposition.h similarity index 100% rename from src/math/eigen/src/QR/CompleteOrthogonalDecomposition.h rename to general/src/math/Eigen/src/QR/CompleteOrthogonalDecomposition.h diff --git a/src/math/eigen/src/QR/FullPivHouseholderQR.h b/general/src/math/Eigen/src/QR/FullPivHouseholderQR.h similarity index 100% rename from src/math/eigen/src/QR/FullPivHouseholderQR.h rename to general/src/math/Eigen/src/QR/FullPivHouseholderQR.h diff --git a/src/math/eigen/src/QR/HouseholderQR.h b/general/src/math/Eigen/src/QR/HouseholderQR.h similarity index 100% rename from src/math/eigen/src/QR/HouseholderQR.h rename to general/src/math/Eigen/src/QR/HouseholderQR.h diff --git a/src/math/eigen/src/QR/HouseholderQR_LAPACKE.h b/general/src/math/Eigen/src/QR/HouseholderQR_LAPACKE.h similarity index 100% rename from src/math/eigen/src/QR/HouseholderQR_LAPACKE.h rename to general/src/math/Eigen/src/QR/HouseholderQR_LAPACKE.h diff --git a/src/math/eigen/src/SPQRSupport/SuiteSparseQRSupport.h b/general/src/math/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h similarity index 100% rename from src/math/eigen/src/SPQRSupport/SuiteSparseQRSupport.h rename to general/src/math/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h diff --git a/src/math/eigen/src/SVD/BDCSVD.h b/general/src/math/Eigen/src/SVD/BDCSVD.h similarity index 100% rename from src/math/eigen/src/SVD/BDCSVD.h rename to general/src/math/Eigen/src/SVD/BDCSVD.h diff --git a/src/math/eigen/src/SVD/JacobiSVD.h b/general/src/math/Eigen/src/SVD/JacobiSVD.h similarity index 100% rename from src/math/eigen/src/SVD/JacobiSVD.h rename to general/src/math/Eigen/src/SVD/JacobiSVD.h diff --git a/src/math/eigen/src/SVD/JacobiSVD_LAPACKE.h b/general/src/math/Eigen/src/SVD/JacobiSVD_LAPACKE.h similarity index 100% rename from src/math/eigen/src/SVD/JacobiSVD_LAPACKE.h rename to general/src/math/Eigen/src/SVD/JacobiSVD_LAPACKE.h diff --git a/src/math/eigen/src/SVD/SVDBase.h b/general/src/math/Eigen/src/SVD/SVDBase.h similarity index 100% rename from src/math/eigen/src/SVD/SVDBase.h rename to general/src/math/Eigen/src/SVD/SVDBase.h diff --git a/src/math/eigen/src/SVD/UpperBidiagonalization.h b/general/src/math/Eigen/src/SVD/UpperBidiagonalization.h similarity index 100% rename from src/math/eigen/src/SVD/UpperBidiagonalization.h rename to general/src/math/Eigen/src/SVD/UpperBidiagonalization.h diff --git a/src/math/eigen/src/SparseCholesky/SimplicialCholesky.h b/general/src/math/Eigen/src/SparseCholesky/SimplicialCholesky.h similarity index 100% rename from src/math/eigen/src/SparseCholesky/SimplicialCholesky.h rename to general/src/math/Eigen/src/SparseCholesky/SimplicialCholesky.h diff --git a/src/math/eigen/src/SparseCholesky/SimplicialCholesky_impl.h b/general/src/math/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h similarity index 100% rename from src/math/eigen/src/SparseCholesky/SimplicialCholesky_impl.h rename to general/src/math/Eigen/src/SparseCholesky/SimplicialCholesky_impl.h diff --git a/src/math/eigen/src/SparseCore/AmbiVector.h b/general/src/math/Eigen/src/SparseCore/AmbiVector.h similarity index 100% rename from src/math/eigen/src/SparseCore/AmbiVector.h rename to general/src/math/Eigen/src/SparseCore/AmbiVector.h diff --git a/src/math/eigen/src/SparseCore/CompressedStorage.h b/general/src/math/Eigen/src/SparseCore/CompressedStorage.h similarity index 100% rename from src/math/eigen/src/SparseCore/CompressedStorage.h rename to general/src/math/Eigen/src/SparseCore/CompressedStorage.h diff --git a/src/math/eigen/src/SparseCore/ConservativeSparseSparseProduct.h b/general/src/math/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h similarity index 100% rename from src/math/eigen/src/SparseCore/ConservativeSparseSparseProduct.h rename to general/src/math/Eigen/src/SparseCore/ConservativeSparseSparseProduct.h diff --git a/src/math/eigen/src/SparseCore/MappedSparseMatrix.h b/general/src/math/Eigen/src/SparseCore/MappedSparseMatrix.h similarity index 100% rename from src/math/eigen/src/SparseCore/MappedSparseMatrix.h rename to general/src/math/Eigen/src/SparseCore/MappedSparseMatrix.h diff --git a/src/math/eigen/src/SparseCore/SparseAssign.h b/general/src/math/Eigen/src/SparseCore/SparseAssign.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseAssign.h rename to general/src/math/Eigen/src/SparseCore/SparseAssign.h diff --git a/src/math/eigen/src/SparseCore/SparseBlock.h b/general/src/math/Eigen/src/SparseCore/SparseBlock.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseBlock.h rename to general/src/math/Eigen/src/SparseCore/SparseBlock.h diff --git a/src/math/eigen/src/SparseCore/SparseColEtree.h b/general/src/math/Eigen/src/SparseCore/SparseColEtree.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseColEtree.h rename to general/src/math/Eigen/src/SparseCore/SparseColEtree.h diff --git a/src/math/eigen/src/SparseCore/SparseCompressedBase.h b/general/src/math/Eigen/src/SparseCore/SparseCompressedBase.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseCompressedBase.h rename to general/src/math/Eigen/src/SparseCore/SparseCompressedBase.h diff --git a/src/math/eigen/src/SparseCore/SparseCwiseBinaryOp.h b/general/src/math/Eigen/src/SparseCore/SparseCwiseBinaryOp.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseCwiseBinaryOp.h rename to general/src/math/Eigen/src/SparseCore/SparseCwiseBinaryOp.h diff --git a/src/math/eigen/src/SparseCore/SparseCwiseUnaryOp.h b/general/src/math/Eigen/src/SparseCore/SparseCwiseUnaryOp.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseCwiseUnaryOp.h rename to general/src/math/Eigen/src/SparseCore/SparseCwiseUnaryOp.h diff --git a/src/math/eigen/src/SparseCore/SparseDenseProduct.h b/general/src/math/Eigen/src/SparseCore/SparseDenseProduct.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseDenseProduct.h rename to general/src/math/Eigen/src/SparseCore/SparseDenseProduct.h diff --git a/src/math/eigen/src/SparseCore/SparseDiagonalProduct.h b/general/src/math/Eigen/src/SparseCore/SparseDiagonalProduct.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseDiagonalProduct.h rename to general/src/math/Eigen/src/SparseCore/SparseDiagonalProduct.h diff --git a/src/math/eigen/src/SparseCore/SparseDot.h b/general/src/math/Eigen/src/SparseCore/SparseDot.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseDot.h rename to general/src/math/Eigen/src/SparseCore/SparseDot.h diff --git a/src/math/eigen/src/SparseCore/SparseFuzzy.h b/general/src/math/Eigen/src/SparseCore/SparseFuzzy.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseFuzzy.h rename to general/src/math/Eigen/src/SparseCore/SparseFuzzy.h diff --git a/src/math/eigen/src/SparseCore/SparseMap.h b/general/src/math/Eigen/src/SparseCore/SparseMap.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseMap.h rename to general/src/math/Eigen/src/SparseCore/SparseMap.h diff --git a/src/math/eigen/src/SparseCore/SparseMatrix.h b/general/src/math/Eigen/src/SparseCore/SparseMatrix.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseMatrix.h rename to general/src/math/Eigen/src/SparseCore/SparseMatrix.h diff --git a/src/math/eigen/src/SparseCore/SparseMatrixBase.h b/general/src/math/Eigen/src/SparseCore/SparseMatrixBase.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseMatrixBase.h rename to general/src/math/Eigen/src/SparseCore/SparseMatrixBase.h diff --git a/src/math/eigen/src/SparseCore/SparsePermutation.h b/general/src/math/Eigen/src/SparseCore/SparsePermutation.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparsePermutation.h rename to general/src/math/Eigen/src/SparseCore/SparsePermutation.h diff --git a/src/math/eigen/src/SparseCore/SparseProduct.h b/general/src/math/Eigen/src/SparseCore/SparseProduct.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseProduct.h rename to general/src/math/Eigen/src/SparseCore/SparseProduct.h diff --git a/src/math/eigen/src/SparseCore/SparseRedux.h b/general/src/math/Eigen/src/SparseCore/SparseRedux.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseRedux.h rename to general/src/math/Eigen/src/SparseCore/SparseRedux.h diff --git a/src/math/eigen/src/SparseCore/SparseRef.h b/general/src/math/Eigen/src/SparseCore/SparseRef.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseRef.h rename to general/src/math/Eigen/src/SparseCore/SparseRef.h diff --git a/src/math/eigen/src/SparseCore/SparseSelfAdjointView.h b/general/src/math/Eigen/src/SparseCore/SparseSelfAdjointView.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseSelfAdjointView.h rename to general/src/math/Eigen/src/SparseCore/SparseSelfAdjointView.h diff --git a/src/math/eigen/src/SparseCore/SparseSolverBase.h b/general/src/math/Eigen/src/SparseCore/SparseSolverBase.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseSolverBase.h rename to general/src/math/Eigen/src/SparseCore/SparseSolverBase.h diff --git a/src/math/eigen/src/SparseCore/SparseSparseProductWithPruning.h b/general/src/math/Eigen/src/SparseCore/SparseSparseProductWithPruning.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseSparseProductWithPruning.h rename to general/src/math/Eigen/src/SparseCore/SparseSparseProductWithPruning.h diff --git a/src/math/eigen/src/SparseCore/SparseTranspose.h b/general/src/math/Eigen/src/SparseCore/SparseTranspose.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseTranspose.h rename to general/src/math/Eigen/src/SparseCore/SparseTranspose.h diff --git a/src/math/eigen/src/SparseCore/SparseTriangularView.h b/general/src/math/Eigen/src/SparseCore/SparseTriangularView.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseTriangularView.h rename to general/src/math/Eigen/src/SparseCore/SparseTriangularView.h diff --git a/src/math/eigen/src/SparseCore/SparseUtil.h b/general/src/math/Eigen/src/SparseCore/SparseUtil.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseUtil.h rename to general/src/math/Eigen/src/SparseCore/SparseUtil.h diff --git a/src/math/eigen/src/SparseCore/SparseVector.h b/general/src/math/Eigen/src/SparseCore/SparseVector.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseVector.h rename to general/src/math/Eigen/src/SparseCore/SparseVector.h diff --git a/src/math/eigen/src/SparseCore/SparseView.h b/general/src/math/Eigen/src/SparseCore/SparseView.h similarity index 100% rename from src/math/eigen/src/SparseCore/SparseView.h rename to general/src/math/Eigen/src/SparseCore/SparseView.h diff --git a/src/math/eigen/src/SparseCore/TriangularSolver.h b/general/src/math/Eigen/src/SparseCore/TriangularSolver.h similarity index 100% rename from src/math/eigen/src/SparseCore/TriangularSolver.h rename to general/src/math/Eigen/src/SparseCore/TriangularSolver.h diff --git a/src/math/eigen/src/SparseLU/SparseLU.h b/general/src/math/Eigen/src/SparseLU/SparseLU.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU.h rename to general/src/math/Eigen/src/SparseLU/SparseLU.h diff --git a/src/math/eigen/src/SparseLU/SparseLUImpl.h b/general/src/math/Eigen/src/SparseLU/SparseLUImpl.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLUImpl.h rename to general/src/math/Eigen/src/SparseLU/SparseLUImpl.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_Memory.h b/general/src/math/Eigen/src/SparseLU/SparseLU_Memory.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_Memory.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_Memory.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_Structs.h b/general/src/math/Eigen/src/SparseLU/SparseLU_Structs.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_Structs.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_Structs.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_SupernodalMatrix.h b/general/src/math/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_SupernodalMatrix.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_SupernodalMatrix.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_Utils.h b/general/src/math/Eigen/src/SparseLU/SparseLU_Utils.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_Utils.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_Utils.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_column_bmod.h b/general/src/math/Eigen/src/SparseLU/SparseLU_column_bmod.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_column_bmod.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_column_bmod.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_column_dfs.h b/general/src/math/Eigen/src/SparseLU/SparseLU_column_dfs.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_column_dfs.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_column_dfs.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_copy_to_ucol.h b/general/src/math/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_copy_to_ucol.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_copy_to_ucol.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_gemm_kernel.h b/general/src/math/Eigen/src/SparseLU/SparseLU_gemm_kernel.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_gemm_kernel.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_gemm_kernel.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_heap_relax_snode.h b/general/src/math/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_heap_relax_snode.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_heap_relax_snode.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_kernel_bmod.h b/general/src/math/Eigen/src/SparseLU/SparseLU_kernel_bmod.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_kernel_bmod.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_kernel_bmod.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_panel_bmod.h b/general/src/math/Eigen/src/SparseLU/SparseLU_panel_bmod.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_panel_bmod.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_panel_bmod.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_panel_dfs.h b/general/src/math/Eigen/src/SparseLU/SparseLU_panel_dfs.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_panel_dfs.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_panel_dfs.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_pivotL.h b/general/src/math/Eigen/src/SparseLU/SparseLU_pivotL.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_pivotL.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_pivotL.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_pruneL.h b/general/src/math/Eigen/src/SparseLU/SparseLU_pruneL.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_pruneL.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_pruneL.h diff --git a/src/math/eigen/src/SparseLU/SparseLU_relax_snode.h b/general/src/math/Eigen/src/SparseLU/SparseLU_relax_snode.h similarity index 100% rename from src/math/eigen/src/SparseLU/SparseLU_relax_snode.h rename to general/src/math/Eigen/src/SparseLU/SparseLU_relax_snode.h diff --git a/src/math/eigen/src/SparseQR/SparseQR.h b/general/src/math/Eigen/src/SparseQR/SparseQR.h similarity index 100% rename from src/math/eigen/src/SparseQR/SparseQR.h rename to general/src/math/Eigen/src/SparseQR/SparseQR.h diff --git a/src/math/eigen/src/StlSupport/StdDeque.h b/general/src/math/Eigen/src/StlSupport/StdDeque.h similarity index 100% rename from src/math/eigen/src/StlSupport/StdDeque.h rename to general/src/math/Eigen/src/StlSupport/StdDeque.h diff --git a/src/math/eigen/src/StlSupport/StdList.h b/general/src/math/Eigen/src/StlSupport/StdList.h similarity index 100% rename from src/math/eigen/src/StlSupport/StdList.h rename to general/src/math/Eigen/src/StlSupport/StdList.h diff --git a/src/math/eigen/src/StlSupport/StdVector.h b/general/src/math/Eigen/src/StlSupport/StdVector.h similarity index 100% rename from src/math/eigen/src/StlSupport/StdVector.h rename to general/src/math/Eigen/src/StlSupport/StdVector.h diff --git a/src/math/eigen/src/StlSupport/details.h b/general/src/math/Eigen/src/StlSupport/details.h similarity index 100% rename from src/math/eigen/src/StlSupport/details.h rename to general/src/math/Eigen/src/StlSupport/details.h diff --git a/src/math/eigen/src/SuperLUSupport/SuperLUSupport.h b/general/src/math/Eigen/src/SuperLUSupport/SuperLUSupport.h similarity index 100% rename from src/math/eigen/src/SuperLUSupport/SuperLUSupport.h rename to general/src/math/Eigen/src/SuperLUSupport/SuperLUSupport.h diff --git a/src/math/eigen/src/UmfPackSupport/UmfPackSupport.h b/general/src/math/Eigen/src/UmfPackSupport/UmfPackSupport.h similarity index 100% rename from src/math/eigen/src/UmfPackSupport/UmfPackSupport.h rename to general/src/math/Eigen/src/UmfPackSupport/UmfPackSupport.h diff --git a/src/math/eigen/src/misc/Image.h b/general/src/math/Eigen/src/misc/Image.h similarity index 100% rename from src/math/eigen/src/misc/Image.h rename to general/src/math/Eigen/src/misc/Image.h diff --git a/src/math/eigen/src/misc/Kernel.h b/general/src/math/Eigen/src/misc/Kernel.h similarity index 100% rename from src/math/eigen/src/misc/Kernel.h rename to general/src/math/Eigen/src/misc/Kernel.h diff --git a/src/math/eigen/src/misc/RealSvd2x2.h b/general/src/math/Eigen/src/misc/RealSvd2x2.h similarity index 100% rename from src/math/eigen/src/misc/RealSvd2x2.h rename to general/src/math/Eigen/src/misc/RealSvd2x2.h diff --git a/src/math/eigen/src/misc/blas.h b/general/src/math/Eigen/src/misc/blas.h similarity index 100% rename from src/math/eigen/src/misc/blas.h rename to general/src/math/Eigen/src/misc/blas.h diff --git a/src/math/eigen/src/misc/lapack.h b/general/src/math/Eigen/src/misc/lapack.h similarity index 100% rename from src/math/eigen/src/misc/lapack.h rename to general/src/math/Eigen/src/misc/lapack.h diff --git a/src/math/eigen/src/misc/lapacke.h b/general/src/math/Eigen/src/misc/lapacke.h similarity index 100% rename from src/math/eigen/src/misc/lapacke.h rename to general/src/math/Eigen/src/misc/lapacke.h diff --git a/src/math/eigen/src/misc/lapacke_mangling.h b/general/src/math/Eigen/src/misc/lapacke_mangling.h similarity index 100% rename from src/math/eigen/src/misc/lapacke_mangling.h rename to general/src/math/Eigen/src/misc/lapacke_mangling.h diff --git a/src/math/eigen/src/plugins/ArrayCwiseBinaryOps.h b/general/src/math/Eigen/src/plugins/ArrayCwiseBinaryOps.h similarity index 100% rename from src/math/eigen/src/plugins/ArrayCwiseBinaryOps.h rename to general/src/math/Eigen/src/plugins/ArrayCwiseBinaryOps.h diff --git a/src/math/eigen/src/plugins/ArrayCwiseUnaryOps.h b/general/src/math/Eigen/src/plugins/ArrayCwiseUnaryOps.h similarity index 100% rename from src/math/eigen/src/plugins/ArrayCwiseUnaryOps.h rename to general/src/math/Eigen/src/plugins/ArrayCwiseUnaryOps.h diff --git a/src/math/eigen/src/plugins/BlockMethods.h b/general/src/math/Eigen/src/plugins/BlockMethods.h similarity index 100% rename from src/math/eigen/src/plugins/BlockMethods.h rename to general/src/math/Eigen/src/plugins/BlockMethods.h diff --git a/src/math/eigen/src/plugins/CommonCwiseBinaryOps.h b/general/src/math/Eigen/src/plugins/CommonCwiseBinaryOps.h similarity index 100% rename from src/math/eigen/src/plugins/CommonCwiseBinaryOps.h rename to general/src/math/Eigen/src/plugins/CommonCwiseBinaryOps.h diff --git a/src/math/eigen/src/plugins/CommonCwiseUnaryOps.h b/general/src/math/Eigen/src/plugins/CommonCwiseUnaryOps.h similarity index 100% rename from src/math/eigen/src/plugins/CommonCwiseUnaryOps.h rename to general/src/math/Eigen/src/plugins/CommonCwiseUnaryOps.h diff --git a/src/math/eigen/src/plugins/IndexedViewMethods.h b/general/src/math/Eigen/src/plugins/IndexedViewMethods.h similarity index 100% rename from src/math/eigen/src/plugins/IndexedViewMethods.h rename to general/src/math/Eigen/src/plugins/IndexedViewMethods.h diff --git a/src/math/eigen/src/plugins/MatrixCwiseBinaryOps.h b/general/src/math/Eigen/src/plugins/MatrixCwiseBinaryOps.h similarity index 100% rename from src/math/eigen/src/plugins/MatrixCwiseBinaryOps.h rename to general/src/math/Eigen/src/plugins/MatrixCwiseBinaryOps.h diff --git a/src/math/eigen/src/plugins/MatrixCwiseUnaryOps.h b/general/src/math/Eigen/src/plugins/MatrixCwiseUnaryOps.h similarity index 100% rename from src/math/eigen/src/plugins/MatrixCwiseUnaryOps.h rename to general/src/math/Eigen/src/plugins/MatrixCwiseUnaryOps.h diff --git a/src/math/eigen/src/plugins/ReshapedMethods.h b/general/src/math/Eigen/src/plugins/ReshapedMethods.h similarity index 100% rename from src/math/eigen/src/plugins/ReshapedMethods.h rename to general/src/math/Eigen/src/plugins/ReshapedMethods.h diff --git a/src/net/PackageReceiver.cpp b/general/src/net/PackageReceiver.cpp similarity index 100% rename from src/net/PackageReceiver.cpp rename to general/src/net/PackageReceiver.cpp diff --git a/src/net/PackageReceiver.h b/general/src/net/PackageReceiver.h similarity index 100% rename from src/net/PackageReceiver.h rename to general/src/net/PackageReceiver.h diff --git a/src/net/TcpClient.cpp b/general/src/net/TcpClient.cpp similarity index 100% rename from src/net/TcpClient.cpp rename to general/src/net/TcpClient.cpp diff --git a/src/net/TcpClient.h b/general/src/net/TcpClient.h similarity index 100% rename from src/net/TcpClient.h rename to general/src/net/TcpClient.h diff --git a/obj/inc/Observer.h b/general/src/pattern/Observer.h similarity index 100% rename from obj/inc/Observer.h rename to general/src/pattern/Observer.h diff --git a/obj/inc/adapter.h b/general/src/pattern/adapter.h similarity index 100% rename from obj/inc/adapter.h rename to general/src/pattern/adapter.h diff --git a/src/pattern/fsm.h b/general/src/pattern/fsm.h similarity index 100% rename from src/pattern/fsm.h rename to general/src/pattern/fsm.h diff --git a/obj/inc/signleton.h b/general/src/pattern/signleton.h similarity index 100% rename from obj/inc/signleton.h rename to general/src/pattern/signleton.h diff --git a/obj/inc/stratergy.h b/general/src/pattern/stratergy.h similarity index 100% rename from obj/inc/stratergy.h rename to general/src/pattern/stratergy.h diff --git a/src/utils.cpp b/general/src/utils.cpp similarity index 100% rename from src/utils.cpp rename to general/src/utils.cpp diff --git a/third/include/evdns.h b/general/third/include/evdns.h similarity index 100% rename from third/include/evdns.h rename to general/third/include/evdns.h diff --git a/third/include/event.h b/general/third/include/event.h similarity index 100% rename from third/include/event.h rename to general/third/include/event.h diff --git a/third/include/event2/buffer.h b/general/third/include/event2/buffer.h similarity index 100% rename from third/include/event2/buffer.h rename to general/third/include/event2/buffer.h diff --git a/third/include/event2/buffer_compat.h b/general/third/include/event2/buffer_compat.h similarity index 100% rename from third/include/event2/buffer_compat.h rename to general/third/include/event2/buffer_compat.h diff --git a/third/include/event2/bufferevent.h b/general/third/include/event2/bufferevent.h similarity index 100% rename from third/include/event2/bufferevent.h rename to general/third/include/event2/bufferevent.h diff --git a/third/include/event2/bufferevent_compat.h b/general/third/include/event2/bufferevent_compat.h similarity index 100% rename from third/include/event2/bufferevent_compat.h rename to general/third/include/event2/bufferevent_compat.h diff --git a/third/include/event2/bufferevent_ssl.h b/general/third/include/event2/bufferevent_ssl.h similarity index 100% rename from third/include/event2/bufferevent_ssl.h rename to general/third/include/event2/bufferevent_ssl.h diff --git a/third/include/event2/bufferevent_struct.h b/general/third/include/event2/bufferevent_struct.h similarity index 100% rename from third/include/event2/bufferevent_struct.h rename to general/third/include/event2/bufferevent_struct.h diff --git a/third/include/event2/dns.h b/general/third/include/event2/dns.h similarity index 100% rename from third/include/event2/dns.h rename to general/third/include/event2/dns.h diff --git a/third/include/event2/dns_compat.h b/general/third/include/event2/dns_compat.h similarity index 100% rename from third/include/event2/dns_compat.h rename to general/third/include/event2/dns_compat.h diff --git a/third/include/event2/dns_struct.h b/general/third/include/event2/dns_struct.h similarity index 100% rename from third/include/event2/dns_struct.h rename to general/third/include/event2/dns_struct.h diff --git a/third/include/event2/event-config.h b/general/third/include/event2/event-config.h similarity index 100% rename from third/include/event2/event-config.h rename to general/third/include/event2/event-config.h diff --git a/third/include/event2/event.h b/general/third/include/event2/event.h similarity index 100% rename from third/include/event2/event.h rename to general/third/include/event2/event.h diff --git a/third/include/event2/event_compat.h b/general/third/include/event2/event_compat.h similarity index 100% rename from third/include/event2/event_compat.h rename to general/third/include/event2/event_compat.h diff --git a/third/include/event2/event_struct.h b/general/third/include/event2/event_struct.h similarity index 100% rename from third/include/event2/event_struct.h rename to general/third/include/event2/event_struct.h diff --git a/third/include/event2/http.h b/general/third/include/event2/http.h similarity index 100% rename from third/include/event2/http.h rename to general/third/include/event2/http.h diff --git a/third/include/event2/http_compat.h b/general/third/include/event2/http_compat.h similarity index 100% rename from third/include/event2/http_compat.h rename to general/third/include/event2/http_compat.h diff --git a/third/include/event2/http_struct.h b/general/third/include/event2/http_struct.h similarity index 100% rename from third/include/event2/http_struct.h rename to general/third/include/event2/http_struct.h diff --git a/third/include/event2/keyvalq_struct.h b/general/third/include/event2/keyvalq_struct.h similarity index 100% rename from third/include/event2/keyvalq_struct.h rename to general/third/include/event2/keyvalq_struct.h diff --git a/third/include/event2/listener.h b/general/third/include/event2/listener.h similarity index 100% rename from third/include/event2/listener.h rename to general/third/include/event2/listener.h diff --git a/third/include/event2/rpc.h b/general/third/include/event2/rpc.h similarity index 100% rename from third/include/event2/rpc.h rename to general/third/include/event2/rpc.h diff --git a/third/include/event2/rpc_compat.h b/general/third/include/event2/rpc_compat.h similarity index 100% rename from third/include/event2/rpc_compat.h rename to general/third/include/event2/rpc_compat.h diff --git a/third/include/event2/rpc_struct.h b/general/third/include/event2/rpc_struct.h similarity index 100% rename from third/include/event2/rpc_struct.h rename to general/third/include/event2/rpc_struct.h diff --git a/third/include/event2/tag.h b/general/third/include/event2/tag.h similarity index 100% rename from third/include/event2/tag.h rename to general/third/include/event2/tag.h diff --git a/third/include/event2/tag_compat.h b/general/third/include/event2/tag_compat.h similarity index 100% rename from third/include/event2/tag_compat.h rename to general/third/include/event2/tag_compat.h diff --git a/third/include/event2/thread.h b/general/third/include/event2/thread.h similarity index 100% rename from third/include/event2/thread.h rename to general/third/include/event2/thread.h diff --git a/third/include/event2/util.h b/general/third/include/event2/util.h similarity index 100% rename from third/include/event2/util.h rename to general/third/include/event2/util.h diff --git a/third/include/event2/visibility.h b/general/third/include/event2/visibility.h similarity index 100% rename from third/include/event2/visibility.h rename to general/third/include/event2/visibility.h diff --git a/third/include/evhttp.h b/general/third/include/evhttp.h similarity index 100% rename from third/include/evhttp.h rename to general/third/include/evhttp.h diff --git a/third/include/evrpc.h b/general/third/include/evrpc.h similarity index 100% rename from third/include/evrpc.h rename to general/third/include/evrpc.h diff --git a/third/include/evutil.h b/general/third/include/evutil.h similarity index 100% rename from third/include/evutil.h rename to general/third/include/evutil.h diff --git a/obj/inc/debug.h b/general/third/include/inc/debug.h similarity index 100% rename from obj/inc/debug.h rename to general/third/include/inc/debug.h diff --git a/third/include/inc/glad/include/KHR/khrplatform.h b/general/third/include/inc/glad/include/KHR/khrplatform.h similarity index 100% rename from third/include/inc/glad/include/KHR/khrplatform.h rename to general/third/include/inc/glad/include/KHR/khrplatform.h diff --git a/third/include/inc/glad/include/glad/glad.h b/general/third/include/inc/glad/include/glad/glad.h similarity index 100% rename from third/include/inc/glad/include/glad/glad.h rename to general/third/include/inc/glad/include/glad/glad.h diff --git a/third/include/inc/glad/src/glad.c b/general/third/include/inc/glad/src/glad.c similarity index 100% rename from third/include/inc/glad/src/glad.c rename to general/third/include/inc/glad/src/glad.c diff --git a/obj/inc/loger.h b/general/third/include/inc/loger.h similarity index 100% rename from obj/inc/loger.h rename to general/third/include/inc/loger.h diff --git a/obj/inc/utils.h b/general/third/include/inc/utils.h similarity index 100% rename from obj/inc/utils.h rename to general/third/include/inc/utils.h diff --git a/third/lib/libevent.a b/general/third/lib/libevent.a similarity index 100% rename from third/lib/libevent.a rename to general/third/lib/libevent.a diff --git a/third/lib/libevent.dll.a b/general/third/lib/libevent.dll.a similarity index 100% rename from third/lib/libevent.dll.a rename to general/third/lib/libevent.dll.a diff --git a/third/lib/libevent.la b/general/third/lib/libevent.la similarity index 100% rename from third/lib/libevent.la rename to general/third/lib/libevent.la diff --git a/third/lib/libevent_core.a b/general/third/lib/libevent_core.a similarity index 100% rename from third/lib/libevent_core.a rename to general/third/lib/libevent_core.a diff --git a/third/lib/libevent_core.dll.a b/general/third/lib/libevent_core.dll.a similarity index 100% rename from third/lib/libevent_core.dll.a rename to general/third/lib/libevent_core.dll.a diff --git a/third/lib/libevent_core.la b/general/third/lib/libevent_core.la similarity index 100% rename from third/lib/libevent_core.la rename to general/third/lib/libevent_core.la diff --git a/third/lib/libevent_extra.a b/general/third/lib/libevent_extra.a similarity index 100% rename from third/lib/libevent_extra.a rename to general/third/lib/libevent_extra.a diff --git a/third/lib/libevent_extra.dll.a b/general/third/lib/libevent_extra.dll.a similarity index 100% rename from third/lib/libevent_extra.dll.a rename to general/third/lib/libevent_extra.dll.a diff --git a/third/lib/libevent_extra.la b/general/third/lib/libevent_extra.la similarity index 100% rename from third/lib/libevent_extra.la rename to general/third/lib/libevent_extra.la diff --git a/third/lib/libevent_openssl.a b/general/third/lib/libevent_openssl.a similarity index 100% rename from third/lib/libevent_openssl.a rename to general/third/lib/libevent_openssl.a diff --git a/third/lib/libevent_openssl.dll.a b/general/third/lib/libevent_openssl.dll.a similarity index 100% rename from third/lib/libevent_openssl.dll.a rename to general/third/lib/libevent_openssl.dll.a diff --git a/third/lib/libevent_openssl.la b/general/third/lib/libevent_openssl.la similarity index 100% rename from third/lib/libevent_openssl.la rename to general/third/lib/libevent_openssl.la diff --git a/third/lib/pkgconfig/libevent.pc b/general/third/lib/pkgconfig/libevent.pc similarity index 100% rename from third/lib/pkgconfig/libevent.pc rename to general/third/lib/pkgconfig/libevent.pc diff --git a/third/lib/pkgconfig/libevent_core.pc b/general/third/lib/pkgconfig/libevent_core.pc similarity index 100% rename from third/lib/pkgconfig/libevent_core.pc rename to general/third/lib/pkgconfig/libevent_core.pc diff --git a/third/lib/pkgconfig/libevent_extra.pc b/general/third/lib/pkgconfig/libevent_extra.pc similarity index 100% rename from third/lib/pkgconfig/libevent_extra.pc rename to general/third/lib/pkgconfig/libevent_extra.pc diff --git a/third/lib/pkgconfig/libevent_openssl.pc b/general/third/lib/pkgconfig/libevent_openssl.pc similarity index 100% rename from third/lib/pkgconfig/libevent_openssl.pc rename to general/third/lib/pkgconfig/libevent_openssl.pc diff --git a/libd/libevent.a b/libd/libevent.a new file mode 100644 index 0000000..ffa2a4d Binary files /dev/null and b/libd/libevent.a differ diff --git a/libd/libgeneral.a b/libd/libgeneral.a new file mode 100644 index 0000000..714efd1 Binary files /dev/null and b/libd/libgeneral.a differ diff --git a/libd/libgenerallib.a b/libd/libgenerallib.a new file mode 100644 index 0000000..0ea233c Binary files /dev/null and b/libd/libgenerallib.a differ diff --git a/sdk_main.c b/sdk_main.c new file mode 100644 index 0000000..882813a --- /dev/null +++ b/sdk_main.c @@ -0,0 +1,4 @@ +// +// Created by 29019 on 2020/4/23. +// + diff --git a/src/encrypt/aes.h b/src/encrypt/aes.h deleted file mode 100644 index 59e94e2..0000000 --- a/src/encrypt/aes.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// Created by 29019 on 2020/1/4. -// - -#ifndef GENERAL_AES_H -#define GENERAL_AES_H - -#include -#include -#include -#define BLOCK_SIZE 16 -using namespace std; - -class AES -{ -public: - enum - { - ECB = 0, CBC = 1, CFB = 2 - }; - -private: - enum - { - DEFAULT_BLOCK_SIZE = 16 - }; - enum - { - MAX_BLOCK_SIZE = 32, MAX_ROUNDS = 14, MAX_KC = 8, MAX_BC = 8 - }; -public: - AES(); - virtual ~AES(); -private: - //Key Initialization Flag - bool m_bKeyInit; - //Encryption (m_Ke) round key - int m_Ke[MAX_ROUNDS + 1][MAX_BC]; - //Decryption (m_Kd) round key - int m_Kd[MAX_ROUNDS + 1][MAX_BC]; - //Key Length - int m_keylength; - //Block Size - int m_blockSize; - //Number of Rounds - int m_iROUNDS; - //Chain Block - char m_chain0[MAX_BLOCK_SIZE]; - char m_chain[MAX_BLOCK_SIZE]; - //Auxiliary private use buffers - int tk[MAX_KC]; - int a[MAX_BC]; - int t[MAX_BC]; -private: - void Xor(char* buff, char const* chain); - void DefEncryptBlock(char const* in, char* result); - void DefDecryptBlock(char const* in, char* result); - void EncryptBlock(char const* in, char* result); - void DecryptBlock(char const* in, char* result); -public: - void MakeKey(char const* key, char const* chain, int keylength = - DEFAULT_BLOCK_SIZE, int blockSize = DEFAULT_BLOCK_SIZE); - void Encrypt(char const* in, char* result, size_t n, int iMode = ECB); - void Decrypt(char const* in, char* result, size_t n, int iMode = ECB); -}; - -#endif //GENERAL_AES_H diff --git a/src/encrypt/base64.h b/src/encrypt/base64.h deleted file mode 100644 index dde91d1..0000000 --- a/src/encrypt/base64.h +++ /dev/null @@ -1,11 +0,0 @@ -// -// Created by 29019 on 2020/1/4. -// - -#ifndef GENERAL_BASE64_H -#define GENERAL_BASE64_H -#include -std::string base64_encode(unsigned char const* , unsigned int len); -std::string base64_decode(std::string const& s); - -#endif //GENERAL_BASE64_H diff --git a/src/math/BigInt.hpp b/src/math/BigInt.hpp deleted file mode 100644 index bc119a6..0000000 --- a/src/math/BigInt.hpp +++ /dev/null @@ -1,1752 +0,0 @@ -/* - BigInt - ------ - Arbitrary-sized integer class for C++. - - Version: 0.4.0-dev - Released on: 03 January 2018 10:51 IST - Author: Syed Faheel Ahmad (faheel@live.in) - Project on GitHub: https://github.com/faheel/BigInt - License: MIT -*/ - -/* - =========================================================================== - BigInt - =========================================================================== - Definition for the BigInt class. -*/ - -#ifndef BIG_INT_HPP -#define BIG_INT_HPP - -#include - -class BigInt { - std::string value; - char sign; - - public: - // Constructors: - BigInt(); - BigInt(const BigInt&); - BigInt(const long long&); - BigInt(const std::string&); - static BigInt& RandLength(int size,BigInt base); - // Assignment operators: - - BigInt& operator=(const BigInt&); - BigInt& operator=(const long long&); - BigInt& operator=(const std::string&); - - // Unary arithmetic operators: - BigInt operator+() const; // unary + - BigInt operator-() const; // unary - - - // Binary arithmetic operators: - BigInt operator+(const BigInt&) const; - BigInt operator-(const BigInt&) const; - BigInt operator*(const BigInt&) const; - BigInt operator/(const BigInt&) const; - BigInt operator%(const BigInt&) const; - BigInt operator+(const long long&) const; - BigInt operator-(const long long&) const; - BigInt operator*(const long long&) const; - BigInt operator/(const long long&) const; - BigInt operator%(const long long&) const; - BigInt operator+(const std::string&) const; - BigInt operator-(const std::string&) const; - BigInt operator*(const std::string&) const; - BigInt operator/(const std::string&) const; - BigInt operator%(const std::string&) const; - - // Arithmetic-assignment operators: - BigInt& operator+=(const BigInt&); - BigInt& operator-=(const BigInt&); - BigInt& operator*=(const BigInt&); - BigInt& operator/=(const BigInt&); - BigInt& operator%=(const BigInt&); - BigInt& operator+=(const long long&); - BigInt& operator-=(const long long&); - BigInt& operator*=(const long long&); - BigInt& operator/=(const long long&); - BigInt& operator%=(const long long&); - BigInt& operator+=(const std::string&); - BigInt& operator-=(const std::string&); - BigInt& operator*=(const std::string&); - BigInt& operator/=(const std::string&); - BigInt& operator%=(const std::string&); - - // Increment and decrement operators: - BigInt& operator++(); // pre-increment - BigInt& operator--(); // pre-decrement - BigInt operator++(int); // post-increment - BigInt operator--(int); // post-decrement - - // Relational operators: - bool operator<(const BigInt&) const; - bool operator>(const BigInt&) const; - bool operator<=(const BigInt&) const; - bool operator>=(const BigInt&) const; - bool operator==(const BigInt&) const; - bool operator!=(const BigInt&) const; - bool operator<(const long long&) const; - bool operator>(const long long&) const; - bool operator<=(const long long&) const; - bool operator>=(const long long&) const; - bool operator==(const long long&) const; - bool operator!=(const long long&) const; - bool operator<(const std::string&) const; - bool operator>(const std::string&) const; - bool operator<=(const std::string&) const; - bool operator>=(const std::string&) const; - bool operator==(const std::string&) const; - bool operator!=(const std::string&) const; - - // I/O stream operators: - friend std::istream& operator>>(std::istream&, BigInt&); - friend std::ostream& operator<<(std::ostream&, const BigInt&); - - // Conversion functions: - std::string to_string() const; - int to_int() const; - long to_long() const; - long long to_long_long() const; -}; - -#endif // BIG_INT_HPP - - -/* - =========================================================================== - Utility functions - =========================================================================== -*/ - -#ifndef BIG_INT_UTILITY_FUNCTIONS_HPP -#define BIG_INT_UTILITY_FUNCTIONS_HPP - -#include - - -/* - is_valid_number - --------------- - Checks whether the given string is a valid integer. -*/ - -bool is_valid_number(const std::string& num) { - for (char digit : num) - if (digit < '0' or digit > '9') - return false; - - return true; -} - - -/* - strip_leading_zeroes - -------------------- - Strip the leading zeroes from a number represented as a string. -*/ - -void strip_leading_zeroes(std::string& num) { - size_t i; - for (i = 0; i < num.size(); i++) - if (num[i] != '0') - break; - - if (i == num.size()) - num = "0"; - else - num = num.substr(i); -} - - -/* - add_leading_zeroes - ------------------ - Adds a given number of leading zeroes to a string-represented integer `num`. -*/ - -void add_leading_zeroes(std::string& num, size_t num_zeroes) { - num = std::string(num_zeroes, '0') + num; -} - - -/* - add_trailing_zeroes - ------------------- - Adds a given number of trailing zeroes to a string-represented integer `num`. -*/ - -void add_trailing_zeroes(std::string& num, size_t num_zeroes) { - num += std::string(num_zeroes, '0'); -} - - -/* - get_larger_and_smaller - ---------------------- - Identifies the given string-represented integers as `larger` and `smaller`, - padding the smaller number with leading zeroes to make it equal in length to - the larger number. -*/ - -std::tuple get_larger_and_smaller(const std::string& num1, - const std::string& num2) { - std::string larger, smaller; - if (num1.size() > num2.size() or - (num1.size() == num2.size() and num1 > num2)) { - larger = num1; - smaller = num2; - } - else { - larger = num2; - smaller = num1; - } - - // pad the smaller number with zeroes - add_leading_zeroes(smaller, larger.size() - smaller.size()); - - return std::make_tuple(larger, smaller); -} - -#endif // BIG_INT_UTILITY_FUNCTIONS_HPP - - -/* - =========================================================================== - Constructors - =========================================================================== -*/ - -#ifndef BIG_INT_CONSTRUCTORS_HPP -#define BIG_INT_CONSTRUCTORS_HPP - - - -/* - Default constructor - ------------------- -*/ - -BigInt::BigInt() { - value = "0"; - sign = '+'; -} - - -/* - Copy constructor - ---------------- -*/ - -BigInt::BigInt(const BigInt& num) { - value = num.value; - sign = num.sign; -} - - -/* - Integer to BigInt - ----------------- -*/ - -BigInt::BigInt(const long long& num) { - value = std::to_string(num); - if (num < 0) { - sign = '-'; - value = value.substr(1); // remove minus sign from value - } - else - sign = '+'; -} - - -/* - String to BigInt - ---------------- -*/ - -BigInt::BigInt(const std::string& num) { - if (num[0] == '+' or num[0] == '-') { // check for sign - std::string magnitude = num.substr(1); - if (is_valid_number(magnitude)) { - value = magnitude; - sign = num[0]; - } - else { - throw std::invalid_argument("Expected an integer, got \'" + num + "\'"); - } - } - else { // if no sign is specified - if (is_valid_number(num)) { - value = num; - sign = '+'; // positive by default - } - else { - throw std::invalid_argument("Expected an integer, got \'" + num + "\'"); - } - } - strip_leading_zeroes(value); -} - -#endif // BIG_INT_CONSTRUCTORS_HPP - - -/* - =========================================================================== - Conversion functions for BigInt - =========================================================================== -*/ - -#ifndef BIG_INT_CONVERSION_FUNCTIONS_HPP -#define BIG_INT_CONVERSION_FUNCTIONS_HPP - - -/* - to_string - --------- - Converts a BigInt to a string. -*/ - -std::string BigInt::to_string() const { - // prefix with sign if negative - return this->sign == '-' ? "-" + this->value : this->value; -} - - -/* - to_int - ------ - Converts a BigInt to an int. - NOTE: If the BigInt is out of range of an int, stoi() will throw an - out_of_range exception. -*/ - -int BigInt::to_int() const { - return std::stoi(this->to_string()); -} - - -/* - to_long - ------- - Converts a BigInt to a long int. - NOTE: If the BigInt is out of range of a long int, stol() will throw an - out_of_range exception. -*/ - -long BigInt::to_long() const { - return std::stol(this->to_string()); -} - - -/* - to_long_long - ------------ - Converts a BigInt to a long long int. - NOTE: If the BigInt is out of range of a long long int, stoll() will throw - an out_of_range exception. -*/ - -long long BigInt::to_long_long() const { - return std::stoll(this->to_string()); -} - -#endif // BIG_INT_CONVERSION_FUNCTIONS_HPP - - -/* - =========================================================================== - Assignment operators - =========================================================================== -*/ - -#ifndef BIG_INT_ASSIGNMENT_OPERATORS_HPP -#define BIG_INT_ASSIGNMENT_OPERATORS_HPP - - - -/* - BigInt = BigInt - --------------- -*/ - -BigInt& BigInt::operator=(const BigInt& num) { - value = num.value; - sign = num.sign; - - return *this; -} - - -/* - BigInt = Integer - ---------------- -*/ - - -BigInt& BigInt::operator=(const long long& num) { - BigInt temp(num); - value = temp.value; - sign = temp.sign; - - return *this; -} -/* - range a data - ---------------- - return : base + rand -*/ -BigInt& BigInt::RandLength(int size,BigInt base){ - // biggest is 2048 - if(size > 2048) - size = 2048; - - - BigInt ret(); - -} -/* - BigInt = String - --------------- -*/ -BigInt& BigInt::operator=(const std::string& num) { - BigInt temp(num); - value = temp.value; - sign = temp.sign; - - return *this; -} - -#endif // BIG_INT_ASSIGNMENT_OPERATORS_HPP - - -/* - =========================================================================== - Unary arithmetic operators - =========================================================================== -*/ - -#ifndef BIG_INT_UNARY_ARITHMETIC_OPERATORS_HPP -#define BIG_INT_UNARY_ARITHMETIC_OPERATORS_HPP - - - -/* - +BigInt - ------- - Returns the value of a BigInt. - NOTE: This function does not return the absolute value. To get the absolute - value of a BigInt, use the `abs` function. -*/ - -BigInt BigInt::operator+() const { - return *this; -} - - -/* - -BigInt - ------- - Returns the negative of a BigInt. -*/ - -BigInt BigInt::operator-() const { - BigInt temp; - - temp.value = value; - if (value != "0") { - if (sign == '+') - temp.sign = '-'; - else - temp.sign = '+'; - } - - return temp; -} - -#endif // BIG_INT_UNARY_ARITHMETIC_OPERATORS_HPP - - -/* - =========================================================================== - Relational operators - =========================================================================== - All operators depend on the '<' and/or '==' operator(s). -*/ - -#ifndef BIG_INT_RELATIONAL_OPERATORS_HPP -#define BIG_INT_RELATIONAL_OPERATORS_HPP - - - -/* - BigInt == BigInt - ---------------- -*/ - -bool BigInt::operator==(const BigInt& num) const { - return (sign == num.sign) and (value == num.value); -} - - -/* - BigInt != BigInt - ---------------- -*/ - -bool BigInt::operator!=(const BigInt& num) const { - return !(*this == num); -} - - -/* - BigInt < BigInt - --------------- -*/ - -bool BigInt::operator<(const BigInt& num) const { - if (sign == num.sign) { - if (sign == '+') { - if (value.length() == num.value.length()) - return value < num.value; - else - return value.length() < num.value.length(); - } - else - return -(*this) > -num; - } - else - return sign == '-'; -} - - -/* - BigInt > BigInt - --------------- -*/ - -bool BigInt::operator>(const BigInt& num) const { - return !((*this < num) or (*this == num)); -} - - -/* - BigInt <= BigInt - ---------------- -*/ - -bool BigInt::operator<=(const BigInt& num) const { - return (*this < num) or (*this == num); -} - - -/* - BigInt >= BigInt - ---------------- -*/ - -bool BigInt::operator>=(const BigInt& num) const { - return !(*this < num); -} - - -/* - BigInt == Integer - ----------------- -*/ - -bool BigInt::operator==(const long long& num) const { - return *this == BigInt(num); -} - - -/* - Integer == BigInt - ----------------- -*/ - -bool operator==(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) == rhs; -} - - -/* - BigInt != Integer - ----------------- -*/ - -bool BigInt::operator!=(const long long& num) const { - return !(*this == BigInt(num)); -} - - -/* - Integer != BigInt - ----------------- -*/ - -bool operator!=(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) != rhs; -} - - -/* - BigInt < Integer - ---------------- -*/ - -bool BigInt::operator<(const long long& num) const { - return *this < BigInt(num); -} - - -/* - Integer < BigInt - ---------------- -*/ - -bool operator<(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) < rhs; -} - - -/* - BigInt > Integer - ---------------- -*/ - -bool BigInt::operator>(const long long& num) const { - return *this > BigInt(num); -} - - -/* - Integer > BigInt - ---------------- -*/ - -bool operator>(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) > rhs; -} - - -/* - BigInt <= Integer - ----------------- -*/ - -bool BigInt::operator<=(const long long& num) const { - return !(*this > BigInt(num)); -} - - -/* - Integer <= BigInt - ----------------- -*/ - -bool operator<=(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) <= rhs; -} - - -/* - BigInt >= Integer - ----------------- -*/ - -bool BigInt::operator>=(const long long& num) const { - return !(*this < BigInt(num)); -} - - -/* - Integer >= BigInt - ----------------- -*/ - -bool operator>=(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) >= rhs; -} - - -/* - BigInt == String - ---------------- -*/ - -bool BigInt::operator==(const std::string& num) const { - return *this == BigInt(num); -} - - -/* - String == BigInt - ---------------- -*/ - -bool operator==(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) == rhs; -} - - -/* - BigInt != String - ---------------- -*/ - -bool BigInt::operator!=(const std::string& num) const { - return !(*this == BigInt(num)); -} - - -/* - String != BigInt - ---------------- -*/ - -bool operator!=(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) != rhs; -} - - -/* - BigInt < String - --------------- -*/ - -bool BigInt::operator<(const std::string& num) const { - return *this < BigInt(num); -} - - -/* - String < BigInt - --------------- -*/ - -bool operator<(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) < rhs; -} - - -/* - BigInt > String - --------------- -*/ - -bool BigInt::operator>(const std::string& num) const { - return *this > BigInt(num); -} - - -/* - String > BigInt - --------------- -*/ - -bool operator>(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) > rhs; -} - - -/* - BigInt <= String - ---------------- -*/ - -bool BigInt::operator<=(const std::string& num) const { - return !(*this > BigInt(num)); -} - - -/* - String <= BigInt - ---------------- -*/ - -bool operator<=(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) <= rhs; -} - - -/* - BigInt >= String - ---------------- -*/ - -bool BigInt::operator>=(const std::string& num) const { - return !(*this < BigInt(num)); -} - - -/* - String >= BigInt - ---------------- -*/ - -bool operator>=(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) >= rhs; -} - -#endif // BIG_INT_RELATIONAL_OPERATORS_HPP - - -/* - =========================================================================== - Math functions for BigInt - =========================================================================== -*/ - -#ifndef BIG_INT_MATH_FUNCTIONS_HPP -#define BIG_INT_MATH_FUNCTIONS_HPP - -#include - - - -/* - abs - --- - Returns the absolute value of a BigInt. -*/ - -BigInt abs(const BigInt& num) { - return num < 0 ? -num : num; -} - - -/* - big_pow10 - --------- - Returns a BigInt equal to 10^exp. - NOTE: exponent should be a non-negative integer. -*/ - -BigInt big_pow10(size_t exp) { - return BigInt("1" + std::string(exp, '0')); -} - - -/* - pow (BigInt) - ------------ - Returns a BigInt equal to base^exp. -*/ - -BigInt pow(const BigInt& base, int exp) { - if (exp < 0) { - if (base == 0) - throw std::logic_error("Cannot divide by zero"); - return abs(base) == 1 ? base : 0; - } - if (exp == 0) { - if (base == 0) - throw std::logic_error("Zero cannot be raised to zero"); - return 1; - } - - BigInt result = base, result_odd = 1; - while (exp > 1) { - if (exp % 2) - result_odd *= result; - result *= result; - exp /= 2; - } - - return result * result_odd; -} - - -/* - pow (Integer) - ------------- - Returns a BigInt equal to base^exp. -*/ - -BigInt pow(const long long& base, int exp) { - return pow(BigInt(base), exp); -} - - -/* - pow (String) - ------------ - Returns a BigInt equal to base^exp. -*/ - -BigInt pow(const std::string& base, int exp) { - return pow(BigInt(base), exp); - -} - - -/* - sqrt - ---- - Returns the positive integer square root of a BigInt using Newton's method. - NOTE: the input must be non-negative. -*/ - -BigInt sqrt(const BigInt& num) { - if (num < 0) - throw std::invalid_argument("Cannot compute square root of a negative integer"); - - // Optimisations for small inputs: - if (num == 0) - return 0; - else if (num < 4) - return 1; - else if (num < 9) - return 2; - else if (num < 16) - return 3; - - BigInt sqrt_prev = 0; - // The value for `sqrt_current` is chosen close to that of the actual - // square root. - // Since a number's square root has at least one less than half as many - // digits as the number, - // sqrt_current = 10^(half_the_digits_in_num - 1) - BigInt sqrt_current = big_pow10(num.to_string().size() / 2 - 1); - - while (abs(sqrt_current - sqrt_prev) > 1) { - sqrt_prev = sqrt_current; - sqrt_current = (num / sqrt_prev + sqrt_prev) / 2; - } - - return sqrt_current; -} - -#endif // BIG_INT_MATH_FUNCTIONS_HPP - - -/* - =========================================================================== - Binary arithmetic operators - =========================================================================== -*/ - -#ifndef BIG_INT_BINARY_ARITHMETIC_OPERATORS_HPP -#define BIG_INT_BINARY_ARITHMETIC_OPERATORS_HPP - -#include -#include -#include - - -const long long FLOOR_SQRT_LLONG_MAX = 3037000499; - - -/* - BigInt + BigInt - --------------- - The operand on the RHS of the addition is `num`. -*/ - -BigInt BigInt::operator+(const BigInt& num) const { - // if the operands are of opposite signs, perform subtraction - if (this->sign == '+' and num.sign == '-') { - BigInt rhs = num; - rhs.sign = '+'; - return *this - rhs; - } - else if (this->sign == '-' and num.sign == '+') { - BigInt lhs = *this; - lhs.sign = '+'; - return -(lhs - num); - } - - // identify the numbers as `larger` and `smaller` - std::string larger, smaller; - std::tie(larger, smaller) = get_larger_and_smaller(this->value, num.value); - - BigInt result; // the resultant sum - result.value = ""; // the value is cleared as the digits will be appended - short carry = 0, sum; - // add the two values - for (long i = larger.size() - 1; i >= 0; i--) { - sum = larger[i] - '0' + smaller[i] - '0' + carry; - result.value = std::to_string(sum % 10) + result.value; - carry = sum / (short) 10; - } - if (carry) - result.value = std::to_string(carry) + result.value; - - // if the operands are negative, the result is negative - if (this->sign == '-' and result.value != "0") - result.sign = '-'; - - return result; -} - - -/* - BigInt - BigInt - --------------- - The operand on the RHS of the subtraction is `num`. -*/ - -BigInt BigInt::operator-(const BigInt& num) const { - // if the operands are of opposite signs, perform addition - if (this->sign == '+' and num.sign == '-') { - BigInt rhs = num; - rhs.sign = '+'; - return *this + rhs; - } - else if (this->sign == '-' and num.sign == '+') { - BigInt lhs = *this; - lhs.sign = '+'; - return -(lhs + num); - } - - BigInt result; // the resultant difference - // identify the numbers as `larger` and `smaller` - std::string larger, smaller; - if (abs(*this) > abs(num)) { - larger = this->value; - smaller = num.value; - - if (this->sign == '-') // -larger - -smaller = -result - result.sign = '-'; - } - else { - larger = num.value; - smaller = this->value; - - if (num.sign == '+') // smaller - larger = -result - result.sign = '-'; - } - // pad the smaller number with zeroes - add_leading_zeroes(smaller, larger.size() - smaller.size()); - - result.value = ""; // the value is cleared as the digits will be appended - short difference; - long i, j; - // subtract the two values - for (i = larger.size() - 1; i >= 0; i--) { - difference = larger[i] - smaller[i]; - if (difference < 0) { - for (j = i - 1; j >= 0; j--) { - if (larger[j] != '0') { - larger[j]--; // borrow from the j-th digit - break; - } - } - j++; - while (j != i) { - larger[j] = '9'; // add the borrow and take away 1 - j++; - } - difference += 10; // add the borrow - } - result.value = std::to_string(difference) + result.value; - } - strip_leading_zeroes(result.value); - - // if the result is 0, set its sign as + - if (result.value == "0") - result.sign = '+'; - - return result; -} - - -/* - BigInt * BigInt - --------------- - Computes the product of two BigInts using Karatsuba's algorithm. - The operand on the RHS of the product is `num`. -*/ - -BigInt BigInt::operator*(const BigInt& num) const { - if (*this == 0 or num == 0) - return BigInt(0); - if (*this == 1) - return num; - if (num == 1) - return *this; - - BigInt product; - if (abs(*this) <= FLOOR_SQRT_LLONG_MAX and abs(num) <= FLOOR_SQRT_LLONG_MAX) - product = std::stoll(this->value) * std::stoll(num.value); - else { - // identify the numbers as `larger` and `smaller` - std::string larger, smaller; - std::tie(larger, smaller) = get_larger_and_smaller(this->value, num.value); - - size_t half_length = larger.size() / 2; - auto half_length_ceil = (size_t) ceil(larger.size() / 2.0); - - BigInt num1_high, num1_low; - num1_high = larger.substr(0, half_length); - num1_low = larger.substr(half_length); - - BigInt num2_high, num2_low; - num2_high = smaller.substr(0, half_length); - num2_low = smaller.substr(half_length); - - strip_leading_zeroes(num1_high.value); - strip_leading_zeroes(num1_low.value); - strip_leading_zeroes(num2_high.value); - strip_leading_zeroes(num2_low.value); - - BigInt prod_high, prod_mid, prod_low; - prod_high = num1_high * num2_high; - prod_low = num1_low * num2_low; - prod_mid = (num1_high + num1_low) * (num2_high + num2_low) - - prod_high - prod_low; - - add_trailing_zeroes(prod_high.value, 2 * half_length_ceil); - add_trailing_zeroes(prod_mid.value, half_length_ceil); - - strip_leading_zeroes(prod_high.value); - strip_leading_zeroes(prod_mid.value); - strip_leading_zeroes(prod_low.value); - - product = prod_high + prod_mid + prod_low; - } - strip_leading_zeroes(product.value); - - if (this->sign == num.sign) - product.sign = '+'; - else - product.sign = '-'; - - return product; -} - - -/* - divide - ------ - Helper function that returns the quotient and remainder on dividing the - dividend by the divisor, when the divisor is 1 to 10 times the dividend. -*/ - -std::tuple divide(const BigInt& dividend, const BigInt& divisor) { - BigInt quotient, remainder, temp; - - temp = divisor; - quotient = 1; - while (temp < dividend) { - quotient++; - temp += divisor; - } - if (temp > dividend) { - quotient--; - remainder = dividend - (temp - divisor); - } - - return std::make_tuple(quotient, remainder); -} - - -/* - BigInt / BigInt - --------------- - Computes the quotient of two BigInts using the long-division method. - The operand on the RHS of the division (the divisor) is `num`. -*/ - -BigInt BigInt::operator/(const BigInt& num) const { - BigInt abs_dividend = abs(*this); - BigInt abs_divisor = abs(num); - - if (num == 0) - throw std::logic_error("Attempted division by zero"); - if (abs_dividend < abs_divisor) - return BigInt(0); - if (num == 1) - return *this; - if (num == -1) - return -(*this); - - BigInt quotient; - if (abs_dividend <= LLONG_MAX and abs_divisor <= LLONG_MAX) - quotient = std::stoll(abs_dividend.value) / std::stoll(abs_divisor.value); - else if (abs_dividend == abs_divisor) - quotient = 1; - else { - quotient.value = ""; // the value is cleared as digits will be appended - BigInt chunk, chunk_quotient, chunk_remainder; - size_t chunk_index = 0; - chunk_remainder.value = abs_dividend.value.substr(chunk_index, abs_divisor.value.size() - 1); - chunk_index = abs_divisor.value.size() - 1; - while (chunk_index < abs_dividend.value.size()) { - chunk.value = chunk_remainder.value.append(1, abs_dividend.value[chunk_index]); - chunk_index++; - while (chunk < abs_divisor) { - quotient.value += "0"; - if (chunk_index < abs_dividend.value.size()) { - chunk.value.append(1, abs_dividend.value[chunk_index]); - chunk_index++; - } - else - break; - } - if (chunk == abs_divisor) { - quotient.value += "1"; - chunk_remainder = 0; - } - else if (chunk > abs_divisor) { - strip_leading_zeroes(chunk.value); - std::tie(chunk_quotient, chunk_remainder) = divide(chunk, abs_divisor); - quotient.value += chunk_quotient.value; - } - } - } - strip_leading_zeroes(quotient.value); - - if (this->sign == num.sign) - quotient.sign = '+'; - else - quotient.sign = '-'; - - return quotient; -} - - -/* - BigInt % BigInt - --------------- - Computes the modulo (remainder on division) of two BigInts. - The operand on the RHS of the modulo (the divisor) is `num`. -*/ - -BigInt BigInt::operator%(const BigInt& num) const { - BigInt abs_dividend = abs(*this); - BigInt abs_divisor = abs(num); - - if (abs_divisor == 0) - throw std::logic_error("Attempted division by zero"); - if (abs_divisor == 1 or abs_divisor == abs_dividend) - return BigInt(0); - - BigInt remainder; - if (abs_dividend <= LLONG_MAX and abs_divisor <= LLONG_MAX) - remainder = std::stoll(abs_dividend.value) % std::stoll(abs_divisor.value); - else if (abs_dividend < abs_divisor) - remainder = abs_dividend; - else { - BigInt quotient = abs_dividend / abs_divisor; - remainder = abs_dividend - quotient * abs_divisor; - } - strip_leading_zeroes(remainder.value); - - // remainder has the same sign as that of the dividend - remainder.sign = this->sign; - if (remainder.value == "0") // except if its zero - remainder.sign = '+'; - - return remainder; -} - - -/* - BigInt + Integer - ---------------- -*/ - -BigInt BigInt::operator+(const long long& num) const { - return *this + BigInt(num); -} - - -/* - Integer + BigInt - ---------------- -*/ - -BigInt operator+(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) + rhs; -} - - -/* - BigInt - Integer - ---------------- -*/ - -BigInt BigInt::operator-(const long long& num) const { - return *this - BigInt(num); -} - - -/* - Integer - BigInt - ---------------- -*/ - -BigInt operator-(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) - rhs; -} - - -/* - BigInt * Integer - ---------------- -*/ - -BigInt BigInt::operator*(const long long& num) const { - return *this * BigInt(num); -} - - -/* - Integer * BigInt - ---------------- -*/ - -BigInt operator*(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) * rhs; -} - - -/* - BigInt / Integer - ---------------- -*/ - -BigInt BigInt::operator/(const long long& num) const { - return *this / BigInt(num); -} - - -/* - Integer / BigInt - ---------------- -*/ - -BigInt operator/(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) / rhs; -} - - -/* - BigInt % Integer - ---------------- -*/ - -BigInt BigInt::operator%(const long long& num) const { - return *this % BigInt(num); -} - - -/* - Integer % BigInt - ---------------- -*/ - -BigInt operator%(const long long& lhs, const BigInt& rhs) { - return BigInt(lhs) % rhs; -} - - -/* - BigInt + String - --------------- -*/ - -BigInt BigInt::operator+(const std::string& num) const { - return *this + BigInt(num); -} - - -/* - String + BigInt - --------------- -*/ - -BigInt operator+(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) + rhs; -} - - -/* - BigInt - String - --------------- -*/ - -BigInt BigInt::operator-(const std::string& num) const { - return *this - BigInt(num); -} - - -/* - String - BigInt - --------------- -*/ - -BigInt operator-(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) - rhs; -} - - -/* - BigInt * String - --------------- -*/ - -BigInt BigInt::operator*(const std::string& num) const { - return *this * BigInt(num); -} - - -/* - String * BigInt - --------------- -*/ - -BigInt operator*(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) * rhs; -} - - -/* - BigInt / String - --------------- -*/ - -BigInt BigInt::operator/(const std::string& num) const { - return *this / BigInt(num); -} - - -/* - String / BigInt - --------------- -*/ - -BigInt operator/(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) / rhs; -} - - -/* - BigInt % String - --------------- -*/ - -BigInt BigInt::operator%(const std::string& num) const { - return *this % BigInt(num); -} - - -/* - String % BigInt - --------------- -*/ - -BigInt operator%(const std::string& lhs, const BigInt& rhs) { - return BigInt(lhs) % rhs; -} - -#endif // BIG_INT_BINARY_ARITHMETIC_OPERATORS_HPP - - -/* - =========================================================================== - Arithmetic-assignment operators - =========================================================================== -*/ - -#ifndef BIG_INT_ARITHMETIC_ASSIGNMENT_OPERATORS_HPP -#define BIG_INT_ARITHMETIC_ASSIGNMENT_OPERATORS_HPP - - - -/* - BigInt += BigInt - ---------------- -*/ - -BigInt& BigInt::operator+=(const BigInt& num) { - *this = *this + num; - - return *this; -} - - -/* - BigInt -= BigInt - ---------------- -*/ - -BigInt& BigInt::operator-=(const BigInt& num) { - *this = *this - num; - - return *this; -} - - -/* - BigInt *= BigInt - ---------------- -*/ - -BigInt& BigInt::operator*=(const BigInt& num) { - *this = *this * num; - - return *this; -} - - -/* - BigInt /= BigInt - ---------------- -*/ - -BigInt& BigInt::operator/=(const BigInt& num) { - *this = *this / num; - - return *this; -} - - -/* - BigInt %= BigInt - ---------------- -*/ - -BigInt& BigInt::operator%=(const BigInt& num) { - *this = *this % num; - - return *this; -} - - -/* - BigInt += Integer - ----------------- -*/ - -BigInt& BigInt::operator+=(const long long& num) { - *this = *this + BigInt(num); - - return *this; -} - - -/* - BigInt -= Integer - ----------------- -*/ - -BigInt& BigInt::operator-=(const long long& num) { - *this = *this - BigInt(num); - - return *this; -} - - -/* - BigInt *= Integer - ----------------- -*/ - -BigInt& BigInt::operator*=(const long long& num) { - *this = *this * BigInt(num); - - return *this; -} - - -/* - BigInt /= Integer - ----------------- -*/ - -BigInt& BigInt::operator/=(const long long& num) { - *this = *this / BigInt(num); - - return *this; -} - - -/* - BigInt %= Integer - ----------------- -*/ - -BigInt& BigInt::operator%=(const long long& num) { - *this = *this % BigInt(num); - - return *this; -} - - -/* - BigInt += String - ---------------- -*/ - -BigInt& BigInt::operator+=(const std::string& num) { - *this = *this + BigInt(num); - - return *this; -} - - -/* - BigInt -= String - ---------------- -*/ - -BigInt& BigInt::operator-=(const std::string& num) { - *this = *this - BigInt(num); - - return *this; -} - - -/* - BigInt *= String - ---------------- -*/ - -BigInt& BigInt::operator*=(const std::string& num) { - *this = *this * BigInt(num); - - return *this; -} - - -/* - BigInt /= String - ---------------- -*/ - -BigInt& BigInt::operator/=(const std::string& num) { - *this = *this / BigInt(num); - - return *this; -} - - -/* - BigInt %= String - ---------------- -*/ - -BigInt& BigInt::operator%=(const std::string& num) { - *this = *this % BigInt(num); - - return *this; -} - -#endif // BIG_INT_ARITHMETIC_ASSIGNMENT_OPERATORS_HPP - - -/* - =========================================================================== - Increment and decrement operators - =========================================================================== -*/ - -#ifndef BIG_INT_INCREMENT_DECREMENT_OPERATORS_HPP -#define BIG_INT_INCREMENT_DECREMENT_OPERATORS_HPP - - - -/* - Pre-increment - ------------- - ++BigInt -*/ - -BigInt& BigInt::operator++() { - *this += 1; - - return *this; -} - - -/* - Pre-decrement - ------------- - --BigInt -*/ - -BigInt& BigInt::operator--() { - *this -= 1; - - return *this; -} - - -/* - Post-increment - -------------- - BigInt++ -*/ - -BigInt BigInt::operator++(int) { - BigInt temp = *this; - *this += 1; - - return temp; -} - - -/* - Post-decrement - -------------- - BigInt-- -*/ - -BigInt BigInt::operator--(int) { - BigInt temp = *this; - *this -= 1; - - return temp; -} - -#endif // BIG_INT_INCREMENT_DECREMENT_OPERATORS_HPP - - -/* - =========================================================================== - I/O stream operators - =========================================================================== -*/ - -#ifndef BIG_INT_IO_STREAM_OPERATORS_HPP -#define BIG_INT_IO_STREAM_OPERATORS_HPP - - - -/* - BigInt from input stream - ------------------------ -*/ - -std::istream& operator>>(std::istream& in, BigInt& num) { - std::string input; - in >> input; - num = BigInt(input); // remove sign from value and set sign, if exists - - return in; -} - - -/* - BigInt to output stream - ----------------------- -*/ - -std::ostream& operator<<(std::ostream& out, const BigInt& num) { - if (num.sign == '-') - out << num.sign; - out << num.value; - - return out; -} - -#endif // BIG_INT_IO_STREAM_OPERATORS_HPP - - diff --git a/src/pattern/Observer.h b/src/pattern/Observer.h deleted file mode 100644 index d909968..0000000 --- a/src/pattern/Observer.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// Created by 29019 on 2019/12/21. -// - -#ifndef GENERAL_OBSERVER_H -#define GENERAL_OBSERVER_H - -#include -#include - -template class Observer; - -template class Observed{ -public: - virtual ~Observed(){}; - virtual int AddObserver(Observer *); // 添加观察者 - virtual int DeleteObserver(Observer *); // 删除观察者 - virtual int NoticeObserver(T *); -protected: - std::vector*> m_vObservers; -}; - -template class Observer -{ -public: - virtual void OnNotifyData(T* ){}; -private: - -}; -template -int Observed::AddObserver(Observer *p) { - if(nullptr == p){ - return -1; - } - - for(typename std::vector*>::iterator itr = m_vObservers.begin(); - itr != m_vObservers.end();itr++){ - if(((Observer*)*itr) == p){ - return 0; - } - } - this->m_vObservers.push_back(p); - return 0; -} -template -int Observed::DeleteObserver(Observer *p) { - for(typename std::vector*>::iterator itr = m_vObservers.begin(); - itr != m_vObservers.end();itr++){ - if(((Observer*)*itr) == p){ - return 0; - } - } - return 0; -} -template -int Observed::NoticeObserver(T *p) { - if(nullptr == p){ - return -1; - } - for(typename std::vector*>::iterator itr = m_vObservers.begin(); - itr != m_vObservers.end();itr++){ - ((Observer*)*itr)->OnNotifyData(p); - } - return 0; -} -#endif //GENERAL_OBSERVER_H diff --git a/src/pattern/adapter.h b/src/pattern/adapter.h deleted file mode 100644 index 9a407b2..0000000 --- a/src/pattern/adapter.h +++ /dev/null @@ -1,7 +0,0 @@ -// -// Created by 29019 on 2019/12/30. -// -#ifndef GENERAL_ADAPTER_H -#define GENERAL_ADAPTER_H - -#endif //GENERAL_ADAPTER_H diff --git a/src/pattern/signleton.h b/src/pattern/signleton.h deleted file mode 100644 index c279246..0000000 --- a/src/pattern/signleton.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// Created by 29019 on 2019/12/17. -// - -#ifndef GENERAL_SIGNLETON_H -#define GENERAL_SIGNLETON_H - -#include -#include - -using namespace std; -template class Singletone -{ -public: - static T* Instance(){ - if(mInstance.get() == nullptr){ - mInstance = std::unique_ptr(new T); - } - return mInstance.get(); - } -private: - Singletone(){} - ~Singletone(){} - Singletone &operator=(const Singletone&){} - static unique_ptr mInstance; -}; -template -unique_ptr Singletone::mInstance; - -#define DECLARE_SINGLETON(type) \ - friend class unique_ptr ; \ - friend class Singletone ; - -#endif //GENERAL_SIGNLETON_H diff --git a/src/pattern/stratergy.h b/src/pattern/stratergy.h deleted file mode 100644 index 6f809bb..0000000 --- a/src/pattern/stratergy.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Created by 29019 on 2019/12/30. -// - -#ifndef GENERAL_STRATERGY_H - -#include - -using namespace std; -template class Stratergy{ -public: - virtual int Handler(T){ - return 0; - } -private: -}; -#define GENERAL_STRATERGY_H - -#endif //GENERAL_STRATERGY_H diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 820f2da..ddf1514 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,13 +2,12 @@ cmake_minimum_required(VERSION 3.15) project(tcptest) message("current dir" ${CMAKE_CURRENT_SOURCE_DIR}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../obj/inc) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../obj/inc/third/include) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../general/obj/inc) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../general/obj/inc/third/include) -link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../obj/) +link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../cmake-build-debug/libgenerallib.a) link_libraries(libGeneral.a) link_libraries(ws2_32) link_libraries(${CMAKE_CURRENT_SOURCE_DIR}/../third/lib/libevent.a) link_libraries(${CMAKE_CURRENT_SOURCE_DIR}/../third/lib/libevent_core.a) -link_libraries(ws2_32) add_executable(tcptest src/tcpclient_test.cpp) \ No newline at end of file diff --git a/third/include/inc/debug.h b/third/include/inc/debug.h deleted file mode 100644 index 50dfe86..0000000 --- a/third/include/inc/debug.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// Created by admin on 2019/4/11. -// - -#ifndef __DEBUG__ -#define __DEBUG__ -#include -#include -#include -#include - -using namespace std; -int dumpObj(void *dst,int rowNum,int num,bool ifAsii,char *out); -int PrintDumpObjvoid (void *dst,int rowNum,int num,bool ifAsii); - -#endif //SHARE_PRT_TEST_DEBUG_H diff --git a/third/include/inc/loger.h b/third/include/inc/loger.h deleted file mode 100644 index 2f54c0c..0000000 --- a/third/include/inc/loger.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// Created by bt110 on 2019/8/19. -// - -#ifndef CPP11FEATURETEST_LOGER_H -#define CPP11FEATURETEST_LOGER_H - -#include -#include -#include -#include -#include - -using namespace std; - -namespace Loger{ - typedef enum Mode{ - Mode_Daily, // 每天保存一次日志 - MODE_Monthly, // 每个月保存一次日志 - MODE_Weekly // 每周保存一次日志 - }ESaveMode; - typedef class _C_Loger { - private: - string mCurrentPath; - FILE *mFile; // 日志文件 - ESaveMode mMode; // 工作模式 - string mCurrentDate; // 当天 - int error; - - public: - _C_Loger(FILE *p); - _C_Loger(string path); - - int Debug(); - int Log(); - int LogFile(); - void operator+(const string&); - void operator<<(const string&); - }Loger; -} - - -#endif //CPP11FEATURETEST_LOGER_H diff --git a/third/include/inc/utils.h b/third/include/inc/utils.h deleted file mode 100644 index c02c7a9..0000000 --- a/third/include/inc/utils.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// Created by 29019 on 2019/5/2. -// - -#ifndef CUTILS_UTILS_H -#define CUTILS_UTILS_H - -#include "utils.h" -#include -#include "debug.h" -#include -#include - -using namespace std; - -#define RELEASE_MEMORY(x) \ - if(nullptr == x) \ - { \ - delete(x); \ - x = nullptr;\ - } -string itos(int x); - - -#endif //CUTILS_UTILS_H