SymmetricMinMaxHeap 대칭 최소 최대 힙 C++ 소스
*동*
다운로드
장바구니
소개글
Symmetric Min Max Heap 을 C++ 로 구현한 과제입니다.http://publications.cse.iitm.ac.in/778/1/IPL99.pdf
위 논문의 구현체이며, DLL 빌드 라이브러리화 되어 있습니다.
테스트 코드를 위한 exe 는 프로젝트를 분리하였습니다.
작동을 위한 자료형은 기본적으로 int 로 되어 있으며, 이를 수정하시려면
DATATYPE 을 다시 define 하시고,
이를 비교하기 위한 CompareFunc 함수를 재정의 하면 됩니다.
VS2013 으로 빌드했으며,
솔루션 파일 프로젝트 파일 모두 첨부되어 있습니다.
컴파일 실행환경
Visual Studio 2013 / Windows 8.1 / C++본문내용
테스트 프로젝트 실행 예시입니다.-----
##### 64-Digit Random Sequence #####
6 4 46 11 10 45 13 24
48 20 35 62 64 37 50 22
25 27 36 44 38 39 17 5
19 51 2 7 52 30 58 33
1 49 29 18 42 55 53 60
57 40 3 15 21 54 14 61
59 8 12 16 56 34 32 63
41 28 26 47 23 43 31 9
Before Insert : [ 0, 0 ]
After Insert : [ 0, 0, 1, 64, 2, 60, 4, 63, 6, 55, 3, 58, 8, 61, 5, 62, 9, 49, 18, 50, 24, 57, 15, 54, 10, 59, 12, 56, 7, 52, 23, 48, 11, 33, 13, 46, 25, 27, 29, 42, 36, 44, 40, 53, 20, 38, 21, 39, 17, 35, 14, 51, 16, 19, 34, 45, 32, 37, 28, 41, 30, 47, 26, 43, 22, 31 ]
After Clear : [ 0, 0 ]
##### Sort using SymmetricMinMaxHeap #####
----- Ascending -----
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32
33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48
49 50 51 52 53 54 55 56
57 58 59 60 61 62 63 64
----- Decending -----
64 63 62 61 60 59 58 57
56 55 54 53 52 51 50 49
48 47 46 45 44 43 42 41
40 39 38 37 36 35 34 33
32 31 30 29 28 27 26 25
24 23 22 21 20 19 18 17
16 15 14 13 12 11 10 9
8 7 6 5 4 3 2 1
-----
압축파일 내 파일목록
Debug/
Debug/SymmetricMinMaxHeapCppLib.dll
Debug/SymmetricMinMaxHeapCppLib.exp
Debug/SymmetricMinMaxHeapCppLib.ilk
Debug/SymmetricMinMaxHeapCppLib.lib
Debug/SymmetricMinMaxHeapCppLib.pdb
Debug/SymmetricMinMaxHeapCppTest.exe
Debug/SymmetricMinMaxHeapCppTest.ilk
Debug/SymmetricMinMaxHeapCppTest.pdb
Release/
Release/SymmetricMinMaxHeapCppLib.dll
Release/SymmetricMinMaxHeapCppLib.exp
Release/SymmetricMinMaxHeapCppLib.lib
Release/SymmetricMinMaxHeapCppLib.pdb
Release/SymmetricMinMaxHeapCppTest.exe
Release/SymmetricMinMaxHeapCppTest.pdb
SymmetricMinMaxHeapCpp.sln
SymmetricMinMaxHeapCpp.suo
SymmetricMinMaxHeapCpp.v12.suo
SymmetricMinMaxHeapCppLib/
SymmetricMinMaxHeapCppLib/Debug/
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.lastbuildstate
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.write.1u.tlog
SymmetricMinMaxHeapCppLib/Debug/SymmetricMinMaxHeapCppLib.log
SymmetricMinMaxHeapCppLib/Debug/SymmetricMinMaxHeapCppLib.obj
SymmetricMinMaxHeapCppLib/Debug/vc120.idb
SymmetricMinMaxHeapCppLib/Debug/vc120.pdb
SymmetricMinMaxHeapCppLib/Release/
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.lastbuildstate
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.write.1u.tlog
SymmetricMinMaxHeapCppLib/Release/SymmetricMinMaxHeapCppLib.log
SymmetricMinMaxHeapCppLib/Release/SymmetricMinMaxHeapCppLib.obj
SymmetricMinMaxHeapCppLib/Release/vc120.pdb
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.cpp
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.h
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.vcxproj
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.vcxproj.filters
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.vcxproj.user
SymmetricMinMaxHeapCppTest/
SymmetricMinMaxHeapCppTest/Debug/
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/SymmetricMinMaxHeapCppTest.lastbuildstate
SymmetricMinMaxHeapCppTest/Debug/SymmetricMinMaxHeapCppTest.log
SymmetricMinMaxHeapCppTest/Debug/SymmetricMinMaxHeapCppTest.obj
SymmetricMinMaxHeapCppTest/Debug/vc120.idb
SymmetricMinMaxHeapCppTest/Debug/vc120.pdb
SymmetricMinMaxHeapCppTest/Release/
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/SymmetricMinMaxHeapCppTest.lastbuildstate
SymmetricMinMaxHeapCppTest/Release/SymmetricMinMaxHeapCppTest.log
SymmetricMinMaxHeapCppTest/Release/SymmetricMinMaxHeapCppTest.obj
SymmetricMinMaxHeapCppTest/Release/vc120.pdb
SymmetricMinMaxHeapCppTest/SymmetricMinMaxHeapCppTest.cpp
SymmetricMinMaxHeapCppTest/SymmetricMinMaxHeapCppTest.vcxproj
SymmetricMinMaxHeapCppTest/SymmetricMinMaxHeapCppTest.vcxproj.filters
Debug/SymmetricMinMaxHeapCppLib.dll
Debug/SymmetricMinMaxHeapCppLib.exp
Debug/SymmetricMinMaxHeapCppLib.ilk
Debug/SymmetricMinMaxHeapCppLib.lib
Debug/SymmetricMinMaxHeapCppLib.pdb
Debug/SymmetricMinMaxHeapCppTest.exe
Debug/SymmetricMinMaxHeapCppTest.ilk
Debug/SymmetricMinMaxHeapCppTest.pdb
Release/
Release/SymmetricMinMaxHeapCppLib.dll
Release/SymmetricMinMaxHeapCppLib.exp
Release/SymmetricMinMaxHeapCppLib.lib
Release/SymmetricMinMaxHeapCppLib.pdb
Release/SymmetricMinMaxHeapCppTest.exe
Release/SymmetricMinMaxHeapCppTest.pdb
SymmetricMinMaxHeapCpp.sln
SymmetricMinMaxHeapCpp.suo
SymmetricMinMaxHeapCpp.v12.suo
SymmetricMinMaxHeapCppLib/
SymmetricMinMaxHeapCppLib/Debug/
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.lastbuildstate
SymmetricMinMaxHeapCppLib/Debug/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.write.1u.tlog
SymmetricMinMaxHeapCppLib/Debug/SymmetricMinMaxHeapCppLib.log
SymmetricMinMaxHeapCppLib/Debug/SymmetricMinMaxHeapCppLib.obj
SymmetricMinMaxHeapCppLib/Debug/vc120.idb
SymmetricMinMaxHeapCppLib/Debug/vc120.pdb
SymmetricMinMaxHeapCppLib/Release/
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.lastbuildstate
SymmetricMinMaxHeapCppLib/Release/Symmetri.2965361D.tlog/SymmetricMinMaxHeapCppLib.write.1u.tlog
SymmetricMinMaxHeapCppLib/Release/SymmetricMinMaxHeapCppLib.log
SymmetricMinMaxHeapCppLib/Release/SymmetricMinMaxHeapCppLib.obj
SymmetricMinMaxHeapCppLib/Release/vc120.pdb
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.cpp
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.h
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.vcxproj
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.vcxproj.filters
SymmetricMinMaxHeapCppLib/SymmetricMinMaxHeapCppLib.vcxproj.user
SymmetricMinMaxHeapCppTest/
SymmetricMinMaxHeapCppTest/Debug/
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppTest/Debug/Symmetri.73798221.tlog/SymmetricMinMaxHeapCppTest.lastbuildstate
SymmetricMinMaxHeapCppTest/Debug/SymmetricMinMaxHeapCppTest.log
SymmetricMinMaxHeapCppTest/Debug/SymmetricMinMaxHeapCppTest.obj
SymmetricMinMaxHeapCppTest/Debug/vc120.idb
SymmetricMinMaxHeapCppTest/Debug/vc120.pdb
SymmetricMinMaxHeapCppTest/Release/
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/cl.command.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/CL.read.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/CL.write.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/link.command.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/link.read.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/link.write.1.tlog
SymmetricMinMaxHeapCppTest/Release/Symmetri.73798221.tlog/SymmetricMinMaxHeapCppTest.lastbuildstate
SymmetricMinMaxHeapCppTest/Release/SymmetricMinMaxHeapCppTest.log
SymmetricMinMaxHeapCppTest/Release/SymmetricMinMaxHeapCppTest.obj
SymmetricMinMaxHeapCppTest/Release/vc120.pdb
SymmetricMinMaxHeapCppTest/SymmetricMinMaxHeapCppTest.cpp
SymmetricMinMaxHeapCppTest/SymmetricMinMaxHeapCppTest.vcxproj
SymmetricMinMaxHeapCppTest/SymmetricMinMaxHeapCppTest.vcxproj.filters