├── README.md ├── code01 └── alog │ ├── ReadMe.txt │ ├── alog.cpp │ ├── alog.sln │ ├── alog.suo │ ├── alog.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code02 └── acp2 │ ├── ReadMe.txt │ ├── acp2.cpp │ ├── acp2.sln │ ├── acp2.suo │ ├── acp2.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code03 ├── FastMul │ ├── BigInt.cpp │ ├── BigInt.h │ ├── FastMul.cpp │ ├── FastMul.sln │ ├── FastMul.suo │ ├── FastMul.vcproj │ ├── ReadMe.txt │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── dp │ ├── ReadMe.txt │ ├── dp.cpp │ ├── dp.sln │ ├── dp.suo │ ├── dp.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── google │ ├── ReadMe.txt │ ├── google.cpp │ ├── google.sln │ ├── google.suo │ ├── google.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── knapsack │ ├── ReadMe.txt │ ├── knapsack.cpp │ ├── knapsack.sln │ ├── knapsack.suo │ ├── knapsack.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── qsort │ ├── ReadMe.txt │ ├── qsort.cpp │ ├── qsort.sln │ ├── qsort.suo │ ├── qsort.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code04 └── chinese_num │ ├── ReadMe.txt │ ├── chinese_num.cpp │ ├── chinese_num.sln │ ├── chinese_num.suo │ ├── chinese_num.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code05 └── bucket │ ├── ReadMe.txt │ ├── bucket.cpp │ ├── bucket.sln │ ├── bucket.suo │ ├── bucket.vcproj │ ├── bucket_state.cpp │ ├── bucket_state.h │ ├── main.cpp │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code06 └── cp6 │ ├── ReadMe.txt │ ├── action_description.cpp │ ├── action_description.h │ ├── cp6.cpp │ ├── cp6.sln │ ├── cp6.suo │ ├── cp6.vcproj │ ├── item_state.cpp │ ├── item_state.h │ ├── river_def.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code07 ├── gs │ ├── ReadMe.txt │ ├── gs.cpp │ ├── gs.sln │ ├── gs.suo │ ├── gs.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── gs2 │ ├── ReadMe.txt │ ├── gs2.cpp │ ├── gs2.sln │ ├── gs2.suo │ ├── gs2.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── gs3 │ ├── ReadMe.txt │ ├── gs3.cpp │ ├── gs3.sln │ ├── gs3.suo │ ├── gs3.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── gs4 │ ├── ReadMe.txt │ ├── gs4.cpp │ ├── gs4.sln │ ├── gs4.suo │ ├── gs4.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code08 └── albert │ ├── ReadMe.txt │ ├── albert.cpp │ ├── albert.sln │ ├── albert.suo │ ├── albert.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code09 ├── cpath │ ├── ReadMe.txt │ ├── cpath.cpp │ ├── cpath.sln │ ├── cpath.suo │ ├── cpath.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── graph │ ├── ReadMe.txt │ ├── graph.cpp │ ├── graph.sln │ ├── graph.suo │ ├── graph.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code10 └── rle │ ├── ReadMe.txt │ ├── rle.cpp │ ├── rle.sln │ ├── rle.suo │ ├── rle.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code11 ├── calendar │ ├── ReadMe.txt │ ├── calendar.cpp │ ├── calendar.sln │ ├── calendar.suo │ ├── calendar.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── calendar2 │ ├── ChineseCalendar.cpp │ ├── ChineseCalendar.h │ ├── ChnMonthInfo.cpp │ ├── ChnMonthInfo.h │ ├── DayInfo.cpp │ ├── DayInfo.h │ ├── MemDC.h │ ├── MonthInfo.cpp │ ├── MonthInfo.h │ ├── Names.cpp │ ├── Names.h │ ├── ReadMe.txt │ ├── WzCalendarCtrl.cpp │ ├── WzCalendarCtrl.h │ ├── calendar2.aps │ ├── calendar2.cpp │ ├── calendar2.h │ ├── calendar2.rc │ ├── calendar2.sln │ ├── calendar2.suo │ ├── calendar2.vcproj │ ├── calendar2Dlg.cpp │ ├── calendar2Dlg.h │ ├── calendar_const.h │ ├── calendar_func.cpp │ ├── calendar_func.h │ ├── elp2000_data.cpp │ ├── elp2000_data.h │ ├── moon.cpp │ ├── moon.h │ ├── nutation.cpp │ ├── nutation.h │ ├── other_func.cpp │ ├── other_func.h │ ├── res │ ├── calendar2.ico │ └── calendar2.rc2 │ ├── resource.h │ ├── stdafx.cpp │ ├── stdafx.h │ ├── sun.cpp │ ├── sun.h │ ├── support.cpp │ ├── support.h │ ├── targetver.h │ ├── td_utc.cpp │ ├── td_utc.h │ ├── vsop87_data.cpp │ └── vsop87_data.h ├── code12 └── CurveFitting │ ├── CurveFitting.sln │ ├── CurveFitting.suo │ ├── LeastSquare │ ├── Common.cpp │ ├── Common.h │ ├── GuassEquation.cpp │ ├── GuassEquation.h │ ├── LeastSquare.cpp │ ├── LeastSquare.vcproj │ ├── ReadMe.txt │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h │ └── spline │ ├── Common.cpp │ ├── Common.h │ ├── DisplayWnd.cpp │ ├── DisplayWnd.h │ ├── LogicDevice.cpp │ ├── LogicDevice.h │ ├── ReadMe.txt │ ├── Spline3.cpp │ ├── Spline3.h │ ├── ThomasEquation.cpp │ ├── ThomasEquation.h │ ├── res │ ├── spline.ico │ └── spline.rc2 │ ├── resource.h │ ├── spline.aps │ ├── spline.cpp │ ├── spline.h │ ├── spline.rc │ ├── spline.vcproj │ ├── splineDlg.cpp │ ├── splineDlg.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code13 └── equation │ ├── ReadMe.txt │ ├── equation.cpp │ ├── equation.sln │ ├── equation.suo │ ├── equation.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code14 ├── circle_demo │ ├── ChildView.cpp │ ├── ChildView.h │ ├── MainFrm.cpp │ ├── MainFrm.h │ ├── ReadMe.txt │ ├── Resource.h │ ├── UserImages.bmp │ ├── circle.cpp │ ├── circle.h │ ├── circle_demo.cpp │ ├── circle_demo.h │ ├── circle_demo.rc │ ├── circle_demo.sln │ ├── circle_demo.suo │ ├── circle_demo.vcproj │ ├── dev_adp.cpp │ ├── dev_adp.h │ ├── res │ │ ├── Toolbar.bmp │ │ ├── Toolbar256.bmp │ │ ├── circle_demo.ico │ │ └── circle_demo.rc2 │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── ellipse_demo │ ├── ChildView.cpp │ ├── ChildView.h │ ├── MainFrm.cpp │ ├── MainFrm.h │ ├── ReadMe.txt │ ├── Resource.h │ ├── dev_adp.cpp │ ├── dev_adp.h │ ├── ellipse.cpp │ ├── ellipse.h │ ├── ellipse_demo.cpp │ ├── ellipse_demo.h │ ├── ellipse_demo.rc │ ├── ellipse_demo.sln │ ├── ellipse_demo.suo │ ├── ellipse_demo.vcproj │ ├── res │ │ ├── Toolbar.bmp │ │ ├── Toolbar256.bmp │ │ ├── ellipse_demo.ico │ │ └── ellipse_demo.rc2 │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── geo_alg │ ├── ReadMe.txt │ ├── geo_alg.cpp │ ├── geo_alg.sln │ ├── geo_alg.suo │ ├── geo_alg.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── line_demo │ ├── ChildView.cpp │ ├── ChildView.h │ ├── MainFrm.cpp │ ├── MainFrm.h │ ├── ReadMe.txt │ ├── Resource.h │ ├── UserImages.bmp │ ├── dev_adp.cpp │ ├── dev_adp.h │ ├── line.cpp │ ├── line.h │ ├── line_demo.aps │ ├── line_demo.cpp │ ├── line_demo.h │ ├── line_demo.rc │ ├── line_demo.sln │ ├── line_demo.suo │ ├── line_demo.vcproj │ ├── res │ │ ├── Toolbar.bmp │ │ ├── Toolbar256.bmp │ │ ├── line_demo.ico │ │ └── line_demo.rc2 │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── polygon_fill │ ├── ReadMe.txt │ ├── common.h │ ├── dev_adp.cpp │ ├── dev_adp.h │ ├── edge_center_fill.cpp │ ├── edge_center_fill.h │ ├── edge_def.h │ ├── edge_mark_fill.cpp │ ├── edge_mark_fill.h │ ├── function.cpp │ ├── function.h │ ├── point.h │ ├── polygon.h │ ├── polygon_fill.cpp │ ├── polygon_fill.sln │ ├── polygon_fill.suo │ ├── polygon_fill.vcproj │ ├── recursion_seed_fill.cpp │ ├── recursion_seed_fill.h │ ├── scanline_fill.cpp │ ├── scanline_fill.h │ ├── scanline_fill_o.cpp │ ├── scanline_fill_o.h │ ├── scanline_seed_fill.cpp │ ├── scanline_seed_fill.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code15 ├── fft_sample │ ├── common │ │ ├── Common.cpp │ │ ├── Common.h │ │ ├── LogicDevice.cpp │ │ ├── LogicDevice.h │ │ ├── Spline3.cpp │ │ ├── Spline3.h │ │ ├── ThomasEquation.cpp │ │ ├── ThomasEquation.h │ │ ├── Wave.cpp │ │ ├── Wave.h │ │ ├── WaveBuffer.cpp │ │ ├── WaveBuffer.h │ │ ├── WaveDevice.cpp │ │ ├── WaveDevice.h │ │ ├── WaveFile.cpp │ │ ├── WaveFile.h │ │ ├── WaveIn.cpp │ │ ├── WaveIn.h │ │ ├── WaveInterface.cpp │ │ ├── WaveInterface.h │ │ ├── WaveOut.cpp │ │ ├── WaveOut.h │ │ ├── equalizer.cpp │ │ ├── equalizer.h │ │ ├── fft.cpp │ │ ├── fft.h │ │ ├── spectrum.cpp │ │ └── spectrum.h │ ├── eq │ │ ├── eq.cpp │ │ ├── eq.h │ │ ├── iir.h │ │ ├── iir_cfs.cpp │ │ ├── iir_cfs.h │ │ ├── iir_fpu.cpp │ │ └── iir_fpu.h │ ├── fft_sample.sln │ ├── fft_sample.suo │ ├── player │ │ ├── DisplayWnd.cpp │ │ ├── DisplayWnd.h │ │ ├── ReadMe.txt │ │ ├── SpectrumWnd.cpp │ │ ├── SpectrumWnd.h │ │ ├── player.aps │ │ ├── player.cpp │ │ ├── player.h │ │ ├── player.rc │ │ ├── player.vcproj │ │ ├── playerDlg.cpp │ │ ├── playerDlg.h │ │ ├── res │ │ │ ├── player.ico │ │ │ └── player.rc2 │ │ ├── resource.h │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h │ └── plot_spectrum │ │ ├── ReadMe.txt │ │ ├── plot_spectrum.aps │ │ ├── plot_spectrum.cpp │ │ ├── plot_spectrum.h │ │ ├── plot_spectrum.rc │ │ ├── plot_spectrum.vcproj │ │ ├── plot_spectrumDlg.cpp │ │ ├── plot_spectrumDlg.h │ │ ├── res │ │ ├── plot_spectrum.ico │ │ └── plot_spectrum.rc2 │ │ ├── resource.h │ │ ├── stdafx.cpp │ │ ├── stdafx.h │ │ └── targetver.h └── 测试数据 │ ├── 0-8000-mono.wav │ ├── 0.wav │ ├── 1-1.wav │ ├── 1-8000-mono.wav │ ├── 2-8000-mono.wav │ ├── 2.wav │ ├── 6-8000-mono.wav │ ├── 6.wav │ ├── 7-8000-mono.wav │ ├── 7.wav │ ├── 8-8000-mono.wav │ ├── 8.wav │ └── 9-2.wav ├── code16 ├── ga │ ├── ReadMe.txt │ ├── ga.cpp │ ├── ga.sln │ ├── ga.suo │ ├── ga.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── ga2 │ ├── ReadMe.txt │ ├── ga2.cpp │ ├── ga2.sln │ ├── ga2.suo │ ├── ga2.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code17 └── calc │ ├── BigInt.cpp │ ├── BigInt.h │ ├── GcdLcm.cpp │ ├── GcdLcm.h │ ├── ReadMe.txt │ ├── calc.cpp │ ├── calc.sln │ ├── calc.suo │ ├── calc.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code18 └── calc │ ├── BigInt.cpp │ ├── BigInt.h │ ├── GcdLcm.cpp │ ├── GcdLcm.h │ ├── MD5Hash.cpp │ ├── MD5Hash.h │ ├── Prime.cpp │ ├── Prime.h │ ├── ReadMe.txt │ ├── RsaLib.cpp │ ├── RsaLib.h │ ├── calc.cpp │ ├── calc.sln │ ├── calc.suo │ ├── calc.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code19 └── sudoku │ ├── ReadMe.txt │ ├── stdafx.cpp │ ├── stdafx.h │ ├── sudoku.cpp │ ├── sudoku.sln │ ├── sudoku.suo │ ├── sudoku.vcproj │ └── targetver.h ├── code20 └── hua-rong-dao │ ├── ReadMe.txt │ ├── hua-rong-dao.cpp │ ├── hua-rong-dao.sln │ ├── hua-rong-dao.suo │ ├── hua-rong-dao.vcproj │ ├── output.log │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code21 └── AStar │ ├── AStar.aps │ ├── AStar.cpp │ ├── AStar.h │ ├── AStar.rc │ ├── AStar.sln │ ├── AStar.suo │ ├── AStar.vcproj │ ├── AStarDlg.cpp │ ├── AStarDlg.h │ ├── A_Star.cpp │ ├── A_Star.h │ ├── CellDef.h │ ├── Dijkstra.cpp │ ├── Dijkstra.h │ ├── Function.cpp │ ├── Function.h │ ├── GridWnd.cpp │ ├── GridWnd.h │ ├── MemDC.h │ ├── ReadMe.txt │ ├── res │ ├── AStar.ico │ └── AStar.rc2 │ ├── resource.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code22 └── russia │ ├── ReadMe.txt │ ├── data_def.cpp │ ├── data_def.h │ ├── evaluate.cpp │ ├── evaluate.h │ ├── russia.cpp │ ├── russia.sln │ ├── russia.suo │ ├── russia.vcproj │ ├── russia.vcxproj │ ├── russia.vcxproj.filters │ ├── russia.vcxproj.user │ ├── stdafx.cpp │ ├── stdafx.h │ ├── targetver.h │ └── type_def.h ├── code23 ├── fir │ ├── AlphaBetaSearcher.cpp │ ├── AlphaBetaSearcher.h │ ├── ComputerPlayer.cpp │ ├── ComputerPlayer.h │ ├── Copy of GameConst.h │ ├── Copy of GameState.cpp │ ├── Copy of GameState.h │ ├── Evaluator.h │ ├── EvaluatorData.cpp │ ├── EvaluatorData.h │ ├── GameConst.h │ ├── GameControl.cpp │ ├── GameControl.h │ ├── GameState.cpp │ ├── GameState.h │ ├── HumanPlayer.cpp │ ├── HumanPlayer.h │ ├── MinimaxSearcher.cpp │ ├── MinimaxSearcher.h │ ├── NegamaxAlphaBetaSearcher.cpp │ ├── NegamaxAlphaBetaSearcher.h │ ├── NegamaxSearcher.cpp │ ├── NegamaxSearcher.h │ ├── OdEvaluator.cpp │ ├── OdEvaluator.h │ ├── Player.h │ ├── ReadMe.txt │ ├── Searcher.h │ ├── Support.cpp │ ├── Support.h │ ├── TranspositionTable.cpp │ ├── TranspositionTable.h │ ├── WzEvaluator.cpp │ ├── WzEvaluator.h │ ├── ZobristHash.cpp │ ├── ZobristHash.h │ ├── fir.cpp │ ├── fir.sln │ ├── fir.suo │ ├── fir.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ ├── targetver.h │ ├── testAnalysis.cpp │ └── testAnalysis.h ├── othello │ ├── AlphaBetaSearcher.cpp │ ├── AlphaBetaSearcher.h │ ├── ComputerPlayer.cpp │ ├── ComputerPlayer.h │ ├── Evaluator.h │ ├── GameConst.h │ ├── GameControl.cpp │ ├── GameControl.h │ ├── GameState.cpp │ ├── GameState.h │ ├── HumanPlayer.cpp │ ├── HumanPlayer.h │ ├── MinimaxSearcher.cpp │ ├── MinimaxSearcher.h │ ├── NegamaxAlphaBetaSearcher.cpp │ ├── NegamaxAlphaBetaSearcher.h │ ├── NegamaxSearcher.cpp │ ├── NegamaxSearcher.h │ ├── OdEvaluator.cpp │ ├── OdEvaluator.h │ ├── Player.h │ ├── ReadMe.txt │ ├── Searcher.h │ ├── Support.cpp │ ├── Support.h │ ├── TranspositionTable.cpp │ ├── TranspositionTable.h │ ├── WzEvaluator.cpp │ ├── WzEvaluator.h │ ├── ZobristHash.cpp │ ├── ZobristHash.h │ ├── othello.cpp │ ├── othello.sln │ ├── othello.suo │ ├── othello.vcproj │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── tic-tac-toe │ ├── AlphaBetaSearcher.cpp │ ├── AlphaBetaSearcher.h │ ├── ComputerPlayer.cpp │ ├── ComputerPlayer.h │ ├── Evaluator.h │ ├── FeEvaluator.cpp │ ├── FeEvaluator.h │ ├── GameConst.h │ ├── GameControl.cpp │ ├── GameControl.h │ ├── GameState.cpp │ ├── GameState.h │ ├── HumanPlayer.cpp │ ├── HumanPlayer.h │ ├── MinimaxSearcher.cpp │ ├── MinimaxSearcher.h │ ├── NegamaxAlphaBetaSearcher.cpp │ ├── NegamaxAlphaBetaSearcher.h │ ├── NegamaxSearcher.cpp │ ├── NegamaxSearcher.h │ ├── Player.h │ ├── ReadMe.txt │ ├── Searcher.h │ ├── Support.cpp │ ├── Support.h │ ├── WzEvaluator.cpp │ ├── WzEvaluator.h │ ├── stdafx.cpp │ ├── stdafx.h │ ├── targetver.h │ ├── tic-tac-toe.cpp │ ├── tic-tac-toe.sln │ ├── tic-tac-toe.suo │ └── tic-tac-toe.vcproj └── second_edition ├── EasyX_static.props ├── FreeImage-3.18.0_share.props ├── code01 ├── bw │ ├── bw.cpp │ ├── bw.vcxproj │ ├── bw.vcxproj.filters │ └── bw.vcxproj.user ├── color │ ├── color.cpp │ ├── color.vcxproj │ ├── color.vcxproj.filters │ └── color.vcxproj.user ├── diff │ ├── diff.cpp │ ├── diff.vcxproj │ ├── diff.vcxproj.filters │ └── diff.vcxproj.user ├── graph.sln ├── gray │ ├── gray.cpp │ ├── gray.vcxproj │ ├── gray.vcxproj.filters │ └── gray.vcxproj.user ├── legibility │ ├── legibility.cpp │ ├── legibility.vcxproj │ ├── legibility.vcxproj.filters │ └── legibility.vcxproj.user └── snow │ ├── CSnow.cpp │ ├── CSnow.h │ ├── snow.cpp │ ├── snow.vcxproj │ ├── snow.vcxproj.filters │ └── snow.vcxproj.user ├── code03 ├── bayes.sln └── bayes │ ├── ReadMe.txt │ ├── bayes.cpp │ ├── bayes.vcxproj │ ├── bayes.vcxproj.filters │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code04 ├── max_match.sln └── max_match │ ├── ReadMe.txt │ ├── max_match.cpp │ ├── max_match.vcxproj │ ├── max_match.vcxproj.filters │ ├── max_match.vcxproj.user │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── code10 ├── bucket │ ├── bucket.cpp │ ├── bucket.vcxproj │ ├── bucket.vcxproj.filters │ └── bucket.vcxproj.user ├── limit.sln └── token │ ├── rate_limiter.cpp │ ├── rate_limiter.h │ ├── token.cpp │ ├── token.vcxproj │ ├── token.vcxproj.filters │ └── token.vcxproj.user ├── code24 ├── knn-digital.sln ├── knn-digital │ ├── ReadMe.txt │ ├── knn-digital.cpp │ ├── knn-digital.vcxproj │ ├── knn-digital.vcxproj.filters │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h ├── testdata │ ├── 0_0.txt │ ├── 0_1.txt │ ├── 0_10.txt │ ├── 0_11.txt │ ├── 0_12.txt │ ├── 0_13.txt │ ├── 0_14.txt │ ├── 0_15.txt │ ├── 0_16.txt │ ├── 0_17.txt │ ├── 0_18.txt │ ├── 0_19.txt │ ├── 0_2.txt │ ├── 0_20.txt │ ├── 0_21.txt │ ├── 0_22.txt │ ├── 0_23.txt │ ├── 0_24.txt │ ├── 0_25.txt │ ├── 0_26.txt │ ├── 0_27.txt │ ├── 0_28.txt │ ├── 0_29.txt │ ├── 0_3.txt │ ├── 0_30.txt │ ├── 0_31.txt │ ├── 0_32.txt │ ├── 0_33.txt │ ├── 0_34.txt │ ├── 0_35.txt │ ├── 0_36.txt │ ├── 0_37.txt │ ├── 0_38.txt │ ├── 0_39.txt │ ├── 0_4.txt │ ├── 0_40.txt │ ├── 0_41.txt │ ├── 0_42.txt │ ├── 0_43.txt │ ├── 0_44.txt │ ├── 0_45.txt │ ├── 0_46.txt │ ├── 0_47.txt │ ├── 0_48.txt │ ├── 0_49.txt │ ├── 0_5.txt │ ├── 0_50.txt │ ├── 0_51.txt │ ├── 0_52.txt │ ├── 0_53.txt │ ├── 0_54.txt │ ├── 0_55.txt │ ├── 0_56.txt │ ├── 0_57.txt │ ├── 0_58.txt │ ├── 0_59.txt │ ├── 0_6.txt │ ├── 0_60.txt │ ├── 0_61.txt │ ├── 0_62.txt │ ├── 0_63.txt │ ├── 0_64.txt │ ├── 0_65.txt │ ├── 0_66.txt │ ├── 0_67.txt │ ├── 0_68.txt │ ├── 0_69.txt │ ├── 0_7.txt │ ├── 0_70.txt │ ├── 0_71.txt │ ├── 0_72.txt │ ├── 0_73.txt │ ├── 0_74.txt │ ├── 0_75.txt │ ├── 0_76.txt │ ├── 0_77.txt │ ├── 0_78.txt │ ├── 0_79.txt │ ├── 0_8.txt │ ├── 0_80.txt │ ├── 0_81.txt │ ├── 0_82.txt │ ├── 0_83.txt │ ├── 0_84.txt │ ├── 0_85.txt │ ├── 0_86.txt │ ├── 0_9.txt │ ├── 1_0.txt │ ├── 1_1.txt │ ├── 1_10.txt │ ├── 1_11.txt │ ├── 1_12.txt │ ├── 1_13.txt │ ├── 1_14.txt │ ├── 1_15.txt │ ├── 1_16.txt │ ├── 1_17.txt │ ├── 1_18.txt │ ├── 1_19.txt │ ├── 1_2.txt │ ├── 1_20.txt │ ├── 1_21.txt │ ├── 1_22.txt │ ├── 1_23.txt │ ├── 1_24.txt │ ├── 1_25.txt │ ├── 1_26.txt │ ├── 1_27.txt │ ├── 1_28.txt │ ├── 1_29.txt │ ├── 1_3.txt │ ├── 1_30.txt │ ├── 1_31.txt │ ├── 1_32.txt │ ├── 1_33.txt │ ├── 1_34.txt │ ├── 1_35.txt │ ├── 1_36.txt │ ├── 1_37.txt │ ├── 1_38.txt │ ├── 1_39.txt │ ├── 1_4.txt │ ├── 1_40.txt │ ├── 1_41.txt │ ├── 1_42.txt │ ├── 1_43.txt │ ├── 1_44.txt │ ├── 1_45.txt │ ├── 1_46.txt │ ├── 1_47.txt │ ├── 1_48.txt │ ├── 1_49.txt │ ├── 1_5.txt │ ├── 1_50.txt │ ├── 1_51.txt │ ├── 1_52.txt │ ├── 1_53.txt │ ├── 1_54.txt │ ├── 1_55.txt │ ├── 1_56.txt │ ├── 1_57.txt │ ├── 1_58.txt │ ├── 1_59.txt │ ├── 1_6.txt │ ├── 1_60.txt │ ├── 1_61.txt │ ├── 1_62.txt │ ├── 1_63.txt │ ├── 1_64.txt │ ├── 1_65.txt │ ├── 1_66.txt │ ├── 1_67.txt │ ├── 1_68.txt │ ├── 1_69.txt │ ├── 1_7.txt │ ├── 1_70.txt │ ├── 1_71.txt │ ├── 1_72.txt │ ├── 1_73.txt │ ├── 1_74.txt │ ├── 1_75.txt │ ├── 1_76.txt │ ├── 1_77.txt │ ├── 1_78.txt │ ├── 1_79.txt │ ├── 1_8.txt │ ├── 1_80.txt │ ├── 1_81.txt │ ├── 1_82.txt │ ├── 1_83.txt │ ├── 1_84.txt │ ├── 1_85.txt │ ├── 1_86.txt │ ├── 1_87.txt │ ├── 1_88.txt │ ├── 1_89.txt │ ├── 1_9.txt │ ├── 1_90.txt │ ├── 1_91.txt │ ├── 1_92.txt │ ├── 1_93.txt │ ├── 1_94.txt │ ├── 1_95.txt │ ├── 1_96.txt │ ├── 2_0.txt │ ├── 2_1.txt │ ├── 2_10.txt │ ├── 2_11.txt │ ├── 2_12.txt │ ├── 2_13.txt │ ├── 2_14.txt │ ├── 2_15.txt │ ├── 2_16.txt │ ├── 2_17.txt │ ├── 2_18.txt │ ├── 2_19.txt │ ├── 2_2.txt │ ├── 2_20.txt │ ├── 2_21.txt │ ├── 2_22.txt │ ├── 2_23.txt │ ├── 2_24.txt │ ├── 2_25.txt │ ├── 2_26.txt │ ├── 2_27.txt │ ├── 2_28.txt │ ├── 2_29.txt │ ├── 2_3.txt │ ├── 2_30.txt │ ├── 2_31.txt │ ├── 2_32.txt │ ├── 2_33.txt │ ├── 2_34.txt │ ├── 2_35.txt │ ├── 2_36.txt │ ├── 2_37.txt │ ├── 2_38.txt │ ├── 2_39.txt │ ├── 2_4.txt │ ├── 2_40.txt │ ├── 2_41.txt │ ├── 2_42.txt │ ├── 2_43.txt │ ├── 2_44.txt │ ├── 2_45.txt │ ├── 2_46.txt │ ├── 2_47.txt │ ├── 2_48.txt │ ├── 2_49.txt │ ├── 2_5.txt │ ├── 2_50.txt │ ├── 2_51.txt │ ├── 2_52.txt │ ├── 2_53.txt │ ├── 2_54.txt │ ├── 2_55.txt │ ├── 2_56.txt │ ├── 2_57.txt │ ├── 2_58.txt │ ├── 2_59.txt │ ├── 2_6.txt │ ├── 2_60.txt │ ├── 2_61.txt │ ├── 2_62.txt │ ├── 2_63.txt │ ├── 2_64.txt │ ├── 2_65.txt │ ├── 2_66.txt │ ├── 2_67.txt │ ├── 2_68.txt │ ├── 2_69.txt │ ├── 2_7.txt │ ├── 2_70.txt │ ├── 2_71.txt │ ├── 2_72.txt │ ├── 2_73.txt │ ├── 2_74.txt │ ├── 2_75.txt │ ├── 2_76.txt │ ├── 2_77.txt │ ├── 2_78.txt │ ├── 2_79.txt │ ├── 2_8.txt │ ├── 2_80.txt │ ├── 2_81.txt │ ├── 2_82.txt │ ├── 2_83.txt │ ├── 2_84.txt │ ├── 2_85.txt │ ├── 2_86.txt │ ├── 2_87.txt │ ├── 2_88.txt │ ├── 2_89.txt │ ├── 2_9.txt │ ├── 2_90.txt │ ├── 2_91.txt │ ├── 3_0.txt │ ├── 3_1.txt │ ├── 3_10.txt │ ├── 3_11.txt │ ├── 3_12.txt │ ├── 3_13.txt │ ├── 3_14.txt │ ├── 3_15.txt │ ├── 3_16.txt │ ├── 3_17.txt │ ├── 3_18.txt │ ├── 3_19.txt │ ├── 3_2.txt │ ├── 3_20.txt │ ├── 3_21.txt │ ├── 3_22.txt │ ├── 3_23.txt │ ├── 3_24.txt │ ├── 3_25.txt │ ├── 3_26.txt │ ├── 3_27.txt │ ├── 3_28.txt │ ├── 3_29.txt │ ├── 3_3.txt │ ├── 3_30.txt │ ├── 3_31.txt │ ├── 3_32.txt │ ├── 3_33.txt │ ├── 3_34.txt │ ├── 3_35.txt │ ├── 3_36.txt │ ├── 3_37.txt │ ├── 3_38.txt │ ├── 3_39.txt │ ├── 3_4.txt │ ├── 3_40.txt │ ├── 3_41.txt │ ├── 3_42.txt │ ├── 3_43.txt │ ├── 3_44.txt │ ├── 3_45.txt │ ├── 3_46.txt │ ├── 3_47.txt │ ├── 3_48.txt │ ├── 3_49.txt │ ├── 3_5.txt │ ├── 3_50.txt │ ├── 3_51.txt │ ├── 3_52.txt │ ├── 3_53.txt │ ├── 3_54.txt │ ├── 3_55.txt │ ├── 3_56.txt │ ├── 3_57.txt │ ├── 3_58.txt │ ├── 3_59.txt │ ├── 3_6.txt │ ├── 3_60.txt │ ├── 3_61.txt │ ├── 3_62.txt │ ├── 3_63.txt │ ├── 3_64.txt │ ├── 3_65.txt │ ├── 3_66.txt │ ├── 3_67.txt │ ├── 3_68.txt │ ├── 3_69.txt │ ├── 3_7.txt │ ├── 3_70.txt │ ├── 3_71.txt │ ├── 3_72.txt │ ├── 3_73.txt │ ├── 3_74.txt │ ├── 3_75.txt │ ├── 3_76.txt │ ├── 3_77.txt │ ├── 3_78.txt │ ├── 3_79.txt │ ├── 3_8.txt │ ├── 3_80.txt │ ├── 3_81.txt │ ├── 3_82.txt │ ├── 3_83.txt │ ├── 3_84.txt │ ├── 3_9.txt │ ├── 4_0.txt │ ├── 4_1.txt │ ├── 4_10.txt │ ├── 4_100.txt │ ├── 4_101.txt │ ├── 4_102.txt │ ├── 4_103.txt │ ├── 4_104.txt │ ├── 4_105.txt │ ├── 4_106.txt │ ├── 4_107.txt │ ├── 4_108.txt │ ├── 4_109.txt │ ├── 4_11.txt │ ├── 4_110.txt │ ├── 4_111.txt │ ├── 4_112.txt │ ├── 4_113.txt │ ├── 4_12.txt │ ├── 4_13.txt │ ├── 4_14.txt │ ├── 4_15.txt │ ├── 4_16.txt │ ├── 4_17.txt │ ├── 4_18.txt │ ├── 4_19.txt │ ├── 4_2.txt │ ├── 4_20.txt │ ├── 4_21.txt │ ├── 4_22.txt │ ├── 4_23.txt │ ├── 4_24.txt │ ├── 4_25.txt │ ├── 4_26.txt │ ├── 4_27.txt │ ├── 4_28.txt │ ├── 4_29.txt │ ├── 4_3.txt │ ├── 4_30.txt │ ├── 4_31.txt │ ├── 4_32.txt │ ├── 4_33.txt │ ├── 4_34.txt │ ├── 4_35.txt │ ├── 4_36.txt │ ├── 4_37.txt │ ├── 4_38.txt │ ├── 4_39.txt │ ├── 4_4.txt │ ├── 4_40.txt │ ├── 4_41.txt │ ├── 4_42.txt │ ├── 4_43.txt │ ├── 4_44.txt │ ├── 4_45.txt │ ├── 4_46.txt │ ├── 4_47.txt │ ├── 4_48.txt │ ├── 4_49.txt │ ├── 4_5.txt │ ├── 4_50.txt │ ├── 4_51.txt │ ├── 4_52.txt │ ├── 4_53.txt │ ├── 4_54.txt │ ├── 4_55.txt │ ├── 4_56.txt │ ├── 4_57.txt │ ├── 4_58.txt │ ├── 4_59.txt │ ├── 4_6.txt │ ├── 4_60.txt │ ├── 4_61.txt │ ├── 4_62.txt │ ├── 4_63.txt │ ├── 4_64.txt │ ├── 4_65.txt │ ├── 4_66.txt │ ├── 4_67.txt │ ├── 4_68.txt │ ├── 4_69.txt │ ├── 4_7.txt │ ├── 4_70.txt │ ├── 4_71.txt │ ├── 4_72.txt │ ├── 4_73.txt │ ├── 4_74.txt │ ├── 4_75.txt │ ├── 4_76.txt │ ├── 4_77.txt │ ├── 4_78.txt │ ├── 4_79.txt │ ├── 4_8.txt │ ├── 4_80.txt │ ├── 4_81.txt │ ├── 4_82.txt │ ├── 4_83.txt │ ├── 4_84.txt │ ├── 4_85.txt │ ├── 4_86.txt │ ├── 4_87.txt │ ├── 4_88.txt │ ├── 4_89.txt │ ├── 4_9.txt │ ├── 4_90.txt │ ├── 4_91.txt │ ├── 4_92.txt │ ├── 4_93.txt │ ├── 4_94.txt │ ├── 4_95.txt │ ├── 4_96.txt │ ├── 4_97.txt │ ├── 4_98.txt │ ├── 4_99.txt │ ├── 5_0.txt │ ├── 5_1.txt │ ├── 5_10.txt │ ├── 5_100.txt │ ├── 5_101.txt │ ├── 5_102.txt │ ├── 5_103.txt │ ├── 5_104.txt │ ├── 5_105.txt │ ├── 5_106.txt │ ├── 5_107.txt │ ├── 5_11.txt │ ├── 5_12.txt │ ├── 5_13.txt │ ├── 5_14.txt │ ├── 5_15.txt │ ├── 5_16.txt │ ├── 5_17.txt │ ├── 5_18.txt │ ├── 5_19.txt │ ├── 5_2.txt │ ├── 5_20.txt │ ├── 5_21.txt │ ├── 5_22.txt │ ├── 5_23.txt │ ├── 5_24.txt │ ├── 5_25.txt │ ├── 5_26.txt │ ├── 5_27.txt │ ├── 5_28.txt │ ├── 5_29.txt │ ├── 5_3.txt │ ├── 5_30.txt │ ├── 5_31.txt │ ├── 5_32.txt │ ├── 5_33.txt │ ├── 5_34.txt │ ├── 5_35.txt │ ├── 5_36.txt │ ├── 5_37.txt │ ├── 5_38.txt │ ├── 5_39.txt │ ├── 5_4.txt │ ├── 5_40.txt │ ├── 5_41.txt │ ├── 5_42.txt │ ├── 5_43.txt │ ├── 5_44.txt │ ├── 5_45.txt │ ├── 5_46.txt │ ├── 5_47.txt │ ├── 5_48.txt │ ├── 5_49.txt │ ├── 5_5.txt │ ├── 5_50.txt │ ├── 5_51.txt │ ├── 5_52.txt │ ├── 5_53.txt │ ├── 5_54.txt │ ├── 5_55.txt │ ├── 5_56.txt │ ├── 5_57.txt │ ├── 5_58.txt │ ├── 5_59.txt │ ├── 5_6.txt │ ├── 5_60.txt │ ├── 5_61.txt │ ├── 5_62.txt │ ├── 5_63.txt │ ├── 5_64.txt │ ├── 5_65.txt │ ├── 5_66.txt │ ├── 5_67.txt │ ├── 5_68.txt │ ├── 5_69.txt │ ├── 5_7.txt │ ├── 5_70.txt │ ├── 5_71.txt │ ├── 5_72.txt │ ├── 5_73.txt │ ├── 5_74.txt │ ├── 5_75.txt │ ├── 5_76.txt │ ├── 5_77.txt │ ├── 5_78.txt │ ├── 5_79.txt │ ├── 5_8.txt │ ├── 5_80.txt │ ├── 5_81.txt │ ├── 5_82.txt │ ├── 5_83.txt │ ├── 5_84.txt │ ├── 5_85.txt │ ├── 5_86.txt │ ├── 5_87.txt │ ├── 5_88.txt │ ├── 5_89.txt │ ├── 5_9.txt │ ├── 5_90.txt │ ├── 5_91.txt │ ├── 5_92.txt │ ├── 5_93.txt │ ├── 5_94.txt │ ├── 5_95.txt │ ├── 5_96.txt │ ├── 5_97.txt │ ├── 5_98.txt │ ├── 5_99.txt │ ├── 6_0.txt │ ├── 6_1.txt │ ├── 6_10.txt │ ├── 6_11.txt │ ├── 6_12.txt │ ├── 6_13.txt │ ├── 6_14.txt │ ├── 6_15.txt │ ├── 6_16.txt │ ├── 6_17.txt │ ├── 6_18.txt │ ├── 6_19.txt │ ├── 6_2.txt │ ├── 6_20.txt │ ├── 6_21.txt │ ├── 6_22.txt │ ├── 6_23.txt │ ├── 6_24.txt │ ├── 6_25.txt │ ├── 6_26.txt │ ├── 6_27.txt │ ├── 6_28.txt │ ├── 6_29.txt │ ├── 6_3.txt │ ├── 6_30.txt │ ├── 6_31.txt │ ├── 6_32.txt │ ├── 6_33.txt │ ├── 6_34.txt │ ├── 6_35.txt │ ├── 6_36.txt │ ├── 6_37.txt │ ├── 6_38.txt │ ├── 6_39.txt │ ├── 6_4.txt │ ├── 6_40.txt │ ├── 6_41.txt │ ├── 6_42.txt │ ├── 6_43.txt │ ├── 6_44.txt │ ├── 6_45.txt │ ├── 6_46.txt │ ├── 6_47.txt │ ├── 6_48.txt │ ├── 6_49.txt │ ├── 6_5.txt │ ├── 6_50.txt │ ├── 6_51.txt │ ├── 6_52.txt │ ├── 6_53.txt │ ├── 6_54.txt │ ├── 6_55.txt │ ├── 6_56.txt │ ├── 6_57.txt │ ├── 6_58.txt │ ├── 6_59.txt │ ├── 6_6.txt │ ├── 6_60.txt │ ├── 6_61.txt │ ├── 6_62.txt │ ├── 6_63.txt │ ├── 6_64.txt │ ├── 6_65.txt │ ├── 6_66.txt │ ├── 6_67.txt │ ├── 6_68.txt │ ├── 6_69.txt │ ├── 6_7.txt │ ├── 6_70.txt │ ├── 6_71.txt │ ├── 6_72.txt │ ├── 6_73.txt │ ├── 6_74.txt │ ├── 6_75.txt │ ├── 6_76.txt │ ├── 6_77.txt │ ├── 6_78.txt │ ├── 6_79.txt │ ├── 6_8.txt │ ├── 6_80.txt │ ├── 6_81.txt │ ├── 6_82.txt │ ├── 6_83.txt │ ├── 6_84.txt │ ├── 6_85.txt │ ├── 6_86.txt │ ├── 6_9.txt │ ├── 7_0.txt │ ├── 7_1.txt │ ├── 7_10.txt │ ├── 7_11.txt │ ├── 7_12.txt │ ├── 7_13.txt │ ├── 7_14.txt │ ├── 7_15.txt │ ├── 7_16.txt │ ├── 7_17.txt │ ├── 7_18.txt │ ├── 7_19.txt │ ├── 7_2.txt │ ├── 7_20.txt │ ├── 7_21.txt │ ├── 7_22.txt │ ├── 7_23.txt │ ├── 7_24.txt │ ├── 7_25.txt │ ├── 7_26.txt │ ├── 7_27.txt │ ├── 7_28.txt │ ├── 7_29.txt │ ├── 7_3.txt │ ├── 7_30.txt │ ├── 7_31.txt │ ├── 7_32.txt │ ├── 7_33.txt │ ├── 7_34.txt │ ├── 7_35.txt │ ├── 7_36.txt │ ├── 7_37.txt │ ├── 7_38.txt │ ├── 7_39.txt │ ├── 7_4.txt │ ├── 7_40.txt │ ├── 7_41.txt │ ├── 7_42.txt │ ├── 7_43.txt │ ├── 7_44.txt │ ├── 7_45.txt │ ├── 7_46.txt │ ├── 7_47.txt │ ├── 7_48.txt │ ├── 7_49.txt │ ├── 7_5.txt │ ├── 7_50.txt │ ├── 7_51.txt │ ├── 7_52.txt │ ├── 7_53.txt │ ├── 7_54.txt │ ├── 7_55.txt │ ├── 7_56.txt │ ├── 7_57.txt │ ├── 7_58.txt │ ├── 7_59.txt │ ├── 7_6.txt │ ├── 7_60.txt │ ├── 7_61.txt │ ├── 7_62.txt │ ├── 7_63.txt │ ├── 7_64.txt │ ├── 7_65.txt │ ├── 7_66.txt │ ├── 7_67.txt │ ├── 7_68.txt │ ├── 7_69.txt │ ├── 7_7.txt │ ├── 7_70.txt │ ├── 7_71.txt │ ├── 7_72.txt │ ├── 7_73.txt │ ├── 7_74.txt │ ├── 7_75.txt │ ├── 7_76.txt │ ├── 7_77.txt │ ├── 7_78.txt │ ├── 7_79.txt │ ├── 7_8.txt │ ├── 7_80.txt │ ├── 7_81.txt │ ├── 7_82.txt │ ├── 7_83.txt │ ├── 7_84.txt │ ├── 7_85.txt │ ├── 7_86.txt │ ├── 7_87.txt │ ├── 7_88.txt │ ├── 7_89.txt │ ├── 7_9.txt │ ├── 7_90.txt │ ├── 7_91.txt │ ├── 7_92.txt │ ├── 7_93.txt │ ├── 7_94.txt │ ├── 7_95.txt │ ├── 8_0.txt │ ├── 8_1.txt │ ├── 8_10.txt │ ├── 8_11.txt │ ├── 8_12.txt │ ├── 8_13.txt │ ├── 8_14.txt │ ├── 8_15.txt │ ├── 8_16.txt │ ├── 8_17.txt │ ├── 8_18.txt │ ├── 8_19.txt │ ├── 8_2.txt │ ├── 8_20.txt │ ├── 8_21.txt │ ├── 8_22.txt │ ├── 8_23.txt │ ├── 8_24.txt │ ├── 8_25.txt │ ├── 8_26.txt │ ├── 8_27.txt │ ├── 8_28.txt │ ├── 8_29.txt │ ├── 8_3.txt │ ├── 8_30.txt │ ├── 8_31.txt │ ├── 8_32.txt │ ├── 8_33.txt │ ├── 8_34.txt │ ├── 8_35.txt │ ├── 8_36.txt │ ├── 8_37.txt │ ├── 8_38.txt │ ├── 8_39.txt │ ├── 8_4.txt │ ├── 8_40.txt │ ├── 8_41.txt │ ├── 8_42.txt │ ├── 8_43.txt │ ├── 8_44.txt │ ├── 8_45.txt │ ├── 8_46.txt │ ├── 8_47.txt │ ├── 8_48.txt │ ├── 8_49.txt │ ├── 8_5.txt │ ├── 8_50.txt │ ├── 8_51.txt │ ├── 8_52.txt │ ├── 8_53.txt │ ├── 8_54.txt │ ├── 8_55.txt │ ├── 8_56.txt │ ├── 8_57.txt │ ├── 8_58.txt │ ├── 8_59.txt │ ├── 8_6.txt │ ├── 8_60.txt │ ├── 8_61.txt │ ├── 8_62.txt │ ├── 8_63.txt │ ├── 8_64.txt │ ├── 8_65.txt │ ├── 8_66.txt │ ├── 8_67.txt │ ├── 8_68.txt │ ├── 8_69.txt │ ├── 8_7.txt │ ├── 8_70.txt │ ├── 8_71.txt │ ├── 8_72.txt │ ├── 8_73.txt │ ├── 8_74.txt │ ├── 8_75.txt │ ├── 8_76.txt │ ├── 8_77.txt │ ├── 8_78.txt │ ├── 8_79.txt │ ├── 8_8.txt │ ├── 8_80.txt │ ├── 8_81.txt │ ├── 8_82.txt │ ├── 8_83.txt │ ├── 8_84.txt │ ├── 8_85.txt │ ├── 8_86.txt │ ├── 8_87.txt │ ├── 8_88.txt │ ├── 8_89.txt │ ├── 8_9.txt │ ├── 8_90.txt │ ├── 9_0.txt │ ├── 9_1.txt │ ├── 9_10.txt │ ├── 9_11.txt │ ├── 9_12.txt │ ├── 9_13.txt │ ├── 9_14.txt │ ├── 9_15.txt │ ├── 9_16.txt │ ├── 9_17.txt │ ├── 9_18.txt │ ├── 9_19.txt │ ├── 9_2.txt │ ├── 9_20.txt │ ├── 9_21.txt │ ├── 9_22.txt │ ├── 9_23.txt │ ├── 9_24.txt │ ├── 9_25.txt │ ├── 9_26.txt │ ├── 9_27.txt │ ├── 9_28.txt │ ├── 9_29.txt │ ├── 9_3.txt │ ├── 9_30.txt │ ├── 9_31.txt │ ├── 9_32.txt │ ├── 9_33.txt │ ├── 9_34.txt │ ├── 9_35.txt │ ├── 9_36.txt │ ├── 9_37.txt │ ├── 9_38.txt │ ├── 9_39.txt │ ├── 9_4.txt │ ├── 9_40.txt │ ├── 9_41.txt │ ├── 9_42.txt │ ├── 9_43.txt │ ├── 9_44.txt │ ├── 9_45.txt │ ├── 9_46.txt │ ├── 9_47.txt │ ├── 9_48.txt │ ├── 9_49.txt │ ├── 9_5.txt │ ├── 9_50.txt │ ├── 9_51.txt │ ├── 9_52.txt │ ├── 9_53.txt │ ├── 9_54.txt │ ├── 9_55.txt │ ├── 9_56.txt │ ├── 9_57.txt │ ├── 9_58.txt │ ├── 9_59.txt │ ├── 9_6.txt │ ├── 9_60.txt │ ├── 9_61.txt │ ├── 9_62.txt │ ├── 9_63.txt │ ├── 9_64.txt │ ├── 9_65.txt │ ├── 9_66.txt │ ├── 9_67.txt │ ├── 9_68.txt │ ├── 9_69.txt │ ├── 9_7.txt │ ├── 9_70.txt │ ├── 9_71.txt │ ├── 9_72.txt │ ├── 9_73.txt │ ├── 9_74.txt │ ├── 9_75.txt │ ├── 9_76.txt │ ├── 9_77.txt │ ├── 9_78.txt │ ├── 9_79.txt │ ├── 9_8.txt │ ├── 9_80.txt │ ├── 9_81.txt │ ├── 9_82.txt │ ├── 9_83.txt │ ├── 9_84.txt │ ├── 9_85.txt │ ├── 9_86.txt │ ├── 9_87.txt │ ├── 9_88.txt │ └── 9_9.txt └── traindata │ ├── 0_0.txt │ ├── 0_1.txt │ ├── 0_10.txt │ ├── 0_100.txt │ ├── 0_101.txt │ ├── 0_102.txt │ ├── 0_103.txt │ ├── 0_104.txt │ ├── 0_105.txt │ ├── 0_106.txt │ ├── 0_107.txt │ ├── 0_108.txt │ ├── 0_109.txt │ ├── 0_11.txt │ ├── 0_110.txt │ ├── 0_111.txt │ ├── 0_112.txt │ ├── 0_113.txt │ ├── 0_114.txt │ ├── 0_115.txt │ ├── 0_116.txt │ ├── 0_117.txt │ ├── 0_118.txt │ ├── 0_119.txt │ ├── 0_12.txt │ ├── 0_120.txt │ ├── 0_121.txt │ ├── 0_122.txt │ ├── 0_123.txt │ ├── 0_124.txt │ ├── 0_125.txt │ ├── 0_126.txt │ ├── 0_127.txt │ ├── 0_128.txt │ ├── 0_129.txt │ ├── 0_13.txt │ ├── 0_130.txt │ ├── 0_131.txt │ ├── 0_132.txt │ ├── 0_133.txt │ ├── 0_134.txt │ ├── 0_135.txt │ ├── 0_136.txt │ ├── 0_137.txt │ ├── 0_138.txt │ ├── 0_139.txt │ ├── 0_14.txt │ ├── 0_140.txt │ ├── 0_141.txt │ ├── 0_142.txt │ ├── 0_143.txt │ ├── 0_144.txt │ ├── 0_145.txt │ ├── 0_146.txt │ ├── 0_147.txt │ ├── 0_148.txt │ ├── 0_149.txt │ ├── 0_15.txt │ ├── 0_150.txt │ ├── 0_151.txt │ ├── 0_152.txt │ ├── 0_153.txt │ ├── 0_154.txt │ ├── 0_155.txt │ ├── 0_156.txt │ ├── 0_157.txt │ ├── 0_158.txt │ ├── 0_159.txt │ ├── 0_16.txt │ ├── 0_160.txt │ ├── 0_161.txt │ ├── 0_162.txt │ ├── 0_163.txt │ ├── 0_164.txt │ ├── 0_165.txt │ ├── 0_166.txt │ ├── 0_167.txt │ ├── 0_168.txt │ ├── 0_169.txt │ ├── 0_17.txt │ ├── 0_170.txt │ ├── 0_171.txt │ ├── 0_172.txt │ ├── 0_173.txt │ ├── 0_174.txt │ ├── 0_175.txt │ ├── 0_176.txt │ ├── 0_177.txt │ ├── 0_178.txt │ ├── 0_179.txt │ ├── 0_18.txt │ ├── 0_180.txt │ ├── 0_181.txt │ ├── 0_182.txt │ ├── 0_183.txt │ ├── 0_184.txt │ ├── 0_185.txt │ ├── 0_186.txt │ ├── 0_187.txt │ ├── 0_188.txt │ ├── 0_19.txt │ ├── 0_2.txt │ ├── 0_20.txt │ ├── 0_21.txt │ ├── 0_22.txt │ ├── 0_23.txt │ ├── 0_24.txt │ ├── 0_25.txt │ ├── 0_26.txt │ ├── 0_27.txt │ ├── 0_28.txt │ ├── 0_29.txt │ ├── 0_3.txt │ ├── 0_30.txt │ ├── 0_31.txt │ ├── 0_32.txt │ ├── 0_33.txt │ ├── 0_34.txt │ ├── 0_35.txt │ ├── 0_36.txt │ ├── 0_37.txt │ ├── 0_38.txt │ ├── 0_39.txt │ ├── 0_4.txt │ ├── 0_40.txt │ ├── 0_41.txt │ ├── 0_42.txt │ ├── 0_43.txt │ ├── 0_44.txt │ ├── 0_45.txt │ ├── 0_46.txt │ ├── 0_47.txt │ ├── 0_48.txt │ ├── 0_49.txt │ ├── 0_5.txt │ ├── 0_50.txt │ ├── 0_51.txt │ ├── 0_52.txt │ ├── 0_53.txt │ ├── 0_54.txt │ ├── 0_55.txt │ ├── 0_56.txt │ ├── 0_57.txt │ ├── 0_58.txt │ ├── 0_59.txt │ ├── 0_6.txt │ ├── 0_60.txt │ ├── 0_61.txt │ ├── 0_62.txt │ ├── 0_63.txt │ ├── 0_64.txt │ ├── 0_65.txt │ ├── 0_66.txt │ ├── 0_67.txt │ ├── 0_68.txt │ ├── 0_69.txt │ ├── 0_7.txt │ ├── 0_70.txt │ ├── 0_71.txt │ ├── 0_72.txt │ ├── 0_73.txt │ ├── 0_74.txt │ ├── 0_75.txt │ ├── 0_76.txt │ ├── 0_77.txt │ ├── 0_78.txt │ ├── 0_79.txt │ ├── 0_8.txt │ ├── 0_80.txt │ ├── 0_81.txt │ ├── 0_82.txt │ ├── 0_83.txt │ ├── 0_84.txt │ ├── 0_85.txt │ ├── 0_86.txt │ ├── 0_87.txt │ ├── 0_88.txt │ ├── 0_89.txt │ ├── 0_9.txt │ ├── 0_90.txt │ ├── 0_91.txt │ ├── 0_92.txt │ ├── 0_93.txt │ ├── 0_94.txt │ ├── 0_95.txt │ ├── 0_96.txt │ ├── 0_97.txt │ ├── 0_98.txt │ ├── 0_99.txt │ ├── 1_0.txt │ ├── 1_1.txt │ ├── 1_10.txt │ ├── 1_100.txt │ ├── 1_101.txt │ ├── 1_102.txt │ ├── 1_103.txt │ ├── 1_104.txt │ ├── 1_105.txt │ ├── 1_106.txt │ ├── 1_107.txt │ ├── 1_108.txt │ ├── 1_109.txt │ ├── 1_11.txt │ ├── 1_110.txt │ ├── 1_111.txt │ ├── 1_112.txt │ ├── 1_113.txt │ ├── 1_114.txt │ ├── 1_115.txt │ ├── 1_116.txt │ ├── 1_117.txt │ ├── 1_118.txt │ ├── 1_119.txt │ ├── 1_12.txt │ ├── 1_120.txt │ ├── 1_121.txt │ ├── 1_122.txt │ ├── 1_123.txt │ ├── 1_124.txt │ ├── 1_125.txt │ ├── 1_126.txt │ ├── 1_127.txt │ ├── 1_128.txt │ ├── 1_129.txt │ ├── 1_13.txt │ ├── 1_130.txt │ ├── 1_131.txt │ ├── 1_132.txt │ ├── 1_133.txt │ ├── 1_134.txt │ ├── 1_135.txt │ ├── 1_136.txt │ ├── 1_137.txt │ ├── 1_138.txt │ ├── 1_139.txt │ ├── 1_14.txt │ ├── 1_140.txt │ ├── 1_141.txt │ ├── 1_142.txt │ ├── 1_143.txt │ ├── 1_144.txt │ ├── 1_145.txt │ ├── 1_146.txt │ ├── 1_147.txt │ ├── 1_148.txt │ ├── 1_149.txt │ ├── 1_15.txt │ ├── 1_150.txt │ ├── 1_151.txt │ ├── 1_152.txt │ ├── 1_153.txt │ ├── 1_154.txt │ ├── 1_155.txt │ ├── 1_156.txt │ ├── 1_157.txt │ ├── 1_158.txt │ ├── 1_159.txt │ ├── 1_16.txt │ ├── 1_160.txt │ ├── 1_161.txt │ ├── 1_162.txt │ ├── 1_163.txt │ ├── 1_164.txt │ ├── 1_165.txt │ ├── 1_166.txt │ ├── 1_167.txt │ ├── 1_168.txt │ ├── 1_169.txt │ ├── 1_17.txt │ ├── 1_170.txt │ ├── 1_171.txt │ ├── 1_172.txt │ ├── 1_173.txt │ ├── 1_174.txt │ ├── 1_175.txt │ ├── 1_176.txt │ ├── 1_177.txt │ ├── 1_178.txt │ ├── 1_179.txt │ ├── 1_18.txt │ ├── 1_180.txt │ ├── 1_181.txt │ ├── 1_182.txt │ ├── 1_183.txt │ ├── 1_184.txt │ ├── 1_185.txt │ ├── 1_186.txt │ ├── 1_187.txt │ ├── 1_188.txt │ ├── 1_189.txt │ ├── 1_19.txt │ ├── 1_190.txt │ ├── 1_191.txt │ ├── 1_192.txt │ ├── 1_193.txt │ ├── 1_194.txt │ ├── 1_195.txt │ ├── 1_196.txt │ ├── 1_197.txt │ ├── 1_2.txt │ ├── 1_20.txt │ ├── 1_21.txt │ ├── 1_22.txt │ ├── 1_23.txt │ ├── 1_24.txt │ ├── 1_25.txt │ ├── 1_26.txt │ ├── 1_27.txt │ ├── 1_28.txt │ ├── 1_29.txt │ ├── 1_3.txt │ ├── 1_30.txt │ ├── 1_31.txt │ ├── 1_32.txt │ ├── 1_33.txt │ ├── 1_34.txt │ ├── 1_35.txt │ ├── 1_36.txt │ ├── 1_37.txt │ ├── 1_38.txt │ ├── 1_39.txt │ ├── 1_4.txt │ ├── 1_40.txt │ ├── 1_41.txt │ ├── 1_42.txt │ ├── 1_43.txt │ ├── 1_44.txt │ ├── 1_45.txt │ ├── 1_46.txt │ ├── 1_47.txt │ ├── 1_48.txt │ ├── 1_49.txt │ ├── 1_5.txt │ ├── 1_50.txt │ ├── 1_51.txt │ ├── 1_52.txt │ ├── 1_53.txt │ ├── 1_54.txt │ ├── 1_55.txt │ ├── 1_56.txt │ ├── 1_57.txt │ ├── 1_58.txt │ ├── 1_59.txt │ ├── 1_6.txt │ ├── 1_60.txt │ ├── 1_61.txt │ ├── 1_62.txt │ ├── 1_63.txt │ ├── 1_64.txt │ ├── 1_65.txt │ ├── 1_66.txt │ ├── 1_67.txt │ ├── 1_68.txt │ ├── 1_69.txt │ ├── 1_7.txt │ ├── 1_70.txt │ ├── 1_71.txt │ ├── 1_72.txt │ ├── 1_73.txt │ ├── 1_74.txt │ ├── 1_75.txt │ ├── 1_76.txt │ ├── 1_77.txt │ ├── 1_78.txt │ ├── 1_79.txt │ ├── 1_8.txt │ ├── 1_80.txt │ ├── 1_81.txt │ ├── 1_82.txt │ ├── 1_83.txt │ ├── 1_84.txt │ ├── 1_85.txt │ ├── 1_86.txt │ ├── 1_87.txt │ ├── 1_88.txt │ ├── 1_89.txt │ ├── 1_9.txt │ ├── 1_90.txt │ ├── 1_91.txt │ ├── 1_92.txt │ ├── 1_93.txt │ ├── 1_94.txt │ ├── 1_95.txt │ ├── 1_96.txt │ ├── 1_97.txt │ ├── 1_98.txt │ ├── 1_99.txt │ ├── 2_0.txt │ ├── 2_1.txt │ ├── 2_10.txt │ ├── 2_100.txt │ ├── 2_101.txt │ ├── 2_102.txt │ ├── 2_103.txt │ ├── 2_104.txt │ ├── 2_105.txt │ ├── 2_106.txt │ ├── 2_107.txt │ ├── 2_108.txt │ ├── 2_109.txt │ ├── 2_11.txt │ ├── 2_110.txt │ ├── 2_111.txt │ ├── 2_112.txt │ ├── 2_113.txt │ ├── 2_114.txt │ ├── 2_115.txt │ ├── 2_116.txt │ ├── 2_117.txt │ ├── 2_118.txt │ ├── 2_119.txt │ ├── 2_12.txt │ ├── 2_120.txt │ ├── 2_121.txt │ ├── 2_122.txt │ ├── 2_123.txt │ ├── 2_124.txt │ ├── 2_125.txt │ ├── 2_126.txt │ ├── 2_127.txt │ ├── 2_128.txt │ ├── 2_129.txt │ ├── 2_13.txt │ ├── 2_130.txt │ ├── 2_131.txt │ ├── 2_132.txt │ ├── 2_133.txt │ ├── 2_134.txt │ ├── 2_135.txt │ ├── 2_136.txt │ ├── 2_137.txt │ ├── 2_138.txt │ ├── 2_139.txt │ ├── 2_14.txt │ ├── 2_140.txt │ ├── 2_141.txt │ ├── 2_142.txt │ ├── 2_143.txt │ ├── 2_144.txt │ ├── 2_145.txt │ ├── 2_146.txt │ ├── 2_147.txt │ ├── 2_148.txt │ ├── 2_149.txt │ ├── 2_15.txt │ ├── 2_150.txt │ ├── 2_151.txt │ ├── 2_152.txt │ ├── 2_153.txt │ ├── 2_154.txt │ ├── 2_155.txt │ ├── 2_156.txt │ ├── 2_157.txt │ ├── 2_158.txt │ ├── 2_159.txt │ ├── 2_16.txt │ ├── 2_160.txt │ ├── 2_161.txt │ ├── 2_162.txt │ ├── 2_163.txt │ ├── 2_164.txt │ ├── 2_165.txt │ ├── 2_166.txt │ ├── 2_167.txt │ ├── 2_168.txt │ ├── 2_169.txt │ ├── 2_17.txt │ ├── 2_170.txt │ ├── 2_171.txt │ ├── 2_172.txt │ ├── 2_173.txt │ ├── 2_174.txt │ ├── 2_175.txt │ ├── 2_176.txt │ ├── 2_177.txt │ ├── 2_178.txt │ ├── 2_179.txt │ ├── 2_18.txt │ ├── 2_180.txt │ ├── 2_181.txt │ ├── 2_182.txt │ ├── 2_183.txt │ ├── 2_184.txt │ ├── 2_185.txt │ ├── 2_186.txt │ ├── 2_187.txt │ ├── 2_188.txt │ ├── 2_189.txt │ ├── 2_19.txt │ ├── 2_190.txt │ ├── 2_191.txt │ ├── 2_192.txt │ ├── 2_193.txt │ ├── 2_194.txt │ ├── 2_2.txt │ ├── 2_20.txt │ ├── 2_21.txt │ ├── 2_22.txt │ ├── 2_23.txt │ ├── 2_24.txt │ ├── 2_25.txt │ ├── 2_26.txt │ ├── 2_27.txt │ ├── 2_28.txt │ ├── 2_29.txt │ ├── 2_3.txt │ ├── 2_30.txt │ ├── 2_31.txt │ ├── 2_32.txt │ ├── 2_33.txt │ ├── 2_34.txt │ ├── 2_35.txt │ ├── 2_36.txt │ ├── 2_37.txt │ ├── 2_38.txt │ ├── 2_39.txt │ ├── 2_4.txt │ ├── 2_40.txt │ ├── 2_41.txt │ ├── 2_42.txt │ ├── 2_43.txt │ ├── 2_44.txt │ ├── 2_45.txt │ ├── 2_46.txt │ ├── 2_47.txt │ ├── 2_48.txt │ ├── 2_49.txt │ ├── 2_5.txt │ ├── 2_50.txt │ ├── 2_51.txt │ ├── 2_52.txt │ ├── 2_53.txt │ ├── 2_54.txt │ ├── 2_55.txt │ ├── 2_56.txt │ ├── 2_57.txt │ ├── 2_58.txt │ ├── 2_59.txt │ ├── 2_6.txt │ ├── 2_60.txt │ ├── 2_61.txt │ ├── 2_62.txt │ ├── 2_63.txt │ ├── 2_64.txt │ ├── 2_65.txt │ ├── 2_66.txt │ ├── 2_67.txt │ ├── 2_68.txt │ ├── 2_69.txt │ ├── 2_7.txt │ ├── 2_70.txt │ ├── 2_71.txt │ ├── 2_72.txt │ ├── 2_73.txt │ ├── 2_74.txt │ ├── 2_75.txt │ ├── 2_76.txt │ ├── 2_77.txt │ ├── 2_78.txt │ ├── 2_79.txt │ ├── 2_8.txt │ ├── 2_80.txt │ ├── 2_81.txt │ ├── 2_82.txt │ ├── 2_83.txt │ ├── 2_84.txt │ ├── 2_85.txt │ ├── 2_86.txt │ ├── 2_87.txt │ ├── 2_88.txt │ ├── 2_89.txt │ ├── 2_9.txt │ ├── 2_90.txt │ ├── 2_91.txt │ ├── 2_92.txt │ ├── 2_93.txt │ ├── 2_94.txt │ ├── 2_95.txt │ ├── 2_96.txt │ ├── 2_97.txt │ ├── 2_98.txt │ ├── 2_99.txt │ ├── 3_0.txt │ ├── 3_1.txt │ ├── 3_10.txt │ ├── 3_100.txt │ ├── 3_101.txt │ ├── 3_102.txt │ ├── 3_103.txt │ ├── 3_104.txt │ ├── 3_105.txt │ ├── 3_106.txt │ ├── 3_107.txt │ ├── 3_108.txt │ ├── 3_109.txt │ ├── 3_11.txt │ ├── 3_110.txt │ ├── 3_111.txt │ ├── 3_112.txt │ ├── 3_113.txt │ ├── 3_114.txt │ ├── 3_115.txt │ ├── 3_116.txt │ ├── 3_117.txt │ ├── 3_118.txt │ ├── 3_119.txt │ ├── 3_12.txt │ ├── 3_120.txt │ ├── 3_121.txt │ ├── 3_122.txt │ ├── 3_123.txt │ ├── 3_124.txt │ ├── 3_125.txt │ ├── 3_126.txt │ ├── 3_127.txt │ ├── 3_128.txt │ ├── 3_129.txt │ ├── 3_13.txt │ ├── 3_130.txt │ ├── 3_131.txt │ ├── 3_132.txt │ ├── 3_133.txt │ ├── 3_134.txt │ ├── 3_135.txt │ ├── 3_136.txt │ ├── 3_137.txt │ ├── 3_138.txt │ ├── 3_139.txt │ ├── 3_14.txt │ ├── 3_140.txt │ ├── 3_141.txt │ ├── 3_142.txt │ ├── 3_143.txt │ ├── 3_144.txt │ ├── 3_145.txt │ ├── 3_146.txt │ ├── 3_147.txt │ ├── 3_148.txt │ ├── 3_149.txt │ ├── 3_15.txt │ ├── 3_150.txt │ ├── 3_151.txt │ ├── 3_152.txt │ ├── 3_153.txt │ ├── 3_154.txt │ ├── 3_155.txt │ ├── 3_156.txt │ ├── 3_157.txt │ ├── 3_158.txt │ ├── 3_159.txt │ ├── 3_16.txt │ ├── 3_160.txt │ ├── 3_161.txt │ ├── 3_162.txt │ ├── 3_163.txt │ ├── 3_164.txt │ ├── 3_165.txt │ ├── 3_166.txt │ ├── 3_167.txt │ ├── 3_168.txt │ ├── 3_169.txt │ ├── 3_17.txt │ ├── 3_170.txt │ ├── 3_171.txt │ ├── 3_172.txt │ ├── 3_173.txt │ ├── 3_174.txt │ ├── 3_175.txt │ ├── 3_176.txt │ ├── 3_177.txt │ ├── 3_178.txt │ ├── 3_179.txt │ ├── 3_18.txt │ ├── 3_180.txt │ ├── 3_181.txt │ ├── 3_182.txt │ ├── 3_183.txt │ ├── 3_184.txt │ ├── 3_185.txt │ ├── 3_186.txt │ ├── 3_187.txt │ ├── 3_188.txt │ ├── 3_189.txt │ ├── 3_19.txt │ ├── 3_190.txt │ ├── 3_191.txt │ ├── 3_192.txt │ ├── 3_193.txt │ ├── 3_194.txt │ ├── 3_195.txt │ ├── 3_196.txt │ ├── 3_197.txt │ ├── 3_198.txt │ ├── 3_2.txt │ ├── 3_20.txt │ ├── 3_21.txt │ ├── 3_22.txt │ ├── 3_23.txt │ ├── 3_24.txt │ ├── 3_25.txt │ ├── 3_26.txt │ ├── 3_27.txt │ ├── 3_28.txt │ ├── 3_29.txt │ ├── 3_3.txt │ ├── 3_30.txt │ ├── 3_31.txt │ ├── 3_32.txt │ ├── 3_33.txt │ ├── 3_34.txt │ ├── 3_35.txt │ ├── 3_36.txt │ ├── 3_37.txt │ ├── 3_38.txt │ ├── 3_39.txt │ ├── 3_4.txt │ ├── 3_40.txt │ ├── 3_41.txt │ ├── 3_42.txt │ ├── 3_43.txt │ ├── 3_44.txt │ ├── 3_45.txt │ ├── 3_46.txt │ ├── 3_47.txt │ ├── 3_48.txt │ ├── 3_49.txt │ ├── 3_5.txt │ ├── 3_50.txt │ ├── 3_51.txt │ ├── 3_52.txt │ ├── 3_53.txt │ ├── 3_54.txt │ ├── 3_55.txt │ ├── 3_56.txt │ ├── 3_57.txt │ ├── 3_58.txt │ ├── 3_59.txt │ ├── 3_6.txt │ ├── 3_60.txt │ ├── 3_61.txt │ ├── 3_62.txt │ ├── 3_63.txt │ ├── 3_64.txt │ ├── 3_65.txt │ ├── 3_66.txt │ ├── 3_67.txt │ ├── 3_68.txt │ ├── 3_69.txt │ ├── 3_7.txt │ ├── 3_70.txt │ ├── 3_71.txt │ ├── 3_72.txt │ ├── 3_73.txt │ ├── 3_74.txt │ ├── 3_75.txt │ ├── 3_76.txt │ ├── 3_77.txt │ ├── 3_78.txt │ ├── 3_79.txt │ ├── 3_8.txt │ ├── 3_80.txt │ ├── 3_81.txt │ ├── 3_82.txt │ ├── 3_83.txt │ ├── 3_84.txt │ ├── 3_85.txt │ ├── 3_86.txt │ ├── 3_87.txt │ ├── 3_88.txt │ ├── 3_89.txt │ ├── 3_9.txt │ ├── 3_90.txt │ ├── 3_91.txt │ ├── 3_92.txt │ ├── 3_93.txt │ ├── 3_94.txt │ ├── 3_95.txt │ ├── 3_96.txt │ ├── 3_97.txt │ ├── 3_98.txt │ ├── 3_99.txt │ ├── 4_0.txt │ ├── 4_1.txt │ ├── 4_10.txt │ ├── 4_100.txt │ ├── 4_101.txt │ ├── 4_102.txt │ ├── 4_103.txt │ ├── 4_104.txt │ ├── 4_105.txt │ ├── 4_106.txt │ ├── 4_107.txt │ ├── 4_108.txt │ ├── 4_109.txt │ ├── 4_11.txt │ ├── 4_110.txt │ ├── 4_111.txt │ ├── 4_112.txt │ ├── 4_113.txt │ ├── 4_114.txt │ ├── 4_115.txt │ ├── 4_116.txt │ ├── 4_117.txt │ ├── 4_118.txt │ ├── 4_119.txt │ ├── 4_12.txt │ ├── 4_120.txt │ ├── 4_121.txt │ ├── 4_122.txt │ ├── 4_123.txt │ ├── 4_124.txt │ ├── 4_125.txt │ ├── 4_126.txt │ ├── 4_127.txt │ ├── 4_128.txt │ ├── 4_129.txt │ ├── 4_13.txt │ ├── 4_130.txt │ ├── 4_131.txt │ ├── 4_132.txt │ ├── 4_133.txt │ ├── 4_134.txt │ ├── 4_135.txt │ ├── 4_136.txt │ ├── 4_137.txt │ ├── 4_138.txt │ ├── 4_139.txt │ ├── 4_14.txt │ ├── 4_140.txt │ ├── 4_141.txt │ ├── 4_142.txt │ ├── 4_143.txt │ ├── 4_144.txt │ ├── 4_145.txt │ ├── 4_146.txt │ ├── 4_147.txt │ ├── 4_148.txt │ ├── 4_149.txt │ ├── 4_15.txt │ ├── 4_150.txt │ ├── 4_151.txt │ ├── 4_152.txt │ ├── 4_153.txt │ ├── 4_154.txt │ ├── 4_155.txt │ ├── 4_156.txt │ ├── 4_157.txt │ ├── 4_158.txt │ ├── 4_159.txt │ ├── 4_16.txt │ ├── 4_160.txt │ ├── 4_161.txt │ ├── 4_162.txt │ ├── 4_163.txt │ ├── 4_164.txt │ ├── 4_165.txt │ ├── 4_166.txt │ ├── 4_167.txt │ ├── 4_168.txt │ ├── 4_169.txt │ ├── 4_17.txt │ ├── 4_170.txt │ ├── 4_171.txt │ ├── 4_172.txt │ ├── 4_173.txt │ ├── 4_174.txt │ ├── 4_175.txt │ ├── 4_176.txt │ ├── 4_177.txt │ ├── 4_178.txt │ ├── 4_179.txt │ ├── 4_18.txt │ ├── 4_180.txt │ ├── 4_181.txt │ ├── 4_182.txt │ ├── 4_183.txt │ ├── 4_184.txt │ ├── 4_185.txt │ ├── 4_19.txt │ ├── 4_2.txt │ ├── 4_20.txt │ ├── 4_21.txt │ ├── 4_22.txt │ ├── 4_23.txt │ ├── 4_24.txt │ ├── 4_25.txt │ ├── 4_26.txt │ ├── 4_27.txt │ ├── 4_28.txt │ ├── 4_29.txt │ ├── 4_3.txt │ ├── 4_30.txt │ ├── 4_31.txt │ ├── 4_32.txt │ ├── 4_33.txt │ ├── 4_34.txt │ ├── 4_35.txt │ ├── 4_36.txt │ ├── 4_37.txt │ ├── 4_38.txt │ ├── 4_39.txt │ ├── 4_4.txt │ ├── 4_40.txt │ ├── 4_41.txt │ ├── 4_42.txt │ ├── 4_43.txt │ ├── 4_44.txt │ ├── 4_45.txt │ ├── 4_46.txt │ ├── 4_47.txt │ ├── 4_48.txt │ ├── 4_49.txt │ ├── 4_5.txt │ ├── 4_50.txt │ ├── 4_51.txt │ ├── 4_52.txt │ ├── 4_53.txt │ ├── 4_54.txt │ ├── 4_55.txt │ ├── 4_56.txt │ ├── 4_57.txt │ ├── 4_58.txt │ ├── 4_59.txt │ ├── 4_6.txt │ ├── 4_60.txt │ ├── 4_61.txt │ ├── 4_62.txt │ ├── 4_63.txt │ ├── 4_64.txt │ ├── 4_65.txt │ ├── 4_66.txt │ ├── 4_67.txt │ ├── 4_68.txt │ ├── 4_69.txt │ ├── 4_7.txt │ ├── 4_70.txt │ ├── 4_71.txt │ ├── 4_72.txt │ ├── 4_73.txt │ ├── 4_74.txt │ ├── 4_75.txt │ ├── 4_76.txt │ ├── 4_77.txt │ ├── 4_78.txt │ ├── 4_79.txt │ ├── 4_8.txt │ ├── 4_80.txt │ ├── 4_81.txt │ ├── 4_82.txt │ ├── 4_83.txt │ ├── 4_84.txt │ ├── 4_85.txt │ ├── 4_86.txt │ ├── 4_87.txt │ ├── 4_88.txt │ ├── 4_89.txt │ ├── 4_9.txt │ ├── 4_90.txt │ ├── 4_91.txt │ ├── 4_92.txt │ ├── 4_93.txt │ ├── 4_94.txt │ ├── 4_95.txt │ ├── 4_96.txt │ ├── 4_97.txt │ ├── 4_98.txt │ ├── 4_99.txt │ ├── 5_0.txt │ ├── 5_1.txt │ ├── 5_10.txt │ ├── 5_100.txt │ ├── 5_101.txt │ ├── 5_102.txt │ ├── 5_103.txt │ ├── 5_104.txt │ ├── 5_105.txt │ ├── 5_106.txt │ ├── 5_107.txt │ ├── 5_108.txt │ ├── 5_109.txt │ ├── 5_11.txt │ ├── 5_110.txt │ ├── 5_111.txt │ ├── 5_112.txt │ ├── 5_113.txt │ ├── 5_114.txt │ ├── 5_115.txt │ ├── 5_116.txt │ ├── 5_117.txt │ ├── 5_118.txt │ ├── 5_119.txt │ ├── 5_12.txt │ ├── 5_120.txt │ ├── 5_121.txt │ ├── 5_122.txt │ ├── 5_123.txt │ ├── 5_124.txt │ ├── 5_125.txt │ ├── 5_126.txt │ ├── 5_127.txt │ ├── 5_128.txt │ ├── 5_129.txt │ ├── 5_13.txt │ ├── 5_130.txt │ ├── 5_131.txt │ ├── 5_132.txt │ ├── 5_133.txt │ ├── 5_134.txt │ ├── 5_135.txt │ ├── 5_136.txt │ ├── 5_137.txt │ ├── 5_138.txt │ ├── 5_139.txt │ ├── 5_14.txt │ ├── 5_140.txt │ ├── 5_141.txt │ ├── 5_142.txt │ ├── 5_143.txt │ ├── 5_144.txt │ ├── 5_145.txt │ ├── 5_146.txt │ ├── 5_147.txt │ ├── 5_148.txt │ ├── 5_149.txt │ ├── 5_15.txt │ ├── 5_150.txt │ ├── 5_151.txt │ ├── 5_152.txt │ ├── 5_153.txt │ ├── 5_154.txt │ ├── 5_155.txt │ ├── 5_156.txt │ ├── 5_157.txt │ ├── 5_158.txt │ ├── 5_159.txt │ ├── 5_16.txt │ ├── 5_160.txt │ ├── 5_161.txt │ ├── 5_162.txt │ ├── 5_163.txt │ ├── 5_164.txt │ ├── 5_165.txt │ ├── 5_166.txt │ ├── 5_167.txt │ ├── 5_168.txt │ ├── 5_169.txt │ ├── 5_17.txt │ ├── 5_170.txt │ ├── 5_171.txt │ ├── 5_172.txt │ ├── 5_173.txt │ ├── 5_174.txt │ ├── 5_175.txt │ ├── 5_176.txt │ ├── 5_177.txt │ ├── 5_178.txt │ ├── 5_179.txt │ ├── 5_18.txt │ ├── 5_180.txt │ ├── 5_181.txt │ ├── 5_182.txt │ ├── 5_183.txt │ ├── 5_184.txt │ ├── 5_185.txt │ ├── 5_186.txt │ ├── 5_19.txt │ ├── 5_2.txt │ ├── 5_20.txt │ ├── 5_21.txt │ ├── 5_22.txt │ ├── 5_23.txt │ ├── 5_24.txt │ ├── 5_25.txt │ ├── 5_26.txt │ ├── 5_27.txt │ ├── 5_28.txt │ ├── 5_29.txt │ ├── 5_3.txt │ ├── 5_30.txt │ ├── 5_31.txt │ ├── 5_32.txt │ ├── 5_33.txt │ ├── 5_34.txt │ ├── 5_35.txt │ ├── 5_36.txt │ ├── 5_37.txt │ ├── 5_38.txt │ ├── 5_39.txt │ ├── 5_4.txt │ ├── 5_40.txt │ ├── 5_41.txt │ ├── 5_42.txt │ ├── 5_43.txt │ ├── 5_44.txt │ ├── 5_45.txt │ ├── 5_46.txt │ ├── 5_47.txt │ ├── 5_48.txt │ ├── 5_49.txt │ ├── 5_5.txt │ ├── 5_50.txt │ ├── 5_51.txt │ ├── 5_52.txt │ ├── 5_53.txt │ ├── 5_54.txt │ ├── 5_55.txt │ ├── 5_56.txt │ ├── 5_57.txt │ ├── 5_58.txt │ ├── 5_59.txt │ ├── 5_6.txt │ ├── 5_60.txt │ ├── 5_61.txt │ ├── 5_62.txt │ ├── 5_63.txt │ ├── 5_64.txt │ ├── 5_65.txt │ ├── 5_66.txt │ ├── 5_67.txt │ ├── 5_68.txt │ ├── 5_69.txt │ ├── 5_7.txt │ ├── 5_70.txt │ ├── 5_71.txt │ ├── 5_72.txt │ ├── 5_73.txt │ ├── 5_74.txt │ ├── 5_75.txt │ ├── 5_76.txt │ ├── 5_77.txt │ ├── 5_78.txt │ ├── 5_79.txt │ ├── 5_8.txt │ ├── 5_80.txt │ ├── 5_81.txt │ ├── 5_82.txt │ ├── 5_83.txt │ ├── 5_84.txt │ ├── 5_85.txt │ ├── 5_86.txt │ ├── 5_87.txt │ ├── 5_88.txt │ ├── 5_89.txt │ ├── 5_9.txt │ ├── 5_90.txt │ ├── 5_91.txt │ ├── 5_92.txt │ ├── 5_93.txt │ ├── 5_94.txt │ ├── 5_95.txt │ ├── 5_96.txt │ ├── 5_97.txt │ ├── 5_98.txt │ ├── 5_99.txt │ ├── 6_0.txt │ ├── 6_1.txt │ ├── 6_10.txt │ ├── 6_100.txt │ ├── 6_101.txt │ ├── 6_102.txt │ ├── 6_103.txt │ ├── 6_104.txt │ ├── 6_105.txt │ ├── 6_106.txt │ ├── 6_107.txt │ ├── 6_108.txt │ ├── 6_109.txt │ ├── 6_11.txt │ ├── 6_110.txt │ ├── 6_111.txt │ ├── 6_112.txt │ ├── 6_113.txt │ ├── 6_114.txt │ ├── 6_115.txt │ ├── 6_116.txt │ ├── 6_117.txt │ ├── 6_118.txt │ ├── 6_119.txt │ ├── 6_12.txt │ ├── 6_120.txt │ ├── 6_121.txt │ ├── 6_122.txt │ ├── 6_123.txt │ ├── 6_124.txt │ ├── 6_125.txt │ ├── 6_126.txt │ ├── 6_127.txt │ ├── 6_128.txt │ ├── 6_129.txt │ ├── 6_13.txt │ ├── 6_130.txt │ ├── 6_131.txt │ ├── 6_132.txt │ ├── 6_133.txt │ ├── 6_134.txt │ ├── 6_135.txt │ ├── 6_136.txt │ ├── 6_137.txt │ ├── 6_138.txt │ ├── 6_139.txt │ ├── 6_14.txt │ ├── 6_140.txt │ ├── 6_141.txt │ ├── 6_142.txt │ ├── 6_143.txt │ ├── 6_144.txt │ ├── 6_145.txt │ ├── 6_146.txt │ ├── 6_147.txt │ ├── 6_148.txt │ ├── 6_149.txt │ ├── 6_15.txt │ ├── 6_150.txt │ ├── 6_151.txt │ ├── 6_152.txt │ ├── 6_153.txt │ ├── 6_154.txt │ ├── 6_155.txt │ ├── 6_156.txt │ ├── 6_157.txt │ ├── 6_158.txt │ ├── 6_159.txt │ ├── 6_16.txt │ ├── 6_160.txt │ ├── 6_161.txt │ ├── 6_162.txt │ ├── 6_163.txt │ ├── 6_164.txt │ ├── 6_165.txt │ ├── 6_166.txt │ ├── 6_167.txt │ ├── 6_168.txt │ ├── 6_169.txt │ ├── 6_17.txt │ ├── 6_170.txt │ ├── 6_171.txt │ ├── 6_172.txt │ ├── 6_173.txt │ ├── 6_174.txt │ ├── 6_175.txt │ ├── 6_176.txt │ ├── 6_177.txt │ ├── 6_178.txt │ ├── 6_179.txt │ ├── 6_18.txt │ ├── 6_180.txt │ ├── 6_181.txt │ ├── 6_182.txt │ ├── 6_183.txt │ ├── 6_184.txt │ ├── 6_185.txt │ ├── 6_186.txt │ ├── 6_187.txt │ ├── 6_188.txt │ ├── 6_189.txt │ ├── 6_19.txt │ ├── 6_190.txt │ ├── 6_191.txt │ ├── 6_192.txt │ ├── 6_193.txt │ ├── 6_194.txt │ ├── 6_2.txt │ ├── 6_20.txt │ ├── 6_21.txt │ ├── 6_22.txt │ ├── 6_23.txt │ ├── 6_24.txt │ ├── 6_25.txt │ ├── 6_26.txt │ ├── 6_27.txt │ ├── 6_28.txt │ ├── 6_29.txt │ ├── 6_3.txt │ ├── 6_30.txt │ ├── 6_31.txt │ ├── 6_32.txt │ ├── 6_33.txt │ ├── 6_34.txt │ ├── 6_35.txt │ ├── 6_36.txt │ ├── 6_37.txt │ ├── 6_38.txt │ ├── 6_39.txt │ ├── 6_4.txt │ ├── 6_40.txt │ ├── 6_41.txt │ ├── 6_42.txt │ ├── 6_43.txt │ ├── 6_44.txt │ ├── 6_45.txt │ ├── 6_46.txt │ ├── 6_47.txt │ ├── 6_48.txt │ ├── 6_49.txt │ ├── 6_5.txt │ ├── 6_50.txt │ ├── 6_51.txt │ ├── 6_52.txt │ ├── 6_53.txt │ ├── 6_54.txt │ ├── 6_55.txt │ ├── 6_56.txt │ ├── 6_57.txt │ ├── 6_58.txt │ ├── 6_59.txt │ ├── 6_6.txt │ ├── 6_60.txt │ ├── 6_61.txt │ ├── 6_62.txt │ ├── 6_63.txt │ ├── 6_64.txt │ ├── 6_65.txt │ ├── 6_66.txt │ ├── 6_67.txt │ ├── 6_68.txt │ ├── 6_69.txt │ ├── 6_7.txt │ ├── 6_70.txt │ ├── 6_71.txt │ ├── 6_72.txt │ ├── 6_73.txt │ ├── 6_74.txt │ ├── 6_75.txt │ ├── 6_76.txt │ ├── 6_77.txt │ ├── 6_78.txt │ ├── 6_79.txt │ ├── 6_8.txt │ ├── 6_80.txt │ ├── 6_81.txt │ ├── 6_82.txt │ ├── 6_83.txt │ ├── 6_84.txt │ ├── 6_85.txt │ ├── 6_86.txt │ ├── 6_87.txt │ ├── 6_88.txt │ ├── 6_89.txt │ ├── 6_9.txt │ ├── 6_90.txt │ ├── 6_91.txt │ ├── 6_92.txt │ ├── 6_93.txt │ ├── 6_94.txt │ ├── 6_95.txt │ ├── 6_96.txt │ ├── 6_97.txt │ ├── 6_98.txt │ ├── 6_99.txt │ ├── 7_0.txt │ ├── 7_1.txt │ ├── 7_10.txt │ ├── 7_100.txt │ ├── 7_101.txt │ ├── 7_102.txt │ ├── 7_103.txt │ ├── 7_104.txt │ ├── 7_105.txt │ ├── 7_106.txt │ ├── 7_107.txt │ ├── 7_108.txt │ ├── 7_109.txt │ ├── 7_11.txt │ ├── 7_110.txt │ ├── 7_111.txt │ ├── 7_112.txt │ ├── 7_113.txt │ ├── 7_114.txt │ ├── 7_115.txt │ ├── 7_116.txt │ ├── 7_117.txt │ ├── 7_118.txt │ ├── 7_119.txt │ ├── 7_12.txt │ ├── 7_120.txt │ ├── 7_121.txt │ ├── 7_122.txt │ ├── 7_123.txt │ ├── 7_124.txt │ ├── 7_125.txt │ ├── 7_126.txt │ ├── 7_127.txt │ ├── 7_128.txt │ ├── 7_129.txt │ ├── 7_13.txt │ ├── 7_130.txt │ ├── 7_131.txt │ ├── 7_132.txt │ ├── 7_133.txt │ ├── 7_134.txt │ ├── 7_135.txt │ ├── 7_136.txt │ ├── 7_137.txt │ ├── 7_138.txt │ ├── 7_139.txt │ ├── 7_14.txt │ ├── 7_140.txt │ ├── 7_141.txt │ ├── 7_142.txt │ ├── 7_143.txt │ ├── 7_144.txt │ ├── 7_145.txt │ ├── 7_146.txt │ ├── 7_147.txt │ ├── 7_148.txt │ ├── 7_149.txt │ ├── 7_15.txt │ ├── 7_150.txt │ ├── 7_151.txt │ ├── 7_152.txt │ ├── 7_153.txt │ ├── 7_154.txt │ ├── 7_155.txt │ ├── 7_156.txt │ ├── 7_157.txt │ ├── 7_158.txt │ ├── 7_159.txt │ ├── 7_16.txt │ ├── 7_160.txt │ ├── 7_161.txt │ ├── 7_162.txt │ ├── 7_163.txt │ ├── 7_164.txt │ ├── 7_165.txt │ ├── 7_166.txt │ ├── 7_167.txt │ ├── 7_168.txt │ ├── 7_169.txt │ ├── 7_17.txt │ ├── 7_170.txt │ ├── 7_171.txt │ ├── 7_172.txt │ ├── 7_173.txt │ ├── 7_174.txt │ ├── 7_175.txt │ ├── 7_176.txt │ ├── 7_177.txt │ ├── 7_178.txt │ ├── 7_179.txt │ ├── 7_18.txt │ ├── 7_180.txt │ ├── 7_181.txt │ ├── 7_182.txt │ ├── 7_183.txt │ ├── 7_184.txt │ ├── 7_185.txt │ ├── 7_186.txt │ ├── 7_187.txt │ ├── 7_188.txt │ ├── 7_189.txt │ ├── 7_19.txt │ ├── 7_190.txt │ ├── 7_191.txt │ ├── 7_192.txt │ ├── 7_193.txt │ ├── 7_194.txt │ ├── 7_195.txt │ ├── 7_196.txt │ ├── 7_197.txt │ ├── 7_198.txt │ ├── 7_199.txt │ ├── 7_2.txt │ ├── 7_20.txt │ ├── 7_200.txt │ ├── 7_21.txt │ ├── 7_22.txt │ ├── 7_23.txt │ ├── 7_24.txt │ ├── 7_25.txt │ ├── 7_26.txt │ ├── 7_27.txt │ ├── 7_28.txt │ ├── 7_29.txt │ ├── 7_3.txt │ ├── 7_30.txt │ ├── 7_31.txt │ ├── 7_32.txt │ ├── 7_33.txt │ ├── 7_34.txt │ ├── 7_35.txt │ ├── 7_36.txt │ ├── 7_37.txt │ ├── 7_38.txt │ ├── 7_39.txt │ ├── 7_4.txt │ ├── 7_40.txt │ ├── 7_41.txt │ ├── 7_42.txt │ ├── 7_43.txt │ ├── 7_44.txt │ ├── 7_45.txt │ ├── 7_46.txt │ ├── 7_47.txt │ ├── 7_48.txt │ ├── 7_49.txt │ ├── 7_5.txt │ ├── 7_50.txt │ ├── 7_51.txt │ ├── 7_52.txt │ ├── 7_53.txt │ ├── 7_54.txt │ ├── 7_55.txt │ ├── 7_56.txt │ ├── 7_57.txt │ ├── 7_58.txt │ ├── 7_59.txt │ ├── 7_6.txt │ ├── 7_60.txt │ ├── 7_61.txt │ ├── 7_62.txt │ ├── 7_63.txt │ ├── 7_64.txt │ ├── 7_65.txt │ ├── 7_66.txt │ ├── 7_67.txt │ ├── 7_68.txt │ ├── 7_69.txt │ ├── 7_7.txt │ ├── 7_70.txt │ ├── 7_71.txt │ ├── 7_72.txt │ ├── 7_73.txt │ ├── 7_74.txt │ ├── 7_75.txt │ ├── 7_76.txt │ ├── 7_77.txt │ ├── 7_78.txt │ ├── 7_79.txt │ ├── 7_8.txt │ ├── 7_80.txt │ ├── 7_81.txt │ ├── 7_82.txt │ ├── 7_83.txt │ ├── 7_84.txt │ ├── 7_85.txt │ ├── 7_86.txt │ ├── 7_87.txt │ ├── 7_88.txt │ ├── 7_89.txt │ ├── 7_9.txt │ ├── 7_90.txt │ ├── 7_91.txt │ ├── 7_92.txt │ ├── 7_93.txt │ ├── 7_94.txt │ ├── 7_95.txt │ ├── 7_96.txt │ ├── 7_97.txt │ ├── 7_98.txt │ ├── 7_99.txt │ ├── 8_0.txt │ ├── 8_1.txt │ ├── 8_10.txt │ ├── 8_100.txt │ ├── 8_101.txt │ ├── 8_102.txt │ ├── 8_103.txt │ ├── 8_104.txt │ ├── 8_105.txt │ ├── 8_106.txt │ ├── 8_107.txt │ ├── 8_108.txt │ ├── 8_109.txt │ ├── 8_11.txt │ ├── 8_110.txt │ ├── 8_111.txt │ ├── 8_112.txt │ ├── 8_113.txt │ ├── 8_114.txt │ ├── 8_115.txt │ ├── 8_116.txt │ ├── 8_117.txt │ ├── 8_118.txt │ ├── 8_119.txt │ ├── 8_12.txt │ ├── 8_120.txt │ ├── 8_121.txt │ ├── 8_122.txt │ ├── 8_123.txt │ ├── 8_124.txt │ ├── 8_125.txt │ ├── 8_126.txt │ ├── 8_127.txt │ ├── 8_128.txt │ ├── 8_129.txt │ ├── 8_13.txt │ ├── 8_130.txt │ ├── 8_131.txt │ ├── 8_132.txt │ ├── 8_133.txt │ ├── 8_134.txt │ ├── 8_135.txt │ ├── 8_136.txt │ ├── 8_137.txt │ ├── 8_138.txt │ ├── 8_139.txt │ ├── 8_14.txt │ ├── 8_140.txt │ ├── 8_141.txt │ ├── 8_142.txt │ ├── 8_143.txt │ ├── 8_144.txt │ ├── 8_145.txt │ ├── 8_146.txt │ ├── 8_147.txt │ ├── 8_148.txt │ ├── 8_149.txt │ ├── 8_15.txt │ ├── 8_150.txt │ ├── 8_151.txt │ ├── 8_152.txt │ ├── 8_153.txt │ ├── 8_154.txt │ ├── 8_155.txt │ ├── 8_156.txt │ ├── 8_157.txt │ ├── 8_158.txt │ ├── 8_159.txt │ ├── 8_16.txt │ ├── 8_160.txt │ ├── 8_161.txt │ ├── 8_162.txt │ ├── 8_163.txt │ ├── 8_164.txt │ ├── 8_165.txt │ ├── 8_166.txt │ ├── 8_167.txt │ ├── 8_168.txt │ ├── 8_169.txt │ ├── 8_17.txt │ ├── 8_170.txt │ ├── 8_171.txt │ ├── 8_172.txt │ ├── 8_173.txt │ ├── 8_174.txt │ ├── 8_175.txt │ ├── 8_176.txt │ ├── 8_177.txt │ ├── 8_178.txt │ ├── 8_179.txt │ ├── 8_18.txt │ ├── 8_19.txt │ ├── 8_2.txt │ ├── 8_20.txt │ ├── 8_21.txt │ ├── 8_22.txt │ ├── 8_23.txt │ ├── 8_24.txt │ ├── 8_25.txt │ ├── 8_26.txt │ ├── 8_27.txt │ ├── 8_28.txt │ ├── 8_29.txt │ ├── 8_3.txt │ ├── 8_30.txt │ ├── 8_31.txt │ ├── 8_32.txt │ ├── 8_33.txt │ ├── 8_34.txt │ ├── 8_35.txt │ ├── 8_36.txt │ ├── 8_37.txt │ ├── 8_38.txt │ ├── 8_39.txt │ ├── 8_4.txt │ ├── 8_40.txt │ ├── 8_41.txt │ ├── 8_42.txt │ ├── 8_43.txt │ ├── 8_44.txt │ ├── 8_45.txt │ ├── 8_46.txt │ ├── 8_47.txt │ ├── 8_48.txt │ ├── 8_49.txt │ ├── 8_5.txt │ ├── 8_50.txt │ ├── 8_51.txt │ ├── 8_52.txt │ ├── 8_53.txt │ ├── 8_54.txt │ ├── 8_55.txt │ ├── 8_56.txt │ ├── 8_57.txt │ ├── 8_58.txt │ ├── 8_59.txt │ ├── 8_6.txt │ ├── 8_60.txt │ ├── 8_61.txt │ ├── 8_62.txt │ ├── 8_63.txt │ ├── 8_64.txt │ ├── 8_65.txt │ ├── 8_66.txt │ ├── 8_67.txt │ ├── 8_68.txt │ ├── 8_69.txt │ ├── 8_7.txt │ ├── 8_70.txt │ ├── 8_71.txt │ ├── 8_72.txt │ ├── 8_73.txt │ ├── 8_74.txt │ ├── 8_75.txt │ ├── 8_76.txt │ ├── 8_77.txt │ ├── 8_78.txt │ ├── 8_79.txt │ ├── 8_8.txt │ ├── 8_80.txt │ ├── 8_81.txt │ ├── 8_82.txt │ ├── 8_83.txt │ ├── 8_84.txt │ ├── 8_85.txt │ ├── 8_86.txt │ ├── 8_87.txt │ ├── 8_88.txt │ ├── 8_89.txt │ ├── 8_9.txt │ ├── 8_90.txt │ ├── 8_91.txt │ ├── 8_92.txt │ ├── 8_93.txt │ ├── 8_94.txt │ ├── 8_95.txt │ ├── 8_96.txt │ ├── 8_97.txt │ ├── 8_98.txt │ ├── 8_99.txt │ ├── 9_0.txt │ ├── 9_1.txt │ ├── 9_10.txt │ ├── 9_100.txt │ ├── 9_101.txt │ ├── 9_102.txt │ ├── 9_103.txt │ ├── 9_104.txt │ ├── 9_105.txt │ ├── 9_106.txt │ ├── 9_107.txt │ ├── 9_108.txt │ ├── 9_109.txt │ ├── 9_11.txt │ ├── 9_110.txt │ ├── 9_111.txt │ ├── 9_112.txt │ ├── 9_113.txt │ ├── 9_114.txt │ ├── 9_115.txt │ ├── 9_116.txt │ ├── 9_117.txt │ ├── 9_118.txt │ ├── 9_119.txt │ ├── 9_12.txt │ ├── 9_120.txt │ ├── 9_121.txt │ ├── 9_122.txt │ ├── 9_123.txt │ ├── 9_124.txt │ ├── 9_125.txt │ ├── 9_126.txt │ ├── 9_127.txt │ ├── 9_128.txt │ ├── 9_129.txt │ ├── 9_13.txt │ ├── 9_130.txt │ ├── 9_131.txt │ ├── 9_132.txt │ ├── 9_133.txt │ ├── 9_134.txt │ ├── 9_135.txt │ ├── 9_136.txt │ ├── 9_137.txt │ ├── 9_138.txt │ ├── 9_139.txt │ ├── 9_14.txt │ ├── 9_140.txt │ ├── 9_141.txt │ ├── 9_142.txt │ ├── 9_143.txt │ ├── 9_144.txt │ ├── 9_145.txt │ ├── 9_146.txt │ ├── 9_147.txt │ ├── 9_148.txt │ ├── 9_149.txt │ ├── 9_15.txt │ ├── 9_150.txt │ ├── 9_151.txt │ ├── 9_152.txt │ ├── 9_153.txt │ ├── 9_154.txt │ ├── 9_155.txt │ ├── 9_156.txt │ ├── 9_157.txt │ ├── 9_158.txt │ ├── 9_159.txt │ ├── 9_16.txt │ ├── 9_160.txt │ ├── 9_161.txt │ ├── 9_162.txt │ ├── 9_163.txt │ ├── 9_164.txt │ ├── 9_165.txt │ ├── 9_166.txt │ ├── 9_167.txt │ ├── 9_168.txt │ ├── 9_169.txt │ ├── 9_17.txt │ ├── 9_170.txt │ ├── 9_171.txt │ ├── 9_172.txt │ ├── 9_173.txt │ ├── 9_174.txt │ ├── 9_175.txt │ ├── 9_176.txt │ ├── 9_177.txt │ ├── 9_178.txt │ ├── 9_179.txt │ ├── 9_18.txt │ ├── 9_180.txt │ ├── 9_181.txt │ ├── 9_182.txt │ ├── 9_183.txt │ ├── 9_184.txt │ ├── 9_185.txt │ ├── 9_186.txt │ ├── 9_187.txt │ ├── 9_188.txt │ ├── 9_189.txt │ ├── 9_19.txt │ ├── 9_190.txt │ ├── 9_191.txt │ ├── 9_192.txt │ ├── 9_193.txt │ ├── 9_194.txt │ ├── 9_195.txt │ ├── 9_196.txt │ ├── 9_197.txt │ ├── 9_198.txt │ ├── 9_199.txt │ ├── 9_2.txt │ ├── 9_20.txt │ ├── 9_200.txt │ ├── 9_201.txt │ ├── 9_202.txt │ ├── 9_203.txt │ ├── 9_21.txt │ ├── 9_22.txt │ ├── 9_23.txt │ ├── 9_24.txt │ ├── 9_25.txt │ ├── 9_26.txt │ ├── 9_27.txt │ ├── 9_28.txt │ ├── 9_29.txt │ ├── 9_3.txt │ ├── 9_30.txt │ ├── 9_31.txt │ ├── 9_32.txt │ ├── 9_33.txt │ ├── 9_34.txt │ ├── 9_35.txt │ ├── 9_36.txt │ ├── 9_37.txt │ ├── 9_38.txt │ ├── 9_39.txt │ ├── 9_4.txt │ ├── 9_40.txt │ ├── 9_41.txt │ ├── 9_42.txt │ ├── 9_43.txt │ ├── 9_44.txt │ ├── 9_45.txt │ ├── 9_46.txt │ ├── 9_47.txt │ ├── 9_48.txt │ ├── 9_49.txt │ ├── 9_5.txt │ ├── 9_50.txt │ ├── 9_51.txt │ ├── 9_52.txt │ ├── 9_53.txt │ ├── 9_54.txt │ ├── 9_55.txt │ ├── 9_56.txt │ ├── 9_57.txt │ ├── 9_58.txt │ ├── 9_59.txt │ ├── 9_6.txt │ ├── 9_60.txt │ ├── 9_61.txt │ ├── 9_62.txt │ ├── 9_63.txt │ ├── 9_64.txt │ ├── 9_65.txt │ ├── 9_66.txt │ ├── 9_67.txt │ ├── 9_68.txt │ ├── 9_69.txt │ ├── 9_7.txt │ ├── 9_70.txt │ ├── 9_71.txt │ ├── 9_72.txt │ ├── 9_73.txt │ ├── 9_74.txt │ ├── 9_75.txt │ ├── 9_76.txt │ ├── 9_77.txt │ ├── 9_78.txt │ ├── 9_79.txt │ ├── 9_8.txt │ ├── 9_80.txt │ ├── 9_81.txt │ ├── 9_82.txt │ ├── 9_83.txt │ ├── 9_84.txt │ ├── 9_85.txt │ ├── 9_86.txt │ ├── 9_87.txt │ ├── 9_88.txt │ ├── 9_89.txt │ ├── 9_9.txt │ ├── 9_90.txt │ ├── 9_91.txt │ ├── 9_92.txt │ ├── 9_93.txt │ ├── 9_94.txt │ ├── 9_95.txt │ ├── 9_96.txt │ ├── 9_97.txt │ ├── 9_98.txt │ └── 9_99.txt ├── code25 ├── out.wav ├── pcm_44100_16.wav ├── stre │ ├── dr_wav.h │ ├── stre.cpp │ ├── stre.vcxproj │ ├── stre.vcxproj.filters │ └── stre.vcxproj.user ├── tune.sln └── tune │ ├── PitchShift.cpp │ ├── PitchShift.h │ ├── dr_wav.h │ ├── tune.cpp │ ├── tune.vcxproj │ ├── tune.vcxproj.filters │ └── tune.vcxproj.user └── 测试数据 ├── 0-8000-mono.wav ├── 0.wav ├── 1-1.wav ├── 1-8000-mono.wav ├── 2-8000-mono.wav ├── 2.wav ├── 6-8000-mono.wav ├── 6.wav ├── 7-8000-mono.wav ├── 7.wav ├── 8-8000-mono.wav ├── 8.wav ├── 9-2.wav └── pcm_44100_16.wav /README.md: -------------------------------------------------------------------------------- 1 | # code_for_algo_book 2 | 《算法的乐趣》随书发布的代码 3 | 4 | 2023年9月增加《算法的乐趣 第二版》的随书代码,位于 second_edition 目录中。部分章节的代码需要使用 EasyX 和 FreeImage 库,它们都是免费或开源组件,可以从网上下载部署,然后修改 EasyX_static.props 和 FreeImage-3.18.0_share.props 这两个属性表文件,替换相关的目录部分与你本地部署的目录一致。 5 | 6 | 7 | -------------------------------------------------------------------------------- /code01/alog/alog.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code01/alog/alog.cpp -------------------------------------------------------------------------------- /code01/alog/alog.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code01/alog/alog.suo -------------------------------------------------------------------------------- /code01/alog/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // alog.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code01/alog/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code01/alog/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code02/acp2/acp2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code02/acp2/acp2.cpp -------------------------------------------------------------------------------- /code02/acp2/acp2.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code02/acp2/acp2.suo -------------------------------------------------------------------------------- /code02/acp2/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // acp2.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code02/acp2/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code02/acp2/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code03/FastMul/BigInt.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/FastMul/BigInt.cpp -------------------------------------------------------------------------------- /code03/FastMul/BigInt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/FastMul/BigInt.h -------------------------------------------------------------------------------- /code03/FastMul/FastMul.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/FastMul/FastMul.cpp -------------------------------------------------------------------------------- /code03/FastMul/FastMul.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/FastMul/FastMul.suo -------------------------------------------------------------------------------- /code03/FastMul/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // FastMul.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code03/FastMul/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code03/FastMul/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code03/dp/dp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/dp/dp.cpp -------------------------------------------------------------------------------- /code03/dp/dp.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dp", "dp.vcproj", "{16ABCAD9-045D-4B34-B6DF-18D2145BC6D8}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {16ABCAD9-045D-4B34-B6DF-18D2145BC6D8}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {16ABCAD9-045D-4B34-B6DF-18D2145BC6D8}.Debug|Win32.Build.0 = Debug|Win32 14 | {16ABCAD9-045D-4B34-B6DF-18D2145BC6D8}.Release|Win32.ActiveCfg = Release|Win32 15 | {16ABCAD9-045D-4B34-B6DF-18D2145BC6D8}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /code03/dp/dp.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/dp/dp.suo -------------------------------------------------------------------------------- /code03/dp/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // dp.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code03/dp/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code03/dp/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code03/google/google.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/google/google.suo -------------------------------------------------------------------------------- /code03/google/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // google.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code03/google/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code03/google/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code03/knapsack/knapsack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/knapsack/knapsack.cpp -------------------------------------------------------------------------------- /code03/knapsack/knapsack.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/knapsack/knapsack.suo -------------------------------------------------------------------------------- /code03/knapsack/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // knapsack.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code03/knapsack/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code03/knapsack/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code03/qsort/qsort.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/qsort/qsort.cpp -------------------------------------------------------------------------------- /code03/qsort/qsort.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code03/qsort/qsort.suo -------------------------------------------------------------------------------- /code03/qsort/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // qsort.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code03/qsort/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code03/qsort/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code04/chinese_num/chinese_num.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code04/chinese_num/chinese_num.cpp -------------------------------------------------------------------------------- /code04/chinese_num/chinese_num.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code04/chinese_num/chinese_num.suo -------------------------------------------------------------------------------- /code04/chinese_num/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // chinese_num.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code04/chinese_num/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | 13 | 14 | 15 | // TODO: reference additional headers your program requires here 16 | -------------------------------------------------------------------------------- /code04/chinese_num/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code05/bucket/bucket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code05/bucket/bucket.cpp -------------------------------------------------------------------------------- /code05/bucket/bucket.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code05/bucket/bucket.suo -------------------------------------------------------------------------------- /code05/bucket/bucket_state.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code05/bucket/bucket_state.cpp -------------------------------------------------------------------------------- /code05/bucket/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code05/bucket/main.cpp -------------------------------------------------------------------------------- /code05/bucket/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // bucket.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code05/bucket/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | 17 | // TODO: reference additional headers your program requires here 18 | -------------------------------------------------------------------------------- /code05/bucket/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code06/cp6/action_description.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code06/cp6/action_description.h -------------------------------------------------------------------------------- /code06/cp6/cp6.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code06/cp6/cp6.cpp -------------------------------------------------------------------------------- /code06/cp6/cp6.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code06/cp6/cp6.suo -------------------------------------------------------------------------------- /code06/cp6/item_state.h: -------------------------------------------------------------------------------- 1 | // item_state.h : include file for item_state class 2 | // 3 | 4 | #pragma once 5 | 6 | #include "river_def.h" 7 | 8 | struct ItemState 9 | { 10 | ItemState(); 11 | ItemState(const ItemState& state); 12 | ItemState& operator=(const ItemState& state); 13 | bool IsSameState(const ItemState& state) const; 14 | void SetState(int lmonster, int lmonk, int rmonster, int rmonk, BOAT_LOCATION bl); 15 | void PrintStates(); 16 | bool IsFinalState(); 17 | bool CanTakeAction(ACTION_EFFECTION& ae) const; 18 | bool IsValidState(); 19 | 20 | int local_monster; 21 | int local_monk; 22 | int remote_monster; 23 | int remote_monk; 24 | BOAT_LOCATION boat; /*LOCAL or REMOTE*/ 25 | ACTION_NAME curAct; 26 | }; 27 | -------------------------------------------------------------------------------- /code06/cp6/river_def.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code06/cp6/river_def.h -------------------------------------------------------------------------------- /code06/cp6/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // cp6.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code06/cp6/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | 19 | 20 | 21 | // TODO: reference additional headers your program requires here 22 | -------------------------------------------------------------------------------- /code06/cp6/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code07/gs/gs.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs/gs.cpp -------------------------------------------------------------------------------- /code07/gs/gs.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs/gs.suo -------------------------------------------------------------------------------- /code07/gs/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // gs.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code07/gs/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | 17 | // TODO: reference additional headers your program requires here 18 | -------------------------------------------------------------------------------- /code07/gs/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code07/gs2/gs2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs2/gs2.cpp -------------------------------------------------------------------------------- /code07/gs2/gs2.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs2/gs2.suo -------------------------------------------------------------------------------- /code07/gs2/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // gs2.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code07/gs2/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | 18 | 19 | // TODO: reference additional headers your program requires here 20 | -------------------------------------------------------------------------------- /code07/gs2/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code07/gs3/gs3.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs3/gs3.cpp -------------------------------------------------------------------------------- /code07/gs3/gs3.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs3/gs3.suo -------------------------------------------------------------------------------- /code07/gs3/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // gs3.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code07/gs3/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | 18 | 19 | // TODO: reference additional headers your program requires here 20 | -------------------------------------------------------------------------------- /code07/gs3/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code07/gs4/gs4.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs4/gs4.cpp -------------------------------------------------------------------------------- /code07/gs4/gs4.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code07/gs4/gs4.suo -------------------------------------------------------------------------------- /code07/gs4/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // gs4.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code07/gs4/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | 18 | 19 | // TODO: reference additional headers your program requires here 20 | -------------------------------------------------------------------------------- /code07/gs4/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code08/albert/albert.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code08/albert/albert.cpp -------------------------------------------------------------------------------- /code08/albert/albert.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code08/albert/albert.suo -------------------------------------------------------------------------------- /code08/albert/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // albert.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code08/albert/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code08/albert/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code09/cpath/cpath.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code09/cpath/cpath.cpp -------------------------------------------------------------------------------- /code09/cpath/cpath.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code09/cpath/cpath.suo -------------------------------------------------------------------------------- /code09/cpath/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // graph.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code09/cpath/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | 17 | 18 | // TODO: reference additional headers your program requires here 19 | -------------------------------------------------------------------------------- /code09/cpath/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code09/graph/graph.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code09/graph/graph.cpp -------------------------------------------------------------------------------- /code09/graph/graph.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code09/graph/graph.suo -------------------------------------------------------------------------------- /code09/graph/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // graph.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code09/graph/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | 17 | // TODO: reference additional headers your program requires here 18 | -------------------------------------------------------------------------------- /code09/graph/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code10/rle/rle.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code10/rle/rle.cpp -------------------------------------------------------------------------------- /code10/rle/rle.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code10/rle/rle.suo -------------------------------------------------------------------------------- /code10/rle/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // rle.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code10/rle/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code10/rle/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code11/calendar/calendar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar/calendar.cpp -------------------------------------------------------------------------------- /code11/calendar/calendar.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar/calendar.suo -------------------------------------------------------------------------------- /code11/calendar/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // calendar.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code11/calendar/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | 13 | 14 | 15 | // TODO: reference additional headers your program requires here 16 | -------------------------------------------------------------------------------- /code11/calendar/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code11/calendar2/ChineseCalendar.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/ChineseCalendar.cpp -------------------------------------------------------------------------------- /code11/calendar2/ChnMonthInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "calendar_const.h" 3 | #include "ChnMonthInfo.h" 4 | 5 | CChnMonthInfo::CChnMonthInfo(const CHN_MONTH_INFO *info) 6 | { 7 | SetChnmonthInfo(info); 8 | } 9 | 10 | CChnMonthInfo::~CChnMonthInfo(void) 11 | { 12 | } 13 | 14 | void CChnMonthInfo::SetChnmonthInfo(const CHN_MONTH_INFO *info) 15 | { 16 | if(info != NULL) 17 | { 18 | memmove(&m_Info, info, sizeof(CHN_MONTH_INFO)); 19 | } 20 | } 21 | 22 | void CChnMonthInfo::GetChnmonthInfo(CHN_MONTH_INFO *info) 23 | { 24 | if(info != NULL) 25 | { 26 | memmove(info, &m_Info, sizeof(CHN_MONTH_INFO)); 27 | } 28 | } 29 | 30 | -------------------------------------------------------------------------------- /code11/calendar2/ChnMonthInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/ChnMonthInfo.h -------------------------------------------------------------------------------- /code11/calendar2/DayInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "DayInfo.h" 3 | 4 | CDayInfo::CDayInfo(const DAY_INFO *info) 5 | { 6 | SetDayInfo(info); 7 | } 8 | 9 | CDayInfo::~CDayInfo(void) 10 | { 11 | } 12 | 13 | void CDayInfo::SetDayInfo(const DAY_INFO *info) 14 | { 15 | if(info != NULL) 16 | { 17 | memmove(&m_Info, info, sizeof(DAY_INFO)); 18 | } 19 | } 20 | 21 | void CDayInfo::GetDayInfo(DAY_INFO *info) 22 | { 23 | if(info != NULL) 24 | { 25 | memmove(info, &m_Info, sizeof(DAY_INFO)); 26 | } 27 | } 28 | 29 | -------------------------------------------------------------------------------- /code11/calendar2/DayInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/DayInfo.h -------------------------------------------------------------------------------- /code11/calendar2/MonthInfo.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/MonthInfo.cpp -------------------------------------------------------------------------------- /code11/calendar2/MonthInfo.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/MonthInfo.h -------------------------------------------------------------------------------- /code11/calendar2/Names.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/Names.cpp -------------------------------------------------------------------------------- /code11/calendar2/Names.h: -------------------------------------------------------------------------------- 1 | #ifndef __NAMES_H__ 2 | #define __NAMES_H__ 3 | 4 | #include "calendar_const.h" 5 | 6 | extern TCHAR *nameOfMonth[MONTHES_FOR_YEAR]; 7 | extern TCHAR *nameOfWeek[DAYS_FOR_WEEK]; 8 | 9 | extern TCHAR *nameOfStems[HEAVENLY_STEMS]; 10 | extern TCHAR *nameOfBranches[EARTHLY_BRANCHES]; 11 | extern TCHAR *nameOfShengXiao[CHINESE_SHENGXIAO]; 12 | extern TCHAR *nameOfChnDay[MAX_CHINESE_MONTH_DAYS]; 13 | extern TCHAR *nameOfChnMonth[MONTHES_FOR_YEAR]; 14 | extern TCHAR *nameOfJieQi[SOLAR_TERMS_COUNT]; 15 | 16 | 17 | #endif //__NAMES_H__ 18 | 19 | -------------------------------------------------------------------------------- /code11/calendar2/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/ReadMe.txt -------------------------------------------------------------------------------- /code11/calendar2/WzCalendarCtrl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/WzCalendarCtrl.cpp -------------------------------------------------------------------------------- /code11/calendar2/calendar2.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar2.aps -------------------------------------------------------------------------------- /code11/calendar2/calendar2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar2.cpp -------------------------------------------------------------------------------- /code11/calendar2/calendar2.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar2.h -------------------------------------------------------------------------------- /code11/calendar2/calendar2.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar2.rc -------------------------------------------------------------------------------- /code11/calendar2/calendar2.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar2.suo -------------------------------------------------------------------------------- /code11/calendar2/calendar2Dlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar2Dlg.cpp -------------------------------------------------------------------------------- /code11/calendar2/calendar2Dlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar2Dlg.h -------------------------------------------------------------------------------- /code11/calendar2/calendar_const.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar_const.h -------------------------------------------------------------------------------- /code11/calendar2/calendar_func.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/calendar_func.cpp -------------------------------------------------------------------------------- /code11/calendar2/calendar_func.h: -------------------------------------------------------------------------------- 1 | #ifndef __CALENDAR_FUNC_H__ 2 | #define __CALENDAR_FUNC_H__ 3 | 4 | 5 | double CalculateSolarTerms(int year, int angle); 6 | double CalculateMoonShuoJD(double tdJD); 7 | void CalculateStemsBranches(int year, int *stems, int *branches); 8 | 9 | 10 | #endif //__CALENDAR_FUNC_H__ 11 | -------------------------------------------------------------------------------- /code11/calendar2/elp2000_data.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/elp2000_data.cpp -------------------------------------------------------------------------------- /code11/calendar2/elp2000_data.h: -------------------------------------------------------------------------------- 1 | #ifndef __ELP2000_DATA_H__ 2 | #define __ELP2000_DATA_H__ 3 | 4 | 5 | 6 | typedef struct 7 | { 8 | double D; 9 | double M; 10 | double Mp; 11 | double F; 12 | double eiA; 13 | double erA; 14 | }MOON_ECLIPTIC_LONGITUDE_COEFF; 15 | 16 | typedef struct 17 | { 18 | double D; 19 | double M; 20 | double Mp; 21 | double F; 22 | double eiA; 23 | }MOON_ECLIPTIC_LATITUDE_COEFF; 24 | 25 | extern const MOON_ECLIPTIC_LONGITUDE_COEFF Moon_longitude[60]; 26 | extern const MOON_ECLIPTIC_LATITUDE_COEFF moon_Latitude[60]; 27 | 28 | 29 | 30 | #endif //__ELP2000_DATA_H__ 31 | 32 | -------------------------------------------------------------------------------- /code11/calendar2/moon.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/moon.cpp -------------------------------------------------------------------------------- /code11/calendar2/moon.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/moon.h -------------------------------------------------------------------------------- /code11/calendar2/nutation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/nutation.cpp -------------------------------------------------------------------------------- /code11/calendar2/nutation.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/nutation.h -------------------------------------------------------------------------------- /code11/calendar2/other_func.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/other_func.cpp -------------------------------------------------------------------------------- /code11/calendar2/other_func.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/other_func.h -------------------------------------------------------------------------------- /code11/calendar2/res/calendar2.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/res/calendar2.ico -------------------------------------------------------------------------------- /code11/calendar2/res/calendar2.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/res/calendar2.rc2 -------------------------------------------------------------------------------- /code11/calendar2/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/stdafx.cpp -------------------------------------------------------------------------------- /code11/calendar2/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/stdafx.h -------------------------------------------------------------------------------- /code11/calendar2/sun.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/sun.cpp -------------------------------------------------------------------------------- /code11/calendar2/sun.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/sun.h -------------------------------------------------------------------------------- /code11/calendar2/support.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/support.cpp -------------------------------------------------------------------------------- /code11/calendar2/support.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/support.h -------------------------------------------------------------------------------- /code11/calendar2/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/targetver.h -------------------------------------------------------------------------------- /code11/calendar2/td_utc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/td_utc.cpp -------------------------------------------------------------------------------- /code11/calendar2/td_utc.h: -------------------------------------------------------------------------------- 1 | #ifndef __TD_UTC_DELTA_H__ 2 | #define __TD_UTC_DELTA_H__ 3 | 4 | double TdUtcDeltatT2(double jd2k); 5 | 6 | 7 | #endif //__TD_UTC_DELTA_H__ 8 | 9 | -------------------------------------------------------------------------------- /code11/calendar2/vsop87_data.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/vsop87_data.cpp -------------------------------------------------------------------------------- /code11/calendar2/vsop87_data.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code11/calendar2/vsop87_data.h -------------------------------------------------------------------------------- /code12/CurveFitting/CurveFitting.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/CurveFitting.suo -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/Common.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Common.h" 3 | 4 | 5 | bool IsPrecisionZero(double value) 6 | { 7 | if(std::fabs(value) < PRECISION) 8 | { 9 | return true; 10 | } 11 | 12 | return false; 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/Common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H__ 2 | #define __COMMON_H__ 3 | 4 | const double PRECISION = 1E-10; 5 | 6 | #define ARR_INDEX(row, col, dim) ((row) * (dim) + (col)) 7 | 8 | 9 | bool IsPrecisionZero(double value); 10 | 11 | #endif //__COMMON_H__ -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/GuassEquation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/LeastSquare/GuassEquation.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/GuassEquation.h: -------------------------------------------------------------------------------- 1 | #ifndef __GUASS_EQUATION_H__ 2 | #define __GUASS_EQUATION_H__ 3 | 4 | 5 | class GuassEquation 6 | { 7 | public: 8 | GuassEquation(int M); 9 | GuassEquation(int M, double *A, double *b); 10 | virtual ~GuassEquation(); 11 | 12 | void Init(int M, double *A, double *b); 13 | double& operator()(int row, int col); 14 | const double& operator()(int row, int col) const; 15 | 16 | bool Resolve(std::vector& xValue); 17 | #ifdef _DEBUG 18 | void DebugDump(); 19 | #endif 20 | protected: 21 | int SelectPivotalElement(int column); 22 | void SwapRow(int row1, int row2); 23 | void SimplePivotalRow(int row, int startColumn); 24 | void RowElimination(int rowS, int rowE, int startColumn); 25 | 26 | protected: 27 | double *m_matrixA; 28 | int m_DIM; 29 | double *m_bVal; 30 | }; 31 | 32 | #endif //__GUASS_EQUATION_H__ -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/LeastSquare.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/LeastSquare/LeastSquare.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // LeastSquare.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | 19 | 20 | // TODO: reference additional headers your program requires here 21 | -------------------------------------------------------------------------------- /code12/CurveFitting/LeastSquare/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code12/CurveFitting/spline/Common.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Common.h" 3 | 4 | 5 | bool IsPrecisionZero(double value) 6 | { 7 | if(std::fabs(value) < PRECISION) 8 | { 9 | return true; 10 | } 11 | 12 | return false; 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /code12/CurveFitting/spline/Common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H__ 2 | #define __COMMON_H__ 3 | 4 | const double PRECISION = 1E-10; 5 | 6 | #define ARR_INDEX(row, col, dim) ((row) * (dim) + (col)) 7 | 8 | 9 | bool IsPrecisionZero(double value); 10 | 11 | #endif //__COMMON_H__ -------------------------------------------------------------------------------- /code12/CurveFitting/spline/DisplayWnd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/DisplayWnd.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/spline/LogicDevice.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOGIC_DEVICE_H__ 2 | #define __LOGIC_DEVICE_H__ 3 | 4 | void SetXLogicRange(double min, double max); 5 | void SetYLogicRange(double min, double max); 6 | void SetDevicePointRange(int left, int top, int right, int bottom); 7 | int DeviceXFromLogicX(double x); 8 | int DeviceYFromLogicY(double y); 9 | 10 | void GetDeviceCenter(int& cx, int& cy); 11 | 12 | #endif //__LOGIC_DEVICE_H__ -------------------------------------------------------------------------------- /code12/CurveFitting/spline/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/ReadMe.txt -------------------------------------------------------------------------------- /code12/CurveFitting/spline/Spline3.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/Spline3.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/spline/Spline3.h: -------------------------------------------------------------------------------- 1 | #ifndef __SPLINE3_FITTING_H__ 2 | #define __SPLINE3_FITTING_H__ 3 | 4 | 5 | class SplineFitting 6 | { 7 | public: 8 | SplineFitting(); 9 | virtual ~SplineFitting(); 10 | 11 | void CalcSpline(double *Xi, double *Yi, int n, int boundType, double b1, double b2); 12 | double GetValue(double x); 13 | 14 | protected: 15 | std::vector m_valXi; 16 | std::vector m_valYi; 17 | std::vector m_valMi; 18 | int m_valN; 19 | bool m_bCalcCompleted; 20 | }; 21 | 22 | #endif //__SPLINE3_FITTING_H__ -------------------------------------------------------------------------------- /code12/CurveFitting/spline/ThomasEquation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/ThomasEquation.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/spline/ThomasEquation.h: -------------------------------------------------------------------------------- 1 | #ifndef __THOMAS_EQUATION_H__ 2 | #define __THOMAS_EQUATION_H__ 3 | 4 | 5 | class ThomasEquation 6 | { 7 | public: 8 | ThomasEquation(int M); 9 | ThomasEquation(int M, double *A, double *b); 10 | virtual ~ThomasEquation(); 11 | 12 | void Init(int M, double *A, double *b); 13 | double& operator()(int row, int col); 14 | const double& operator()(int row, int col) const; 15 | 16 | bool Resolve(std::vector& xValue); 17 | #ifdef _DEBUG 18 | void DebugDump(); 19 | #endif 20 | 21 | protected: 22 | double *m_matrixA; 23 | int m_DIM; 24 | double *m_bVal; 25 | }; 26 | 27 | #endif //__THOMAS_EQUATION_H__ -------------------------------------------------------------------------------- /code12/CurveFitting/spline/res/spline.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/res/spline.ico -------------------------------------------------------------------------------- /code12/CurveFitting/spline/res/spline.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/res/spline.rc2 -------------------------------------------------------------------------------- /code12/CurveFitting/spline/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by spline.rc 4 | // 5 | #define IDM_ABOUTBOX 0x0010 6 | #define IDD_ABOUTBOX 100 7 | #define IDS_ABOUTBOX 101 8 | #define IDD_SPLINE_DIALOG 102 9 | #define IDR_MAINFRAME 128 10 | #define IDC_BUTTON1 1000 11 | #define IDC_BTN_SPLINE 1000 12 | 13 | // Next default values for new objects 14 | // 15 | #ifdef APSTUDIO_INVOKED 16 | #ifndef APSTUDIO_READONLY_SYMBOLS 17 | #define _APS_NEXT_RESOURCE_VALUE 129 18 | #define _APS_NEXT_COMMAND_VALUE 32771 19 | #define _APS_NEXT_CONTROL_VALUE 1001 20 | #define _APS_NEXT_SYMED_VALUE 101 21 | #endif 22 | #endif 23 | -------------------------------------------------------------------------------- /code12/CurveFitting/spline/spline.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/spline.aps -------------------------------------------------------------------------------- /code12/CurveFitting/spline/spline.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/spline.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/spline/spline.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/spline.h -------------------------------------------------------------------------------- /code12/CurveFitting/spline/spline.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/spline.rc -------------------------------------------------------------------------------- /code12/CurveFitting/spline/splineDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/splineDlg.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/spline/splineDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/splineDlg.h -------------------------------------------------------------------------------- /code12/CurveFitting/spline/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/stdafx.cpp -------------------------------------------------------------------------------- /code12/CurveFitting/spline/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/stdafx.h -------------------------------------------------------------------------------- /code12/CurveFitting/spline/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code12/CurveFitting/spline/targetver.h -------------------------------------------------------------------------------- /code13/equation/equation.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code13/equation/equation.suo -------------------------------------------------------------------------------- /code13/equation/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // equation.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code13/equation/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code13/equation/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code14/circle_demo/ChildView.h: -------------------------------------------------------------------------------- 1 | 2 | // ChildView.h : interface of the CChildView class 3 | // 4 | 5 | 6 | #pragma once 7 | 8 | 9 | // CChildView window 10 | 11 | class CChildView : public CWnd 12 | { 13 | // Construction 14 | public: 15 | CChildView(); 16 | 17 | // Attributes 18 | public: 19 | 20 | // Operations 21 | public: 22 | 23 | // Overrides 24 | protected: 25 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 26 | 27 | // Implementation 28 | public: 29 | virtual ~CChildView(); 30 | 31 | // Generated message map functions 32 | protected: 33 | afx_msg void OnPaint(); 34 | DECLARE_MESSAGE_MAP() 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /code14/circle_demo/UserImages.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/circle_demo/UserImages.bmp -------------------------------------------------------------------------------- /code14/circle_demo/circle.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/circle_demo/circle.cpp -------------------------------------------------------------------------------- /code14/circle_demo/circle.h: -------------------------------------------------------------------------------- 1 | #ifndef __CIRCLE_H__ 2 | #define __CIRCLE_H__ 3 | 4 | void MP_Circle(int xc , int yc , int r); 5 | void Bresenham_Circle(int xc , int yc , int r); 6 | 7 | void Pnar_Circle(int xc, int yc, int r); 8 | 9 | void Fast_Circle(int xc , int yc , int r); 10 | 11 | #endif /*__CIRCLE_H__*/ 12 | 13 | -------------------------------------------------------------------------------- /code14/circle_demo/circle_demo.h: -------------------------------------------------------------------------------- 1 | 2 | // circle_demo.h : main header file for the circle_demo application 3 | // 4 | #pragma once 5 | 6 | #ifndef __AFXWIN_H__ 7 | #error "include 'stdafx.h' before including this file for PCH" 8 | #endif 9 | 10 | #include "resource.h" // main symbols 11 | 12 | 13 | // Ccircle_demoApp: 14 | // See circle_demo.cpp for the implementation of this class 15 | // 16 | 17 | class Ccircle_demoApp : public CWinAppEx 18 | { 19 | public: 20 | Ccircle_demoApp(); 21 | 22 | 23 | // Overrides 24 | public: 25 | virtual BOOL InitInstance(); 26 | 27 | // Implementation 28 | 29 | public: 30 | UINT m_nAppLook; 31 | BOOL m_bHiColorIcons; 32 | 33 | virtual void PreLoadState(); 34 | virtual void LoadCustomState(); 35 | virtual void SaveCustomState(); 36 | 37 | afx_msg void OnAppAbout(); 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | extern Ccircle_demoApp theApp; 42 | -------------------------------------------------------------------------------- /code14/circle_demo/circle_demo.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/circle_demo/circle_demo.suo -------------------------------------------------------------------------------- /code14/circle_demo/dev_adp.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEV_ADP_H__ 2 | #define __DEV_ADP_H__ 3 | 4 | HDC SetCurrentDevice(HDC hDC); 5 | COLORREF SetDeviceColor(COLORREF color); 6 | void SetDevicePixel(int x, int y); 7 | void SetDeviceWidth(int width); 8 | void SetDeviceHeight(int height); 9 | void DrawAxis(); 10 | 11 | #endif /*__DEV_ADP_H__*/ 12 | 13 | -------------------------------------------------------------------------------- /code14/circle_demo/res/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/circle_demo/res/Toolbar.bmp -------------------------------------------------------------------------------- /code14/circle_demo/res/Toolbar256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/circle_demo/res/Toolbar256.bmp -------------------------------------------------------------------------------- /code14/circle_demo/res/circle_demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/circle_demo/res/circle_demo.ico -------------------------------------------------------------------------------- /code14/circle_demo/res/circle_demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // circle_demo.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /code14/circle_demo/stdafx.cpp: -------------------------------------------------------------------------------- 1 | 2 | // stdafx.cpp : source file that includes just the standard includes 3 | // circle_demo.pch will be the pre-compiled header 4 | // stdafx.obj will contain the pre-compiled type information 5 | 6 | #include "stdafx.h" 7 | 8 | 9 | -------------------------------------------------------------------------------- /code14/ellipse_demo/ChildView.h: -------------------------------------------------------------------------------- 1 | 2 | // ChildView.h : interface of the CChildView class 3 | // 4 | 5 | 6 | #pragma once 7 | 8 | 9 | // CChildView window 10 | 11 | class CChildView : public CWnd 12 | { 13 | // Construction 14 | public: 15 | CChildView(); 16 | 17 | // Attributes 18 | public: 19 | 20 | // Operations 21 | public: 22 | 23 | // Overrides 24 | protected: 25 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 26 | 27 | // Implementation 28 | public: 29 | virtual ~CChildView(); 30 | 31 | // Generated message map functions 32 | protected: 33 | afx_msg void OnPaint(); 34 | DECLARE_MESSAGE_MAP() 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /code14/ellipse_demo/dev_adp.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEV_ADP_H__ 2 | #define __DEV_ADP_H__ 3 | 4 | HDC SetCurrentDevice(HDC hDC); 5 | COLORREF SetDeviceColor(COLORREF color); 6 | void SetDevicePixel(int x, int y); 7 | void SetDeviceWidth(int width); 8 | void SetDeviceHeight(int height); 9 | void DrawAxis(); 10 | 11 | #endif /*__DEV_ADP_H__*/ 12 | 13 | -------------------------------------------------------------------------------- /code14/ellipse_demo/ellipse.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/ellipse_demo/ellipse.cpp -------------------------------------------------------------------------------- /code14/ellipse_demo/ellipse.h: -------------------------------------------------------------------------------- 1 | #ifndef __ELLIPSE_H__ 2 | #define __ELLIPSE_H__ 3 | 4 | void MP_Ellipse(int xc , int yc , int a, int b); 5 | void Bresenham_Ellipse(int xc , int yc , int a, int b); 6 | void Bresenham_Ellipse2(int xc , int yc , int a, int b); 7 | 8 | 9 | #endif /*__ELLIPSE_H__*/ 10 | 11 | -------------------------------------------------------------------------------- /code14/ellipse_demo/ellipse_demo.h: -------------------------------------------------------------------------------- 1 | 2 | // ellipse_demo.h : main header file for the ellipse_demo application 3 | // 4 | #pragma once 5 | 6 | #ifndef __AFXWIN_H__ 7 | #error "include 'stdafx.h' before including this file for PCH" 8 | #endif 9 | 10 | #include "resource.h" // main symbols 11 | 12 | 13 | // Cellipse_demoApp: 14 | // See circle_demo.cpp for the implementation of this class 15 | // 16 | 17 | class Cellipse_demoApp : public CWinAppEx 18 | { 19 | public: 20 | Cellipse_demoApp(); 21 | 22 | 23 | // Overrides 24 | public: 25 | virtual BOOL InitInstance(); 26 | 27 | // Implementation 28 | 29 | public: 30 | UINT m_nAppLook; 31 | BOOL m_bHiColorIcons; 32 | 33 | virtual void PreLoadState(); 34 | virtual void LoadCustomState(); 35 | virtual void SaveCustomState(); 36 | 37 | afx_msg void OnAppAbout(); 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | extern Cellipse_demoApp theApp; 42 | -------------------------------------------------------------------------------- /code14/ellipse_demo/ellipse_demo.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/ellipse_demo/ellipse_demo.suo -------------------------------------------------------------------------------- /code14/ellipse_demo/res/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/ellipse_demo/res/Toolbar.bmp -------------------------------------------------------------------------------- /code14/ellipse_demo/res/Toolbar256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/ellipse_demo/res/Toolbar256.bmp -------------------------------------------------------------------------------- /code14/ellipse_demo/res/ellipse_demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/ellipse_demo/res/ellipse_demo.ico -------------------------------------------------------------------------------- /code14/ellipse_demo/res/ellipse_demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // ellipse_demo.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /code14/ellipse_demo/stdafx.cpp: -------------------------------------------------------------------------------- 1 | 2 | // stdafx.cpp : source file that includes just the standard includes 3 | // circle_demo.pch will be the pre-compiled header 4 | // stdafx.obj will contain the pre-compiled type information 5 | 6 | #include "stdafx.h" 7 | 8 | 9 | -------------------------------------------------------------------------------- /code14/geo_alg/geo_alg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/geo_alg/geo_alg.cpp -------------------------------------------------------------------------------- /code14/geo_alg/geo_alg.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/geo_alg/geo_alg.suo -------------------------------------------------------------------------------- /code14/geo_alg/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // line.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code14/geo_alg/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code14/geo_alg/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code14/line_demo/ChildView.h: -------------------------------------------------------------------------------- 1 | 2 | // ChildView.h : interface of the CChildView class 3 | // 4 | 5 | 6 | #pragma once 7 | 8 | 9 | // CChildView window 10 | 11 | class CChildView : public CWnd 12 | { 13 | // Construction 14 | public: 15 | CChildView(); 16 | 17 | // Attributes 18 | public: 19 | 20 | // Operations 21 | public: 22 | 23 | // Overrides 24 | protected: 25 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 26 | 27 | // Implementation 28 | public: 29 | virtual ~CChildView(); 30 | 31 | // Generated message map functions 32 | protected: 33 | afx_msg void OnPaint(); 34 | DECLARE_MESSAGE_MAP() 35 | }; 36 | 37 | -------------------------------------------------------------------------------- /code14/line_demo/UserImages.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/line_demo/UserImages.bmp -------------------------------------------------------------------------------- /code14/line_demo/dev_adp.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEV_ADP_H__ 2 | #define __DEV_ADP_H__ 3 | 4 | HDC SetCurrentDevice(HDC hDC); 5 | COLORREF SetDeviceColor(COLORREF color); 6 | void SetDevicePixel(int x, int y); 7 | void SetDeviceWidth(int width); 8 | void SetDeviceHeight(int height); 9 | void DrawAxis(); 10 | 11 | #endif /*__DEV_ADP_H__*/ 12 | 13 | -------------------------------------------------------------------------------- /code14/line_demo/line.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/line_demo/line.cpp -------------------------------------------------------------------------------- /code14/line_demo/line.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINE_H__ 2 | #define __LINE_H__ 3 | 4 | void DDA_Line(int x1, int y1, int x2, int y2); 5 | void Bresenham_Line(int x1, int y1, int x2, int y2); 6 | void Bresenham_Line2(int x1, int y1, int x2, int y2); 7 | void Sym_Bresenham_Line(int x1, int y1, int x2, int y2); 8 | void Double_Step_Line(int x1, int y1, int x2, int y2); 9 | 10 | 11 | #endif /*__LINE_H__*/ 12 | 13 | -------------------------------------------------------------------------------- /code14/line_demo/line_demo.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/line_demo/line_demo.aps -------------------------------------------------------------------------------- /code14/line_demo/line_demo.h: -------------------------------------------------------------------------------- 1 | 2 | // line_demo.h : main header file for the line_demo application 3 | // 4 | #pragma once 5 | 6 | #ifndef __AFXWIN_H__ 7 | #error "include 'stdafx.h' before including this file for PCH" 8 | #endif 9 | 10 | #include "resource.h" // main symbols 11 | 12 | 13 | // Cline_demoApp: 14 | // See line_demo.cpp for the implementation of this class 15 | // 16 | 17 | class Cline_demoApp : public CWinAppEx 18 | { 19 | public: 20 | Cline_demoApp(); 21 | 22 | 23 | // Overrides 24 | public: 25 | virtual BOOL InitInstance(); 26 | 27 | // Implementation 28 | 29 | public: 30 | UINT m_nAppLook; 31 | BOOL m_bHiColorIcons; 32 | 33 | virtual void PreLoadState(); 34 | virtual void LoadCustomState(); 35 | virtual void SaveCustomState(); 36 | 37 | afx_msg void OnAppAbout(); 38 | DECLARE_MESSAGE_MAP() 39 | }; 40 | 41 | extern Cline_demoApp theApp; 42 | -------------------------------------------------------------------------------- /code14/line_demo/line_demo.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/line_demo/line_demo.suo -------------------------------------------------------------------------------- /code14/line_demo/res/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/line_demo/res/Toolbar.bmp -------------------------------------------------------------------------------- /code14/line_demo/res/Toolbar256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/line_demo/res/Toolbar256.bmp -------------------------------------------------------------------------------- /code14/line_demo/res/line_demo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/line_demo/res/line_demo.ico -------------------------------------------------------------------------------- /code14/line_demo/res/line_demo.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // line_demo.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /code14/line_demo/stdafx.cpp: -------------------------------------------------------------------------------- 1 | 2 | // stdafx.cpp : source file that includes just the standard includes 3 | // line_demo.pch will be the pre-compiled header 4 | // stdafx.obj will contain the pre-compiled type information 5 | 6 | #include "stdafx.h" 7 | 8 | 9 | -------------------------------------------------------------------------------- /code14/polygon_fill/common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H__ 2 | #define __COMMON_H__ 3 | 4 | #define COUNT_OF(x) (sizeof(x) / sizeof(x[0])) 5 | #define ROUND_INT(x) ( (x > 0) ? (int)(x + 0.5) : (int)(x - 0.5) ) 6 | 7 | 8 | 9 | 10 | #endif /*__COMMON_H__*/ 11 | 12 | -------------------------------------------------------------------------------- /code14/polygon_fill/dev_adp.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/polygon_fill/dev_adp.cpp -------------------------------------------------------------------------------- /code14/polygon_fill/dev_adp.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEV_ADP_H__ 2 | #define __DEV_ADP_H__ 3 | 4 | const int MAX_MAP_WIDTH = 16; 5 | const int MAX_MAP_HEIGHT = 16; 6 | 7 | int GetPixelColor(int x, int y); 8 | void SetPixelColor(int x, int y, int color); 9 | void DrawHorizontalLine(int x1, int x2, int y, int color); 10 | void FillBackground(int color); 11 | 12 | void SetPixelMap(int map[MAX_MAP_WIDTH][MAX_MAP_HEIGHT], int width, int height); 13 | void PrintCurrentPixelMap(); 14 | 15 | #endif /*__DEV_ADP_H__*/ 16 | 17 | -------------------------------------------------------------------------------- /code14/polygon_fill/edge_center_fill.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/polygon_fill/edge_center_fill.cpp -------------------------------------------------------------------------------- /code14/polygon_fill/edge_center_fill.h: -------------------------------------------------------------------------------- 1 | #ifndef __EDGE_CENTER_FILL_H__ 2 | #define __EDGE_CENTER_FILL_H__ 3 | 4 | #include "polygon.h" 5 | 6 | void EdgeCenterMarkFill(const Polygon& py, int color); 7 | void EdgeFenceMarkFill(const Polygon& py, int fence, int color); 8 | 9 | #endif /*__EDGE_CENTER_FILL_H__*/ 10 | 11 | -------------------------------------------------------------------------------- /code14/polygon_fill/edge_def.h: -------------------------------------------------------------------------------- 1 | #ifndef __DEGE_DEF_H__ 2 | #define __DEGE_DEF_H__ 3 | 4 | #include "point.h" 5 | 6 | 7 | typedef struct tagEDGE 8 | { 9 | double xi; 10 | double dx; 11 | int ymax; 12 | #ifdef _DEBUG 13 | POINT ps; 14 | POINT pe; 15 | #endif 16 | }EDGE; 17 | 18 | 19 | typedef struct tagEDGE2 20 | { 21 | double xi; 22 | double dx; 23 | int ymax; 24 | int dy; 25 | #ifdef _DEBUG 26 | POINT ps; 27 | POINT pe; 28 | #endif 29 | }EDGE2; 30 | 31 | typedef struct tagEDGE3 32 | { 33 | double xi; 34 | double dx; 35 | int ymax; 36 | int ymin; 37 | #ifdef _DEBUG 38 | POINT ps; 39 | POINT pe; 40 | #endif 41 | }EDGE3; 42 | 43 | 44 | 45 | #endif /*__DEGE_DEF_H__*/ 46 | 47 | -------------------------------------------------------------------------------- /code14/polygon_fill/edge_mark_fill.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "dev_adp.h" 3 | #include "edge_mark_fill.h" 4 | 5 | void EdgeMarkFill(int xmin, int xmax, int ymin, int ymax, 6 | int boundarycolor, int color) 7 | { 8 | int flag = -1; 9 | for(int y = ymin; y <= ymax; y++) 10 | { 11 | flag = -1; 12 | for(int x = xmin; x <= xmax; x++) 13 | { 14 | if(GetPixelColor(x, y) == boundarycolor) 15 | { 16 | flag = -flag; 17 | } 18 | if(flag == 1) 19 | { 20 | SetPixelColor(x, y, color); 21 | } 22 | } 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /code14/polygon_fill/edge_mark_fill.h: -------------------------------------------------------------------------------- 1 | #ifndef __EDGE_MARK_FILL_H__ 2 | #define __EDGE_MARK_FILL_H__ 3 | 4 | #include "polygon.h" 5 | 6 | 7 | void EdgeMarkFill(int xmin, int xmax, int ymin, int ymax, 8 | int boundarycolor, int color); 9 | 10 | #endif /*__EDGE_MARK_FILL_H__*/ 11 | 12 | -------------------------------------------------------------------------------- /code14/polygon_fill/function.h: -------------------------------------------------------------------------------- 1 | #ifndef __FUNCTION_H__ 2 | #define __FUNCTION_H__ 3 | 4 | #include "polygon.h" 5 | 6 | void GetPolygonMinMax(const Polygon& py, int& ymin, int& ymax); 7 | void HorizonEdgeFill(const Polygon& py, int color); 8 | 9 | #endif /*__FUNCTION_H__*/ 10 | 11 | -------------------------------------------------------------------------------- /code14/polygon_fill/point.h: -------------------------------------------------------------------------------- 1 | #ifndef __POINT_H__ 2 | #define __POINT_H__ 3 | 4 | typedef struct tagPOINT 5 | { 6 | int x; 7 | int y; 8 | }POINT; 9 | 10 | class Point 11 | { 12 | public: 13 | Point(int x_, int y_) 14 | { x = x_; y = y_; }; 15 | Point(const Point &pt) 16 | { x = pt.x; y = pt.y; }; 17 | Point() 18 | { x = 0; y = 0; }; 19 | 20 | int x; 21 | int y; 22 | }; 23 | 24 | #endif /*__POINT_H__*/ 25 | 26 | -------------------------------------------------------------------------------- /code14/polygon_fill/polygon.h: -------------------------------------------------------------------------------- 1 | #ifndef __POLYGON_H__ 2 | #define __POLYGON_H__ 3 | 4 | #include 5 | #include 6 | #include "point.h" 7 | 8 | class Polygon 9 | { 10 | public: 11 | Polygon(POINT *p, int count) 12 | { 13 | for(int i = 0; i < count; i++) 14 | { 15 | pts.push_back(Point(p[i].x, p[i].y)); 16 | } 17 | }; 18 | Polygon(const Polygon& py) 19 | { 20 | std::copy(py.pts.begin(), py.pts.end(), back_inserter(pts)); 21 | }; 22 | 23 | bool IsValid() const 24 | { return pts.size() >= 3; }; 25 | 26 | int GetPolyCount() const 27 | { return static_cast(pts.size()); }; 28 | 29 | std::vector pts; 30 | }; 31 | 32 | #endif /*__POLYGON_H__*/ 33 | 34 | -------------------------------------------------------------------------------- /code14/polygon_fill/polygon_fill.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/polygon_fill/polygon_fill.suo -------------------------------------------------------------------------------- /code14/polygon_fill/recursion_seed_fill.h: -------------------------------------------------------------------------------- 1 | #ifndef __RECURSION_SEED_FILL_H__ 2 | #define __RECURSION_SEED_FILL_H__ 3 | 4 | void FloodSeedFill(int x, int y, int old_color, int new_color); 5 | void BoundarySeedFill(int x, int y, int new_color, int boundary_color); 6 | 7 | #endif /*__RECURSION_SEED_FILL_H__*/ 8 | 9 | -------------------------------------------------------------------------------- /code14/polygon_fill/scanline_fill.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/polygon_fill/scanline_fill.cpp -------------------------------------------------------------------------------- /code14/polygon_fill/scanline_fill.h: -------------------------------------------------------------------------------- 1 | #ifndef __SCANLINE_FILL_H__ 2 | #define __SCANLINE_FILL_H__ 3 | 4 | #include "polygon.h" 5 | 6 | 7 | void ScanLinePolygonFill(const Polygon& py, int color); 8 | 9 | #endif /*__SCANLINE_FILL_H__*/ 10 | 11 | -------------------------------------------------------------------------------- /code14/polygon_fill/scanline_fill_o.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/polygon_fill/scanline_fill_o.cpp -------------------------------------------------------------------------------- /code14/polygon_fill/scanline_fill_o.h: -------------------------------------------------------------------------------- 1 | #ifndef __SCANLINE_FILL_O_H__ 2 | #define __SCANLINE_FILL_O_H__ 3 | 4 | #include "polygon.h" 5 | 6 | 7 | 8 | void ScanLinePolygonFill2(const Polygon& py, int color); 9 | 10 | #endif /*__SCANLINE_FILL_O_H__*/ 11 | 12 | -------------------------------------------------------------------------------- /code14/polygon_fill/scanline_seed_fill.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code14/polygon_fill/scanline_seed_fill.cpp -------------------------------------------------------------------------------- /code14/polygon_fill/scanline_seed_fill.h: -------------------------------------------------------------------------------- 1 | #ifndef __SCANLINE_SEED_FILL_H__ 2 | #define __SCANLINE_SEED_FILL_H__ 3 | 4 | void ScanLineSeedFill(int x, int y, int new_color, int boundary_color); 5 | 6 | #endif /*__SCANLINE_SEED_FILL_H__*/ 7 | 8 | -------------------------------------------------------------------------------- /code14/polygon_fill/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // polygon_fill.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code14/polygon_fill/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | //#include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code14/polygon_fill/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code15/fft_sample/common/Common.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Common.h" 3 | 4 | 5 | bool IsPrecisionZero(double value) 6 | { 7 | if(std::fabs(value) < PRECISION) 8 | { 9 | return true; 10 | } 11 | 12 | return false; 13 | } 14 | 15 | 16 | -------------------------------------------------------------------------------- /code15/fft_sample/common/Common.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_H__ 2 | #define __COMMON_H__ 3 | 4 | const double PRECISION = 1E-10; 5 | 6 | #define ARR_INDEX(row, col, dim) ((row) * (dim) + (col)) 7 | 8 | 9 | bool IsPrecisionZero(double value); 10 | 11 | #endif //__COMMON_H__ -------------------------------------------------------------------------------- /code15/fft_sample/common/LogicDevice.h: -------------------------------------------------------------------------------- 1 | #ifndef __LOGIC_DEVICE_H__ 2 | #define __LOGIC_DEVICE_H__ 3 | 4 | void SetXLogicRange(double min, double max); 5 | void SetYLogicRange(double min, double max); 6 | void SetDevicePointRange(int left, int top, int right, int bottom); 7 | int DeviceXFromLogicX(double x); 8 | int DeviceYFromLogicY(double y); 9 | 10 | void GetDeviceCenter(int& cx, int& cy); 11 | 12 | #endif //__LOGIC_DEVICE_H__ -------------------------------------------------------------------------------- /code15/fft_sample/common/Spline3.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/common/Spline3.cpp -------------------------------------------------------------------------------- /code15/fft_sample/common/Spline3.h: -------------------------------------------------------------------------------- 1 | #ifndef __SPLINE3_FITTING_H__ 2 | #define __SPLINE3_FITTING_H__ 3 | 4 | 5 | class SplineFitting 6 | { 7 | public: 8 | SplineFitting(); 9 | virtual ~SplineFitting(); 10 | 11 | void CalcSpline(double *Xi, double *Yi, int n, int boundType, double b1, double b2); 12 | double GetValue(double x); 13 | 14 | protected: 15 | std::vector m_valXi; 16 | std::vector m_valYi; 17 | std::vector m_valMi; 18 | int m_valN; 19 | bool m_bCalcCompleted; 20 | }; 21 | 22 | #endif //__SPLINE3_FITTING_H__ -------------------------------------------------------------------------------- /code15/fft_sample/common/ThomasEquation.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/common/ThomasEquation.cpp -------------------------------------------------------------------------------- /code15/fft_sample/common/ThomasEquation.h: -------------------------------------------------------------------------------- 1 | #ifndef __THOMAS_EQUATION_H__ 2 | #define __THOMAS_EQUATION_H__ 3 | 4 | 5 | class ThomasEquation 6 | { 7 | public: 8 | ThomasEquation(int M); 9 | ThomasEquation(int M, double *A, double *b); 10 | virtual ~ThomasEquation(); 11 | 12 | void Init(int M, double *A, double *b); 13 | double& operator()(int row, int col); 14 | const double& operator()(int row, int col) const; 15 | 16 | bool Resolve(std::vector& xValue); 17 | #ifdef _DEBUG 18 | void DebugDump(); 19 | #endif 20 | 21 | protected: 22 | double *m_matrixA; 23 | int m_DIM; 24 | double *m_bVal; 25 | }; 26 | 27 | #endif //__THOMAS_EQUATION_H__ -------------------------------------------------------------------------------- /code15/fft_sample/common/equalizer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/common/equalizer.cpp -------------------------------------------------------------------------------- /code15/fft_sample/common/equalizer.h: -------------------------------------------------------------------------------- 1 | #ifndef __EQUALIZER_H__ 2 | #define __EQUALIZER_H__ 3 | 4 | 5 | #include "fft.h" 6 | 7 | typedef struct tagEQUALIZER_HANDLE 8 | { 9 | FFT_HANDLE hfft; 10 | COMPLEX *filter; 11 | }EQUALIZER_HANDLE; 12 | 13 | bool InitEqualizer(EQUALIZER_HANDLE *hEQ, int count); 14 | void ReleaseEqualizer(EQUALIZER_HANDLE *hEQ); 15 | 16 | bool UpdateFilter(EQUALIZER_HANDLE *hEQ, float *gain, int count); 17 | 18 | bool Equalizer(EQUALIZER_HANDLE *hEQ, short *sampleData, int totalSamples, int channels); 19 | 20 | 21 | #endif //__EQUALIZER_H__ 22 | -------------------------------------------------------------------------------- /code15/fft_sample/common/fft.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/common/fft.cpp -------------------------------------------------------------------------------- /code15/fft_sample/common/spectrum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/common/spectrum.cpp -------------------------------------------------------------------------------- /code15/fft_sample/common/spectrum.h: -------------------------------------------------------------------------------- 1 | #ifndef __SPECTRUM_H__ 2 | #define __SPECTRUM_H__ 3 | 4 | #include "fft.h" 5 | 6 | 7 | bool PowerSpectrumT(FFT_HANDLE *hfft, short *sampleData, int totalSamples, int channels, float *power); 8 | 9 | bool PowerSpectrumS(FFT_HANDLE *hfft, short *sampleData, int totalSamples, int channels, float *power); 10 | 11 | #endif //__SPECTRUM_H__ 12 | -------------------------------------------------------------------------------- /code15/fft_sample/fft_sample.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/fft_sample.suo -------------------------------------------------------------------------------- /code15/fft_sample/player/DisplayWnd.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/DisplayWnd.cpp -------------------------------------------------------------------------------- /code15/fft_sample/player/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/ReadMe.txt -------------------------------------------------------------------------------- /code15/fft_sample/player/player.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/player.aps -------------------------------------------------------------------------------- /code15/fft_sample/player/player.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/player.cpp -------------------------------------------------------------------------------- /code15/fft_sample/player/player.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/player.h -------------------------------------------------------------------------------- /code15/fft_sample/player/player.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/player.rc -------------------------------------------------------------------------------- /code15/fft_sample/player/playerDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/playerDlg.cpp -------------------------------------------------------------------------------- /code15/fft_sample/player/playerDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/playerDlg.h -------------------------------------------------------------------------------- /code15/fft_sample/player/res/player.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/res/player.ico -------------------------------------------------------------------------------- /code15/fft_sample/player/res/player.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/res/player.rc2 -------------------------------------------------------------------------------- /code15/fft_sample/player/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/stdafx.cpp -------------------------------------------------------------------------------- /code15/fft_sample/player/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/stdafx.h -------------------------------------------------------------------------------- /code15/fft_sample/player/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/player/targetver.h -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/ReadMe.txt -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/plot_spectrum.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/plot_spectrum.aps -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/plot_spectrum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/plot_spectrum.cpp -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/plot_spectrum.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/plot_spectrum.h -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/plot_spectrum.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/plot_spectrum.rc -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/plot_spectrumDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/plot_spectrumDlg.cpp -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/plot_spectrumDlg.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/plot_spectrumDlg.h -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/res/plot_spectrum.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/res/plot_spectrum.ico -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/res/plot_spectrum.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/res/plot_spectrum.rc2 -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/stdafx.cpp -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/stdafx.h -------------------------------------------------------------------------------- /code15/fft_sample/plot_spectrum/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/fft_sample/plot_spectrum/targetver.h -------------------------------------------------------------------------------- /code15/测试数据/0-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/0-8000-mono.wav -------------------------------------------------------------------------------- /code15/测试数据/0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/0.wav -------------------------------------------------------------------------------- /code15/测试数据/1-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/1-1.wav -------------------------------------------------------------------------------- /code15/测试数据/1-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/1-8000-mono.wav -------------------------------------------------------------------------------- /code15/测试数据/2-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/2-8000-mono.wav -------------------------------------------------------------------------------- /code15/测试数据/2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/2.wav -------------------------------------------------------------------------------- /code15/测试数据/6-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/6-8000-mono.wav -------------------------------------------------------------------------------- /code15/测试数据/6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/6.wav -------------------------------------------------------------------------------- /code15/测试数据/7-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/7-8000-mono.wav -------------------------------------------------------------------------------- /code15/测试数据/7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/7.wav -------------------------------------------------------------------------------- /code15/测试数据/8-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/8-8000-mono.wav -------------------------------------------------------------------------------- /code15/测试数据/8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/8.wav -------------------------------------------------------------------------------- /code15/测试数据/9-2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code15/测试数据/9-2.wav -------------------------------------------------------------------------------- /code16/ga/ga.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code16/ga/ga.cpp -------------------------------------------------------------------------------- /code16/ga/ga.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code16/ga/ga.suo -------------------------------------------------------------------------------- /code16/ga/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // ga.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code16/ga/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code16/ga/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code16/ga2/ga2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code16/ga2/ga2.cpp -------------------------------------------------------------------------------- /code16/ga2/ga2.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code16/ga2/ga2.suo -------------------------------------------------------------------------------- /code16/ga2/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // ga.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code16/ga2/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code16/ga2/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code17/calc/BigInt.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code17/calc/BigInt.cpp -------------------------------------------------------------------------------- /code17/calc/BigInt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code17/calc/BigInt.h -------------------------------------------------------------------------------- /code17/calc/GcdLcm.h: -------------------------------------------------------------------------------- 1 | #ifndef __GCD_LCM_H__ 2 | #define __GCD_LCM_H__ 3 | 4 | #include "BigInt.h" 5 | 6 | CBigInt EuclidGcd(const CBigInt& a, const CBigInt& b); 7 | CBigInt SteinGcd(const CBigInt& a, const CBigInt& b); 8 | CBigInt SubstractGcd(const CBigInt& a, const CBigInt& b); 9 | 10 | CBigInt GcdLcm(const CBigInt& a, const CBigInt& b); 11 | CBigInt NormalLcm(const CBigInt& a, const CBigInt& b); 12 | 13 | 14 | #endif //__GCD_LCM_H__ -------------------------------------------------------------------------------- /code17/calc/calc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code17/calc/calc.cpp -------------------------------------------------------------------------------- /code17/calc/calc.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code17/calc/calc.suo -------------------------------------------------------------------------------- /code17/calc/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // calc.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code17/calc/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | 15 | 16 | // TODO: reference additional headers your program requires here 17 | -------------------------------------------------------------------------------- /code17/calc/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code18/calc/BigInt.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code18/calc/BigInt.cpp -------------------------------------------------------------------------------- /code18/calc/BigInt.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code18/calc/BigInt.h -------------------------------------------------------------------------------- /code18/calc/GcdLcm.h: -------------------------------------------------------------------------------- 1 | #ifndef __GCD_LCM_H__ 2 | #define __GCD_LCM_H__ 3 | 4 | #include "BigInt.h" 5 | 6 | CBigInt EuclidGcd(const CBigInt& a, const CBigInt& b); 7 | CBigInt SteinGcd(const CBigInt& a, const CBigInt& b); 8 | CBigInt SubstractGcd(const CBigInt& a, const CBigInt& b); 9 | 10 | CBigInt GcdLcm(const CBigInt& a, const CBigInt& b); 11 | CBigInt NormalLcm(const CBigInt& a, const CBigInt& b); 12 | 13 | 14 | #endif //__GCD_LCM_H__ -------------------------------------------------------------------------------- /code18/calc/MD5Hash.h: -------------------------------------------------------------------------------- 1 | #ifndef __MD5HASH_H__ 2 | #define __MD5HASH_H__ 3 | 4 | #define MD5_DIGEST_SIZE 16 5 | 6 | class CMD5Hash 7 | { 8 | public: 9 | CMD5Hash(); 10 | ~CMD5Hash(); 11 | void Init(); 12 | void Update(const unsigned char *pbuf,int nLen); 13 | void Final(unsigned char *pFinalDigest); 14 | 15 | private: 16 | void _Transform(unsigned long *pBuf, unsigned long *pIn); 17 | unsigned long m_i[2]; 18 | unsigned long m_buf[4]; 19 | unsigned char m_in[64]; 20 | }; 21 | 22 | void CalcMD5Hash(void *data, int dataSize, unsigned char *digestBuf); 23 | 24 | #endif //__MD5HASH_H__ -------------------------------------------------------------------------------- /code18/calc/Prime.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code18/calc/Prime.cpp -------------------------------------------------------------------------------- /code18/calc/Prime.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code18/calc/Prime.h -------------------------------------------------------------------------------- /code18/calc/RsaLib.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code18/calc/RsaLib.cpp -------------------------------------------------------------------------------- /code18/calc/RsaLib.h: -------------------------------------------------------------------------------- 1 | #ifndef __RSALIB_H__ 2 | #define __RSALIB_H__ 3 | 4 | #include "BigInt.h" 5 | 6 | int Rsa_Pkcs15_Encrypt(CBigInt& e, CBigInt& n, int kbits, 7 | void *pSrcData, int dataSize, void *pEncData, int encBufSize); 8 | 9 | 10 | int Rsa_Pkcs15_Decrypt(CBigInt& d, CBigInt& n, int kbits, 11 | void *pSrcData, int dataSize, void *pDecData, int decBufSize); 12 | 13 | 14 | int Rsa_Pkcs15_Sign(CBigInt& d, CBigInt& n, int kbits, 15 | void *pSrcData, int dataSize, void *pSignBuf, int bufSize); 16 | 17 | 18 | bool Rsa_Pkcs15_Verify(CBigInt& e, CBigInt& n, int kbits, 19 | void *pSignData, int dataSize, void *pSrcData, int srcSize); 20 | 21 | #endif /*__RSALIB_H__*/ -------------------------------------------------------------------------------- /code18/calc/calc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code18/calc/calc.cpp -------------------------------------------------------------------------------- /code18/calc/calc.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code18/calc/calc.suo -------------------------------------------------------------------------------- /code18/calc/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // calc.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code18/calc/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | 16 | 17 | // TODO: reference additional headers your program requires here 18 | -------------------------------------------------------------------------------- /code18/calc/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code19/sudoku/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code19/sudoku/ReadMe.txt -------------------------------------------------------------------------------- /code19/sudoku/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // bucket.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code19/sudoku/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // TODO: reference additional headers your program requires here 21 | -------------------------------------------------------------------------------- /code19/sudoku/sudoku.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code19/sudoku/sudoku.cpp -------------------------------------------------------------------------------- /code19/sudoku/sudoku.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code19/sudoku/sudoku.suo -------------------------------------------------------------------------------- /code19/sudoku/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code20/hua-rong-dao/hua-rong-dao.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code20/hua-rong-dao/hua-rong-dao.cpp -------------------------------------------------------------------------------- /code20/hua-rong-dao/hua-rong-dao.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code20/hua-rong-dao/hua-rong-dao.suo -------------------------------------------------------------------------------- /code20/hua-rong-dao/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // hua-rong-dao.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code20/hua-rong-dao/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code20/hua-rong-dao/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code21/AStar/AStar.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code21/AStar/AStar.aps -------------------------------------------------------------------------------- /code21/AStar/AStar.h: -------------------------------------------------------------------------------- 1 | 2 | // AStar.h : main header file for the PROJECT_NAME application 3 | // 4 | 5 | #pragma once 6 | 7 | #ifndef __AFXWIN_H__ 8 | #error "include 'stdafx.h' before including this file for PCH" 9 | #endif 10 | 11 | #include "resource.h" // main symbols 12 | 13 | 14 | // CAStarApp: 15 | // See AStar.cpp for the implementation of this class 16 | // 17 | 18 | class CAStarApp : public CWinAppEx 19 | { 20 | public: 21 | CAStarApp(); 22 | 23 | // Overrides 24 | public: 25 | virtual BOOL InitInstance(); 26 | 27 | // Implementation 28 | 29 | DECLARE_MESSAGE_MAP() 30 | }; 31 | 32 | extern CAStarApp theApp; -------------------------------------------------------------------------------- /code21/AStar/AStar.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code21/AStar/AStar.rc -------------------------------------------------------------------------------- /code21/AStar/AStar.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code21/AStar/AStar.suo -------------------------------------------------------------------------------- /code21/AStar/AStarDlg.h: -------------------------------------------------------------------------------- 1 | 2 | // AStarDlg.h : header file 3 | // 4 | 5 | #pragma once 6 | 7 | #include "GridWnd.h" 8 | 9 | // CAStarDlg dialog 10 | class CAStarDlg : public CDialog 11 | { 12 | // Construction 13 | public: 14 | CAStarDlg(CWnd* pParent = NULL); // standard constructor 15 | 16 | // Dialog Data 17 | enum { IDD = IDD_ASTAR_DIALOG }; 18 | 19 | protected: 20 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 21 | 22 | 23 | // Implementation 24 | protected: 25 | HICON m_hIcon; 26 | CGridWnd m_gridWnd; 27 | int m_AlgoType; 28 | BOOL m_UsingWall; 29 | int m_DistanceType; 30 | 31 | // Generated message map functions 32 | virtual BOOL OnInitDialog(); 33 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 34 | afx_msg void OnPaint(); 35 | afx_msg HCURSOR OnQueryDragIcon(); 36 | afx_msg void OnBnClickedBtnStart(); 37 | DECLARE_MESSAGE_MAP() 38 | }; 39 | -------------------------------------------------------------------------------- /code21/AStar/A_Star.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code21/AStar/A_Star.cpp -------------------------------------------------------------------------------- /code21/AStar/CellDef.h: -------------------------------------------------------------------------------- 1 | #ifndef __CELL_DEFINE_H__ 2 | #define __CELL_DEFINE_H__ 3 | 4 | const int N_SCALE = 16; 5 | 6 | const int CELL_NORMAL = 0; 7 | const int CELL_MARK = 1; 8 | const int CELL_WALL = 2; 9 | const int CELL_SOURCE = 3; 10 | const int CELL_TARGET = 4; 11 | 12 | typedef struct tagCell 13 | { 14 | int node_idx; 15 | int type; //0:normal,1:mark,2:wall,3:source,4:target 16 | bool inPath; 17 | bool processed; 18 | }CELL; 19 | 20 | typedef struct tagGridCell 21 | { 22 | CELL cell[N_SCALE][N_SCALE]; 23 | }GRID_CELL; 24 | 25 | typedef struct tagGridInit 26 | { 27 | int n; 28 | int grid[N_SCALE][N_SCALE]; 29 | }GRID_INIT; 30 | 31 | 32 | #endif //__CELL_DEFINE_H__ 33 | -------------------------------------------------------------------------------- /code21/AStar/Dijkstra.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code21/AStar/Dijkstra.cpp -------------------------------------------------------------------------------- /code21/AStar/Dijkstra.h: -------------------------------------------------------------------------------- 1 | #ifndef __DIJKSTRA_H__ 2 | #define __DIJKSTRA_H__ 3 | 4 | #include 5 | #include 6 | #include 7 | #include "CellDef.h" 8 | 9 | const int MAX_DISTANCE = 100000; 10 | const int N_NODE = N_SCALE * N_SCALE; 11 | 12 | typedef struct tagGNode 13 | { 14 | int i; 15 | int j; 16 | }GNODE; 17 | 18 | typedef struct tagDijkstraGraph 19 | { 20 | std::vector nodes; 21 | int adj[N_NODE][N_NODE]; 22 | int prev[N_NODE]; 23 | int dist[N_NODE]; 24 | int source; 25 | int target; 26 | }DIJKSTRA_GRAPH; 27 | 28 | void DijkstraGraphFromGridDef(DIJKSTRA_GRAPH *graph, GRID_CELL *gc, GRID_INIT *gi); 29 | void Dijkstra(DIJKSTRA_GRAPH *graph, GRID_CELL *gc); 30 | 31 | #endif //__DIJKSTRA_H__ 32 | -------------------------------------------------------------------------------- /code21/AStar/Function.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include "Function.h" 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /code21/AStar/Function.h: -------------------------------------------------------------------------------- 1 | #ifndef __FUNCTION_H__ 2 | #define __FUNCTION_H__ 3 | 4 | #define COUNT_OF(x) (sizeof(x) / sizeof(x[0])) 5 | 6 | typedef struct tagVecrot 7 | { 8 | int x; 9 | int y; 10 | }VECTOR; 11 | 12 | 13 | 14 | #endif //__FUNCTION_H__ 15 | -------------------------------------------------------------------------------- /code21/AStar/res/AStar.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code21/AStar/res/AStar.ico -------------------------------------------------------------------------------- /code21/AStar/res/AStar.rc2: -------------------------------------------------------------------------------- 1 | // 2 | // AStar.RC2 - resources Microsoft Visual C++ does not edit directly 3 | // 4 | 5 | #ifdef APSTUDIO_INVOKED 6 | #error this file is not editable by Microsoft Visual C++ 7 | #endif //APSTUDIO_INVOKED 8 | 9 | 10 | ///////////////////////////////////////////////////////////////////////////// 11 | // Add manually edited resources here... 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | -------------------------------------------------------------------------------- /code21/AStar/stdafx.cpp: -------------------------------------------------------------------------------- 1 | 2 | // stdafx.cpp : source file that includes just the standard includes 3 | // AStar.pch will be the pre-compiled header 4 | // stdafx.obj will contain the pre-compiled type information 5 | 6 | #include "stdafx.h" 7 | 8 | 9 | -------------------------------------------------------------------------------- /code22/russia/data_def.h: -------------------------------------------------------------------------------- 1 | #ifndef __DATA_DEF_H__ 2 | #define __DATA_DEF_H__ 3 | 4 | #include "type_def.h" 5 | 6 | 7 | extern char shape_char[]; 8 | 9 | extern R_SHAPE g_shapes[]; 10 | 11 | 12 | #endif //__DATA_DEF_H__ -------------------------------------------------------------------------------- /code22/russia/evaluate.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code22/russia/evaluate.cpp -------------------------------------------------------------------------------- /code22/russia/evaluate.h: -------------------------------------------------------------------------------- 1 | #ifndef __EVALUATE_H__ 2 | #define __EVALUATE_H__ 3 | 4 | #include "type_def.h" 5 | 6 | bool IsFullRowStatus(RUSSIA_GAME *game, int row); 7 | 8 | int GetLandingHeight(RUSSIA_GAME *game, B_SHAPE *bs, int row, int col); 9 | int GetErodedPieceCellsMetric(RUSSIA_GAME *game, B_SHAPE *bs, int row, int col); 10 | int GetBoardRowTransitions(RUSSIA_GAME *game, B_SHAPE *bs, int row, int col); 11 | int GetBoardColTransitions(RUSSIA_GAME *game, B_SHAPE *bs, int row, int col); 12 | int GetBoardBuriedHoles(RUSSIA_GAME *game, B_SHAPE *bs, int row, int col); 13 | int GetBoardWells(RUSSIA_GAME *game, B_SHAPE *bs, int row, int col); 14 | 15 | int EvaluateFunction(RUSSIA_GAME *game, B_SHAPE *bs, int row, int col); 16 | int PrioritySelection(RUSSIA_GAME *game, B_SHAPE* bs, int row, int col); 17 | 18 | 19 | #endif //__EVALUATE_H__ -------------------------------------------------------------------------------- /code22/russia/russia.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code22/russia/russia.cpp -------------------------------------------------------------------------------- /code22/russia/russia.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code22/russia/russia.suo -------------------------------------------------------------------------------- /code22/russia/russia.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /code22/russia/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // russia.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code22/russia/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /code22/russia/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code22/russia/type_def.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code22/russia/type_def.h -------------------------------------------------------------------------------- /code23/fir/AlphaBetaSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/AlphaBetaSearcher.cpp -------------------------------------------------------------------------------- /code23/fir/AlphaBetaSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class AlphaBetaSearcher : public Searcher 6 | { 7 | public: 8 | AlphaBetaSearcher(void); 9 | virtual ~AlphaBetaSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int AlphaBeta(GameState& state, int depth, int alpha, int beta, int max_player_id); 19 | }; 20 | -------------------------------------------------------------------------------- /code23/fir/ComputerPlayer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "player.h" 6 | #include "Searcher.h" 7 | 8 | class ComputerPlayer : public Player 9 | { 10 | public: 11 | ComputerPlayer(void); 12 | ComputerPlayer(const std::string& name); 13 | virtual ~ComputerPlayer(void); 14 | 15 | virtual int GetNextPosition(); 16 | Searcher* SetSearcher(Searcher* searcher, int depth); 17 | 18 | protected: 19 | Searcher* m_searcher; 20 | int m_depth; 21 | }; 22 | -------------------------------------------------------------------------------- /code23/fir/Copy of GameConst.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const int GAME_ROW = 15; 4 | const int GAME_COL = 15; 5 | const int GAME_CELLS = 225; 6 | 7 | 8 | const int BOARD_START = 17; 9 | const int BOARD_COL = 16; 10 | const int BOARD_CELLS = 273; 11 | 12 | const int INFINITY = 10000; 13 | const int DRAW = 0; 14 | 15 | typedef char CellType; 16 | 17 | const CellType CELL_EMPTY = '-'; 18 | const CellType CELL_O = 'o'; 19 | const CellType CELL_X = 'x'; 20 | 21 | 22 | const int PLAYER_TYPE = 3; 23 | 24 | const int PLAYER_NULL = 0; 25 | const int PLAYER_A = 1; 26 | const int PLAYER_B = 2; 27 | const int DUMMY = 3; 28 | 29 | #define BOARD_CELL(row, col) ((col - 1) + 17 + (row - 1) * 16) 30 | -------------------------------------------------------------------------------- /code23/fir/Copy of GameState.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/Copy of GameState.cpp -------------------------------------------------------------------------------- /code23/fir/Evaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GameState; 4 | 5 | class Evaluator 6 | { 7 | protected: 8 | Evaluator(void) 9 | { 10 | } 11 | 12 | public: 13 | virtual ~Evaluator(void) 14 | { 15 | } 16 | 17 | virtual int Evaluate(GameState& state, int max_player_id) = NULL; 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /code23/fir/EvaluatorData.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "EvaluatorData.h" 3 | #include "Support.h" 4 | 5 | 6 | 7 | EvaluatorData::EvaluatorData(void) 8 | { 9 | memset(m_counter, 0, sizeof(int) * 2 * 7); 10 | } 11 | 12 | EvaluatorData::~EvaluatorData(void) 13 | { 14 | } 15 | 16 | void EvaluatorData::IncreaseCounter(int rl_count, int player_id, bool bClose) 17 | { 18 | int player_idx = player_id - 1; 19 | int type_base = (rl_count - 2) * 2; 20 | if(rl_count != 5) 21 | { 22 | type_base += (bClose ? 0 : 1); 23 | } 24 | m_counter[player_idx][type_base]++; 25 | } 26 | 27 | int EvaluatorData::GetCounter(int rl_count, int player_id, bool bClose) 28 | { 29 | int player_idx = player_id - 1; 30 | int type_base = (rl_count - 2) * 2; 31 | if(rl_count != 5) 32 | { 33 | type_base += (bClose ? 0 : 1); 34 | } 35 | return m_counter[player_idx][type_base]; 36 | } 37 | 38 | -------------------------------------------------------------------------------- /code23/fir/EvaluatorData.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const int C_TWO = 0; 4 | const int H_TWO = 1; 5 | const int C_THREE = 2; 6 | const int H_THREE = 3; 7 | const int C_FOUR = 4; 8 | const int H_FOUR = 5; 9 | const int S_FIVE = 6; 10 | 11 | class EvaluatorData 12 | { 13 | public: 14 | EvaluatorData(void); 15 | ~EvaluatorData(void); 16 | 17 | void IncreaseCounter(int rl_count, int player_id, bool bClose); 18 | int GetCounter(int rl_count, int player_id, bool bClose); 19 | protected: 20 | int m_counter[2][7]; 21 | }; 22 | -------------------------------------------------------------------------------- /code23/fir/GameConst.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const int GAME_ROW = 9; 4 | const int GAME_COL = 9; 5 | const int GAME_CELLS = 81; 6 | 7 | 8 | const int BOARD_START = 11; 9 | const int BOARD_COL = 10; 10 | const int BOARD_CELLS = 111; 11 | 12 | const int INFINITY = 10000; 13 | const int DRAW = 0; 14 | 15 | typedef char CellType; 16 | 17 | const CellType CELL_EMPTY = '-'; 18 | const CellType CELL_O = 'o'; 19 | const CellType CELL_X = 'x'; 20 | 21 | 22 | const int PLAYER_TYPE = 3; 23 | 24 | const int PLAYER_NULL = 0; 25 | const int PLAYER_A = 1; 26 | const int PLAYER_B = 2; 27 | const int DUMMY = 3; 28 | 29 | #define BOARD_CELL(row, col) ((col - 1) + 11 + (row - 1) * 10) 30 | -------------------------------------------------------------------------------- /code23/fir/GameControl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameState.h" 4 | #include "Searcher.h" 5 | #include "Player.h" 6 | #include 7 | 8 | 9 | class GameControl 10 | { 11 | public: 12 | GameControl(void); 13 | ~GameControl(void); 14 | 15 | void SetPlayer(Player *player, int player_id); 16 | Player* GetPlayer(int player_id); 17 | void InitGameState(const GameState& state); 18 | void Run(); 19 | 20 | protected: 21 | GameState m_gameState; 22 | std::map m_players; 23 | }; 24 | -------------------------------------------------------------------------------- /code23/fir/GameState.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/GameState.cpp -------------------------------------------------------------------------------- /code23/fir/HumanPlayer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "player.h" 5 | 6 | class HumanPlayer : public Player 7 | { 8 | public: 9 | HumanPlayer(void); 10 | HumanPlayer(const std::string& name); 11 | virtual ~HumanPlayer(void); 12 | 13 | virtual int GetNextPosition(); 14 | }; 15 | -------------------------------------------------------------------------------- /code23/fir/MinimaxSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/MinimaxSearcher.cpp -------------------------------------------------------------------------------- /code23/fir/MinimaxSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class MinimaxSearcher : public Searcher 6 | { 7 | public: 8 | MinimaxSearcher(void); 9 | virtual ~MinimaxSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int MiniMax(GameState& state, int depth, int max_player_id); 19 | }; 20 | -------------------------------------------------------------------------------- /code23/fir/NegamaxAlphaBetaSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/NegamaxAlphaBetaSearcher.cpp -------------------------------------------------------------------------------- /code23/fir/NegamaxAlphaBetaSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class NegamaxAlphaBetaSearcher : public Searcher 6 | { 7 | public: 8 | NegamaxAlphaBetaSearcher(void); 9 | virtual ~NegamaxAlphaBetaSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int EvaluateNegaMax(GameState& state, int max_player_id); 19 | int NegaMax(GameState& state, int depth, int alpha, int beta, int max_player_id); 20 | }; 21 | -------------------------------------------------------------------------------- /code23/fir/NegamaxSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class NegamaxSearcher : public Searcher 6 | { 7 | public: 8 | NegamaxSearcher(void); 9 | virtual ~NegamaxSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int EvaluateNegaMax(GameState& state, int max_player_id); 19 | //int NegaMax(CGameState& state, int depth); 20 | int NegaMax(GameState& state, int depth, int color, int max_player_id); 21 | }; 22 | -------------------------------------------------------------------------------- /code23/fir/OdEvaluator.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "OdEvaluator.h" 3 | #include "GameState.h" 4 | #include "Support.h" 5 | 6 | 7 | OdEvaluator::OdEvaluator(void) 8 | { 9 | } 10 | 11 | OdEvaluator::~OdEvaluator(void) 12 | { 13 | } 14 | 15 | int OdEvaluator::Evaluate(GameState& state, int max_player_id) 16 | { 17 | int min = GetPeerPlayer(max_player_id); 18 | /* 19 | int ev = (state.CountPosValue(max_player_id) - state.CountPosValue(min)) * 2; 20 | ev += (state.CountMobility(max_player_id) - state.CountMobility(min)) * 7; 21 | */ 22 | return 0; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /code23/fir/OdEvaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "evaluator.h" 3 | 4 | class OdEvaluator : public Evaluator 5 | { 6 | public: 7 | OdEvaluator(void); 8 | virtual ~OdEvaluator(void); 9 | 10 | virtual int Evaluate(GameState& state, int max_player_id); 11 | 12 | protected: 13 | }; 14 | -------------------------------------------------------------------------------- /code23/fir/Player.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class GameState; 6 | 7 | class Player 8 | { 9 | protected: 10 | Player(void) 11 | { 12 | } 13 | 14 | public: 15 | virtual ~Player(void) 16 | { 17 | } 18 | 19 | virtual int GetNextPosition() = NULL; 20 | std::string GetPlayerName() { return m_playerName; }; 21 | void SetPlayerName(const std::string& name) { m_playerName = name; }; 22 | int GetPlayerId() { return m_playerId; }; 23 | void SetPlayerId(int id) { m_playerId = id; }; 24 | GameState* GetGameState() { return m_state; }; 25 | void SetGameState(GameState* state) { m_state = state; }; 26 | 27 | protected: 28 | int m_playerId; 29 | std::string m_playerName; 30 | GameState *m_state; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /code23/fir/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/ReadMe.txt -------------------------------------------------------------------------------- /code23/fir/Searcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameState.h" 4 | 5 | class Searcher 6 | { 7 | public: 8 | virtual int SearchBestPlay(const GameState& state, int depth) = 0; 9 | }; 10 | -------------------------------------------------------------------------------- /code23/fir/Support.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/Support.cpp -------------------------------------------------------------------------------- /code23/fir/Support.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameConst.h" 4 | 5 | #define COUNT_OF(x) (sizeof(x)/sizeof(x[0])) 6 | 7 | const int MAX_FORBIDDEN_PATTERN = 12; 8 | 9 | typedef struct tagForbiddenItem 10 | { 11 | int off_inc[MAX_FORBIDDEN_PATTERN]; 12 | int off_cnt; 13 | }FORBIDDEN_ITEM; 14 | 15 | extern FORBIDDEN_ITEM forbidden_patterns[4]; 16 | 17 | const int MAX_LINE_S = 9; 18 | 19 | typedef struct tagLines 20 | { 21 | int line_s[MAX_LINE_S]; 22 | int off_dir; 23 | }LINES; 24 | 25 | extern LINES line_cpts[4]; 26 | 27 | 28 | inline int GetPeerPlayer(int player_id) { return (player_id == PLAYER_A) ? PLAYER_B : PLAYER_A; }; 29 | 30 | -------------------------------------------------------------------------------- /code23/fir/TranspositionTable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const int TT_FLAG_EXACT = 1; 4 | const int TT_FLAG_LOWERBOUND = 2; 5 | const int TT_FLAG_UPPERBOUND = 3; 6 | 7 | typedef struct tagTranspositionTblEntry 8 | { 9 | int flag; 10 | int depth; 11 | int value; 12 | }TT_ENTRY; 13 | 14 | void InitTranspositionTable(); 15 | void ResetTranspositionTable(); 16 | bool LookupTranspositionTable(unsigned int hash, TT_ENTRY& ttEntry); 17 | void StoreTranspositionTable(unsigned int hash, TT_ENTRY& ttEntry); 18 | -------------------------------------------------------------------------------- /code23/fir/WzEvaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Evaluator.h" 4 | 5 | class WzEvaluator : public Evaluator 6 | { 7 | public: 8 | WzEvaluator(void); 9 | virtual ~WzEvaluator(void); 10 | 11 | virtual int Evaluate(GameState& state, int max_player_id); 12 | 13 | protected: 14 | }; 15 | -------------------------------------------------------------------------------- /code23/fir/ZobristHash.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "ZobristHash.h" 3 | 4 | static bool zobristHashInit = false; 5 | 6 | static ZOBRIST_HASH zob_hash; 7 | 8 | void InitZobristHashTbl() 9 | { 10 | srand((unsigned)time(NULL)); 11 | 12 | for(int i = 0; i < GAME_CELLS; i++) 13 | { 14 | for(int j = 0; j < PLAYER_TYPE; j++) 15 | { 16 | zob_hash.key[i][j] = rand() | ((unsigned int)rand() << 15); 17 | } 18 | } 19 | zobristHashInit = true; 20 | } 21 | 22 | ZOBRIST_HASH *GetZobristHashTbl() 23 | { 24 | assert(zobristHashInit); 25 | 26 | return &zob_hash; 27 | } 28 | -------------------------------------------------------------------------------- /code23/fir/ZobristHash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameConst.h" 4 | 5 | typedef struct tagZobristHash 6 | { 7 | unsigned int key[GAME_CELLS][PLAYER_TYPE]; 8 | }ZOBRIST_HASH; 9 | 10 | 11 | void InitZobristHashTbl(); 12 | ZOBRIST_HASH *GetZobristHashTbl(); 13 | 14 | -------------------------------------------------------------------------------- /code23/fir/fir.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/fir.cpp -------------------------------------------------------------------------------- /code23/fir/fir.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/fir.suo -------------------------------------------------------------------------------- /code23/fir/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // othello.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code23/fir/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | 22 | 23 | 24 | // TODO: reference additional headers your program requires here 25 | -------------------------------------------------------------------------------- /code23/fir/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code23/fir/testAnalysis.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/fir/testAnalysis.cpp -------------------------------------------------------------------------------- /code23/fir/testAnalysis.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | void TestStateAnalysis(); -------------------------------------------------------------------------------- /code23/othello/AlphaBetaSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/AlphaBetaSearcher.cpp -------------------------------------------------------------------------------- /code23/othello/AlphaBetaSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class AlphaBetaSearcher : public Searcher 6 | { 7 | public: 8 | AlphaBetaSearcher(void); 9 | virtual ~AlphaBetaSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int AlphaBeta(GameState& state, int depth, int alpha, int beta, int max_player_id); 19 | }; 20 | -------------------------------------------------------------------------------- /code23/othello/ComputerPlayer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "player.h" 6 | #include "Searcher.h" 7 | 8 | class ComputerPlayer : public Player 9 | { 10 | public: 11 | ComputerPlayer(void); 12 | ComputerPlayer(const std::string& name); 13 | virtual ~ComputerPlayer(void); 14 | 15 | virtual int GetNextPosition(); 16 | Searcher* SetSearcher(Searcher* searcher, int depth); 17 | 18 | protected: 19 | Searcher* m_searcher; 20 | int m_depth; 21 | }; 22 | -------------------------------------------------------------------------------- /code23/othello/Evaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GameState; 4 | 5 | class Evaluator 6 | { 7 | protected: 8 | Evaluator(void) 9 | { 10 | } 11 | 12 | public: 13 | virtual ~Evaluator(void) 14 | { 15 | } 16 | 17 | virtual int Evaluate(GameState& state, int max_player_id) = NULL; 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /code23/othello/GameConst.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const int GAME_ROW = 8; 4 | const int GAME_COL = 8; 5 | const int GAME_CELLS = 64; 6 | 7 | 8 | const int BOARD_ROW = 10; 9 | const int BOARD_COL = 9; 10 | const int BOARD_CELLS = 91; 11 | 12 | const int INFINITY = 10000; 13 | const int DRAW = 0; 14 | 15 | typedef char CellType; 16 | 17 | const CellType CELL_EMPTY = '-'; 18 | const CellType CELL_O = 'o'; 19 | const CellType CELL_X = 'x'; 20 | 21 | 22 | const int PLAYER_TYPE = 3; 23 | 24 | const int PLAYER_NULL = 0; 25 | const int PLAYER_A = 1; 26 | const int PLAYER_B = 2; 27 | const int DUMMY = 3; 28 | 29 | #define BOARD_CELL(row, col) ((col - 1) + 10 + (row - 1) * 9) 30 | -------------------------------------------------------------------------------- /code23/othello/GameControl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameState.h" 4 | #include "Searcher.h" 5 | #include "Player.h" 6 | #include 7 | 8 | 9 | class GameControl 10 | { 11 | public: 12 | GameControl(void); 13 | ~GameControl(void); 14 | 15 | void SetPlayer(Player *player, int player_id); 16 | Player* GetPlayer(int player_id); 17 | void InitGameState(const GameState& state); 18 | void Run(); 19 | 20 | protected: 21 | GameState m_gameState; 22 | std::map m_players; 23 | }; 24 | -------------------------------------------------------------------------------- /code23/othello/GameState.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/GameState.cpp -------------------------------------------------------------------------------- /code23/othello/HumanPlayer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "player.h" 5 | 6 | class HumanPlayer : public Player 7 | { 8 | public: 9 | HumanPlayer(void); 10 | HumanPlayer(const std::string& name); 11 | virtual ~HumanPlayer(void); 12 | 13 | virtual int GetNextPosition(); 14 | }; 15 | -------------------------------------------------------------------------------- /code23/othello/MinimaxSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/MinimaxSearcher.cpp -------------------------------------------------------------------------------- /code23/othello/MinimaxSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class MinimaxSearcher : public Searcher 6 | { 7 | public: 8 | MinimaxSearcher(void); 9 | virtual ~MinimaxSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int MiniMax(GameState& state, int depth, int max_player_id); 19 | }; 20 | -------------------------------------------------------------------------------- /code23/othello/NegamaxAlphaBetaSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/NegamaxAlphaBetaSearcher.cpp -------------------------------------------------------------------------------- /code23/othello/NegamaxAlphaBetaSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class NegamaxAlphaBetaSearcher : public Searcher 6 | { 7 | public: 8 | NegamaxAlphaBetaSearcher(void); 9 | virtual ~NegamaxAlphaBetaSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int EvaluateNegaMax(GameState& state, int max_player_id); 19 | int NegaMax(GameState& state, int depth, int alpha, int beta, int max_player_id); 20 | }; 21 | -------------------------------------------------------------------------------- /code23/othello/NegamaxSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class NegamaxSearcher : public Searcher 6 | { 7 | public: 8 | NegamaxSearcher(void); 9 | virtual ~NegamaxSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int EvaluateNegaMax(GameState& state, int max_player_id); 19 | //int NegaMax(CGameState& state, int depth); 20 | int NegaMax(GameState& state, int depth, int color, int max_player_id); 21 | }; 22 | -------------------------------------------------------------------------------- /code23/othello/OdEvaluator.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "OdEvaluator.h" 3 | #include "GameState.h" 4 | #include "Support.h" 5 | 6 | 7 | OdEvaluator::OdEvaluator(void) 8 | { 9 | } 10 | 11 | OdEvaluator::~OdEvaluator(void) 12 | { 13 | } 14 | 15 | int OdEvaluator::Evaluate(GameState& state, int max_player_id) 16 | { 17 | int min = GetPeerPlayer(max_player_id); 18 | 19 | int ev = (state.CountPosValue(max_player_id) - state.CountPosValue(min)) * 2; 20 | ev += (state.CountMobility(max_player_id) - state.CountMobility(min)) * 7; 21 | 22 | return ev; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /code23/othello/OdEvaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "evaluator.h" 3 | 4 | class OdEvaluator : public Evaluator 5 | { 6 | public: 7 | OdEvaluator(void); 8 | virtual ~OdEvaluator(void); 9 | 10 | virtual int Evaluate(GameState& state, int max_player_id); 11 | 12 | protected: 13 | }; 14 | -------------------------------------------------------------------------------- /code23/othello/Player.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class GameState; 6 | 7 | class Player 8 | { 9 | protected: 10 | Player(void) 11 | { 12 | } 13 | 14 | public: 15 | virtual ~Player(void) 16 | { 17 | } 18 | 19 | virtual int GetNextPosition() = NULL; 20 | std::string GetPlayerName() { return m_playerName; }; 21 | void SetPlayerName(const std::string& name) { m_playerName = name; }; 22 | int GetPlayerId() { return m_playerId; }; 23 | void SetPlayerId(int id) { m_playerId = id; }; 24 | GameState* GetGameState() { return m_state; }; 25 | void SetGameState(GameState* state) { m_state = state; }; 26 | 27 | protected: 28 | int m_playerId; 29 | std::string m_playerName; 30 | GameState *m_state; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /code23/othello/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/ReadMe.txt -------------------------------------------------------------------------------- /code23/othello/Searcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameState.h" 4 | 5 | class Searcher 6 | { 7 | public: 8 | virtual int SearchBestPlay(const GameState& state, int depth) = 0; 9 | }; 10 | -------------------------------------------------------------------------------- /code23/othello/Support.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/Support.cpp -------------------------------------------------------------------------------- /code23/othello/Support.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameConst.h" 4 | 5 | const int LINE_DIRECTION = 8; 6 | const int LINE_CELLS = 3; 7 | 8 | extern int line_idx_tbl[LINE_DIRECTION][LINE_CELLS]; 9 | 10 | inline int GetPeerPlayer(int player_id) { return (player_id == PLAYER_A) ? PLAYER_B : PLAYER_A; }; 11 | 12 | -------------------------------------------------------------------------------- /code23/othello/TranspositionTable.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const int TT_FLAG_EXACT = 1; 4 | const int TT_FLAG_LOWERBOUND = 2; 5 | const int TT_FLAG_UPPERBOUND = 3; 6 | 7 | typedef struct tagTranspositionTblEntry 8 | { 9 | int flag; 10 | int depth; 11 | int value; 12 | }TT_ENTRY; 13 | 14 | void InitTranspositionTable(); 15 | void ResetTranspositionTable(); 16 | bool LookupTranspositionTable(unsigned int hash, TT_ENTRY& ttEntry); 17 | void StoreTranspositionTable(unsigned int hash, TT_ENTRY& ttEntry); 18 | -------------------------------------------------------------------------------- /code23/othello/WzEvaluator.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/WzEvaluator.cpp -------------------------------------------------------------------------------- /code23/othello/WzEvaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Evaluator.h" 4 | 5 | class WzEvaluator : public Evaluator 6 | { 7 | public: 8 | WzEvaluator(void); 9 | virtual ~WzEvaluator(void); 10 | 11 | virtual int Evaluate(GameState& state, int max_player_id); 12 | 13 | protected: 14 | }; 15 | -------------------------------------------------------------------------------- /code23/othello/ZobristHash.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | #include "ZobristHash.h" 3 | 4 | static bool zobristHashInit = false; 5 | 6 | static ZOBRIST_HASH zob_hash; 7 | 8 | void InitZobristHashTbl() 9 | { 10 | srand((unsigned)time(NULL)); 11 | 12 | for(int i = 0; i < GAME_CELLS; i++) 13 | { 14 | for(int j = 0; j < PLAYER_TYPE; j++) 15 | { 16 | zob_hash.key[i][j] = rand() | ((unsigned int)rand() << 15); 17 | } 18 | } 19 | zobristHashInit = true; 20 | } 21 | 22 | ZOBRIST_HASH *GetZobristHashTbl() 23 | { 24 | assert(zobristHashInit); 25 | 26 | return &zob_hash; 27 | } 28 | -------------------------------------------------------------------------------- /code23/othello/ZobristHash.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameConst.h" 4 | 5 | typedef struct tagZobristHash 6 | { 7 | unsigned int key[GAME_CELLS][PLAYER_TYPE]; 8 | }ZOBRIST_HASH; 9 | 10 | 11 | void InitZobristHashTbl(); 12 | ZOBRIST_HASH *GetZobristHashTbl(); 13 | 14 | -------------------------------------------------------------------------------- /code23/othello/othello.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/othello.cpp -------------------------------------------------------------------------------- /code23/othello/othello.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/othello/othello.suo -------------------------------------------------------------------------------- /code23/othello/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // othello.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code23/othello/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | 21 | 22 | // TODO: reference additional headers your program requires here 23 | -------------------------------------------------------------------------------- /code23/othello/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/AlphaBetaSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/tic-tac-toe/AlphaBetaSearcher.cpp -------------------------------------------------------------------------------- /code23/tic-tac-toe/AlphaBetaSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class AlphaBetaSearcher : public Searcher 6 | { 7 | public: 8 | AlphaBetaSearcher(void); 9 | virtual ~AlphaBetaSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int AlphaBeta(GameState& state, int depth, int alpha, int beta, int max_player_id); 19 | }; 20 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/ComputerPlayer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include "player.h" 6 | #include "Searcher.h" 7 | 8 | class ComputerPlayer : public Player 9 | { 10 | public: 11 | ComputerPlayer(void); 12 | ComputerPlayer(const std::string& name); 13 | virtual ~ComputerPlayer(void); 14 | 15 | virtual int GetNextPosition(); 16 | Searcher* SetSearcher(Searcher* searcher, int depth); 17 | 18 | protected: 19 | Searcher* m_searcher; 20 | int m_depth; 21 | }; 22 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/Evaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | class GameState; 4 | 5 | class Evaluator 6 | { 7 | protected: 8 | Evaluator(void) 9 | { 10 | } 11 | 12 | public: 13 | virtual ~Evaluator(void) 14 | { 15 | } 16 | 17 | virtual int Evaluate(GameState& state, int max_player_id) = NULL; 18 | }; 19 | 20 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/FeEvaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "evaluator.h" 3 | 4 | class FeEvaluator : public Evaluator 5 | { 6 | public: 7 | FeEvaluator(void); 8 | virtual ~FeEvaluator(void); 9 | 10 | virtual int Evaluate(GameState& state, int max_player_id); 11 | 12 | protected: 13 | void CountPlayerChess(GameState& state, int player_id, int& countOne, int& countTwo, int& countThree); 14 | }; 15 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/GameConst.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | const int BOARD_ROW = 3; 4 | const int BOARD_COL = 3; 5 | const int BOARD_CELLS = BOARD_ROW * BOARD_COL; 6 | 7 | const int INFINITY = 100; 8 | const int WIN_LEVEL = 80; 9 | const int DRAW = 0; 10 | const int DOUBLE_WEIGHT = 10; 11 | 12 | typedef char CellType; 13 | 14 | const CellType CELL_EMPTY = '-'; 15 | const CellType CELL_O = 'o'; 16 | const CellType CELL_X = 'x'; 17 | 18 | 19 | const int PLAYER_NULL = 0; 20 | const int PLAYER_A = 1; 21 | const int PLAYER_B = 2; 22 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/GameControl.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameState.h" 4 | #include "Searcher.h" 5 | #include "Player.h" 6 | #include 7 | 8 | 9 | class GameControl 10 | { 11 | public: 12 | GameControl(void); 13 | ~GameControl(void); 14 | 15 | void SetPlayer(Player *player, int player_id); 16 | Player* GetPlayer(int player_id); 17 | void InitGameState(const GameState& state); 18 | void Run(); 19 | 20 | protected: 21 | GameState m_gameState; 22 | std::map m_players; 23 | }; 24 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/HumanPlayer.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include 3 | #include 4 | #include "player.h" 5 | 6 | class HumanPlayer : public Player 7 | { 8 | public: 9 | HumanPlayer(void); 10 | HumanPlayer(const std::string& name); 11 | virtual ~HumanPlayer(void); 12 | 13 | virtual int GetNextPosition(); 14 | }; 15 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/MinimaxSearcher.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/tic-tac-toe/MinimaxSearcher.cpp -------------------------------------------------------------------------------- /code23/tic-tac-toe/MinimaxSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class MinimaxSearcher : public Searcher 6 | { 7 | public: 8 | MinimaxSearcher(void); 9 | virtual ~MinimaxSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int MiniMax(GameState& state, int depth, int max_player_id); 19 | }; 20 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/NegamaxAlphaBetaSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class NegamaxAlphaBetaSearcher : public Searcher 6 | { 7 | public: 8 | NegamaxAlphaBetaSearcher(void); 9 | virtual ~NegamaxAlphaBetaSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int EvaluateNegaMax(GameState& state, int max_player_id); 19 | int NegaMax(GameState& state, int depth, int alpha, int beta, int max_player_id); 20 | }; 21 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/NegamaxSearcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Searcher.h" 4 | 5 | class NegamaxSearcher : public Searcher 6 | { 7 | public: 8 | NegamaxSearcher(void); 9 | virtual ~NegamaxSearcher(void); 10 | 11 | virtual int SearchBestPlay(const GameState& state, int depth); 12 | 13 | #ifdef _DEBUG 14 | int _searcherCounter; 15 | #endif 16 | 17 | protected: 18 | int EvaluateNegaMax(GameState& state, int max_player_id); 19 | //int NegaMax(CGameState& state, int depth); 20 | int NegaMax(GameState& state, int depth, int color, int max_player_id); 21 | }; 22 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/Player.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class GameState; 6 | 7 | class Player 8 | { 9 | protected: 10 | Player(void) 11 | { 12 | } 13 | 14 | public: 15 | virtual ~Player(void) 16 | { 17 | } 18 | 19 | virtual int GetNextPosition() = NULL; 20 | std::string GetPlayerName() { return m_playerName; }; 21 | void SetPlayerName(const std::string& name) { m_playerName = name; }; 22 | int GetPlayerId() { return m_playerId; }; 23 | void SetPlayerId(int id) { m_playerId = id; }; 24 | GameState* GetGameState() { return m_state; }; 25 | void SetGameState(GameState* state) { m_state = state; }; 26 | 27 | protected: 28 | int m_playerId; 29 | std::string m_playerName; 30 | GameState *m_state; 31 | }; 32 | 33 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/ReadMe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/tic-tac-toe/ReadMe.txt -------------------------------------------------------------------------------- /code23/tic-tac-toe/Searcher.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameState.h" 4 | 5 | class Searcher 6 | { 7 | public: 8 | virtual int SearchBestPlay(const GameState& state, int depth) = 0; 9 | }; 10 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/Support.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/tic-tac-toe/Support.cpp -------------------------------------------------------------------------------- /code23/tic-tac-toe/Support.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "GameConst.h" 4 | 5 | const int LINE_DIRECTION = 8; 6 | const int LINE_CELLS = 3; 7 | 8 | extern int line_idx_tbl[LINE_DIRECTION][LINE_CELLS]; 9 | 10 | inline int GetPeerPlayer(int player_id) { return (player_id == PLAYER_A) ? PLAYER_B : PLAYER_A; }; 11 | 12 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/WzEvaluator.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Evaluator.h" 4 | 5 | class WzEvaluator : public Evaluator 6 | { 7 | public: 8 | WzEvaluator(void); 9 | virtual ~WzEvaluator(void); 10 | 11 | virtual int Evaluate(GameState& state, int max_player_id); 12 | 13 | protected: 14 | int CountPlayerChess(GameState& state, int player_id, int& countThree, int& countTwo); 15 | }; 16 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // tic-tac-toe.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | 19 | 20 | // TODO: reference additional headers your program requires here 21 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /code23/tic-tac-toe/tic-tac-toe.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/tic-tac-toe/tic-tac-toe.cpp -------------------------------------------------------------------------------- /code23/tic-tac-toe/tic-tac-toe.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/code23/tic-tac-toe/tic-tac-toe.suo -------------------------------------------------------------------------------- /second_edition/EasyX_static.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | E:\development\EasyX 5 | 6 | 7 | 8 | $(EASYX_ROOT)\lib\$(PlatformTarget);%(AdditionalLibraryDirectories) 9 | 10 | 11 | $(EASYX_ROOT)\include;%(AdditionalIncludeDirectories) 12 | 13 | 14 | 15 | 16 | $(EASYX_ROOT) 17 | true 18 | 19 | 20 | -------------------------------------------------------------------------------- /second_edition/code01/bw/bw.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code01/color/color.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code01/diff/diff.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code01/gray/gray.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code01/legibility/legibility.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code01/snow/CSnow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | class CSnow 5 | { 6 | friend CSnow MakeSnow(int maxWidth); 7 | protected: 8 | CSnow(int x, int y, int speed, int layers); 9 | public: 10 | CSnow(const CSnow& snow); 11 | ~CSnow(); 12 | POINT& GetPosition() { return m_pos; } 13 | const POINT& GetPosition() const { return m_pos; } 14 | int GetSpeed() const { return m_speed; } 15 | int GetLayers() const { return m_layers; } 16 | int DecreaseLayers() { return --m_layers; } 17 | void UpdatePosition(int dps = 0); 18 | protected: 19 | POINT m_pos; 20 | int m_speed; 21 | int m_layers; 22 | }; 23 | 24 | CSnow MakeSnow(int maxWidth); 25 | 26 | -------------------------------------------------------------------------------- /second_edition/code01/snow/snow.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code03/bayes/bayes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/code03/bayes/bayes.cpp -------------------------------------------------------------------------------- /second_edition/code03/bayes/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // bayes.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /second_edition/code03/bayes/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | 13 | 14 | 15 | // TODO: reference additional headers your program requires here 16 | -------------------------------------------------------------------------------- /second_edition/code03/bayes/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /second_edition/code04/max_match/max_match.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/code04/max_match/max_match.cpp -------------------------------------------------------------------------------- /second_edition/code04/max_match/max_match.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code04/max_match/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // max_match.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /second_edition/code04/max_match/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | 13 | 14 | 15 | // TODO: reference additional headers your program requires here 16 | -------------------------------------------------------------------------------- /second_edition/code04/max_match/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /second_edition/code10/bucket/bucket.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/code10/bucket/bucket.cpp -------------------------------------------------------------------------------- /second_edition/code10/bucket/bucket.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code10/token/rate_limiter.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/code10/token/rate_limiter.cpp -------------------------------------------------------------------------------- /second_edition/code10/token/rate_limiter.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class CRateLimiter 7 | { 8 | public: 9 | CRateLimiter() = delete; 10 | CRateLimiter(double permitsPerSecond, double capacity = 0.0); 11 | double Aquire(int permits = 1); 12 | bool TryAquire(int permits, int timeouts = 0); 13 | 14 | double GetPermitsRate() const; 15 | void SetPermitsRate(double permitsPerSecond); 16 | protected: 17 | virtual void resync(unsigned long long nowMicros); 18 | virtual unsigned long long reserve(double permits); 19 | 20 | private: 21 | 22 | mutable std::mutex m_mutex; 23 | double m_stableIntervalMicros; 24 | double m_maxPermits; 25 | double m_storedPermits; 26 | unsigned long long m_nextFreeTicketMicros; 27 | }; 28 | -------------------------------------------------------------------------------- /second_edition/code10/token/token.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /second_edition/code24/knn-digital/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // knn-digital.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /second_edition/code24/knn-digital/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | 13 | 14 | 15 | // TODO: reference additional headers your program requires here 16 | -------------------------------------------------------------------------------- /second_edition/code24/knn-digital/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /second_edition/code25/out.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/code25/out.wav -------------------------------------------------------------------------------- /second_edition/code25/pcm_44100_16.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/code25/pcm_44100_16.wav -------------------------------------------------------------------------------- /second_edition/code25/stre/stre.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | "E:\Alg 2\code\5\tune\voice_16_1_44100.wav" "E:\Alg 2\code\5\tune\out.wav" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /second_edition/code25/tune/PitchShift.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define M_PI 3.14159265358979323846 4 | #define MAX_FRAME_LENGTH 8192 5 | 6 | typedef struct tagPitchContext 7 | { 8 | float gInFIFO[MAX_FRAME_LENGTH]; 9 | float gOutFIFO[MAX_FRAME_LENGTH]; 10 | float gFFTworksp[2 * MAX_FRAME_LENGTH]; 11 | float gLastPhase[MAX_FRAME_LENGTH / 2 + 1]; 12 | float gSumPhase[MAX_FRAME_LENGTH / 2 + 1]; 13 | float gOutputAccum[2 * MAX_FRAME_LENGTH]; 14 | float gAnaFreq[MAX_FRAME_LENGTH]; 15 | float gAnaMagn[MAX_FRAME_LENGTH]; 16 | float gSynFreq[MAX_FRAME_LENGTH]; 17 | float gSynMagn[MAX_FRAME_LENGTH]; 18 | long gRover; 19 | }PITCH_CONTEXT; 20 | 21 | void InitPitchContext(PITCH_CONTEXT* ctx); 22 | 23 | void smbPitchShift(PITCH_CONTEXT* ctx, float pitchShift, long numSampsToProcess, long fftFrameSize, long osamp, float sampleRate, float* indata, float* outdata); 24 | -------------------------------------------------------------------------------- /second_edition/code25/tune/tune.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | "d:\Alg 2\code\5\tune\pcm_44100_16.wav" "d:\Alg 2\code\5\tune\out.wav" 5 | WindowsLocalDebugger 6 | 7 | -------------------------------------------------------------------------------- /second_edition/测试数据/0-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/0-8000-mono.wav -------------------------------------------------------------------------------- /second_edition/测试数据/0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/0.wav -------------------------------------------------------------------------------- /second_edition/测试数据/1-1.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/1-1.wav -------------------------------------------------------------------------------- /second_edition/测试数据/1-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/1-8000-mono.wav -------------------------------------------------------------------------------- /second_edition/测试数据/2-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/2-8000-mono.wav -------------------------------------------------------------------------------- /second_edition/测试数据/2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/2.wav -------------------------------------------------------------------------------- /second_edition/测试数据/6-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/6-8000-mono.wav -------------------------------------------------------------------------------- /second_edition/测试数据/6.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/6.wav -------------------------------------------------------------------------------- /second_edition/测试数据/7-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/7-8000-mono.wav -------------------------------------------------------------------------------- /second_edition/测试数据/7.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/7.wav -------------------------------------------------------------------------------- /second_edition/测试数据/8-8000-mono.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/8-8000-mono.wav -------------------------------------------------------------------------------- /second_edition/测试数据/8.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/8.wav -------------------------------------------------------------------------------- /second_edition/测试数据/9-2.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/9-2.wav -------------------------------------------------------------------------------- /second_edition/测试数据/pcm_44100_16.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/inte2000/code_for_algo_book/95a3f898e41b317c6f6c8d92fedc881dbc0e77c5/second_edition/测试数据/pcm_44100_16.wav --------------------------------------------------------------------------------