From cc0e02e5f83bda51d37151b8e943ca35c9ee0d46 Mon Sep 17 00:00:00 2001 From: realstealthninja Date: Mon, 7 Oct 2024 13:41:10 +0000 Subject: [PATCH] Documentation for dd36279e734ca96f4a1dd7907faf2058210dc293 --- annotated.html | 1 + annotated_dup.js | 3 +- classes.html | 2 +- d2/d90/namespacegreedy__algorithms.html | 10 + d2/d90/namespacegreedy__algorithms.js | 1 + d3/d36/digit__separation_8cpp.html | 284 ++++++++++++++++++ d3/d36/digit__separation_8cpp.js | 6 + ...83bb8ccf42aaf7375a83e91490eda1e_cgraph.map | 10 + ...83bb8ccf42aaf7375a83e91490eda1e_cgraph.md5 | 1 + ...83bb8ccf42aaf7375a83e91490eda1e_cgraph.svg | 114 +++++++ ...8ccf42aaf7375a83e91490eda1e_cgraph_org.svg | 88 ++++++ ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map | 12 + ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 | 1 + ...66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg | 132 ++++++++ ...b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg | 106 +++++++ d9/d47/digit__separation_8cpp__incl.map | 15 + d9/d47/digit__separation_8cpp__incl.md5 | 1 + d9/d47/digit__separation_8cpp__incl.svg | 156 ++++++++++ d9/d47/digit__separation_8cpp__incl_org.svg | 130 ++++++++ ...eedy__algorithms_1_1_digit_separation.html | 269 +++++++++++++++++ ...greedy__algorithms_1_1_digit_separation.js | 6 + ...809ae6828223999374bde5b197a59c8_cgraph.map | 7 + ...809ae6828223999374bde5b197a59c8_cgraph.md5 | 1 + ...809ae6828223999374bde5b197a59c8_cgraph.svg | 87 ++++++ ...e6828223999374bde5b197a59c8_cgraph_org.svg | 61 ++++ ...gorithms_1_1_digit_separation-members.html | 125 ++++++++ dir_0eaa691bd54ab0922ca7f50599de6d22.html | 3 + dir_0eaa691bd54ab0922ca7f50599de6d22.js | 1 + doxygen_crawl.html | 10 + files.html | 9 +- functions_d.html | 3 + functions_func_d.html | 3 + globals_func_m.html | 2 +- globals_func_t.html | 2 +- globals_m.html | 2 +- globals_t.html | 2 +- hierarchy.html | 203 ++++++------- hierarchy.js | 1 + inherit_graph_100.map | 2 +- inherit_graph_100.md5 | 2 +- inherit_graph_100.svg | 10 +- inherit_graph_101.map | 2 +- inherit_graph_101.md5 | 2 +- inherit_graph_101.svg | 10 +- inherit_graph_102.map | 2 +- inherit_graph_102.md5 | 2 +- inherit_graph_102.svg | 10 +- inherit_graph_103.map | 2 +- inherit_graph_103.md5 | 2 +- inherit_graph_103.svg | 4 +- inherit_graph_104.map | 14 +- inherit_graph_104.md5 | 2 +- inherit_graph_104.svg | 122 +------- inherit_graph_105.map | 14 +- inherit_graph_105.md5 | 2 +- inherit_graph_105.svg | 123 +++++++- inherit_graph_106.map | 2 +- inherit_graph_106.md5 | 2 +- inherit_graph_106.svg | 13 +- inherit_graph_107.map | 2 +- inherit_graph_107.md5 | 2 +- inherit_graph_107.svg | 10 +- inherit_graph_108.map | 2 +- inherit_graph_108.md5 | 2 +- inherit_graph_108.svg | 10 +- inherit_graph_109.map | 2 +- inherit_graph_109.md5 | 2 +- inherit_graph_109.svg | 10 +- inherit_graph_110.map | 2 +- inherit_graph_110.md5 | 2 +- inherit_graph_110.svg | 10 +- inherit_graph_111.map | 2 +- inherit_graph_111.md5 | 2 +- inherit_graph_111.svg | 10 +- inherit_graph_112.map | 2 +- inherit_graph_112.md5 | 2 +- inherit_graph_112.svg | 4 +- inherit_graph_113.map | 3 + inherit_graph_113.md5 | 1 + inherit_graph_113.svg | 21 ++ inherit_graph_46.map | 2 +- inherit_graph_46.md5 | 2 +- inherit_graph_46.svg | 4 +- inherit_graph_47.map | 2 +- inherit_graph_47.md5 | 2 +- inherit_graph_47.svg | 13 +- inherit_graph_48.map | 2 +- inherit_graph_48.md5 | 2 +- inherit_graph_48.svg | 10 +- inherit_graph_49.map | 2 +- inherit_graph_49.md5 | 2 +- inherit_graph_49.svg | 10 +- inherit_graph_50.map | 2 +- inherit_graph_50.md5 | 2 +- inherit_graph_50.svg | 10 +- inherit_graph_51.map | 2 +- inherit_graph_51.md5 | 2 +- inherit_graph_51.svg | 10 +- inherit_graph_52.map | 2 +- inherit_graph_52.md5 | 2 +- inherit_graph_52.svg | 10 +- inherit_graph_53.map | 2 +- inherit_graph_53.md5 | 2 +- inherit_graph_53.svg | 10 +- inherit_graph_54.map | 2 +- inherit_graph_54.md5 | 2 +- inherit_graph_54.svg | 10 +- inherit_graph_55.map | 2 +- inherit_graph_55.md5 | 2 +- inherit_graph_55.svg | 10 +- inherit_graph_56.map | 2 +- inherit_graph_56.md5 | 2 +- inherit_graph_56.svg | 14 +- inherit_graph_57.map | 2 +- inherit_graph_57.md5 | 2 +- inherit_graph_57.svg | 10 +- inherit_graph_58.map | 2 +- inherit_graph_58.md5 | 2 +- inherit_graph_58.svg | 10 +- inherit_graph_59.map | 2 +- inherit_graph_59.md5 | 2 +- inherit_graph_59.svg | 15 +- inherit_graph_60.map | 2 +- inherit_graph_60.md5 | 2 +- inherit_graph_60.svg | 12 +- inherit_graph_61.map | 2 +- inherit_graph_61.md5 | 2 +- inherit_graph_61.svg | 12 +- inherit_graph_62.map | 2 +- inherit_graph_62.md5 | 2 +- inherit_graph_62.svg | 10 +- inherit_graph_63.map | 2 +- inherit_graph_63.md5 | 2 +- inherit_graph_63.svg | 12 +- inherit_graph_64.map | 2 +- inherit_graph_64.md5 | 2 +- inherit_graph_64.svg | 13 +- inherit_graph_65.map | 2 +- inherit_graph_65.md5 | 2 +- inherit_graph_65.svg | 10 +- inherit_graph_66.map | 2 +- inherit_graph_66.md5 | 2 +- inherit_graph_66.svg | 10 +- inherit_graph_67.map | 2 +- inherit_graph_67.md5 | 2 +- inherit_graph_67.svg | 10 +- inherit_graph_68.map | 2 +- inherit_graph_68.md5 | 2 +- inherit_graph_68.svg | 10 +- inherit_graph_69.map | 2 +- inherit_graph_69.md5 | 2 +- inherit_graph_69.svg | 8 +- inherit_graph_70.map | 2 +- inherit_graph_70.md5 | 2 +- inherit_graph_70.svg | 14 +- inherit_graph_71.map | 2 +- inherit_graph_71.md5 | 2 +- inherit_graph_71.svg | 15 +- inherit_graph_72.map | 2 +- inherit_graph_72.md5 | 2 +- inherit_graph_72.svg | 10 +- inherit_graph_73.map | 2 +- inherit_graph_73.md5 | 2 +- inherit_graph_73.svg | 10 +- inherit_graph_74.map | 2 +- inherit_graph_74.md5 | 2 +- inherit_graph_74.svg | 10 +- inherit_graph_75.map | 2 +- inherit_graph_75.md5 | 2 +- inherit_graph_75.svg | 4 +- inherit_graph_76.map | 2 +- inherit_graph_76.md5 | 2 +- inherit_graph_76.svg | 12 +- inherit_graph_77.map | 2 +- inherit_graph_77.md5 | 2 +- inherit_graph_77.svg | 13 +- inherit_graph_78.map | 2 +- inherit_graph_78.md5 | 2 +- inherit_graph_78.svg | 13 +- inherit_graph_79.map | 2 +- inherit_graph_79.md5 | 2 +- inherit_graph_79.svg | 12 +- inherit_graph_80.map | 2 +- inherit_graph_80.md5 | 2 +- inherit_graph_80.svg | 10 +- inherit_graph_81.map | 2 +- inherit_graph_81.md5 | 2 +- inherit_graph_81.svg | 12 +- inherit_graph_82.map | 2 +- inherit_graph_82.md5 | 2 +- inherit_graph_82.svg | 12 +- inherit_graph_83.map | 2 +- inherit_graph_83.md5 | 2 +- inherit_graph_83.svg | 12 +- inherit_graph_84.map | 2 +- inherit_graph_84.md5 | 2 +- inherit_graph_84.svg | 4 +- inherit_graph_85.map | 2 +- inherit_graph_85.md5 | 2 +- inherit_graph_85.svg | 13 +- inherit_graph_86.map | 2 +- inherit_graph_86.md5 | 2 +- inherit_graph_86.svg | 13 +- inherit_graph_87.map | 2 +- inherit_graph_87.md5 | 2 +- inherit_graph_87.svg | 12 +- inherit_graph_88.map | 2 +- inherit_graph_88.md5 | 2 +- inherit_graph_88.svg | 12 +- inherit_graph_89.map | 2 +- inherit_graph_89.md5 | 2 +- inherit_graph_89.svg | 13 +- inherit_graph_90.map | 2 +- inherit_graph_90.md5 | 2 +- inherit_graph_90.svg | 10 +- inherit_graph_91.map | 2 +- inherit_graph_91.md5 | 2 +- inherit_graph_91.svg | 10 +- inherit_graph_92.map | 2 +- inherit_graph_92.md5 | 2 +- inherit_graph_92.svg | 10 +- inherit_graph_93.map | 6 +- inherit_graph_93.md5 | 2 +- inherit_graph_93.svg | 54 +--- inherit_graph_94.map | 6 +- inherit_graph_94.md5 | 2 +- inherit_graph_94.svg | 54 +++- inherit_graph_95.map | 2 +- inherit_graph_95.md5 | 2 +- inherit_graph_95.svg | 13 +- inherit_graph_96.map | 2 +- inherit_graph_96.md5 | 2 +- inherit_graph_96.svg | 13 +- inherit_graph_97.map | 2 +- inherit_graph_97.md5 | 2 +- inherit_graph_97.svg | 13 +- inherit_graph_98.map | 2 +- inherit_graph_98.md5 | 2 +- inherit_graph_98.svg | 13 +- inherit_graph_99.map | 2 +- inherit_graph_99.md5 | 2 +- inherit_graph_99.svg | 10 +- inherits.html | 125 ++++---- navtreedata.js | 22 +- navtreeindex10.js | 24 +- navtreeindex11.js | 24 +- navtreeindex12.js | 24 +- navtreeindex13.js | 24 +- navtreeindex14.js | 36 +-- navtreeindex15.js | 11 + navtreeindex3.js | 4 +- navtreeindex4.js | 8 +- navtreeindex5.js | 8 +- navtreeindex6.js | 8 +- navtreeindex7.js | 16 +- navtreeindex8.js | 16 +- navtreeindex9.js | 8 +- search/all_12.js | 2 +- search/all_19.js | 2 +- search/all_9.js | 188 ++++++------ search/classes_3.js | 19 +- search/files_4.js | 19 +- search/functions_14.js | 2 +- search/functions_4.js | 135 +++++---- search/functions_d.js | 2 +- 265 files changed, 2821 insertions(+), 1126 deletions(-) create mode 100644 d3/d36/digit__separation_8cpp.html create mode 100644 d3/d36/digit__separation_8cpp.js create mode 100644 d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.map create mode 100644 d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.md5 create mode 100644 d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg create mode 100644 d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph_org.svg create mode 100644 d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map create mode 100644 d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 create mode 100644 d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg create mode 100644 d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg create mode 100644 d9/d47/digit__separation_8cpp__incl.map create mode 100644 d9/d47/digit__separation_8cpp__incl.md5 create mode 100644 d9/d47/digit__separation_8cpp__incl.svg create mode 100644 d9/d47/digit__separation_8cpp__incl_org.svg create mode 100644 da/d49/classgreedy__algorithms_1_1_digit_separation.html create mode 100644 da/d49/classgreedy__algorithms_1_1_digit_separation.js create mode 100644 da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.map create mode 100644 da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.md5 create mode 100644 da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.svg create mode 100644 da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph_org.svg create mode 100644 de/d8f/classgreedy__algorithms_1_1_digit_separation-members.html create mode 100644 inherit_graph_113.map create mode 100644 inherit_graph_113.md5 create mode 100644 inherit_graph_113.svg diff --git a/annotated.html b/annotated.html index 4cab3351d..0651a0986 100644 --- a/annotated.html +++ b/annotated.html @@ -164,6 +164,7 @@ $(function(){initNavTree('annotated.html',''); initResizable(true); });  Ngreedy_algorithmsFor std::vector  NdijkstraFunctions for the Dijkstra algorithm implementation  CGraphWrapper class for storing a graph + CDigitSeparationA class that provides methods to separate the digits of a large positive number  NhashingHashing algorithms  Nsha256  CHashContains hash array and functions to update it and convert it to a hexadecimal string diff --git a/annotated_dup.js b/annotated_dup.js index 6f403959f..acbb8e242 100644 --- a/annotated_dup.js +++ b/annotated_dup.js @@ -74,7 +74,8 @@ var annotated_dup = [ "greedy_algorithms", "d2/d90/namespacegreedy__algorithms.html", [ [ "dijkstra", "d2/d2f/namespacegreedy__algorithms_1_1dijkstra.html", [ [ "Graph", "d2/daa/classgreedy__algorithms_1_1dijkstra_1_1_graph.html", "d2/daa/classgreedy__algorithms_1_1dijkstra_1_1_graph" ] - ] ] + ] ], + [ "DigitSeparation", "da/d49/classgreedy__algorithms_1_1_digit_separation.html", "da/d49/classgreedy__algorithms_1_1_digit_separation" ] ] ], [ "hashing", "d6/d0c/namespacehashing.html", [ [ "sha256", null, [ diff --git a/classes.html b/classes.html index 47ed1e4ea..62c74a4f1 100644 --- a/classes.html +++ b/classes.html @@ -120,7 +120,7 @@ $(function(){initNavTree('classes.html',''); initResizable(true); });
catalan_numbers
CircularLinkedList (operations_on_datastructures::circular_linked_list)
cll
Compare
compare
AyStarSearch::comparison_operator (machine_learning::aystar_search)
Complex
Convexhull (geometry::jarvis)
CycleCheck
D
-
D_Node (others::Cache)
DenseLayer (machine_learning::neural_network::layers)
double_linked_list
dsu
+
D_Node (others::Cache)
DenseLayer (machine_learning::neural_network::layers)
DigitSeparation (greedy_algorithms)
double_linked_list
dsu
E
EasterYearMonthDay
Edge
EightPuzzle (machine_learning::aystar_search)
Entry (double_hashing)
Entry (linear_probing)
Entry (quadratic_probing)
diff --git a/d2/d90/namespacegreedy__algorithms.html b/d2/d90/namespacegreedy__algorithms.html index 4d568c873..65fb7a8ef 100644 --- a/d2/d90/namespacegreedy__algorithms.html +++ b/d2/d90/namespacegreedy__algorithms.html @@ -106,6 +106,7 @@ $(function(){initNavTree('d2/d90/namespacegreedy__algorithms.html','../../'); in
greedy_algorithms Namespace Reference
@@ -123,6 +124,12 @@ Namespaces  Functions for the Gale-Shapley Algorithm.
  + + + + +

+Classes

class  DigitSeparation
 A class that provides methods to separate the digits of a large positive number. More...
 
@@ -137,8 +144,11 @@ Functions

for std::vector

for uint32_t

for assert

+

For std::vector to store separated digits.

for assert for INT_MAX for IO operations

Greedy Algorithms

+

For reveresing the vector For assert() function to check for errors For abs() function For int64_t data type to handle large numbers For input/output operations

+

Greedy Algorithms

for std::u32int_t for std::vector for std::find

Greedy Algorithms

for assert for std::cout

diff --git a/d2/d90/namespacegreedy__algorithms.js b/d2/d90/namespacegreedy__algorithms.js index db534295e..ede2af138 100644 --- a/d2/d90/namespacegreedy__algorithms.js +++ b/d2/d90/namespacegreedy__algorithms.js @@ -4,6 +4,7 @@ var namespacegreedy__algorithms = [ "stable_matching", "dd/d9a/namespacegreedy__algorithms_1_1stable__matching.html", [ [ "gale_shapley", "dd/d9a/namespacegreedy__algorithms_1_1stable__matching.html#a6d7e84df47dcf19e88f95f8f9040306c", null ] ] ], + [ "DigitSeparation", "da/d49/classgreedy__algorithms_1_1_digit_separation.html", "da/d49/classgreedy__algorithms_1_1_digit_separation" ], [ "can_jump", "d2/d90/namespacegreedy__algorithms.html#a33e3819aa9ffec0e380383c52603b502", null ], [ "findMinimumEdge", "d2/d90/namespacegreedy__algorithms.html#a349e4ab9a97532c3931a2bd2a19c0098", null ] ]; \ No newline at end of file diff --git a/d3/d36/digit__separation_8cpp.html b/d3/d36/digit__separation_8cpp.html new file mode 100644 index 000000000..996dbcf03 --- /dev/null +++ b/d3/d36/digit__separation_8cpp.html @@ -0,0 +1,284 @@ + + + + + + + +Algorithms_in_C++: greedy_algorithms/digit_separation.cpp File Reference + + + + + + + + + + + + + + + + + +
+
+

Functions

bool can_jump (const std::vector< int > &nums)
+ + + + + +
+
Algorithms_in_C++ 1.0.0 +
+
Set of algorithms implemented in C++.
+
+ + + + + + + + + + +
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
digit_separation.cpp File Reference
+
+
+ +

Separates digits from numbers in forward and reverse order. +More...

+
#include <algorithm>
+#include <cassert>
+#include <cmath>
+#include <cstdint>
+#include <iostream>
+#include <vector>
+
+Include dependency graph for digit_separation.cpp:
+
+
+
+
+ + + + +

+Classes

class  greedy_algorithms::DigitSeparation
 A class that provides methods to separate the digits of a large positive number. More...
 
+ + + + +

+Namespaces

namespace  greedy_algorithms
 for std::vector
 
+ + + + + + + +

+Functions

static void tests ()
 self test implementation
 
int main ()
 main function
 
+

Detailed Description

+

Separates digits from numbers in forward and reverse order.

+
See also
https://www.log2base2.com/c-examples/loop/split-a-number-into-digits-in-c.html
+

The DigitSeparation class provides two methods to separate the digits of large integers: digitSeparationReverseOrder and digitSeparationForwardOrder. The digitSeparationReverseOrder method extracts digits by repeatedly applying the modulus operation (% 10) to isolate the last digit, then divides the number by 10 to remove it. This process continues until the entire number is broken down into its digits, which are stored in reverse order. If the number is zero, the method directly returns a vector containing {0} to handle this edge case. Negative numbers are handled by taking the absolute value, ensuring consistent behavior regardless of the sign.

Author
Muhammad Junaid Khalid
+

Function Documentation

+ +

◆ main()

+ +
+
+ + + + + + + +
int main (void )
+
+ +

main function

+
Returns
0 on successful exit
+
138 {
+
139 tests(); // run self test implementation
+
140
+
141 return 0;
+
142}
+
static void tests()
self test implementation
Definition digit_separation.cpp:83
+
+Here is the call graph for this function:
+
+
+
+ +
+
+ +

◆ tests()

+ +
+
+ + + + + +
+ + + + + + + +
static void tests ()
+
+static
+
+ +

self test implementation

+
Returns
void
+
83 {
+ +
85
+
86 // Test case: Positive number
+
87 std::int64_t number = 1234567890;
+
88 std::vector<std::int64_t> expectedReverse = {0, 9, 8, 7, 6, 5, 4, 3, 2, 1};
+
89 std::vector<std::int64_t> expectedForward = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
+
90 std::vector<std::int64_t> reverseOrder =
+ +
92 assert(reverseOrder == expectedReverse);
+
93 std::vector<std::int64_t> forwardOrder =
+ +
95 assert(forwardOrder == expectedForward);
+
96
+
97 // Test case: Single digit number
+
98 number = 5;
+
99 expectedReverse = {5};
+
100 expectedForward = {5};
+
101 reverseOrder = ds.digitSeparationReverseOrder(number);
+
102 assert(reverseOrder == expectedReverse);
+
103 forwardOrder = ds.digitSeparationForwardOrder(number);
+
104 assert(forwardOrder == expectedForward);
+
105
+
106 // Test case: Zero
+
107 number = 0;
+
108 expectedReverse = {0};
+
109 expectedForward = {0};
+
110 reverseOrder = ds.digitSeparationReverseOrder(number);
+
111 assert(reverseOrder == expectedReverse);
+
112 forwardOrder = ds.digitSeparationForwardOrder(number);
+
113 assert(forwardOrder == expectedForward);
+
114
+
115 // Test case: Large number
+
116 number = 987654321012345;
+
117 expectedReverse = {5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+
118 expectedForward = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5};
+
119 reverseOrder = ds.digitSeparationReverseOrder(number);
+
120 assert(reverseOrder == expectedReverse);
+
121 forwardOrder = ds.digitSeparationForwardOrder(number);
+
122 assert(forwardOrder == expectedForward);
+
123
+
124 // Test case: Negative number
+
125 number = -987654321012345;
+
126 expectedReverse = {5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+
127 expectedForward = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5};
+
128 reverseOrder = ds.digitSeparationReverseOrder(number);
+
129 assert(reverseOrder == expectedReverse);
+
130 forwardOrder = ds.digitSeparationForwardOrder(number);
+
131 assert(forwardOrder == expectedForward);
+
132}
+
A class that provides methods to separate the digits of a large positive number.
Definition digit_separation.cpp:35
+
std::vector< std::int64_t > digitSeparationForwardOrder(std::int64_t largeNumber) const
Implementation of digitSeparationForwardOrder method.
Definition digit_separation.cpp:68
+
std::vector< std::int64_t > digitSeparationReverseOrder(std::int64_t largeNumber) const
Implementation of digitSeparationReverseOrder method.
Definition digit_separation.cpp:48
+ + +
+Here is the call graph for this function:
+
+
+
+ +
+
+
+
+ + + + diff --git a/d3/d36/digit__separation_8cpp.js b/d3/d36/digit__separation_8cpp.js new file mode 100644 index 000000000..ba9fd7a9c --- /dev/null +++ b/d3/d36/digit__separation_8cpp.js @@ -0,0 +1,6 @@ +var digit__separation_8cpp = +[ + [ "greedy_algorithms::DigitSeparation", "da/d49/classgreedy__algorithms_1_1_digit_separation.html", "da/d49/classgreedy__algorithms_1_1_digit_separation" ], + [ "main", "d3/d36/digit__separation_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ], + [ "tests", "d3/d36/digit__separation_8cpp.html#a483bb8ccf42aaf7375a83e91490eda1e", null ] +]; \ No newline at end of file diff --git a/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.map b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.map new file mode 100644 index 000000000..80ac12428 --- /dev/null +++ b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.map @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.md5 b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.md5 new file mode 100644 index 000000000..859bc715b --- /dev/null +++ b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.md5 @@ -0,0 +1 @@ +1649b7dab17754b877f56efbec73556b \ No newline at end of file diff --git a/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg new file mode 100644 index 000000000..f4efd2f90 --- /dev/null +++ b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph.svg @@ -0,0 +1,114 @@ + + + + + + + + + + + + +tests + + +Node1 + + +tests + + + + + +Node2 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ForwardOrder + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ReverseOrder + + + + + +Node1->Node3 + + + + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +std::reverse + + + + + +Node2->Node4 + + + + + + + + + + + + + diff --git a/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph_org.svg b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph_org.svg new file mode 100644 index 000000000..277fde8c0 --- /dev/null +++ b/d3/d36/digit__separation_8cpp_a483bb8ccf42aaf7375a83e91490eda1e_cgraph_org.svg @@ -0,0 +1,88 @@ + + + + + + +tests + + +Node1 + + +tests + + + + + +Node2 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ForwardOrder + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ReverseOrder + + + + + +Node1->Node3 + + + + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +std::reverse + + + + + +Node2->Node4 + + + + + + + + diff --git a/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map new file mode 100644 index 000000000..36ec9b490 --- /dev/null +++ b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 new file mode 100644 index 000000000..11ee4acae --- /dev/null +++ b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 @@ -0,0 +1 @@ +a557164585e504eb1d90a8d78bad24e8 \ No newline at end of file diff --git a/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg new file mode 100644 index 000000000..e828c3cd3 --- /dev/null +++ b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + +main + + +Node1 + + +main + + + + + +Node2 + + +tests + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ForwardOrder + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ReverseOrder + + + + + +Node2->Node4 + + + + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +std::reverse + + + + + +Node3->Node5 + + + + + + + + + + + + + diff --git a/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg new file mode 100644 index 000000000..9cdc66952 --- /dev/null +++ b/d3/d36/digit__separation_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph_org.svg @@ -0,0 +1,106 @@ + + + + + + +main + + +Node1 + + +main + + + + + +Node2 + + +tests + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ForwardOrder + + + + + +Node2->Node3 + + + + + + + + +Node4 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ReverseOrder + + + + + +Node2->Node4 + + + + + + + + +Node3->Node4 + + + + + + + + +Node5 + + +std::reverse + + + + + +Node3->Node5 + + + + + + + + diff --git a/d9/d47/digit__separation_8cpp__incl.map b/d9/d47/digit__separation_8cpp__incl.map new file mode 100644 index 000000000..3394e6a79 --- /dev/null +++ b/d9/d47/digit__separation_8cpp__incl.map @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/d9/d47/digit__separation_8cpp__incl.md5 b/d9/d47/digit__separation_8cpp__incl.md5 new file mode 100644 index 000000000..b85aab930 --- /dev/null +++ b/d9/d47/digit__separation_8cpp__incl.md5 @@ -0,0 +1 @@ +d9a664742d1c710397683c17a216434e \ No newline at end of file diff --git a/d9/d47/digit__separation_8cpp__incl.svg b/d9/d47/digit__separation_8cpp__incl.svg new file mode 100644 index 000000000..8f919559d --- /dev/null +++ b/d9/d47/digit__separation_8cpp__incl.svg @@ -0,0 +1,156 @@ + + + + + + + + + + + + +greedy_algorithms/digit_separation.cpp + + +Node1 + + +greedy_algorithms/digit +_separation.cpp + + + + + +Node2 + + +algorithm + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +cassert + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +cmath + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +cstdint + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +iostream + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +vector + + + + + +Node1->Node7 + + + + + + + + + + + + + diff --git a/d9/d47/digit__separation_8cpp__incl_org.svg b/d9/d47/digit__separation_8cpp__incl_org.svg new file mode 100644 index 000000000..79bd2b9dd --- /dev/null +++ b/d9/d47/digit__separation_8cpp__incl_org.svg @@ -0,0 +1,130 @@ + + + + + + +greedy_algorithms/digit_separation.cpp + + +Node1 + + +greedy_algorithms/digit +_separation.cpp + + + + + +Node2 + + +algorithm + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +cassert + + + + + +Node1->Node3 + + + + + + + + +Node4 + + +cmath + + + + + +Node1->Node4 + + + + + + + + +Node5 + + +cstdint + + + + + +Node1->Node5 + + + + + + + + +Node6 + + +iostream + + + + + +Node1->Node6 + + + + + + + + +Node7 + + +vector + + + + + +Node1->Node7 + + + + + + + + diff --git a/da/d49/classgreedy__algorithms_1_1_digit_separation.html b/da/d49/classgreedy__algorithms_1_1_digit_separation.html new file mode 100644 index 000000000..178e109ce --- /dev/null +++ b/da/d49/classgreedy__algorithms_1_1_digit_separation.html @@ -0,0 +1,269 @@ + + + + + + + +Algorithms_in_C++: greedy_algorithms::DigitSeparation Class Reference + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Algorithms_in_C++ 1.0.0 +
+
Set of algorithms implemented in C++.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+ +
greedy_algorithms::DigitSeparation Class Reference
+
+
+ +

A class that provides methods to separate the digits of a large positive number. + More...

+ + + + + + + + + + + +

+Public Member Functions

 DigitSeparation ()
 Default constructor for the DigitSeparation class.
 
std::vector< std::int64_tdigitSeparationReverseOrder (std::int64_t largeNumber) const
 Implementation of digitSeparationReverseOrder method.
 
std::vector< std::int64_tdigitSeparationForwardOrder (std::int64_t largeNumber) const
 Implementation of digitSeparationForwardOrder method.
 
+

Detailed Description

+

A class that provides methods to separate the digits of a large positive number.

+

Constructor & Destructor Documentation

+ +

◆ DigitSeparation()

+ +
+
+ + + + + +
+ + + + + + + +
greedy_algorithms::DigitSeparation::DigitSeparation ()
+
+inline
+
+ +

Default constructor for the DigitSeparation class.

+
40{}
+
+
+
+

Member Function Documentation

+ +

◆ digitSeparationForwardOrder()

+ +
+
+ + + + + +
+ + + + + + + +
std::vector< std::int64_t > greedy_algorithms::DigitSeparation::digitSeparationForwardOrder (std::int64_t largeNumber) const
+
+inline
+
+ +

Implementation of digitSeparationForwardOrder method.

+
Parameters
+ + +
largeNumberThe large number to separate digits from.
+
+
+
Returns
A vector of digits in forward order.
+
69 {
+ +
71 digitSeparationReverseOrder(largeNumber);
+
72 std::reverse(result.begin(), result.end());
+
73 return result;
+
74 }
+
std::vector< std::int64_t > digitSeparationReverseOrder(std::int64_t largeNumber) const
Implementation of digitSeparationReverseOrder method.
Definition digit_separation.cpp:48
+
uint64_t result(uint64_t n)
Definition fibonacci_sum.cpp:76
+
T reverse(T... args)
+ +
+Here is the call graph for this function:
+
+
+
+ +
+
+ +

◆ digitSeparationReverseOrder()

+ +
+
+ + + + + +
+ + + + + + + +
std::vector< std::int64_t > greedy_algorithms::DigitSeparation::digitSeparationReverseOrder (std::int64_t largeNumber) const
+
+inline
+
+ +

Implementation of digitSeparationReverseOrder method.

+
Parameters
+ + +
largeNumberThe large number to separate digits from.
+
+
+
Returns
A vector of digits in reverse order.
+
49 {
+ +
51 if (largeNumber != 0) {
+
52 while (largeNumber != 0) {
+
53 result.push_back(std::abs(largeNumber % 10));
+
54 largeNumber /= 10;
+
55 }
+
56 } else {
+
57 result.push_back(0);
+
58 }
+
59 return result;
+
60 }
+
+
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/da/d49/classgreedy__algorithms_1_1_digit_separation.js b/da/d49/classgreedy__algorithms_1_1_digit_separation.js new file mode 100644 index 000000000..22b2e5615 --- /dev/null +++ b/da/d49/classgreedy__algorithms_1_1_digit_separation.js @@ -0,0 +1,6 @@ +var classgreedy__algorithms_1_1_digit_separation = +[ + [ "DigitSeparation", "da/d49/classgreedy__algorithms_1_1_digit_separation.html#afd54c969a6c9bab16b4a064fbc8ed40e", null ], + [ "digitSeparationForwardOrder", "da/d49/classgreedy__algorithms_1_1_digit_separation.html#a1809ae6828223999374bde5b197a59c8", null ], + [ "digitSeparationReverseOrder", "da/d49/classgreedy__algorithms_1_1_digit_separation.html#a34769a780845e9d4279152899bd3bf79", null ] +]; \ No newline at end of file diff --git a/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.map b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.map new file mode 100644 index 000000000..edb494389 --- /dev/null +++ b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.map @@ -0,0 +1,7 @@ + + + + + + + diff --git a/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.md5 b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.md5 new file mode 100644 index 000000000..c33953a26 --- /dev/null +++ b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.md5 @@ -0,0 +1 @@ +c6f4b15afebce0a61636f63d76449450 \ No newline at end of file diff --git a/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.svg b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.svg new file mode 100644 index 000000000..c539965f5 --- /dev/null +++ b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + +greedy_algorithms::DigitSeparation::digitSeparationForwardOrder + + +Node1 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ForwardOrder + + + + + +Node2 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ReverseOrder + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +std::reverse + + + + + +Node1->Node3 + + + + + + + + + + + + + diff --git a/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph_org.svg b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph_org.svg new file mode 100644 index 000000000..7652d14d2 --- /dev/null +++ b/da/d49/classgreedy__algorithms_1_1_digit_separation_a1809ae6828223999374bde5b197a59c8_cgraph_org.svg @@ -0,0 +1,61 @@ + + + + + + +greedy_algorithms::DigitSeparation::digitSeparationForwardOrder + + +Node1 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ForwardOrder + + + + + +Node2 + + +greedy_algorithms:: +DigitSeparation::digitSeparation +ReverseOrder + + + + + +Node1->Node2 + + + + + + + + +Node3 + + +std::reverse + + + + + +Node1->Node3 + + + + + + + + diff --git a/de/d8f/classgreedy__algorithms_1_1_digit_separation-members.html b/de/d8f/classgreedy__algorithms_1_1_digit_separation-members.html new file mode 100644 index 000000000..fa1f66df6 --- /dev/null +++ b/de/d8f/classgreedy__algorithms_1_1_digit_separation-members.html @@ -0,0 +1,125 @@ + + + + + + + +Algorithms_in_C++: Member List + + + + + + + + + + + + + + + + + +
+
+ + + + + + +
+
Algorithms_in_C++ 1.0.0 +
+
Set of algorithms implemented in C++.
+
+
+ + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+
+
+
+
+
Loading...
+
Searching...
+
No Matches
+
+
+
+
+ +
+
greedy_algorithms::DigitSeparation Member List
+
+
+ +

This is the complete list of members for greedy_algorithms::DigitSeparation, including all inherited members.

+ + + + +
DigitSeparation()greedy_algorithms::DigitSeparationinline
digitSeparationForwardOrder(std::int64_t largeNumber) constgreedy_algorithms::DigitSeparationinline
digitSeparationReverseOrder(std::int64_t largeNumber) constgreedy_algorithms::DigitSeparationinline
+
+ + + + diff --git a/dir_0eaa691bd54ab0922ca7f50599de6d22.html b/dir_0eaa691bd54ab0922ca7f50599de6d22.html index 67907aafb..961d6534a 100644 --- a/dir_0eaa691bd54ab0922ca7f50599de6d22.html +++ b/dir_0eaa691bd54ab0922ca7f50599de6d22.html @@ -113,6 +113,9 @@ Files  boruvkas_minimum_spanning_tree.cpp  [Borůvkas Algorithm](https://en.wikipedia.org/wiki/Borůvka's_algorithm) to find the Minimum Spanning Tree
  + digit_separation.cpp + Separates digits from numbers in forward and reverse order.
 dijkstra.cpp  Dijkstra algorithm implementation
  diff --git a/dir_0eaa691bd54ab0922ca7f50599de6d22.js b/dir_0eaa691bd54ab0922ca7f50599de6d22.js index 174d12979..9f187e626 100644 --- a/dir_0eaa691bd54ab0922ca7f50599de6d22.js +++ b/dir_0eaa691bd54ab0922ca7f50599de6d22.js @@ -1,6 +1,7 @@ var dir_0eaa691bd54ab0922ca7f50599de6d22 = [ [ "boruvkas_minimum_spanning_tree.cpp", "d4/d6c/boruvkas__minimum__spanning__tree_8cpp.html", "d4/d6c/boruvkas__minimum__spanning__tree_8cpp" ], + [ "digit_separation.cpp", "d3/d36/digit__separation_8cpp.html", "d3/d36/digit__separation_8cpp" ], [ "dijkstra.cpp", "df/dcb/greedy__algorithms_2dijkstra_8cpp.html", "df/dcb/greedy__algorithms_2dijkstra_8cpp" ], [ "gale_shapley.cpp", "db/d80/gale__shapley_8cpp.html", "db/d80/gale__shapley_8cpp" ], [ "jump_game.cpp", "d6/dba/jump__game_8cpp.html", "d6/dba/jump__game_8cpp" ], diff --git a/doxygen_crawl.html b/doxygen_crawl.html index 1237e3165..2761b57d3 100644 --- a/doxygen_crawl.html +++ b/doxygen_crawl.html @@ -116,6 +116,7 @@ + @@ -510,6 +511,8 @@ + + @@ -1455,6 +1458,9 @@ + + + @@ -2906,6 +2912,10 @@ + + + + diff --git a/files.html b/files.html index 3e47a8a2c..71f9655ee 100644 --- a/files.html +++ b/files.html @@ -218,10 +218,11 @@ solve-a-rat-in-a-maze-c-java-pytho/" target="_blank">Rat in a Maze algorithm  spirograph.cppImplementation of Spirograph   greedy_algorithms  boruvkas_minimum_spanning_tree.cpp[Borůvkas Algorithm](https://en.wikipedia.org/wiki/Borůvka's_algorithm) to find the Minimum Spanning Tree - dijkstra.cppDijkstra algorithm implementation - gale_shapley.cppGale Shapley Algorithm - jump_game.cppJumping Game algorithm implementation - kruskals_minimum_spanning_tree.cppKruskals Minimum Spanning Tree implementation + digit_separation.cppSeparates digits from numbers in forward and reverse order + dijkstra.cppDijkstra algorithm implementation + gale_shapley.cppGale Shapley Algorithm + jump_game.cppJumping Game algorithm implementation + kruskals_minimum_spanning_tree.cppKruskals Minimum Spanning Tree implementation   hashing  chaining.cppImplementation of hash chains  double_hash_hash_table.cppStorage mechanism using double-hashed keys diff --git a/functions_d.html b/functions_d.html index 0e74b0a43..75d0ba852 100644 --- a/functions_d.html +++ b/functions_d.html @@ -130,6 +130,9 @@ $(function(){initNavTree('functions_d.html',''); initResizable(true); });
  • dfs_par() : range_queries::heavy_light_decomposition::HLD< X >
  • dfs_size() : range_queries::heavy_light_decomposition::Tree< X >
  • digit_char() : large_number
  • +
  • DigitSeparation() : greedy_algorithms::DigitSeparation
  • +
  • digitSeparationForwardOrder() : greedy_algorithms::DigitSeparation
  • +
  • digitSeparationReverseOrder() : greedy_algorithms::DigitSeparation
  • direction() : SegmentIntersection
  • display() : data_structures::linked_list::list, data_structures::queue_using_array::Queue_Array, hash_chain, others::lru_cache::LRUCache, queue< ValueType >, stack< ValueType >
  • displayList() : data_structures::SkipList
  • diff --git a/functions_func_d.html b/functions_func_d.html index 588dc5b51..0b69f3e81 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -127,6 +127,9 @@ $(function(){initNavTree('functions_func_d.html',''); initResizable(true); });
  • dfs_par() : range_queries::heavy_light_decomposition::HLD< X >
  • dfs_size() : range_queries::heavy_light_decomposition::Tree< X >
  • digit_char() : large_number
  • +
  • DigitSeparation() : greedy_algorithms::DigitSeparation
  • +
  • digitSeparationForwardOrder() : greedy_algorithms::DigitSeparation
  • +
  • digitSeparationReverseOrder() : greedy_algorithms::DigitSeparation
  • direction() : SegmentIntersection
  • display() : data_structures::linked_list::list, data_structures::queue_using_array::Queue_Array, hash_chain, others::lru_cache::LRUCache, queue< ValueType >, stack< ValueType >
  • displayList() : data_structures::SkipList
  • diff --git a/globals_func_m.html b/globals_func_m.html index 6f3770744..366b8e7ea 100644 --- a/globals_func_m.html +++ b/globals_func_m.html @@ -107,7 +107,7 @@ $(function(){initNavTree('globals_func_m.html',''); initResizable(true); });
    Here is a list of all documented functions with links to the documentation:

    - m -