From e272dfaf96be5d7c393eb65c8babaed3d89d2f21 Mon Sep 17 00:00:00 2001 From: justcoding121 Date: Sun, 5 Aug 2018 22:00:17 -0400 Subject: [PATCH] comments --- Advanced.Algorithms/Graph/Bridge/TarjansBridgeFinder.cs | 3 +++ Advanced.Algorithms/Graph/Coloring/MColorer.cs | 4 +++- Advanced.Algorithms/Graph/Cover/MinVertexCover.cs | 3 +++ Advanced.Algorithms/Graph/Cut/MinimumCut.cs | 3 +++ Advanced.Algorithms/Graph/Flow/EdmondsKarp.cs | 2 +- Advanced.Algorithms/Graph/Matching/BiPartiteMatching.cs | 3 +++ Advanced.Algorithms/Graph/ShortestPath/Floyd-Warshall.cs | 3 +++ Advanced.Algorithms/Graph/ShortestPath/Johnsons.cs | 3 +++ Advanced.Algorithms/Numerical/Exponentiation.cs | 3 +++ Advanced.Algorithms/Numerical/PrimeGenerator.cs | 6 +++--- Advanced.Algorithms/Search/BinarySearch.cs | 3 +++ Advanced.Algorithms/Search/BoyerMoore.cs | 4 ++++ Advanced.Algorithms/Search/QuickSelect.cs | 4 ++++ Advanced.Algorithms/Sorting/BubbleSort.cs | 3 +++ Advanced.Algorithms/Sorting/HeapSort.cs | 3 +++ Advanced.Algorithms/Sorting/InsertionSort.cs | 4 ++++ Advanced.Algorithms/Sorting/MergeSort.cs | 3 +++ Advanced.Algorithms/Sorting/QuickSort.cs | 3 +++ Advanced.Algorithms/Sorting/SelectionSort.cs | 3 +++ Advanced.Algorithms/Sorting/ShellSort.cs | 1 - Advanced.Algorithms/Sorting/TreeSort.cs | 3 +++ Advanced.Algorithms/String/Search/KMP.cs | 2 +- Advanced.Algorithms/String/Search/RabinKarp.cs | 3 +++ Advanced.Algorithms/String/Search/ZAlgorithm.cs | 3 +++ 24 files changed, 68 insertions(+), 7 deletions(-) diff --git a/Advanced.Algorithms/Graph/Bridge/TarjansBridgeFinder.cs b/Advanced.Algorithms/Graph/Bridge/TarjansBridgeFinder.cs index 6f4317cb..3aae89e0 100644 --- a/Advanced.Algorithms/Graph/Bridge/TarjansBridgeFinder.cs +++ b/Advanced.Algorithms/Graph/Bridge/TarjansBridgeFinder.cs @@ -77,6 +77,9 @@ private List> dfs(GraphVertex currentVertex, } } + /// + /// The bridge object. + /// public class Bridge { public T vertexA { get; } diff --git a/Advanced.Algorithms/Graph/Coloring/MColorer.cs b/Advanced.Algorithms/Graph/Coloring/MColorer.cs index 9e70b5a9..e75becd6 100644 --- a/Advanced.Algorithms/Graph/Coloring/MColorer.cs +++ b/Advanced.Algorithms/Graph/Coloring/MColorer.cs @@ -3,7 +3,9 @@ namespace Advanced.Algorithms.Graph { - + /// + /// An m-coloring algorithm implementation. + /// public class MColorer { /// diff --git a/Advanced.Algorithms/Graph/Cover/MinVertexCover.cs b/Advanced.Algorithms/Graph/Cover/MinVertexCover.cs index 2242c367..fc93bbb1 100644 --- a/Advanced.Algorithms/Graph/Cover/MinVertexCover.cs +++ b/Advanced.Algorithms/Graph/Cover/MinVertexCover.cs @@ -3,6 +3,9 @@ namespace Advanced.Algorithms.Graph { + /// + /// A minimum vertex conver algorithm implementation. + /// public class MinVertexCover { public List> GetMinVertexCover(Graph graph) diff --git a/Advanced.Algorithms/Graph/Cut/MinimumCut.cs b/Advanced.Algorithms/Graph/Cut/MinimumCut.cs index ed13c8e9..f13807df 100644 --- a/Advanced.Algorithms/Graph/Cut/MinimumCut.cs +++ b/Advanced.Algorithms/Graph/Cut/MinimumCut.cs @@ -87,6 +87,9 @@ private void dfs(WeightedDiGraphVertex currentResidualGraphVertex, } } + /// + /// Minimum cut result object. + /// public class MinCutEdge { public T Source { get; } diff --git a/Advanced.Algorithms/Graph/Flow/EdmondsKarp.cs b/Advanced.Algorithms/Graph/Flow/EdmondsKarp.cs index ca9b0136..ef770849 100644 --- a/Advanced.Algorithms/Graph/Flow/EdmondsKarp.cs +++ b/Advanced.Algorithms/Graph/Flow/EdmondsKarp.cs @@ -6,7 +6,7 @@ namespace Advanced.Algorithms.Graph { /// - /// A Edmond Karp max flox implementation on weighted directed graph using + /// An Edmond Karp max flow implementation on weighted directed graph using /// adjacency list representation of graph & residual graph. /// public class EdmondKarpMaxFlow where W : IComparable diff --git a/Advanced.Algorithms/Graph/Matching/BiPartiteMatching.cs b/Advanced.Algorithms/Graph/Matching/BiPartiteMatching.cs index 614c8d85..c9ca6421 100644 --- a/Advanced.Algorithms/Graph/Matching/BiPartiteMatching.cs +++ b/Advanced.Algorithms/Graph/Matching/BiPartiteMatching.cs @@ -109,6 +109,9 @@ private static WeightedDiGraph createFlowGraph(Graph graph, } } + /// + /// The match result object. + /// public class MatchEdge { public T Source { get; } diff --git a/Advanced.Algorithms/Graph/ShortestPath/Floyd-Warshall.cs b/Advanced.Algorithms/Graph/ShortestPath/Floyd-Warshall.cs index abce5e78..6ba272c8 100644 --- a/Advanced.Algorithms/Graph/ShortestPath/Floyd-Warshall.cs +++ b/Advanced.Algorithms/Graph/ShortestPath/Floyd-Warshall.cs @@ -4,6 +4,9 @@ namespace Advanced.Algorithms.Graph { + /// + /// A floyd-warshall shortest path algorithm implementation. + /// public class FloydWarshallShortestPath where W : IComparable { readonly IShortestPathOperators operators; diff --git a/Advanced.Algorithms/Graph/ShortestPath/Johnsons.cs b/Advanced.Algorithms/Graph/ShortestPath/Johnsons.cs index 46fdc8bb..12f8ca9c 100644 --- a/Advanced.Algorithms/Graph/ShortestPath/Johnsons.cs +++ b/Advanced.Algorithms/Graph/ShortestPath/Johnsons.cs @@ -6,6 +6,9 @@ namespace Advanced.Algorithms.Graph { + /// + /// A Johnson's shortest path algorithm implementation. + /// public class JohnsonsShortestPath where W : IComparable { readonly IJohnsonsShortestPathOperators operators; diff --git a/Advanced.Algorithms/Numerical/Exponentiation.cs b/Advanced.Algorithms/Numerical/Exponentiation.cs index 5851c738..dad35093 100644 --- a/Advanced.Algorithms/Numerical/Exponentiation.cs +++ b/Advanced.Algorithms/Numerical/Exponentiation.cs @@ -1,5 +1,8 @@ namespace Advanced.Algorithms.Numerical { + /// + /// A fast exponentiation algorithm implementation. + /// public class FastExponentiation { /// diff --git a/Advanced.Algorithms/Numerical/PrimeGenerator.cs b/Advanced.Algorithms/Numerical/PrimeGenerator.cs index 99f1020f..347e034e 100644 --- a/Advanced.Algorithms/Numerical/PrimeGenerator.cs +++ b/Advanced.Algorithms/Numerical/PrimeGenerator.cs @@ -3,11 +3,11 @@ namespace Advanced.Algorithms.Numerical { + /// + /// A prime number generation algorithm using Sieve of Eratosthenes. + /// public class PrimeGenerator { - /// - /// Prime generation using Sieve of Eratosthenes. - /// public static List GetAllPrimes(int max) { var primeTable = new bool[max + 1]; diff --git a/Advanced.Algorithms/Search/BinarySearch.cs b/Advanced.Algorithms/Search/BinarySearch.cs index 8c5ddbe0..833fedf2 100644 --- a/Advanced.Algorithms/Search/BinarySearch.cs +++ b/Advanced.Algorithms/Search/BinarySearch.cs @@ -1,5 +1,8 @@ namespace Advanced.Algorithms.Search { + /// + /// A binary search algorithm implementation. + /// public class BinarySearch { public static int Search(int[] input, int element) diff --git a/Advanced.Algorithms/Search/BoyerMoore.cs b/Advanced.Algorithms/Search/BoyerMoore.cs index 574409c2..eaeecca1 100644 --- a/Advanced.Algorithms/Search/BoyerMoore.cs +++ b/Advanced.Algorithms/Search/BoyerMoore.cs @@ -4,6 +4,10 @@ namespace Advanced.Algorithms.Search { + /// + /// A boyer-moore majority finder algorithm implementation. + /// + /// public class BoyerMoore where T : IComparable { public static T FindMajority(IEnumerable input) diff --git a/Advanced.Algorithms/Search/QuickSelect.cs b/Advanced.Algorithms/Search/QuickSelect.cs index e739681f..4f3184fe 100644 --- a/Advanced.Algorithms/Search/QuickSelect.cs +++ b/Advanced.Algorithms/Search/QuickSelect.cs @@ -5,6 +5,10 @@ namespace Advanced.Algorithms.Search { + /// + /// A quick select for Kth smallest algorithm implementation. + /// + /// public class QuickSelect where T : IComparable { public static T FindSmallest(IEnumerable input, int k) diff --git a/Advanced.Algorithms/Sorting/BubbleSort.cs b/Advanced.Algorithms/Sorting/BubbleSort.cs index 37aa89e4..125ccfe3 100644 --- a/Advanced.Algorithms/Sorting/BubbleSort.cs +++ b/Advanced.Algorithms/Sorting/BubbleSort.cs @@ -2,6 +2,9 @@ namespace Advanced.Algorithms.Sorting { + /// + /// A bubble sort implementation. + /// public class BubbleSort where T : IComparable { /// diff --git a/Advanced.Algorithms/Sorting/HeapSort.cs b/Advanced.Algorithms/Sorting/HeapSort.cs index 854bda1c..d212c6d7 100644 --- a/Advanced.Algorithms/Sorting/HeapSort.cs +++ b/Advanced.Algorithms/Sorting/HeapSort.cs @@ -3,6 +3,9 @@ namespace Advanced.Algorithms.Sorting { + /// + /// A heap sort implementation. + /// public class HeapSort where T : IComparable { /// diff --git a/Advanced.Algorithms/Sorting/InsertionSort.cs b/Advanced.Algorithms/Sorting/InsertionSort.cs index 4da49741..e7ef3d71 100644 --- a/Advanced.Algorithms/Sorting/InsertionSort.cs +++ b/Advanced.Algorithms/Sorting/InsertionSort.cs @@ -2,6 +2,10 @@ namespace Advanced.Algorithms.Sorting { + /// + /// An insertion sort implementation. + /// + /// public class InsertionSort where T : IComparable { /// diff --git a/Advanced.Algorithms/Sorting/MergeSort.cs b/Advanced.Algorithms/Sorting/MergeSort.cs index a8273400..f0ab107a 100644 --- a/Advanced.Algorithms/Sorting/MergeSort.cs +++ b/Advanced.Algorithms/Sorting/MergeSort.cs @@ -2,6 +2,9 @@ namespace Advanced.Algorithms.Sorting { + /// + /// A merge sort implementation. + /// public class MergeSort where T : IComparable { /// diff --git a/Advanced.Algorithms/Sorting/QuickSort.cs b/Advanced.Algorithms/Sorting/QuickSort.cs index dfafa616..b3a922be 100644 --- a/Advanced.Algorithms/Sorting/QuickSort.cs +++ b/Advanced.Algorithms/Sorting/QuickSort.cs @@ -2,6 +2,9 @@ namespace Advanced.Algorithms.Sorting { + /// + /// A quick sort implementation. + /// public class QuickSort where T : IComparable { /// diff --git a/Advanced.Algorithms/Sorting/SelectionSort.cs b/Advanced.Algorithms/Sorting/SelectionSort.cs index f00f052a..5a7705b7 100644 --- a/Advanced.Algorithms/Sorting/SelectionSort.cs +++ b/Advanced.Algorithms/Sorting/SelectionSort.cs @@ -2,6 +2,9 @@ namespace Advanced.Algorithms.Sorting { + /// + /// A selection sort implementation. + /// public class SelectionSort where T : IComparable { /// diff --git a/Advanced.Algorithms/Sorting/ShellSort.cs b/Advanced.Algorithms/Sorting/ShellSort.cs index 41510608..3bcb07b4 100644 --- a/Advanced.Algorithms/Sorting/ShellSort.cs +++ b/Advanced.Algorithms/Sorting/ShellSort.cs @@ -2,7 +2,6 @@ namespace Advanced.Algorithms.Sorting { - /// /// A shell sort implementation. /// diff --git a/Advanced.Algorithms/Sorting/TreeSort.cs b/Advanced.Algorithms/Sorting/TreeSort.cs index 63fc333d..3046160f 100644 --- a/Advanced.Algorithms/Sorting/TreeSort.cs +++ b/Advanced.Algorithms/Sorting/TreeSort.cs @@ -3,6 +3,9 @@ namespace Advanced.Algorithms.Sorting { + /// + /// A tree sort implementation. + /// public class TreeSort where T : IComparable { /// diff --git a/Advanced.Algorithms/String/Search/KMP.cs b/Advanced.Algorithms/String/Search/KMP.cs index 0613f5b4..8bfe4a61 100644 --- a/Advanced.Algorithms/String/Search/KMP.cs +++ b/Advanced.Algorithms/String/Search/KMP.cs @@ -1,7 +1,7 @@ namespace Advanced.Algorithms.String { /// - /// Knuth–Morris–Pratt(KMP) search implementation. + /// Knuth–Morris–Pratt(KMP) string search implementation. /// public class KMP { diff --git a/Advanced.Algorithms/String/Search/RabinKarp.cs b/Advanced.Algorithms/String/Search/RabinKarp.cs index c55fe953..eadd026f 100644 --- a/Advanced.Algorithms/String/Search/RabinKarp.cs +++ b/Advanced.Algorithms/String/Search/RabinKarp.cs @@ -2,6 +2,9 @@ namespace Advanced.Algorithms.String { + /// + /// A Rabin-Karp string search implementation. + /// public class RabinKarp { /// diff --git a/Advanced.Algorithms/String/Search/ZAlgorithm.cs b/Advanced.Algorithms/String/Search/ZAlgorithm.cs index 4dd52cc0..bfbeb94a 100644 --- a/Advanced.Algorithms/String/Search/ZAlgorithm.cs +++ b/Advanced.Algorithms/String/Search/ZAlgorithm.cs @@ -1,5 +1,8 @@ namespace Advanced.Algorithms.String { + /// + /// A Z-algorithm implementation for string search. + /// public class ZAlgorithm { ///