diff --git a/README.md b/README.md index f51f41c91..cd4609492 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Unfortunately, this means that we will probably never cover every algorithm ever That said, we'll still cover a few algorithms for fun that have very little, if any practical purpose. If you would like to contribute, feel free to go to any chapter with code associated with it and implement that algorithm in your favorite language, -and then submit the code via pull request, following the submission guidelines found in `chapters/how_to_contribute.md` (or [here](chapters/how_to_contribute.md) if you are reading this on gitbook). +and then submit the code via pull request, following the submission guidelines found in `chapters/how_to_contribute.md` (or [here](chapters/introduction/how_to_contribute.md) if you are reading this on gitbook). Hopefully, this project will grow and allow individuals to learn about and try their hand at implementing different algorithms for fun and (potentially) useful projects. If nothing else, it will be an enjoyable adventure for our community. diff --git a/SUMMARY.md b/SUMMARY.md index bf7a251f1..bbdad28a5 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -2,9 +2,9 @@ * [Algorithm Archive](README.md) * [TODO](TODO.md) -* [Introduction](chapters/introduction.md) -* [A Personal Note](chapters/getting_started.md) -* [How To Contribute](chapters/how_to_contribute.md) +* [Introduction](chapters/introduction/introduction.md) +* [A Personal Note](chapters/introduction/my_introduction_to_hobby_programming.md) +* [How To Contribute](chapters/introduction/how_to_contribute.md) * [Principles of Code](chapters/principles_of_code/principles_of_code.md) * [Choosing A Language](chapters/principles_of_code/choosing_a_language/choosing_a_language.md) * [Compiled Languages](chapters/principles_of_code/choosing_a_language/compiled/compiled.md) @@ -20,35 +20,34 @@ * [Bit Logic](chapters/principles_of_code/building_blocks/bitlogic.md) * [Version Control](chapters/principles_of_code/version_control.md) * [Complexity Notation](chapters/principles_of_code/notation/notation.md) -* [Convolutions](chapters/convolutions/convolutions.md) -* [Taylor Series](chapters/taylor/taylor_series.md) -* [Sorting and Searching](chapters/sorting_searching/sorting_searching.md) - * [Bubble Sort](chapters/sorting_searching/bubble/bubble_sort.md) - * [Bogo Sort](chapters/sorting_searching/bogo/bogo_sort.md) -* [Tree Traversal](chapters/tree_traversal/tree_traversal.md) -* [Euclidean Algorithm](chapters/euclidean_algorithm/euclidean.md) -* [Multiplication](chapters/multiplication/multiplication.md) -* [Monte Carlo](chapters/monte_carlo/monte_carlo.md) -* [Matrix Methods](chapters/matrix_methods/matrix_methods.md) - * [Gaussian Elimination](chapters/matrix_methods/gaussian_elimination/gaussian_elimination.md) - * [Thomas Algorithm](chapters/matrix_methods/thomas/thomas.md) -* [Computational Geometry](chapters/computational_geometry/computational_geometry.md) - * [Gift Wrapping](chapters/computational_geometry/gift_wrapping/gift_wrapping.md) - * [Jarvis March](chapters/computational_geometry/gift_wrapping/jarvis_march/jarvis_march.md) - * [Graham Scan](chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md) - * [Chan's Algorithm](chapters/computational_geometry/gift_wrapping/chan/chans.md) -* [FFT](chapters/FFT/cooley_tukey.md) -* [Decision Problems](chapters/decision_problems/decision_problems.md) - * [Stable Marriage Problem](chapters/decision_problems/stable_marriage/stable_marriage.md) -* [Differential Equation Solvers](chapters/differential_equations/differential_equations.md) - * [Forward Euler Method](chapters/differential_equations/euler/euler.md) - * [Backward Euler Methods](chapters/differential_equations/euler/backward_euler.md) - * [Runge Kutta](chapters/differential_equations/runge_kutta/runge_kutta.md) -* [Physics Solvers](chapters/physics_solvers/physics_solvers.md) - * [Verlet Integration](chapters/physics_solvers/verlet/verlet.md) - * [Barnes-Hut](chapters/physics_solvers/barnes_hut.md) - * [Quantum Systems](chapters/physics_solvers/quantum/quantum.md) - * [Split-Operator Method](chapters/physics_solvers/quantum/split-op/split-op.md) -* [Data Compression](chapters/data_compression/data_compression.md) - * [Huffman Encoding](chapters/data_compression/huffman/huffman.md) -* [Quantum Information](chapters/QI/QI.md) +* [Convolutions](chapters/algorithms/convolutions/convolutions.md) +* [Taylor Series](chapters/general/taylor_series_expansion/taylor_series_expansion.md) +* [Sorting and Searching](chapters/general/sorting_and_searching/sorting_and_searching.md) + * [Bubble Sort](chapters/algorithms/bubble_sort/bubble_sort.md) + * [Bogo Sort](chapters/algorithms/bogo_sort/bogo_sort.md) +* [Tree Traversal](chapters/algorithms/tree_traversal/tree_traversal.md) +* [Euclidean Algorithm](chapters/algorithms/euclidean_algorithm/euclidean_algorithm.md) +* [Multiplication](chapters/general/multiplication/multiplication.md) +* [Monte Carlo](chapters/algorithms/monte_carlo_integration/monte_carlo_integration.md) +* [Matrix Methods](chapters/general/matrix_methods/matrix_methods.md) + * [Gaussian Elimination](chapters/algorithms/gaussian_elimination/gaussian_elimination.md) + * [Thomas Algorithm](chapters/algorithms/thomas_algorithm/thomas_algorithm.md) +* [Computational Geometry](chapters/general/computational_geometry/computational_geometry.md) + * [Gift Wrapping](chapters/general/gift_wrapping/gift_wrapping.md) + * [Jarvis March](chapters/algorithms/jarvis_march/jarvis_march.md) + * [Graham Scan](chapters/algorithms/graham_scan/graham_scan.md) + * [Chan's Algorithm](chapters/algorithms/chans_algorithm/chans_algorithm.md) +* [FFT](chapters/algorithms/cooley_turkey/cooley_tukey.md) +* [Decision Problems](chapters/general/decision_problems/decision_problems.md) + * [Stable Marriage Problem](chapters/algorithms/stable_marriage_problem/stable_marriage_problem.md) +* [Differential Equation Solvers](chapters/general/differential_equations/differential_equations.md) + * [Forward Euler Method](chapters/algorithms/forward_euler_method/forward_euler_method.md) + * [Backward Euler Methods](chapters/algorithms/backward_euler_method/backward_euler_method.md) +* [Physics Solvers](chapters/general/physics_solvers/physics_solvers.md) + * [Verlet Integration](chapters/algorithms/verlet_integration/verlet_integration.md) + * [Barnes-Hut](chapters/algorithms/barnes_hut_algorithm/barnes_hut_algorithm.md) + * [Quantum Systems](chapters/general/quantum_systems/quantum_systems.md) + * [Split-Operator Method](chapters/algorithms/split-operator_method/split-operator_method.md) +* [Data Compression](chapters/general/data_compression/data_compression.md) + * [Huffman Encoding](chapters/algorithms/huffman_encoding/huffman_encoding.md) +* [Quantum Information](chapters/general/quantum_information/quantum_information.md) diff --git a/book.json b/book.json index 9aff20ea6..0854d85de 100644 --- a/book.json +++ b/book.json @@ -8,7 +8,8 @@ "wordcount", "api-language-selector", "include-codeblock", - "ga" + "ga", + "bulk-redirect" ], "lunr": { "maxIndexSize": 1000000000 @@ -18,6 +19,10 @@ "fixlang": true, "unindent": true }, + "bulk-redirect": { + "basepath": "/", + "redirectsFile": "redirects.json" + }, "ga": { "token": "UA-118252470-1" }, diff --git a/chapters/differential_equations/euler/backward_euler.md b/chapters/algorithms/backward_euler_method/backward_euler_method.md similarity index 80% rename from chapters/differential_equations/euler/backward_euler.md rename to chapters/algorithms/backward_euler_method/backward_euler_method.md index f415d969e..50cd34a96 100644 --- a/chapters/differential_equations/euler/backward_euler.md +++ b/chapters/algorithms/backward_euler_method/backward_euler_method.md @@ -1,6 +1,6 @@ ### Backward Euler Method -Unlike the forward Euler Method above, the backward Euler Method is an *implicit method*, which means that it results in a system of equations to solve. Luckily, we know how to solve systems of equations (*hint*: [Thomas Algorithm](../../computational_mathematics/matrix_methods/thomas/thomas.md), [Gaussian Elimination](../../computational_mathematics/matrix_methods/gaussian_elimination/gaussian_elimination.md)) +Unlike the forward Euler Method above, the backward Euler Method is an *implicit method*, which means that it results in a system of equations to solve. Luckily, we know how to solve systems of equations (*hint*: [Thomas Algorithm](../thomas_algorithm/thomas_algorithm.md), [Gaussian Elimination](../gaussian_elimination/gaussian_elimination.md)) MORE TO COME!!! diff --git a/chapters/physics_solvers/barnes_hut.md b/chapters/algorithms/barnes_hut_algorithm/barnes_hut_algorithm.md similarity index 92% rename from chapters/physics_solvers/barnes_hut.md rename to chapters/algorithms/barnes_hut_algorithm/barnes_hut_algorithm.md index 491b5bb13..038813bfe 100644 --- a/chapters/physics_solvers/barnes_hut.md +++ b/chapters/algorithms/barnes_hut_algorithm/barnes_hut_algorithm.md @@ -1,5 +1,5 @@ ##### Dependencies -* [Verlet Integration](verlet.md) +* [Verlet Integration](../verlet_integration/verlet_integration.md) # Barnes Hut Algorithm diff --git a/chapters/sorting_searching/bogo/bogo_sort.md b/chapters/algorithms/bogo_sort/bogo_sort.md similarity index 100% rename from chapters/sorting_searching/bogo/bogo_sort.md rename to chapters/algorithms/bogo_sort/bogo_sort.md diff --git a/chapters/sorting_searching/bogo/code/c++/bogosort.cpp b/chapters/algorithms/bogo_sort/code/c++/bogosort.cpp similarity index 100% rename from chapters/sorting_searching/bogo/code/c++/bogosort.cpp rename to chapters/algorithms/bogo_sort/code/c++/bogosort.cpp diff --git a/chapters/sorting_searching/bogo/code/c/bogo_sort.c b/chapters/algorithms/bogo_sort/code/c/bogo_sort.c similarity index 100% rename from chapters/sorting_searching/bogo/code/c/bogo_sort.c rename to chapters/algorithms/bogo_sort/code/c/bogo_sort.c diff --git a/chapters/sorting_searching/bogo/code/clojure/bogo.clj b/chapters/algorithms/bogo_sort/code/clojure/bogo.clj similarity index 100% rename from chapters/sorting_searching/bogo/code/clojure/bogo.clj rename to chapters/algorithms/bogo_sort/code/clojure/bogo.clj diff --git a/chapters/sorting_searching/bogo/code/csharp/BogoSort.cs b/chapters/algorithms/bogo_sort/code/csharp/BogoSort.cs similarity index 100% rename from chapters/sorting_searching/bogo/code/csharp/BogoSort.cs rename to chapters/algorithms/bogo_sort/code/csharp/BogoSort.cs diff --git a/chapters/sorting_searching/bogo/code/csharp/Program.cs b/chapters/algorithms/bogo_sort/code/csharp/Program.cs similarity index 100% rename from chapters/sorting_searching/bogo/code/csharp/Program.cs rename to chapters/algorithms/bogo_sort/code/csharp/Program.cs diff --git a/chapters/sorting_searching/bogo/code/haskell/bogoSort.hs b/chapters/algorithms/bogo_sort/code/haskell/bogoSort.hs similarity index 100% rename from chapters/sorting_searching/bogo/code/haskell/bogoSort.hs rename to chapters/algorithms/bogo_sort/code/haskell/bogoSort.hs diff --git a/chapters/sorting_searching/bogo/code/java/bogo.java b/chapters/algorithms/bogo_sort/code/java/bogo.java similarity index 100% rename from chapters/sorting_searching/bogo/code/java/bogo.java rename to chapters/algorithms/bogo_sort/code/java/bogo.java diff --git a/chapters/sorting_searching/bogo/code/javascript/bogo.js b/chapters/algorithms/bogo_sort/code/javascript/bogo.js similarity index 100% rename from chapters/sorting_searching/bogo/code/javascript/bogo.js rename to chapters/algorithms/bogo_sort/code/javascript/bogo.js diff --git a/chapters/sorting_searching/bogo/code/julia/bogo.jl b/chapters/algorithms/bogo_sort/code/julia/bogo.jl similarity index 100% rename from chapters/sorting_searching/bogo/code/julia/bogo.jl rename to chapters/algorithms/bogo_sort/code/julia/bogo.jl diff --git a/chapters/sorting_searching/bogo/code/matlab/bogosort.m b/chapters/algorithms/bogo_sort/code/matlab/bogosort.m similarity index 100% rename from chapters/sorting_searching/bogo/code/matlab/bogosort.m rename to chapters/algorithms/bogo_sort/code/matlab/bogosort.m diff --git a/chapters/sorting_searching/bogo/code/python/bogo.py b/chapters/algorithms/bogo_sort/code/python/bogo.py similarity index 100% rename from chapters/sorting_searching/bogo/code/python/bogo.py rename to chapters/algorithms/bogo_sort/code/python/bogo.py diff --git a/chapters/sorting_searching/bogo/code/rust/bogosort.rs b/chapters/algorithms/bogo_sort/code/rust/bogosort.rs similarity index 100% rename from chapters/sorting_searching/bogo/code/rust/bogosort.rs rename to chapters/algorithms/bogo_sort/code/rust/bogosort.rs diff --git a/chapters/sorting_searching/bogo/code/swift/bogosort.swift b/chapters/algorithms/bogo_sort/code/swift/bogosort.swift similarity index 100% rename from chapters/sorting_searching/bogo/code/swift/bogosort.swift rename to chapters/algorithms/bogo_sort/code/swift/bogosort.swift diff --git a/chapters/sorting_searching/bubble/bubble_sort.md b/chapters/algorithms/bubble_sort/bubble_sort.md similarity index 100% rename from chapters/sorting_searching/bubble/bubble_sort.md rename to chapters/algorithms/bubble_sort/bubble_sort.md diff --git a/chapters/sorting_searching/bubble/code/c++/bubblesort.cpp b/chapters/algorithms/bubble_sort/code/c++/bubblesort.cpp similarity index 100% rename from chapters/sorting_searching/bubble/code/c++/bubblesort.cpp rename to chapters/algorithms/bubble_sort/code/c++/bubblesort.cpp diff --git a/chapters/sorting_searching/bubble/code/c/bubble_sort.c b/chapters/algorithms/bubble_sort/code/c/bubble_sort.c similarity index 100% rename from chapters/sorting_searching/bubble/code/c/bubble_sort.c rename to chapters/algorithms/bubble_sort/code/c/bubble_sort.c diff --git a/chapters/sorting_searching/bubble/code/csharp/BubbleSort.cs b/chapters/algorithms/bubble_sort/code/csharp/BubbleSort.cs similarity index 100% rename from chapters/sorting_searching/bubble/code/csharp/BubbleSort.cs rename to chapters/algorithms/bubble_sort/code/csharp/BubbleSort.cs diff --git a/chapters/sorting_searching/bubble/code/csharp/Program.cs b/chapters/algorithms/bubble_sort/code/csharp/Program.cs similarity index 100% rename from chapters/sorting_searching/bubble/code/csharp/Program.cs rename to chapters/algorithms/bubble_sort/code/csharp/Program.cs diff --git a/chapters/sorting_searching/bubble/code/d/bubble_sort.d b/chapters/algorithms/bubble_sort/code/d/bubble_sort.d similarity index 100% rename from chapters/sorting_searching/bubble/code/d/bubble_sort.d rename to chapters/algorithms/bubble_sort/code/d/bubble_sort.d diff --git a/chapters/sorting_searching/bubble/code/go/bubbleSort.go b/chapters/algorithms/bubble_sort/code/go/bubbleSort.go similarity index 100% rename from chapters/sorting_searching/bubble/code/go/bubbleSort.go rename to chapters/algorithms/bubble_sort/code/go/bubbleSort.go diff --git a/chapters/sorting_searching/bubble/code/haskell/bubbleSort.hs b/chapters/algorithms/bubble_sort/code/haskell/bubbleSort.hs similarity index 100% rename from chapters/sorting_searching/bubble/code/haskell/bubbleSort.hs rename to chapters/algorithms/bubble_sort/code/haskell/bubbleSort.hs diff --git a/chapters/sorting_searching/bubble/code/java/bubble.java b/chapters/algorithms/bubble_sort/code/java/bubble.java similarity index 100% rename from chapters/sorting_searching/bubble/code/java/bubble.java rename to chapters/algorithms/bubble_sort/code/java/bubble.java diff --git a/chapters/sorting_searching/bubble/code/javascript/bubble.js b/chapters/algorithms/bubble_sort/code/javascript/bubble.js similarity index 100% rename from chapters/sorting_searching/bubble/code/javascript/bubble.js rename to chapters/algorithms/bubble_sort/code/javascript/bubble.js diff --git a/chapters/sorting_searching/bubble/code/julia/bubble.jl b/chapters/algorithms/bubble_sort/code/julia/bubble.jl similarity index 100% rename from chapters/sorting_searching/bubble/code/julia/bubble.jl rename to chapters/algorithms/bubble_sort/code/julia/bubble.jl diff --git a/chapters/sorting_searching/bubble/code/matlab/bubblesort.m b/chapters/algorithms/bubble_sort/code/matlab/bubblesort.m similarity index 100% rename from chapters/sorting_searching/bubble/code/matlab/bubblesort.m rename to chapters/algorithms/bubble_sort/code/matlab/bubblesort.m diff --git a/chapters/sorting_searching/bubble/code/python/bubblesort.py b/chapters/algorithms/bubble_sort/code/python/bubblesort.py similarity index 100% rename from chapters/sorting_searching/bubble/code/python/bubblesort.py rename to chapters/algorithms/bubble_sort/code/python/bubblesort.py diff --git a/chapters/sorting_searching/bubble/code/racket/bubbleSort.rkt b/chapters/algorithms/bubble_sort/code/racket/bubbleSort.rkt similarity index 100% rename from chapters/sorting_searching/bubble/code/racket/bubbleSort.rkt rename to chapters/algorithms/bubble_sort/code/racket/bubbleSort.rkt diff --git a/chapters/sorting_searching/bubble/code/rust/bubble_sort.rs b/chapters/algorithms/bubble_sort/code/rust/bubble_sort.rs similarity index 100% rename from chapters/sorting_searching/bubble/code/rust/bubble_sort.rs rename to chapters/algorithms/bubble_sort/code/rust/bubble_sort.rs diff --git a/chapters/sorting_searching/bubble/code/swift/bubblesort.swift b/chapters/algorithms/bubble_sort/code/swift/bubblesort.swift similarity index 100% rename from chapters/sorting_searching/bubble/code/swift/bubblesort.swift rename to chapters/algorithms/bubble_sort/code/swift/bubblesort.swift diff --git a/chapters/computational_geometry/gift_wrapping/chan/chans.md b/chapters/algorithms/chans_algorithm/chans_algorithm.md similarity index 100% rename from chapters/computational_geometry/gift_wrapping/chan/chans.md rename to chapters/algorithms/chans_algorithm/chans_algorithm.md diff --git a/chapters/convolutions/code/c++/convolutions.cpp b/chapters/algorithms/convolutions/code/c++/convolutions.cpp similarity index 100% rename from chapters/convolutions/code/c++/convolutions.cpp rename to chapters/algorithms/convolutions/code/c++/convolutions.cpp diff --git a/chapters/convolutions/code/c/convolutions.c b/chapters/algorithms/convolutions/code/c/convolutions.c similarity index 100% rename from chapters/convolutions/code/c/convolutions.c rename to chapters/algorithms/convolutions/code/c/convolutions.c diff --git a/chapters/convolutions/code/c/fft.h b/chapters/algorithms/convolutions/code/c/fft.h similarity index 100% rename from chapters/convolutions/code/c/fft.h rename to chapters/algorithms/convolutions/code/c/fft.h diff --git a/chapters/convolutions/code/haskell/convolution.hs b/chapters/algorithms/convolutions/code/haskell/convolution.hs similarity index 100% rename from chapters/convolutions/code/haskell/convolution.hs rename to chapters/algorithms/convolutions/code/haskell/convolution.hs diff --git a/chapters/convolutions/code/julia/conv.jl b/chapters/algorithms/convolutions/code/julia/conv.jl similarity index 100% rename from chapters/convolutions/code/julia/conv.jl rename to chapters/algorithms/convolutions/code/julia/conv.jl diff --git a/chapters/convolutions/convolutions.md b/chapters/algorithms/convolutions/convolutions.md similarity index 97% rename from chapters/convolutions/convolutions.md rename to chapters/algorithms/convolutions/convolutions.md index d3863f067..e00c7e02c 100644 --- a/chapters/convolutions/convolutions.md +++ b/chapters/algorithms/convolutions/convolutions.md @@ -61,7 +61,7 @@ Now, let me tell you about a bit of black computational magic: That is crazy! It's also incredibly hard to explain, so let me do my best. -As described in the chapter on [Fourier Transforms](chapters/FFT/cooley_tukey.md), Fourier Transforms allow programmers to move from real space to frequency space. +As described in the chapter on [Fourier Transforms](../cooley_turkey/cooley_tukey.md), Fourier Transforms allow programmers to move from real space to frequency space. When we transform a wave into frequency space, we see a single peak in frequency space related to the frequency of that wave. No matter what function we send into a Fourier Transform, the frequency-space image can be interpreted as a series of different waves with a specified frequency. diff --git a/chapters/FFT/code/c++/fft.cpp b/chapters/algorithms/cooley_turkey/code/c++/fft.cpp similarity index 100% rename from chapters/FFT/code/c++/fft.cpp rename to chapters/algorithms/cooley_turkey/code/c++/fft.cpp diff --git a/chapters/FFT/code/c/fft.c b/chapters/algorithms/cooley_turkey/code/c/fft.c similarity index 100% rename from chapters/FFT/code/c/fft.c rename to chapters/algorithms/cooley_turkey/code/c/fft.c diff --git a/chapters/FFT/code/haskell/fft.hs b/chapters/algorithms/cooley_turkey/code/haskell/fft.hs similarity index 100% rename from chapters/FFT/code/haskell/fft.hs rename to chapters/algorithms/cooley_turkey/code/haskell/fft.hs diff --git a/chapters/FFT/code/julia/fft.jl b/chapters/algorithms/cooley_turkey/code/julia/fft.jl similarity index 100% rename from chapters/FFT/code/julia/fft.jl rename to chapters/algorithms/cooley_turkey/code/julia/fft.jl diff --git a/chapters/FFT/code/python/fft.py b/chapters/algorithms/cooley_turkey/code/python/fft.py similarity index 100% rename from chapters/FFT/code/python/fft.py rename to chapters/algorithms/cooley_turkey/code/python/fft.py diff --git a/chapters/FFT/cooley_tukey.md b/chapters/algorithms/cooley_turkey/cooley_tukey.md similarity index 100% rename from chapters/FFT/cooley_tukey.md rename to chapters/algorithms/cooley_turkey/cooley_tukey.md diff --git a/chapters/FFT/res/FT_example.png b/chapters/algorithms/cooley_turkey/res/FT_example.png similarity index 100% rename from chapters/FFT/res/FT_example.png rename to chapters/algorithms/cooley_turkey/res/FT_example.png diff --git a/chapters/FFT/res/butterfly_diagram.png b/chapters/algorithms/cooley_turkey/res/butterfly_diagram.png similarity index 100% rename from chapters/FFT/res/butterfly_diagram.png rename to chapters/algorithms/cooley_turkey/res/butterfly_diagram.png diff --git a/chapters/FFT/res/fft.png b/chapters/algorithms/cooley_turkey/res/fft.png similarity index 100% rename from chapters/FFT/res/fft.png rename to chapters/algorithms/cooley_turkey/res/fft.png diff --git a/chapters/FFT/res/out.dat b/chapters/algorithms/cooley_turkey/res/out.dat similarity index 100% rename from chapters/FFT/res/out.dat rename to chapters/algorithms/cooley_turkey/res/out.dat diff --git a/chapters/FFT/res/radix-2screen.jpg b/chapters/algorithms/cooley_turkey/res/radix-2screen.jpg similarity index 100% rename from chapters/FFT/res/radix-2screen.jpg rename to chapters/algorithms/cooley_turkey/res/radix-2screen.jpg diff --git a/chapters/FFT/res/radix-2screen_positive.jpg b/chapters/algorithms/cooley_turkey/res/radix-2screen_positive.jpg similarity index 100% rename from chapters/FFT/res/radix-2screen_positive.jpg rename to chapters/algorithms/cooley_turkey/res/radix-2screen_positive.jpg diff --git a/chapters/FFT/res/radix-8screen.jpg b/chapters/algorithms/cooley_turkey/res/radix-8screen.jpg similarity index 100% rename from chapters/FFT/res/radix-8screen.jpg rename to chapters/algorithms/cooley_turkey/res/radix-8screen.jpg diff --git a/chapters/FFT/res/sinusoid.png b/chapters/algorithms/cooley_turkey/res/sinusoid.png similarity index 100% rename from chapters/FFT/res/sinusoid.png rename to chapters/algorithms/cooley_turkey/res/sinusoid.png diff --git a/chapters/euclidean_algorithm/code/c++/euclidean.cpp b/chapters/algorithms/euclidean_algorithm/code/c++/euclidean.cpp similarity index 100% rename from chapters/euclidean_algorithm/code/c++/euclidean.cpp rename to chapters/algorithms/euclidean_algorithm/code/c++/euclidean.cpp diff --git a/chapters/euclidean_algorithm/code/c/euclidean_example.c b/chapters/algorithms/euclidean_algorithm/code/c/euclidean_example.c similarity index 100% rename from chapters/euclidean_algorithm/code/c/euclidean_example.c rename to chapters/algorithms/euclidean_algorithm/code/c/euclidean_example.c diff --git a/chapters/euclidean_algorithm/code/clojure/euclidean_example.clj b/chapters/algorithms/euclidean_algorithm/code/clojure/euclidean_example.clj similarity index 100% rename from chapters/euclidean_algorithm/code/clojure/euclidean_example.clj rename to chapters/algorithms/euclidean_algorithm/code/clojure/euclidean_example.clj diff --git a/chapters/euclidean_algorithm/code/csharp/EuclideanAlgorithm.cs b/chapters/algorithms/euclidean_algorithm/code/csharp/EuclideanAlgorithm.cs similarity index 100% rename from chapters/euclidean_algorithm/code/csharp/EuclideanAlgorithm.cs rename to chapters/algorithms/euclidean_algorithm/code/csharp/EuclideanAlgorithm.cs diff --git a/chapters/euclidean_algorithm/code/csharp/Program.cs b/chapters/algorithms/euclidean_algorithm/code/csharp/Program.cs similarity index 100% rename from chapters/euclidean_algorithm/code/csharp/Program.cs rename to chapters/algorithms/euclidean_algorithm/code/csharp/Program.cs diff --git a/chapters/euclidean_algorithm/code/go/euclidean.go b/chapters/algorithms/euclidean_algorithm/code/go/euclidean.go similarity index 100% rename from chapters/euclidean_algorithm/code/go/euclidean.go rename to chapters/algorithms/euclidean_algorithm/code/go/euclidean.go diff --git a/chapters/euclidean_algorithm/code/haskell/euclidean_example.hs b/chapters/algorithms/euclidean_algorithm/code/haskell/euclidean_example.hs similarity index 100% rename from chapters/euclidean_algorithm/code/haskell/euclidean_example.hs rename to chapters/algorithms/euclidean_algorithm/code/haskell/euclidean_example.hs diff --git a/chapters/euclidean_algorithm/code/java/EuclideanAlgo.java b/chapters/algorithms/euclidean_algorithm/code/java/EuclideanAlgo.java similarity index 100% rename from chapters/euclidean_algorithm/code/java/EuclideanAlgo.java rename to chapters/algorithms/euclidean_algorithm/code/java/EuclideanAlgo.java diff --git a/chapters/euclidean_algorithm/code/java/MainClass.java b/chapters/algorithms/euclidean_algorithm/code/java/MainClass.java similarity index 100% rename from chapters/euclidean_algorithm/code/java/MainClass.java rename to chapters/algorithms/euclidean_algorithm/code/java/MainClass.java diff --git a/chapters/euclidean_algorithm/code/javascript/euclidean_example.js b/chapters/algorithms/euclidean_algorithm/code/javascript/euclidean_example.js similarity index 100% rename from chapters/euclidean_algorithm/code/javascript/euclidean_example.js rename to chapters/algorithms/euclidean_algorithm/code/javascript/euclidean_example.js diff --git a/chapters/euclidean_algorithm/code/ocaml/euclidean_example.ml b/chapters/algorithms/euclidean_algorithm/code/ocaml/euclidean_example.ml similarity index 100% rename from chapters/euclidean_algorithm/code/ocaml/euclidean_example.ml rename to chapters/algorithms/euclidean_algorithm/code/ocaml/euclidean_example.ml diff --git a/chapters/euclidean_algorithm/code/pseudo/euclidean.pseudo b/chapters/algorithms/euclidean_algorithm/code/pseudo/euclidean.pseudo similarity index 100% rename from chapters/euclidean_algorithm/code/pseudo/euclidean.pseudo rename to chapters/algorithms/euclidean_algorithm/code/pseudo/euclidean.pseudo diff --git a/chapters/euclidean_algorithm/code/python/euclidean_example.py b/chapters/algorithms/euclidean_algorithm/code/python/euclidean_example.py similarity index 100% rename from chapters/euclidean_algorithm/code/python/euclidean_example.py rename to chapters/algorithms/euclidean_algorithm/code/python/euclidean_example.py diff --git a/chapters/euclidean_algorithm/code/rust/euclidean_example.rs b/chapters/algorithms/euclidean_algorithm/code/rust/euclidean_example.rs similarity index 100% rename from chapters/euclidean_algorithm/code/rust/euclidean_example.rs rename to chapters/algorithms/euclidean_algorithm/code/rust/euclidean_example.rs diff --git a/chapters/euclidean_algorithm/code/swift/euclidean_algorithm.swift b/chapters/algorithms/euclidean_algorithm/code/swift/euclidean_algorithm.swift similarity index 100% rename from chapters/euclidean_algorithm/code/swift/euclidean_algorithm.swift rename to chapters/algorithms/euclidean_algorithm/code/swift/euclidean_algorithm.swift diff --git a/chapters/euclidean_algorithm/euclidean.md b/chapters/algorithms/euclidean_algorithm/euclidean_algorithm.md similarity index 100% rename from chapters/euclidean_algorithm/euclidean.md rename to chapters/algorithms/euclidean_algorithm/euclidean_algorithm.md diff --git a/chapters/euclidean_algorithm/res/modulus.png b/chapters/algorithms/euclidean_algorithm/res/modulus.png similarity index 100% rename from chapters/euclidean_algorithm/res/modulus.png rename to chapters/algorithms/euclidean_algorithm/res/modulus.png diff --git a/chapters/euclidean_algorithm/res/subtraction.png b/chapters/algorithms/euclidean_algorithm/res/subtraction.png similarity index 100% rename from chapters/euclidean_algorithm/res/subtraction.png rename to chapters/algorithms/euclidean_algorithm/res/subtraction.png diff --git a/chapters/differential_equations/euler/code/c++/euler.cpp b/chapters/algorithms/forward_euler_method/code/c++/euler.cpp similarity index 100% rename from chapters/differential_equations/euler/code/c++/euler.cpp rename to chapters/algorithms/forward_euler_method/code/c++/euler.cpp diff --git a/chapters/differential_equations/euler/code/c/euler.c b/chapters/algorithms/forward_euler_method/code/c/euler.c similarity index 100% rename from chapters/differential_equations/euler/code/c/euler.c rename to chapters/algorithms/forward_euler_method/code/c/euler.c diff --git a/chapters/differential_equations/euler/code/elm/elm-package.json b/chapters/algorithms/forward_euler_method/code/elm/elm-package.json similarity index 100% rename from chapters/differential_equations/euler/code/elm/elm-package.json rename to chapters/algorithms/forward_euler_method/code/elm/elm-package.json diff --git a/chapters/differential_equations/euler/code/elm/euler.elm b/chapters/algorithms/forward_euler_method/code/elm/euler.elm similarity index 100% rename from chapters/differential_equations/euler/code/elm/euler.elm rename to chapters/algorithms/forward_euler_method/code/elm/euler.elm diff --git a/chapters/differential_equations/euler/code/euler.m b/chapters/algorithms/forward_euler_method/code/euler.m similarity index 100% rename from chapters/differential_equations/euler/code/euler.m rename to chapters/algorithms/forward_euler_method/code/euler.m diff --git a/chapters/differential_equations/euler/code/haskell/euler.hs b/chapters/algorithms/forward_euler_method/code/haskell/euler.hs similarity index 100% rename from chapters/differential_equations/euler/code/haskell/euler.hs rename to chapters/algorithms/forward_euler_method/code/haskell/euler.hs diff --git a/chapters/differential_equations/euler/code/julia/euler.jl b/chapters/algorithms/forward_euler_method/code/julia/euler.jl similarity index 100% rename from chapters/differential_equations/euler/code/julia/euler.jl rename to chapters/algorithms/forward_euler_method/code/julia/euler.jl diff --git a/chapters/differential_equations/euler/code/python/euler.py b/chapters/algorithms/forward_euler_method/code/python/euler.py similarity index 100% rename from chapters/differential_equations/euler/code/python/euler.py rename to chapters/algorithms/forward_euler_method/code/python/euler.py diff --git a/chapters/differential_equations/euler/code/rust/euler.rs b/chapters/algorithms/forward_euler_method/code/rust/euler.rs similarity index 100% rename from chapters/differential_equations/euler/code/rust/euler.rs rename to chapters/algorithms/forward_euler_method/code/rust/euler.rs diff --git a/chapters/differential_equations/euler/euler.md b/chapters/algorithms/forward_euler_method/forward_euler_method.md similarity index 89% rename from chapters/differential_equations/euler/euler.md rename to chapters/algorithms/forward_euler_method/forward_euler_method.md index c554c3d06..28bbc8e9e 100644 --- a/chapters/differential_equations/euler/euler.md +++ b/chapters/algorithms/forward_euler_method/forward_euler_method.md @@ -1,10 +1,10 @@ # The Forward Euler Method The Euler methods are some of the simplest methods to solve ordinary differential equations numerically. -They introduce a new set of methods called the [Runge Kutta](../runge_kutta/runge_kutta.md) methods, which will be discussed in the near future! +They introduce a new set of methods called the [Runge Kutta](../runge_kutta_methods/runge_kutta_methods.md) methods, which will be discussed in the near future! As a physicist, I tend to understand things through methods that I have learned before. -In this case, it makes sense for me to see Euler methods as extensions of the [Taylor Series Expansion](../../taylor/taylor_series.md). +In this case, it makes sense for me to see Euler methods as extensions of the [Taylor Series Expansion](../general/taylor_series_expansion/taylor_series_expansion.md). These expansions basically approximate functions based on their derivatives, like so: $$ @@ -48,7 +48,7 @@ $$ $$ Now, solving this set of equations in this way is known as the *forward* Euler Method. -In fact, there is another method known as the [*backward* Euler Method](backward_euler.md), which we will get to soon enough. +In fact, there is another method known as the [*backward* Euler Method](../backward_euler_method/backward_euler_method.md), which we will get to soon enough. For now, it is important to note that the error of these methods depend on the timestep chosen.
@@ -83,17 +83,17 @@ $$ $$ Which means that the forward Euler method is actually unstable for most values! If we want to stick to using the forward Euler method exclusively, the only solution is to decrease the timestep until it is within this stability region, and that's not necessarily easy for all cases. -So now it might be obvious that another, more stable method should be used instead; however, many other stable methods are *implicit*, which means that in order to find the solution, we need to solve a system of equations via the [Thomas Algorithm](../../matrix_methods/thomas/thomas.md) or [Gaussian Elimination](../../matrix_methods/gaussian_elimination/gaussian_elimination.md). +So now it might be obvious that another, more stable method should be used instead; however, many other stable methods are *implicit*, which means that in order to find the solution, we need to solve a system of equations via the [Thomas Algorithm](../thomas_algorithm/thomas_algorithm.md) or [Gaussian Elimination](../gaussian_elimination/gaussian_elimination.md). Which is an entire layer of complexity that most people don't want to mess with! -Now, here is where we might want to relate the method to another algorithm that is sometimes used for a similar use-case: [Verlet Integration](../../physics_solvers/verlet/verlet.md). +Now, here is where we might want to relate the method to another algorithm that is sometimes used for a similar use-case: [Verlet Integration](../verlet_integration/verlet_integration.md). Verlet integration has a distinct advantage over the forward Euler method in both error and stability with more coarse-grained timesteps; however, Euler methods are powerful in that they may be used for cases other than simple kinematics. That said, in practice, due to the instability of the forward Euler method and the error with larger timesteps, this method is rarely used in practice. -That said, variations of this method *are* certainly used (for example Crank-Nicolson and [Runge-Kutta](../runge_kutta/runge_kutta.md), so the time spent reading this chapter is not a total waste! +That said, variations of this method *are* certainly used (for example Crank-Nicolson and [Runge-Kutta](../runge_kutta_methods/runge_kutta_methods.md), so the time spent reading this chapter is not a total waste! ## Example Code -Like in the case of [Verlet Integration](../../physics_solvers/verlet/verlet.md), the easiest way to test to see if this method works is to test it against a simple test-case. +Like in the case of [Verlet Integration](../verlet_integration/verlet_integration.md), the easiest way to test to see if this method works is to test it against a simple test-case. Here, the most obvious test-case would be dropping a ball from 5 meters, which is my favorite example, but proved itself to be slightly less enlightening than I would have thought. So, this time, let's remove ourselves from any physics and instead solve the following ODE: $$y' = 5y$$. Note that in this case, the velocity is directly given by the ODE and the acceleration is not part of the model. diff --git a/chapters/differential_equations/euler/res/error.png b/chapters/algorithms/forward_euler_method/res/error.png similarity index 100% rename from chapters/differential_equations/euler/res/error.png rename to chapters/algorithms/forward_euler_method/res/error.png diff --git a/chapters/differential_equations/euler/res/instability.png b/chapters/algorithms/forward_euler_method/res/instability.png similarity index 100% rename from chapters/differential_equations/euler/res/instability.png rename to chapters/algorithms/forward_euler_method/res/instability.png diff --git a/chapters/matrix_methods/gaussian_elimination/code/c/gaussian_elimination.c b/chapters/algorithms/gaussian_elimination/code/c/gaussian_elimination.c similarity index 100% rename from chapters/matrix_methods/gaussian_elimination/code/c/gaussian_elimination.c rename to chapters/algorithms/gaussian_elimination/code/c/gaussian_elimination.c diff --git a/chapters/matrix_methods/gaussian_elimination/code/julia/gaussian_elimination.jl b/chapters/algorithms/gaussian_elimination/code/julia/gaussian_elimination.jl similarity index 100% rename from chapters/matrix_methods/gaussian_elimination/code/julia/gaussian_elimination.jl rename to chapters/algorithms/gaussian_elimination/code/julia/gaussian_elimination.jl diff --git a/chapters/matrix_methods/gaussian_elimination/code/rust/gaussian_elimination.rs b/chapters/algorithms/gaussian_elimination/code/rust/gaussian_elimination.rs similarity index 100% rename from chapters/matrix_methods/gaussian_elimination/code/rust/gaussian_elimination.rs rename to chapters/algorithms/gaussian_elimination/code/rust/gaussian_elimination.rs diff --git a/chapters/matrix_methods/gaussian_elimination/gaussian_elimination.md b/chapters/algorithms/gaussian_elimination/gaussian_elimination.md similarity index 100% rename from chapters/matrix_methods/gaussian_elimination/gaussian_elimination.md rename to chapters/algorithms/gaussian_elimination/gaussian_elimination.md diff --git a/chapters/computational_geometry/gift_wrapping/graham_scan/code/c/graham.c b/chapters/algorithms/graham_scan/code/c/graham.c similarity index 100% rename from chapters/computational_geometry/gift_wrapping/graham_scan/code/c/graham.c rename to chapters/algorithms/graham_scan/code/c/graham.c diff --git a/chapters/computational_geometry/gift_wrapping/graham_scan/code/haskell/grahamScan.hs b/chapters/algorithms/graham_scan/code/haskell/grahamScan.hs similarity index 100% rename from chapters/computational_geometry/gift_wrapping/graham_scan/code/haskell/grahamScan.hs rename to chapters/algorithms/graham_scan/code/haskell/grahamScan.hs diff --git a/chapters/computational_geometry/gift_wrapping/graham_scan/code/javascript/graham-scan.js b/chapters/algorithms/graham_scan/code/javascript/graham-scan.js similarity index 100% rename from chapters/computational_geometry/gift_wrapping/graham_scan/code/javascript/graham-scan.js rename to chapters/algorithms/graham_scan/code/javascript/graham-scan.js diff --git a/chapters/computational_geometry/gift_wrapping/graham_scan/code/julia/graham.jl b/chapters/algorithms/graham_scan/code/julia/graham.jl similarity index 100% rename from chapters/computational_geometry/gift_wrapping/graham_scan/code/julia/graham.jl rename to chapters/algorithms/graham_scan/code/julia/graham.jl diff --git a/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md b/chapters/algorithms/graham_scan/graham_scan.md similarity index 94% rename from chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md rename to chapters/algorithms/graham_scan/graham_scan.md index 7a3683c65..52e8d9593 100644 --- a/chapters/computational_geometry/gift_wrapping/graham_scan/graham_scan.md +++ b/chapters/algorithms/graham_scan/graham_scan.md @@ -1,6 +1,6 @@ # Graham Scan -At around the same time of the [Jarvis March](jarvis_march.md), R. L. Graham was also developing an algorithm to find the convex hull of a random set of points {{ "gs1972" | cite }}. +At around the same time of the [Jarvis March](../jarvis_march/jarvis_march.md), R. L. Graham was also developing an algorithm to find the convex hull of a random set of points {{ "gs1972" | cite }}. Unlike the Jarvis March, which is an $$\mathcal{O}(nh)$$ operation, the Graham Scan is $$\mathcal{O}(n\log(n))$$, where $$n$$ is the number of points and $$h$$ is the size fo the hull. This means that the complexity of the Graham Scan is not output-sensitive; moreover, there are some cases where the Jarvis March is more optimal, depending on the size of the hull and the number of points to wrap. diff --git a/chapters/data_compression/huffman/code/c++/huffman.cpp b/chapters/algorithms/huffman_encoding/code/c++/huffman.cpp similarity index 100% rename from chapters/data_compression/huffman/code/c++/huffman.cpp rename to chapters/algorithms/huffman_encoding/code/c++/huffman.cpp diff --git a/chapters/data_compression/huffman/code/c/huffman.c b/chapters/algorithms/huffman_encoding/code/c/huffman.c similarity index 100% rename from chapters/data_compression/huffman/code/c/huffman.c rename to chapters/algorithms/huffman_encoding/code/c/huffman.c diff --git a/chapters/data_compression/huffman/code/clojure/huffman.clj b/chapters/algorithms/huffman_encoding/code/clojure/huffman.clj similarity index 100% rename from chapters/data_compression/huffman/code/clojure/huffman.clj rename to chapters/algorithms/huffman_encoding/code/clojure/huffman.clj diff --git a/chapters/data_compression/huffman/code/csharp/HuffmanCoding.cs b/chapters/algorithms/huffman_encoding/code/csharp/HuffmanCoding.cs similarity index 100% rename from chapters/data_compression/huffman/code/csharp/HuffmanCoding.cs rename to chapters/algorithms/huffman_encoding/code/csharp/HuffmanCoding.cs diff --git a/chapters/data_compression/huffman/code/csharp/Program.cs b/chapters/algorithms/huffman_encoding/code/csharp/Program.cs similarity index 100% rename from chapters/data_compression/huffman/code/csharp/Program.cs rename to chapters/algorithms/huffman_encoding/code/csharp/Program.cs diff --git a/chapters/data_compression/huffman/code/haskell/huffman.hs b/chapters/algorithms/huffman_encoding/code/haskell/huffman.hs similarity index 100% rename from chapters/data_compression/huffman/code/haskell/huffman.hs rename to chapters/algorithms/huffman_encoding/code/haskell/huffman.hs diff --git a/chapters/data_compression/huffman/code/java/huffman.java b/chapters/algorithms/huffman_encoding/code/java/huffman.java similarity index 100% rename from chapters/data_compression/huffman/code/java/huffman.java rename to chapters/algorithms/huffman_encoding/code/java/huffman.java diff --git a/chapters/data_compression/huffman/code/javascript/huffman.js b/chapters/algorithms/huffman_encoding/code/javascript/huffman.js similarity index 100% rename from chapters/data_compression/huffman/code/javascript/huffman.js rename to chapters/algorithms/huffman_encoding/code/javascript/huffman.js diff --git a/chapters/data_compression/huffman/code/julia/huffman.jl b/chapters/algorithms/huffman_encoding/code/julia/huffman.jl similarity index 100% rename from chapters/data_compression/huffman/code/julia/huffman.jl rename to chapters/algorithms/huffman_encoding/code/julia/huffman.jl diff --git a/chapters/data_compression/huffman/code/python/huffman.py b/chapters/algorithms/huffman_encoding/code/python/huffman.py similarity index 100% rename from chapters/data_compression/huffman/code/python/huffman.py rename to chapters/algorithms/huffman_encoding/code/python/huffman.py diff --git a/chapters/data_compression/huffman/code/rust/huffman.rs b/chapters/algorithms/huffman_encoding/code/rust/huffman.rs similarity index 100% rename from chapters/data_compression/huffman/code/rust/huffman.rs rename to chapters/algorithms/huffman_encoding/code/rust/huffman.rs diff --git a/chapters/data_compression/huffman/huffman.md b/chapters/algorithms/huffman_encoding/huffman_encoding.md similarity index 97% rename from chapters/data_compression/huffman/huffman.md rename to chapters/algorithms/huffman_encoding/huffman_encoding.md index 50d74a3cc..9f9115076 100644 --- a/chapters/data_compression/huffman/huffman.md +++ b/chapters/algorithms/huffman_encoding/huffman_encoding.md @@ -8,7 +8,7 @@ He managed to rip the heart out of the methods described by leaders of the field It was in that moment, I knew I would never amount to anything. I have since accepted that fact and moved on. -Huffman encoding follows from the problem described in the [Data Compression](../data_compression.md) section. +Huffman encoding follows from the problem described in the [Data Compression](../../general/data_compression/data_compression.md) section. We have a string that we want to encode into bits. Huffman encoding ensures that our encoded bitstring is as small as possible without losing any information. Because it is both lossless and guarantees the smallest possible bit length, it outright replaces both Shannon and Shannon-Fano encoding in most cases, which is a little weird because the method was devised while Huffman was taking a course from Fano, himself! @@ -50,7 +50,7 @@ The fact that this algorithm is both conceptually simple and provably useful is ## Example Code In code, this can be a little tricky. It requires a method to continually sort the nodes as you add more and more nodes to the system. The most straightforward way to do this in some languages is with a priority queue, but depending on the language, this might be more or less appropriate. -In addition, to read the tree backwards, some sort of [Depth First Search](../../tree_traversal/tree_traversal.md) needs to be implemented. +In addition, to read the tree backwards, some sort of [Depth First Search](../tree_traversal/tree_traversal.md) needs to be implemented. Whether you use a stack or straight-up recursion also depends on the language, but the recursive method is a little easier to understand in most cases. {% method %} diff --git a/chapters/data_compression/huffman/res/huffman_tree.png b/chapters/algorithms/huffman_encoding/res/huffman_tree.png similarity index 100% rename from chapters/data_compression/huffman/res/huffman_tree.png rename to chapters/algorithms/huffman_encoding/res/huffman_tree.png diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/c/jarvis_march.c b/chapters/algorithms/jarvis_march/code/c/jarvis_march.c similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/c/jarvis_march.c rename to chapters/algorithms/jarvis_march/code/c/jarvis_march.c diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/csharp/JarvisMarch.cs b/chapters/algorithms/jarvis_march/code/csharp/JarvisMarch.cs similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/csharp/JarvisMarch.cs rename to chapters/algorithms/jarvis_march/code/csharp/JarvisMarch.cs diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/csharp/Program.cs b/chapters/algorithms/jarvis_march/code/csharp/Program.cs similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/csharp/Program.cs rename to chapters/algorithms/jarvis_march/code/csharp/Program.cs diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/haskell/jarvisMarch.hs b/chapters/algorithms/jarvis_march/code/haskell/jarvisMarch.hs similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/haskell/jarvisMarch.hs rename to chapters/algorithms/jarvis_march/code/haskell/jarvisMarch.hs diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/jarvis.jl b/chapters/algorithms/jarvis_march/code/jarvis.jl similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/jarvis.jl rename to chapters/algorithms/jarvis_march/code/jarvis.jl diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/javascript/jarvis-march.js b/chapters/algorithms/jarvis_march/code/javascript/jarvis-march.js similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/javascript/jarvis-march.js rename to chapters/algorithms/jarvis_march/code/javascript/jarvis-march.js diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/julia/jarvis.jl b/chapters/algorithms/jarvis_march/code/julia/jarvis.jl similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/julia/jarvis.jl rename to chapters/algorithms/jarvis_march/code/julia/jarvis.jl diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/code/py/jarvisMarch.py b/chapters/algorithms/jarvis_march/code/py/jarvisMarch.py similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/code/py/jarvisMarch.py rename to chapters/algorithms/jarvis_march/code/py/jarvisMarch.py diff --git a/chapters/computational_geometry/gift_wrapping/jarvis_march/jarvis_march.md b/chapters/algorithms/jarvis_march/jarvis_march.md similarity index 100% rename from chapters/computational_geometry/gift_wrapping/jarvis_march/jarvis_march.md rename to chapters/algorithms/jarvis_march/jarvis_march.md diff --git a/chapters/monte_carlo/code/c/monte_carlo.c b/chapters/algorithms/monte_carlo_integration/code/c/monte_carlo.c similarity index 100% rename from chapters/monte_carlo/code/c/monte_carlo.c rename to chapters/algorithms/monte_carlo_integration/code/c/monte_carlo.c diff --git a/chapters/monte_carlo/code/clojure/monte_carlo.clj b/chapters/algorithms/monte_carlo_integration/code/clojure/monte_carlo.clj similarity index 100% rename from chapters/monte_carlo/code/clojure/monte_carlo.clj rename to chapters/algorithms/monte_carlo_integration/code/clojure/monte_carlo.clj diff --git a/chapters/monte_carlo/code/d/monte_carlo.d b/chapters/algorithms/monte_carlo_integration/code/d/monte_carlo.d similarity index 100% rename from chapters/monte_carlo/code/d/monte_carlo.d rename to chapters/algorithms/monte_carlo_integration/code/d/monte_carlo.d diff --git a/chapters/monte_carlo/code/go/monteCarlo.go b/chapters/algorithms/monte_carlo_integration/code/go/monteCarlo.go similarity index 100% rename from chapters/monte_carlo/code/go/monteCarlo.go rename to chapters/algorithms/monte_carlo_integration/code/go/monteCarlo.go diff --git a/chapters/monte_carlo/code/haskell/monteCarlo.hs b/chapters/algorithms/monte_carlo_integration/code/haskell/monteCarlo.hs similarity index 100% rename from chapters/monte_carlo/code/haskell/monteCarlo.hs rename to chapters/algorithms/monte_carlo_integration/code/haskell/monteCarlo.hs diff --git a/chapters/monte_carlo/code/java/MonteCarlo.java b/chapters/algorithms/monte_carlo_integration/code/java/MonteCarlo.java similarity index 100% rename from chapters/monte_carlo/code/java/MonteCarlo.java rename to chapters/algorithms/monte_carlo_integration/code/java/MonteCarlo.java diff --git a/chapters/monte_carlo/code/javascript/monte_carlo.js b/chapters/algorithms/monte_carlo_integration/code/javascript/monte_carlo.js similarity index 100% rename from chapters/monte_carlo/code/javascript/monte_carlo.js rename to chapters/algorithms/monte_carlo_integration/code/javascript/monte_carlo.js diff --git a/chapters/monte_carlo/code/julia/monte_carlo.jl b/chapters/algorithms/monte_carlo_integration/code/julia/monte_carlo.jl similarity index 100% rename from chapters/monte_carlo/code/julia/monte_carlo.jl rename to chapters/algorithms/monte_carlo_integration/code/julia/monte_carlo.jl diff --git a/chapters/monte_carlo/code/r/monte_carlo.R b/chapters/algorithms/monte_carlo_integration/code/r/monte_carlo.R similarity index 100% rename from chapters/monte_carlo/code/r/monte_carlo.R rename to chapters/algorithms/monte_carlo_integration/code/r/monte_carlo.R diff --git a/chapters/monte_carlo/code/rust/monte_carlo.rs b/chapters/algorithms/monte_carlo_integration/code/rust/monte_carlo.rs similarity index 100% rename from chapters/monte_carlo/code/rust/monte_carlo.rs rename to chapters/algorithms/monte_carlo_integration/code/rust/monte_carlo.rs diff --git a/chapters/monte_carlo/code/swift/monte_carlo.swift b/chapters/algorithms/monte_carlo_integration/code/swift/monte_carlo.swift similarity index 100% rename from chapters/monte_carlo/code/swift/monte_carlo.swift rename to chapters/algorithms/monte_carlo_integration/code/swift/monte_carlo.swift diff --git a/chapters/monte_carlo/monte_carlo.md b/chapters/algorithms/monte_carlo_integration/monte_carlo_integration.md similarity index 100% rename from chapters/monte_carlo/monte_carlo.md rename to chapters/algorithms/monte_carlo_integration/monte_carlo_integration.md diff --git a/chapters/monte_carlo/res/13311.png b/chapters/algorithms/monte_carlo_integration/res/13311.png similarity index 100% rename from chapters/monte_carlo/res/13311.png rename to chapters/algorithms/monte_carlo_integration/res/13311.png diff --git a/chapters/monte_carlo/res/195583.png b/chapters/algorithms/monte_carlo_integration/res/195583.png similarity index 100% rename from chapters/monte_carlo/res/195583.png rename to chapters/algorithms/monte_carlo_integration/res/195583.png diff --git a/chapters/monte_carlo/res/31.png b/chapters/algorithms/monte_carlo_integration/res/31.png similarity index 100% rename from chapters/monte_carlo/res/31.png rename to chapters/algorithms/monte_carlo_integration/res/31.png diff --git a/chapters/monte_carlo/res/monte_carlo.gif b/chapters/algorithms/monte_carlo_integration/res/monte_carlo.gif similarity index 100% rename from chapters/monte_carlo/res/monte_carlo.gif rename to chapters/algorithms/monte_carlo_integration/res/monte_carlo.gif diff --git a/chapters/monte_carlo/res/square_circle.png b/chapters/algorithms/monte_carlo_integration/res/square_circle.png similarity index 100% rename from chapters/monte_carlo/res/square_circle.png rename to chapters/algorithms/monte_carlo_integration/res/square_circle.png diff --git a/chapters/physics_solvers/quantum/split-op/code/julia/split_op.jl b/chapters/algorithms/split-operator_method/code/julia/split_op.jl similarity index 100% rename from chapters/physics_solvers/quantum/split-op/code/julia/split_op.jl rename to chapters/algorithms/split-operator_method/code/julia/split_op.jl diff --git a/chapters/physics_solvers/quantum/split-op/split-op.md b/chapters/algorithms/split-operator_method/split-operator_method.md similarity index 90% rename from chapters/physics_solvers/quantum/split-op/split-op.md rename to chapters/algorithms/split-operator_method/split-operator_method.md index 8349c3595..d9bd160c5 100644 --- a/chapters/physics_solvers/quantum/split-op/split-op.md +++ b/chapters/algorithms/split-operator_method/split-operator_method.md @@ -6,7 +6,7 @@ $$ i \hbar \frac{\partial \Psi(\mathbf{r},t)}{\partial t} = \left[-\frac{\hbar^2}{2m}\nabla^2 + g|\Psi(\mathbf{r},t)|^2 \right] \Psi(\mathbf{r},t), $$ -which follows from the notation provided in the [quantum systems](../quantum.md) chapter: $$\Psi(\mathbf{r},t)$$ is a quantum wave-function with spatial ($$\mathbf{r}$$) and time ($$t$$) dependence and $$\nabla^2$$ is a laplacian; however, in this case, we also add an interaction tern $$g$$ next to a nonlinear $$|\Psi(\mathbf{r},t)|^2$$ term. +which follows from the notation provided in the [quantum systems](../../general/quantum_systems/quantum_systems.md) chapter: $$\Psi(\mathbf{r},t)$$ is a quantum wave-function with spatial ($$\mathbf{r}$$) and time ($$t$$) dependence and $$\nabla^2$$ is a laplacian; however, in this case, we also add an interaction tern $$g$$ next to a nonlinear $$|\Psi(\mathbf{r},t)|^2$$ term. By adding in the $$V(\mathbf{r})$$ term, we get an equation used to study superfluid Bose--Einstein Condensate (BEC) systems: $$ @@ -15,9 +15,9 @@ $$ This is the system I studied for most of my PhD (granted, we played a few tricks with parallelization and such, so it was _slightly_ more complicated). -At it's heart, the split-op method is nothing more than a pseudo-spectral differential equation solver... That is to say, it solves the Schrodinger equation with [FFT's](../../../FFT/cooley_tukey.md). +At it's heart, the split-op method is nothing more than a pseudo-spectral differential equation solver... That is to say, it solves the Schrodinger equation with [FFT's](../cooley_turkey/cooley_tukey.md). In fact, there is a large class of spectral and pseudo-spectral methods used to solve a number of different physical systems, and we'll definitely be covering those in the future. -As mentioned in the [quantum systems](../quantum.md) section, we can represent a a quantum wavefunction in momentum space, which is parameterized with the wavevector $$k$$. +As mentioned in the [quantum systems](../../general/quantum_systems/quantum_systems.md) section, we can represent a a quantum wavefunction in momentum space, which is parameterized with the wavevector $$k$$. In the hamiltonian shown above, we can split our system into real-space components, $$\hat{H}_R = \left[V(\mathbf{r}) + g|\Psi(\mathbf{r},t)|^2 \right] \Psi(\mathbf{r},t)$$, and momentum space components, $$\hat{H}_M = \left[-\frac{\hbar^2}{2m}\nabla^2 \right]\Psi(\mathbf{r},t)$$. If we assume a somewhat general solution to our quantum system: @@ -38,7 +38,7 @@ $$ \Psi(\mathbf{r},t+dt) = \left[e^{-\frac{i\hat{H}_Rdt}{2\hbar}}e^{-\frac{i\hat{H}_Mdt}{\hbar}}e^{-\frac{i\hat{H}_Rdt}{2\hbar}} \right]\Psi(\mathbf{r},t) + \mathcal{O}(dt^3) $$ -We can then address each part of this solution in chunks, first in real space, then in momentum space, then in real space again by using [Fourier Transforms](../../../FFT/cooley_tukey.md). +We can then address each part of this solution in chunks, first in real space, then in momentum space, then in real space again by using [Fourier Transforms](../cooley_turkey/cooley_tukey.md). Which looks something like this: $$ diff --git a/chapters/decision_problems/stable_marriage/code/c++/stable_marriage.cpp b/chapters/algorithms/stable_marriage_problem/code/c++/stable_marriage.cpp similarity index 100% rename from chapters/decision_problems/stable_marriage/code/c++/stable_marriage.cpp rename to chapters/algorithms/stable_marriage_problem/code/c++/stable_marriage.cpp diff --git a/chapters/decision_problems/stable_marriage/code/c/stable_marriage.c b/chapters/algorithms/stable_marriage_problem/code/c/stable_marriage.c similarity index 100% rename from chapters/decision_problems/stable_marriage/code/c/stable_marriage.c rename to chapters/algorithms/stable_marriage_problem/code/c/stable_marriage.c diff --git a/chapters/decision_problems/stable_marriage/code/csharp/GaleShapleyAlgorithm.cs b/chapters/algorithms/stable_marriage_problem/code/csharp/GaleShapleyAlgorithm.cs similarity index 100% rename from chapters/decision_problems/stable_marriage/code/csharp/GaleShapleyAlgorithm.cs rename to chapters/algorithms/stable_marriage_problem/code/csharp/GaleShapleyAlgorithm.cs diff --git a/chapters/decision_problems/stable_marriage/code/csharp/ListExtensions.cs b/chapters/algorithms/stable_marriage_problem/code/csharp/ListExtensions.cs similarity index 100% rename from chapters/decision_problems/stable_marriage/code/csharp/ListExtensions.cs rename to chapters/algorithms/stable_marriage_problem/code/csharp/ListExtensions.cs diff --git a/chapters/decision_problems/stable_marriage/code/csharp/Person.cs b/chapters/algorithms/stable_marriage_problem/code/csharp/Person.cs similarity index 100% rename from chapters/decision_problems/stable_marriage/code/csharp/Person.cs rename to chapters/algorithms/stable_marriage_problem/code/csharp/Person.cs diff --git a/chapters/decision_problems/stable_marriage/code/csharp/Program.cs b/chapters/algorithms/stable_marriage_problem/code/csharp/Program.cs similarity index 100% rename from chapters/decision_problems/stable_marriage/code/csharp/Program.cs rename to chapters/algorithms/stable_marriage_problem/code/csharp/Program.cs diff --git a/chapters/decision_problems/stable_marriage/code/haskell/stableMarriage.hs b/chapters/algorithms/stable_marriage_problem/code/haskell/stableMarriage.hs similarity index 100% rename from chapters/decision_problems/stable_marriage/code/haskell/stableMarriage.hs rename to chapters/algorithms/stable_marriage_problem/code/haskell/stableMarriage.hs diff --git a/chapters/decision_problems/stable_marriage/code/javascript/stable-marriage.js b/chapters/algorithms/stable_marriage_problem/code/javascript/stable-marriage.js similarity index 100% rename from chapters/decision_problems/stable_marriage/code/javascript/stable-marriage.js rename to chapters/algorithms/stable_marriage_problem/code/javascript/stable-marriage.js diff --git a/chapters/decision_problems/stable_marriage/code/julia/stable_marriage.jl b/chapters/algorithms/stable_marriage_problem/code/julia/stable_marriage.jl similarity index 100% rename from chapters/decision_problems/stable_marriage/code/julia/stable_marriage.jl rename to chapters/algorithms/stable_marriage_problem/code/julia/stable_marriage.jl diff --git a/chapters/decision_problems/stable_marriage/code/python/stable_marriage.py b/chapters/algorithms/stable_marriage_problem/code/python/stable_marriage.py similarity index 100% rename from chapters/decision_problems/stable_marriage/code/python/stable_marriage.py rename to chapters/algorithms/stable_marriage_problem/code/python/stable_marriage.py diff --git a/chapters/decision_problems/stable_marriage/stable_marriage.md b/chapters/algorithms/stable_marriage_problem/stable_marriage_problem.md similarity index 100% rename from chapters/decision_problems/stable_marriage/stable_marriage.md rename to chapters/algorithms/stable_marriage_problem/stable_marriage_problem.md diff --git a/chapters/matrix_methods/thomas/code/c/thomas.c b/chapters/algorithms/thomas_algorithm/code/c/thomas.c similarity index 100% rename from chapters/matrix_methods/thomas/code/c/thomas.c rename to chapters/algorithms/thomas_algorithm/code/c/thomas.c diff --git a/chapters/matrix_methods/thomas/code/julia/thomas.jl b/chapters/algorithms/thomas_algorithm/code/julia/thomas.jl similarity index 100% rename from chapters/matrix_methods/thomas/code/julia/thomas.jl rename to chapters/algorithms/thomas_algorithm/code/julia/thomas.jl diff --git a/chapters/matrix_methods/thomas/code/python/thomas.py b/chapters/algorithms/thomas_algorithm/code/python/thomas.py similarity index 100% rename from chapters/matrix_methods/thomas/code/python/thomas.py rename to chapters/algorithms/thomas_algorithm/code/python/thomas.py diff --git a/chapters/matrix_methods/thomas/thomas.md b/chapters/algorithms/thomas_algorithm/thomas_algorithm.md similarity index 100% rename from chapters/matrix_methods/thomas/thomas.md rename to chapters/algorithms/thomas_algorithm/thomas_algorithm.md diff --git a/chapters/tree_traversal/code/c++/tree_example.cpp b/chapters/algorithms/tree_traversal/code/c++/tree_example.cpp similarity index 100% rename from chapters/tree_traversal/code/c++/tree_example.cpp rename to chapters/algorithms/tree_traversal/code/c++/tree_example.cpp diff --git a/chapters/tree_traversal/code/c/tree_traversal.c b/chapters/algorithms/tree_traversal/code/c/tree_traversal.c similarity index 100% rename from chapters/tree_traversal/code/c/tree_traversal.c rename to chapters/algorithms/tree_traversal/code/c/tree_traversal.c diff --git a/chapters/tree_traversal/code/c/utility.h b/chapters/algorithms/tree_traversal/code/c/utility.h similarity index 100% rename from chapters/tree_traversal/code/c/utility.h rename to chapters/algorithms/tree_traversal/code/c/utility.h diff --git a/chapters/tree_traversal/code/csharp/Program.cs b/chapters/algorithms/tree_traversal/code/csharp/Program.cs similarity index 100% rename from chapters/tree_traversal/code/csharp/Program.cs rename to chapters/algorithms/tree_traversal/code/csharp/Program.cs diff --git a/chapters/tree_traversal/code/csharp/Tree.cs b/chapters/algorithms/tree_traversal/code/csharp/Tree.cs similarity index 100% rename from chapters/tree_traversal/code/csharp/Tree.cs rename to chapters/algorithms/tree_traversal/code/csharp/Tree.cs diff --git a/chapters/tree_traversal/code/haskell/TreeTraversal.hs b/chapters/algorithms/tree_traversal/code/haskell/TreeTraversal.hs similarity index 100% rename from chapters/tree_traversal/code/haskell/TreeTraversal.hs rename to chapters/algorithms/tree_traversal/code/haskell/TreeTraversal.hs diff --git a/chapters/tree_traversal/code/java/MainClass.java b/chapters/algorithms/tree_traversal/code/java/MainClass.java similarity index 100% rename from chapters/tree_traversal/code/java/MainClass.java rename to chapters/algorithms/tree_traversal/code/java/MainClass.java diff --git a/chapters/tree_traversal/code/java/Tree.java b/chapters/algorithms/tree_traversal/code/java/Tree.java similarity index 100% rename from chapters/tree_traversal/code/java/Tree.java rename to chapters/algorithms/tree_traversal/code/java/Tree.java diff --git a/chapters/tree_traversal/code/javascript/tree.js b/chapters/algorithms/tree_traversal/code/javascript/tree.js similarity index 100% rename from chapters/tree_traversal/code/javascript/tree.js rename to chapters/algorithms/tree_traversal/code/javascript/tree.js diff --git a/chapters/tree_traversal/code/julia/Tree.jl b/chapters/algorithms/tree_traversal/code/julia/Tree.jl similarity index 100% rename from chapters/tree_traversal/code/julia/Tree.jl rename to chapters/algorithms/tree_traversal/code/julia/Tree.jl diff --git a/chapters/tree_traversal/code/ocaml/tree.ml b/chapters/algorithms/tree_traversal/code/ocaml/tree.ml similarity index 100% rename from chapters/tree_traversal/code/ocaml/tree.ml rename to chapters/algorithms/tree_traversal/code/ocaml/tree.ml diff --git a/chapters/tree_traversal/code/pseudo/Tree.pseudo b/chapters/algorithms/tree_traversal/code/pseudo/Tree.pseudo similarity index 100% rename from chapters/tree_traversal/code/pseudo/Tree.pseudo rename to chapters/algorithms/tree_traversal/code/pseudo/Tree.pseudo diff --git a/chapters/tree_traversal/code/python/Tree_example.py b/chapters/algorithms/tree_traversal/code/python/Tree_example.py similarity index 100% rename from chapters/tree_traversal/code/python/Tree_example.py rename to chapters/algorithms/tree_traversal/code/python/Tree_example.py diff --git a/chapters/tree_traversal/code/rust/tree.rs b/chapters/algorithms/tree_traversal/code/rust/tree.rs similarity index 100% rename from chapters/tree_traversal/code/rust/tree.rs rename to chapters/algorithms/tree_traversal/code/rust/tree.rs diff --git a/chapters/tree_traversal/code/scratch/scratch_tree.png b/chapters/algorithms/tree_traversal/code/scratch/scratch_tree.png similarity index 100% rename from chapters/tree_traversal/code/scratch/scratch_tree.png rename to chapters/algorithms/tree_traversal/code/scratch/scratch_tree.png diff --git a/chapters/tree_traversal/res/3-tree.png b/chapters/algorithms/tree_traversal/res/3-tree.png similarity index 100% rename from chapters/tree_traversal/res/3-tree.png rename to chapters/algorithms/tree_traversal/res/3-tree.png diff --git a/chapters/tree_traversal/res/BFS_simple.png b/chapters/algorithms/tree_traversal/res/BFS_simple.png similarity index 100% rename from chapters/tree_traversal/res/BFS_simple.png rename to chapters/algorithms/tree_traversal/res/BFS_simple.png diff --git a/chapters/tree_traversal/res/DFS_in.png b/chapters/algorithms/tree_traversal/res/DFS_in.png similarity index 100% rename from chapters/tree_traversal/res/DFS_in.png rename to chapters/algorithms/tree_traversal/res/DFS_in.png diff --git a/chapters/tree_traversal/res/DFS_post.png b/chapters/algorithms/tree_traversal/res/DFS_post.png similarity index 100% rename from chapters/tree_traversal/res/DFS_post.png rename to chapters/algorithms/tree_traversal/res/DFS_post.png diff --git a/chapters/tree_traversal/res/DFS_pre.png b/chapters/algorithms/tree_traversal/res/DFS_pre.png similarity index 100% rename from chapters/tree_traversal/res/DFS_pre.png rename to chapters/algorithms/tree_traversal/res/DFS_pre.png diff --git a/chapters/tree_traversal/res/binary_tree.png b/chapters/algorithms/tree_traversal/res/binary_tree.png similarity index 100% rename from chapters/tree_traversal/res/binary_tree.png rename to chapters/algorithms/tree_traversal/res/binary_tree.png diff --git a/chapters/tree_traversal/tree_traversal.md b/chapters/algorithms/tree_traversal/tree_traversal.md similarity index 100% rename from chapters/tree_traversal/tree_traversal.md rename to chapters/algorithms/tree_traversal/tree_traversal.md diff --git a/chapters/physics_solvers/verlet/code/c++/verlet.cpp b/chapters/algorithms/verlet_integration/code/c++/verlet.cpp similarity index 100% rename from chapters/physics_solvers/verlet/code/c++/verlet.cpp rename to chapters/algorithms/verlet_integration/code/c++/verlet.cpp diff --git a/chapters/physics_solvers/verlet/code/c/verlet.c b/chapters/algorithms/verlet_integration/code/c/verlet.c similarity index 100% rename from chapters/physics_solvers/verlet/code/c/verlet.c rename to chapters/algorithms/verlet_integration/code/c/verlet.c diff --git a/chapters/physics_solvers/verlet/code/haskell/verlet.hs b/chapters/algorithms/verlet_integration/code/haskell/verlet.hs similarity index 100% rename from chapters/physics_solvers/verlet/code/haskell/verlet.hs rename to chapters/algorithms/verlet_integration/code/haskell/verlet.hs diff --git a/chapters/physics_solvers/verlet/code/java/verlet.java b/chapters/algorithms/verlet_integration/code/java/verlet.java similarity index 100% rename from chapters/physics_solvers/verlet/code/java/verlet.java rename to chapters/algorithms/verlet_integration/code/java/verlet.java diff --git a/chapters/physics_solvers/verlet/code/javascript/verlet.js b/chapters/algorithms/verlet_integration/code/javascript/verlet.js similarity index 100% rename from chapters/physics_solvers/verlet/code/javascript/verlet.js rename to chapters/algorithms/verlet_integration/code/javascript/verlet.js diff --git a/chapters/physics_solvers/verlet/code/julia/verlet.jl b/chapters/algorithms/verlet_integration/code/julia/verlet.jl similarity index 100% rename from chapters/physics_solvers/verlet/code/julia/verlet.jl rename to chapters/algorithms/verlet_integration/code/julia/verlet.jl diff --git a/chapters/physics_solvers/verlet/code/labview/verlet_labview.png b/chapters/algorithms/verlet_integration/code/labview/verlet_labview.png similarity index 100% rename from chapters/physics_solvers/verlet/code/labview/verlet_labview.png rename to chapters/algorithms/verlet_integration/code/labview/verlet_labview.png diff --git a/chapters/physics_solvers/verlet/code/matlab/verlet.m b/chapters/algorithms/verlet_integration/code/matlab/verlet.m similarity index 100% rename from chapters/physics_solvers/verlet/code/matlab/verlet.m rename to chapters/algorithms/verlet_integration/code/matlab/verlet.m diff --git a/chapters/physics_solvers/verlet/code/python/verlet.py b/chapters/algorithms/verlet_integration/code/python/verlet.py similarity index 100% rename from chapters/physics_solvers/verlet/code/python/verlet.py rename to chapters/algorithms/verlet_integration/code/python/verlet.py diff --git a/chapters/physics_solvers/verlet/code/rust/verlet.rs b/chapters/algorithms/verlet_integration/code/rust/verlet.rs similarity index 100% rename from chapters/physics_solvers/verlet/code/rust/verlet.rs rename to chapters/algorithms/verlet_integration/code/rust/verlet.rs diff --git a/chapters/physics_solvers/verlet/code/scratch/verlet_scratch.png b/chapters/algorithms/verlet_integration/code/scratch/verlet_scratch.png similarity index 100% rename from chapters/physics_solvers/verlet/code/scratch/verlet_scratch.png rename to chapters/algorithms/verlet_integration/code/scratch/verlet_scratch.png diff --git a/chapters/physics_solvers/verlet/verlet.md b/chapters/algorithms/verlet_integration/verlet_integration.md similarity index 97% rename from chapters/physics_solvers/verlet/verlet.md rename to chapters/algorithms/verlet_integration/verlet_integration.md index 7c1eca2c2..3e96f004c 100644 --- a/chapters/physics_solvers/verlet/verlet.md +++ b/chapters/algorithms/verlet_integration/verlet_integration.md @@ -162,7 +162,7 @@ Unfortunately, this has not yet been implemented in LabVIEW, so here's Julia cod {% endmethod %} -Even though this method is more used than the simple Verlet method mentioned above, it unforunately has an error term of $$\mathcal{O} \Delta t^2$$, which is two orders of magnitude worse. That said, if you want to have a simulaton with many objects that depend on one another --- like a gravity simulation --- the Velocity Verlet algorithm is a handy choice; however, you may have to play further tricks to allow everything to scale appropriately. These types of simulatons are sometimes called *n-body* simulations and one such trick is the [Barnes-Hut](barnes_hut.md) algorithm, which cuts the complexity of n-body simulations from $$\sim \mathcal{O}(n^2)$$ to $$\sim \mathcal{O}(n\log(n))$$ +Even though this method is more used than the simple Verlet method mentioned above, it unforunately has an error term of $$\mathcal{O} \Delta t^2$$, which is two orders of magnitude worse. That said, if you want to have a simulaton with many objects that depend on one another --- like a gravity simulation --- the Velocity Verlet algorithm is a handy choice; however, you may have to play further tricks to allow everything to scale appropriately. These types of simulatons are sometimes called *n-body* simulations and one such trick is the [Barnes-Hut](../barnes_hut_algorithm/barnes_hut_algorithm.md) algorithm, which cuts the complexity of n-body simulations from $$\sim \mathcal{O}(n^2)$$ to $$\sim \mathcal{O}(n\log(n))$$ ## Example Code diff --git a/chapters/differential_equations/runge_kutta/runge_kutta.md b/chapters/differential_equations/runge_kutta/runge_kutta.md deleted file mode 100644 index fd87a6cd9..000000000 --- a/chapters/differential_equations/runge_kutta/runge_kutta.md +++ /dev/null @@ -1,6 +0,0 @@ -##### Dependencies -* [Euler Methods](euler.md) - -# Runge Kutta Methods - -COMING SOON! diff --git a/chapters/computational_geometry/computational_geometry.md b/chapters/general/computational_geometry/computational_geometry.md similarity index 100% rename from chapters/computational_geometry/computational_geometry.md rename to chapters/general/computational_geometry/computational_geometry.md diff --git a/chapters/data_compression/data_compression.md b/chapters/general/data_compression/data_compression.md similarity index 94% rename from chapters/data_compression/data_compression.md rename to chapters/general/data_compression/data_compression.md index 5b0b67683..b666fa21a 100644 --- a/chapters/data_compression/data_compression.md +++ b/chapters/general/data_compression/data_compression.md @@ -6,10 +6,10 @@ It would naively seem that better hardware means that there are less restriction That said, there will always be new devices on the market that require minimizing data storage. In fact, some of the most revolutionary algorithms and methods in existence today fall in the category of data compression. -From lossless data compression with [Huffman encoding](huffman/huffman.md) to genetic compression algorithms and machine learning, there is a lot to learn about this field, and we'll go through it piece-by-piece. +From lossless data compression with [Huffman encoding](../../algorithms/huffman_encoding/huffman_encoding.md) to genetic compression algorithms and machine learning, there is a lot to learn about this field, and we'll go through it piece-by-piece. All that said, no discussion about data compression is complete without first discussing the information, itself -- specifically how information is represented in computer systems. -Now, we've discussed this in some depth before with [bitlogic](../principles_of_code/building_blocks/bitlogic.md), but there is much more to the story than what we let on before. +Now, we've discussed this in some depth before with [bitlogic](../../principles_of_code/building_blocks/bitlogic.md), but there is much more to the story than what we let on before. Let's start with a working definition of information: *Information is a representation of certainty.* @@ -119,7 +119,7 @@ L_2 &= 0.1\times 3 + 0.2 \times 3 + 0.3 \times 2 + 0.4 \times 1 = 1.9 $$ Here, it's clear that $$L_2 < L_1$$, and thus the second set of codewords compresses our data more than the first. -This measure can be used as a direct test of certain simple data compression techniques, notably those created by Shannon, Fano, and [Huffman](huffman/huffman.md), which will be covered soon! +This measure can be used as a direct test of certain simple data compression techniques, notably those created by Shannon, Fano, and [Huffman](../../algorithms/huffman_encoding/huffman_encoding.md), which will be covered soon!