diff --git a/d7/db9/hill__cipher_8cpp.html b/d7/db9/hill__cipher_8cpp.html
index 7852fe515..8ed8388c6 100644
--- a/d7/db9/hill__cipher_8cpp.html
+++ b/d7/db9/hill__cipher_8cpp.html
@@ -392,6 +392,7 @@ Here is the call graph for this function:
int hash_search(int key, int *counter)
Definition: hash_search.cpp:76
void shell_sort(T *arr, size_t LEN)
Definition: shell_sort2.cpp:45
+int main()
Definition: fibonacci_search.cpp:123
std::string tolowerRoman(int n)
Definition: decimal_to_roman_numeral.cpp:24
void test_f(const int NUM_DATA)
Definition: shell_sort2.cpp:145
String search algorithms.
Definition: brute_force_string_searching.cpp:13
@@ -406,7 +407,9 @@ Here is the call graph for this function:
double addition_rule_dependent(double A, double B, double B_given_A)
Definition: addition_rule.cpp:25
void test2()
Definition: smallest_circle.cpp:173
+bool random_tests()
random tests which cover cases when we have one, multiple or zero occurences of the value we're looki...
Definition: fibonacci_search.cpp:96
+
double x
Definition: smallest_circle.cpp:16
int main()
Definition: decimal_to_roman_numeral.cpp:90
@@ -454,6 +457,7 @@ Here is the call graph for this function:
int brute_force(const std::string &text, const std::string &pattern)
Definition: brute_force_string_searching.cpp:21
int main()
Definition: buzz_number.cpp:9
+int fibonacci_search(const std::vector< int > &arr, int value)
using fibonacci search algorithm finds an index of a given element in a sorted array
Definition: fibonacci_search.cpp:23
Functions to compute QR decomposition of any rectangular matrix.
int offset(int x)
Definition: fenwick_tree.cpp:22
void create_matrix(std::valarray< std::valarray< double >> *A)
Definition: qr_eigen_values.cpp:28
@@ -546,6 +550,7 @@ Here is the call graph for this function:
int data[MAX]
test data
Definition: hash_search.cpp:24
void method1(int number)
Definition: decimal_to_binary.cpp:11
void test1()
Definition: qr_eigen_values.cpp:177
+bool no_occurence_tests()
random tests for checking performance when an array doesn't contain an element
Definition: fibonacci_search.cpp:72
void printArray(T *arr, int sz)
Definition: heap_sort.cpp:37
int main()
Definition: hash_search.cpp:99
diff --git a/d9/dfa/fibonacci__search_8cpp__incl.map b/d9/dfa/fibonacci__search_8cpp__incl.map
new file mode 100644
index 000000000..d5ea0ced2
--- /dev/null
+++ b/d9/dfa/fibonacci__search_8cpp__incl.map
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/d9/dfa/fibonacci__search_8cpp__incl.md5 b/d9/dfa/fibonacci__search_8cpp__incl.md5
new file mode 100644
index 000000000..3fcf02184
--- /dev/null
+++ b/d9/dfa/fibonacci__search_8cpp__incl.md5
@@ -0,0 +1 @@
+b6cb0972b59667af42aa0eec7dc0c47d
\ No newline at end of file
diff --git a/d9/dfa/fibonacci__search_8cpp__incl.svg b/d9/dfa/fibonacci__search_8cpp__incl.svg
new file mode 100644
index 000000000..0d952651a
--- /dev/null
+++ b/d9/dfa/fibonacci__search_8cpp__incl.svg
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+search/fibonacci_search.cpp
+
+
+
+Node1
+
+
+search/fibonacci_search.cpp
+
+
+
+
+
+Node2
+
+
+iostream
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node3
+
+
+vector
+
+
+
+
+
+Node1->Node3
+
+
+
+
+
+Node4
+
+
+cassert
+
+
+
+
+
+Node1->Node4
+
+
+
+
+
+Node5
+
+
+cstdlib
+
+
+
+
+
+Node1->Node5
+
+
+
+
+
+Node6
+
+
+algorithm
+
+
+
+
+
+Node1->Node6
+
+
+
+
+
diff --git a/de/d0d/fibonacci__search_8cpp.html b/de/d0d/fibonacci__search_8cpp.html
new file mode 100644
index 000000000..c2752c5cb
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp.html
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+Algorithms_in_C++: search/fibonacci_search.cpp File Reference
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Algorithms_in_C++
+ 1.0.0
+
+ Set of algorithms implemented in C++.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Fibonacci search algorithm
+More...
+
#include <iostream>
+#include <vector>
+#include <cassert>
+#include <cstdlib>
+#include <algorithm>
+
+
+int fibonacci_search (const std::vector < int > &arr, int value)
+ using fibonacci search algorithm finds an index of a given element in a sorted array More...
+
+
+bool no_occurence_tests ()
+ random tests for checking performance when an array doesn't contain an element
+
+
+bool random_tests ()
+ random tests which cover cases when we have one, multiple or zero occurences of the value we're looking for
+
+int main ()
+
+
+
+
+
+
◆ fibonacci_search()
+
+
+
+
+
+ int fibonacci_search
+ (
+ const std::vector < int > &
+ arr ,
+
+
+
+
+ int
+ value
+
+
+
+ )
+
+
+
+
+
+
using fibonacci search algorithm finds an index of a given element in a sorted array
+
Parameters
+
+ arr sorted array
+ value value that we're looking for
+
+
+
+
Returns if the array contains the value, returns an index of the element. otherwise -1.
+
+
+
25 int last = 0, current = 1;
+
26 int length = arr.size();
+
+
28 int next = last + current;
+
+
+
+
+
+
34 next = last + current;
+
+
+
+
38 int offset = -1, index;
+
+
+
+
+
+
44 index =
std::min (offset + last, length-1);
+
+
46 if (arr[index] < value){
+
+
+
49 last =
next - current;
+
+
+
52 }
else if (arr[index] > value){
+
+
54 current = current - last;
+
55 last =
next - current;
+
+
+
+
+
+
+
62 if (current && !arr.empty() && arr[offset+1] == value){
+
+
+
+
+
+
+
+
+
+
+
+
◆ main()
+
+
+
+
+
+ int main
+ (
+ )
+
+
+
+
+
Main Function testing the algorithm
+
+
+
+
+
+
+
+bool random_tests()
random tests which cover cases when we have one, multiple or zero occurences of the value we're looki...
Definition: fibonacci_search.cpp:96
+
+bool no_occurence_tests()
random tests for checking performance when an array doesn't contain an element
Definition: fibonacci_search.cpp:72
+
+
+
+
+
diff --git a/de/d0d/fibonacci__search_8cpp.js b/de/d0d/fibonacci__search_8cpp.js
new file mode 100644
index 000000000..c22583e86
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp.js
@@ -0,0 +1,7 @@
+var fibonacci__search_8cpp =
+[
+ [ "fibonacci_search", "de/d0d/fibonacci__search_8cpp.html#a0bc61b3903d9a53061bf31e5d110fe61", null ],
+ [ "main", "de/d0d/fibonacci__search_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4", null ],
+ [ "no_occurence_tests", "de/d0d/fibonacci__search_8cpp.html#a5e144326104e57a3808aed7eb098db0d", null ],
+ [ "random_tests", "de/d0d/fibonacci__search_8cpp.html#a2aa09bef74ee063c1331de0883af4f4f", null ]
+];
\ No newline at end of file
diff --git a/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.map b/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.map
new file mode 100644
index 000000000..24d96092e
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.md5 b/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.md5
new file mode 100644
index 000000000..3e246ddec
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.md5
@@ -0,0 +1 @@
+5d52d9e06e399c2c4799dfa50bf04384
\ No newline at end of file
diff --git a/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.svg b/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.svg
new file mode 100644
index 000000000..aca12c730
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp_a0bc61b3903d9a53061bf31e5d110fe61_cgraph.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+fibonacci_search
+
+
+
+Node1
+
+
+fibonacci_search
+
+
+
+
+
+Node2
+
+
+std::min
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
diff --git a/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map b/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
new file mode 100644
index 000000000..41b0f7805
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.map
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5 b/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
new file mode 100644
index 000000000..42d6c09b7
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.md5
@@ -0,0 +1 @@
+60e7701dda18f05cd45344ac80fe6fd3
\ No newline at end of file
diff --git a/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg b/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
new file mode 100644
index 000000000..5ff9a91c4
--- /dev/null
+++ b/de/d0d/fibonacci__search_8cpp_ae66f6b31b5ad750f1fe042a706a4e3d4_cgraph.svg
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+main
+
+
+
+Node1
+
+
+main
+
+
+
+
+
+Node2
+
+
+no_occurence_tests
+
+
+
+
+
+Node1->Node2
+
+
+
+
+
+Node8
+
+
+random_tests
+
+
+
+
+
+Node1->Node8
+
+
+
+
+
+Node3
+
+
+fibonacci_search
+
+
+
+
+
+Node2->Node3
+
+
+
+
+
+Node5
+
+
+std::find
+
+
+
+
+
+Node2->Node5
+
+
+
+
+
+Node6
+
+
+std::rand
+
+
+
+
+
+Node2->Node6
+
+
+
+
+
+Node7
+
+
+std::remove
+
+
+
+
+
+Node2->Node7
+
+
+
+
+
+Node4
+
+
+std::min
+
+
+
+
+
+Node3->Node4
+
+
+
+
+
+Node8->Node3
+
+
+
+
+
+Node8->Node5
+
+
+
+
+
+Node8->Node6
+
+
+
+
+
+Node9
+
+
+std::sort
+
+
+
+
+
+Node8->Node9
+
+
+
+
+
diff --git a/dir_19b2bf9199a15c634a08b1ede1dd896a.html b/dir_19b2bf9199a15c634a08b1ede1dd896a.html
index a3188faed..2f918d350 100644
--- a/dir_19b2bf9199a15c634a08b1ede1dd896a.html
+++ b/dir_19b2bf9199a15c634a08b1ede1dd896a.html
@@ -103,6 +103,9 @@ Files
file exponential_search.cpp
Exponential search algorithm
+file fibonacci_search.cpp
+ Fibonacci search algorithm
+
file hash_search.cpp
Hash Search Algorithm - Best Time Complexity Ω(1)
diff --git a/dir_19b2bf9199a15c634a08b1ede1dd896a.js b/dir_19b2bf9199a15c634a08b1ede1dd896a.js
index 40f90c0ce..1f9369269 100644
--- a/dir_19b2bf9199a15c634a08b1ede1dd896a.js
+++ b/dir_19b2bf9199a15c634a08b1ede1dd896a.js
@@ -2,6 +2,7 @@ var dir_19b2bf9199a15c634a08b1ede1dd896a =
[
[ "binary_search.cpp", "df/dd5/binary__search_8cpp.html", "df/dd5/binary__search_8cpp" ],
[ "exponential_search.cpp", "d8/d8a/exponential__search_8cpp.html", "d8/d8a/exponential__search_8cpp" ],
+ [ "fibonacci_search.cpp", "de/d0d/fibonacci__search_8cpp.html", "de/d0d/fibonacci__search_8cpp" ],
[ "hash_search.cpp", "d1/df3/hash__search_8cpp.html", "d1/df3/hash__search_8cpp" ],
[ "interpolation_search.cpp", "d9/dd7/interpolation__search_8cpp.html", "d9/dd7/interpolation__search_8cpp" ],
[ "interpolation_search2.cpp", "df/d39/interpolation__search2_8cpp.html", "df/d39/interpolation__search2_8cpp" ],
diff --git a/files.html b/files.html
index 34c7a8253..5a19f4590 100644
--- a/files.html
+++ b/files.html
@@ -196,14 +196,15 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
► search
binary_search.cpp Binary search algorithm
exponential_search.cpp Exponential search algorithm
- hash_search.cpp Hash Search Algorithm - Best Time Complexity Ω(1)
- interpolation_search.cpp Interpolation search algorithm
- interpolation_search2.cpp Interpolation search algorithm
- jump_search.cpp C++ program to implement Jump Search
- linear_search.cpp Linear search algorithm
- median_search.cpp Median search algorithm
- ternary_search.cpp Ternary search algorithm
- text_search.cpp Search for words in a long textual paragraph
+ fibonacci_search.cpp Fibonacci search algorithm
+ hash_search.cpp Hash Search Algorithm - Best Time Complexity Ω(1)
+ interpolation_search.cpp Interpolation search algorithm
+ interpolation_search2.cpp Interpolation search algorithm
+ jump_search.cpp C++ program to implement Jump Search
+ linear_search.cpp Linear search algorithm
+ median_search.cpp Median search algorithm
+ ternary_search.cpp Ternary search algorithm
+ text_search.cpp Search for words in a long textual paragraph
► sorting
bubble_sort.cpp Bubble sort algorithm
comb_sort.cpp Comb Sort Algorithm (Comb Sort)
diff --git a/globals_f.html b/globals_f.html
index 2fdd254c1..e75b7823a 100644
--- a/globals_f.html
+++ b/globals_f.html
@@ -124,6 +124,9 @@ $(document).ready(function(){initNavTree('globals_f.html',''); initResizable();
fibonacci()
: fibonacci.cpp
+fibonacci_search()
+: fibonacci_search.cpp
+
fill()
: decimal_to_roman_numeral.cpp
diff --git a/globals_func_f.html b/globals_func_f.html
index 9f7835041..59647cc07 100644
--- a/globals_func_f.html
+++ b/globals_func_f.html
@@ -118,6 +118,9 @@ $(document).ready(function(){initNavTree('globals_func_f.html',''); initResizabl
fibonacci()
: fibonacci.cpp
+fibonacci_search()
+: fibonacci_search.cpp
+
fill()
: decimal_to_roman_numeral.cpp
diff --git a/globals_func_i.html b/globals_func_i.html
index d5748cd0f..4203fa9e3 100644
--- a/globals_func_i.html
+++ b/globals_func_i.html
@@ -120,12 +120,12 @@ $(document).ready(function(){initNavTree('globals_func_i.html',''); initResizabl
is_square()
: ordinary_least_squares_regressor.cpp
-isPrime()
-: modular_inverse_fermat_little_theorem.cpp
-
IsPrime()
: primality_test.cpp
+isPrime()
+: modular_inverse_fermat_little_theorem.cpp
+
it_ternary_search()
: ternary_search.cpp
diff --git a/globals_func_m.html b/globals_func_m.html
index eea961821..c96064cd7 100644
--- a/globals_func_m.html
+++ b/globals_func_m.html
@@ -125,6 +125,7 @@ $(document).ready(function(){initNavTree('globals_func_m.html',''); initResizabl
, interpolation_search2.cpp
, interpolation_search.cpp
, hash_search.cpp
+, fibonacci_search.cpp
, exponential_search.cpp
, binary_search.cpp
, fenwick_tree.cpp
diff --git a/globals_func_n.html b/globals_func_n.html
index 1f42d7a24..53180b8d9 100644
--- a/globals_func_n.html
+++ b/globals_func_n.html
@@ -96,6 +96,9 @@ $(document).ready(function(){initNavTree('globals_func_n.html',''); initResizabl
nCr()
: binomial_dist.cpp
+no_occurence_tests()
+: fibonacci_search.cpp
+
number_of_digits()
: armstrong_number.cpp
diff --git a/globals_func_r.html b/globals_func_r.html
index bb314bcaf..dad59279c 100644
--- a/globals_func_r.html
+++ b/globals_func_r.html
@@ -93,6 +93,9 @@ $(document).ready(function(){initNavTree('globals_func_r.html',''); initResizabl
- r -