diff --git a/d0/d04/qr__decompose_8h__incl.svg b/d0/d04/qr__decompose_8h__incl.svg index cb76acd49..33c9c37d5 100644 --- a/d0/d04/qr__decompose_8h__incl.svg +++ b/d0/d04/qr__decompose_8h__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg b/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg index a15d67906..03d5c04dc 100644 --- a/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg +++ b/d1/db8/classothers_1_1_cache_1_1_l_r_u_cache__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - diff --git a/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg b/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg index ce607d219..7303628be 100644 --- a/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg +++ b/d1/dda/structdata__structures_1_1trie__using__hashmap_1_1_trie_1_1_node__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - diff --git a/d2/d23/neural__network_8cpp__incl_org.svg b/d2/d23/neural__network_8cpp__incl_org.svg index ad75026af..167121bfd 100644 --- a/d2/d23/neural__network_8cpp__incl_org.svg +++ b/d2/d23/neural__network_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - -
machine_learning::sum
T sum(const std::vector< std::valarray< T > > &A)
Definition vector_ops.hpp:232
qr_algorithm::vector_proj
std::valarray< T > vector_proj(const std::valarray< T > &a, const std::valarray< T > &b)
Definition qr_decompose.h:104
qr_algorithm::vector_mag
double vector_mag(const std::valarray< T > &a)
Definition qr_decompose.h:92
-
math::vector_cross::mag
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
Definition vector_cross_product.cpp:83
+
math::vector_cross::mag
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
Definition vector_cross_product.cpp:91
diff --git a/d2/d3f/insertion__sort__recursive_8cpp__incl.svg b/d2/d3f/insertion__sort__recursive_8cpp__incl.svg index 65a3dd2ab..24337184a 100644 --- a/d2/d3f/insertion__sort__recursive_8cpp__incl.svg +++ b/d2/d3f/insertion__sort__recursive_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - diff --git a/d2/d4b/spirograph_8cpp__incl_org.svg b/d2/d4b/spirograph_8cpp__incl_org.svg index 4941ae7d9..a4cf5056c 100644 --- a/d2/d4b/spirograph_8cpp__incl_org.svg +++ b/d2/d4b/spirograph_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg b/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg index ceda8b70e..67e579355 100644 --- a/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg +++ b/d2/dba/non__preemptive__sjf__scheduling_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - diff --git a/d3/d1a/hill__cipher_8cpp__incl_org.svg b/d3/d1a/hill__cipher_8cpp__incl_org.svg index 1cd0d45ca..2bf0af71c 100644 --- a/d3/d1a/hill__cipher_8cpp__incl_org.svg +++ b/d3/d1a/hill__cipher_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - -
machine_learning::sum
T sum(const std::vector< std::valarray< T > > &A)
Definition vector_ops.hpp:232
qr_algorithm::vector_proj
std::valarray< T > vector_proj(const std::valarray< T > &a, const std::valarray< T > &b)
Definition qr_decompose.h:104
qr_algorithm::vector_mag
double vector_mag(const std::valarray< T > &a)
Definition qr_decompose.h:92
-
math::vector_cross::mag
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
Definition vector_cross_product.cpp:83
+
math::vector_cross::mag
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
Definition vector_cross_product.cpp:91
diff --git a/d3/d28/wiggle__sort_8cpp__incl.svg b/d3/d28/wiggle__sort_8cpp__incl.svg index 4e071d438..e9b345d13 100644 --- a/d3/d28/wiggle__sort_8cpp__incl.svg +++ b/d3/d28/wiggle__sort_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - diff --git a/d3/d4c/sha1_8cpp__incl_org.svg b/d3/d4c/sha1_8cpp__incl_org.svg index b6620d4fb..ca92b7d77 100644 --- a/d3/d4c/sha1_8cpp__incl_org.svg +++ b/d3/d4c/sha1_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d4/d26/durand__kerner__roots_8cpp__incl_org.svg b/d4/d26/durand__kerner__roots_8cpp__incl_org.svg index 2a91de311..9b477d3e2 100644 --- a/d4/d26/durand__kerner__roots_8cpp__incl_org.svg +++ b/d4/d26/durand__kerner__roots_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - diff --git a/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg b/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg index c24a21aee..1370eb77e 100644 --- a/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg +++ b/d4/d2f/fcfs__scheduling_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - diff --git a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg index 9ab29ecde..81f185615 100644 --- a/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg +++ b/d4/d53/classothers_1_1_cache_1_1_l_f_u_cache__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - diff --git a/d4/d60/kohonen__som__trace_8cpp__incl_org.svg b/d4/d60/kohonen__som__trace_8cpp__incl_org.svg index a603e1b7b..82226adac 100644 --- a/d4/d60/kohonen__som__trace_8cpp__incl_org.svg +++ b/d4/d60/kohonen__som__trace_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg b/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg index b18f59301..a8b3a1be1 100644 --- a/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg +++ b/d5/dcd/kohonen__som__topology_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg b/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg index 83a53984e..50484f387 100644 --- a/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg +++ b/d6/d47/classrange__queries_1_1per_seg_tree__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d7/da7/adaline__learning_8cpp__incl_org.svg b/d7/da7/adaline__learning_8cpp__incl_org.svg index 53a8bf2cc..3c23bc000 100644 --- a/d7/da7/adaline__learning_8cpp__incl_org.svg +++ b/d7/da7/adaline__learning_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg b/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg index f53dac040..d3d88e64b 100644 --- a/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg +++ b/d8/dc0/heavy__light__decomposition_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg b/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg index 91ddb3c70..c5a0df8ba 100644 --- a/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg +++ b/da/d32/classdata__structures_1_1trie__using__hashmap_1_1_trie__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + diff --git a/db/dc3/vector__cross__product_8cpp__incl.md5 b/db/dc3/vector__cross__product_8cpp__incl.md5 index d13fbc6dd..f6d881f86 100644 --- a/db/dc3/vector__cross__product_8cpp__incl.md5 +++ b/db/dc3/vector__cross__product_8cpp__incl.md5 @@ -1 +1 @@ -00f4e001cfc1975304c1959526f68d6b \ No newline at end of file +bbfe001127235f61c9e175a193858302 \ No newline at end of file diff --git a/db/dc3/vector__cross__product_8cpp__incl.svg b/db/dc3/vector__cross__product_8cpp__incl.svg index 900094279..f16ff7974 100644 --- a/db/dc3/vector__cross__product_8cpp__incl.svg +++ b/db/dc3/vector__cross__product_8cpp__incl.svg @@ -1,11 +1,11 @@ - - + @@ -23,8 +23,8 @@ Node1 - -math/vector_cross_product.cpp + +math/vector_cross_product.cpp @@ -32,8 +32,8 @@ Node2 - -iostream + +array @@ -41,8 +41,8 @@ Node1->Node2 - - + + @@ -50,8 +50,8 @@ Node3 - -array + +cassert @@ -59,8 +59,8 @@ Node1->Node3 - - + + @@ -68,8 +68,8 @@ Node4 - -cmath + +cmath @@ -77,26 +77,8 @@ Node1->Node4 - - - - - - - -Node5 - - -cassert - - - - - -Node1->Node5 - - - + + diff --git a/db/dc3/vector__cross__product_8cpp__incl_org.svg b/db/dc3/vector__cross__product_8cpp__incl_org.svg index c02083c11..089d5cfa1 100644 --- a/db/dc3/vector__cross__product_8cpp__incl_org.svg +++ b/db/dc3/vector__cross__product_8cpp__incl_org.svg @@ -1,19 +1,19 @@ - - + math/vector_cross_product.cpp Node1 - -math/vector_cross_product.cpp + +math/vector_cross_product.cpp @@ -21,8 +21,8 @@ Node2 - -iostream + +array @@ -30,8 +30,8 @@ Node1->Node2 - - + + @@ -39,8 +39,8 @@ Node3 - -array + +cassert @@ -48,8 +48,8 @@ Node1->Node3 - - + + @@ -57,8 +57,8 @@ Node4 - -cmath + +cmath @@ -66,26 +66,8 @@ Node1->Node4 - - - - - - - -Node5 - - -cassert - - - - - -Node1->Node5 - - - + + diff --git a/db/dc8/dijkstra__greedy_8cpp__incl.svg b/db/dc8/dijkstra__greedy_8cpp__incl.svg index 2504283d5..d532f86ea 100644 --- a/db/dc8/dijkstra__greedy_8cpp__incl.svg +++ b/db/dc8/dijkstra__greedy_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dc/dd2/sha256_8cpp__incl_org.svg b/dc/dd2/sha256_8cpp__incl_org.svg index 877840ba4..02f7238e6 100644 --- a/dc/dd2/sha256_8cpp__incl_org.svg +++ b/dc/dd2/sha256_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - diff --git a/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg b/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg index 6d42b3575..fed76d2e1 100644 --- a/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg +++ b/dc/dd9/classrange__queries_1_1heavy__light__decomposition_1_1_h_l_d__coll__graph_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - diff --git a/dd/d0f/md5_8cpp__incl_org.svg b/dd/d0f/md5_8cpp__incl_org.svg index 502874592..225cc884f 100644 --- a/dd/d0f/md5_8cpp__incl_org.svg +++ b/dd/d0f/md5_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Calculates the Cross Product and the magnitude of two mathematical 3D vectors. More...

-
#include <iostream>
-#include <array>
-#include <cmath>
+
#include <array>
#include <cassert>
+#include <cmath>
Include dependency graph for vector_cross_product.cpp:
-
+

Go to the source code of this file.

@@ -145,7 +144,7 @@ Functions double math::vector_cross::mag (const std::array< double, 3 > &vec)  Calculates the magnitude of the mathematical vector from it's direction ratios.
static void test () - namespace math
+ test function.
int main ()  Main Function.
@@ -197,14 +196,14 @@ Example:
Returns
the direction ratios of the cross product.

Performs the cross product as shown in @algorithm.

-

Definition at line 69 of file vector_cross_product.cpp.

-
69 {
-
70 std::array<double, 3> product;
-
72 product[0] = (A[1] * B[2]) - (A[2] * B[1]);
-
73 product[1] = -((A[0] * B[2]) - (A[2] * B[0]));
-
74 product[2] = (A[0] * B[1]) - (A[1] * B[0]);
-
75 return product;
-
76 }
+

Definition at line 74 of file vector_cross_product.cpp.

+
75 {
+
76 std::array<double, 3> product;
+
78 product[0] = (A[1] * B[2]) - (A[2] * B[1]);
+
79 product[1] = -((A[0] * B[2]) - (A[2] * B[0]));
+
80 product[2] = (A[0] * B[1]) - (A[1] * B[0]);
+
81 return product;
+
82}
@@ -232,11 +231,12 @@ Example:
Returns
type: double description: the magnitude of the mathematical vector from the given direction ratios.
-

Definition at line 83 of file vector_cross_product.cpp.

-
83 {
-
84 double magnitude = sqrt((vec[0] * vec[0]) + (vec[1] * vec[1]) + (vec[2] * vec[2]));
-
85 return magnitude;
-
86 }
+

Definition at line 91 of file vector_cross_product.cpp.

+
91 {
+
92 double magnitude =
+
93 sqrt((vec[0] * vec[0]) + (vec[1] * vec[1]) + (vec[2] * vec[2]));
+
94 return magnitude;
+
95}
@@ -258,35 +258,13 @@ Example:

Main Function.

Asks the user to enter the direction ratios for each of the two mathematical vectors using std::cin

Returns
0 on exit

Tests the functions with sample input before asking for user input.

-

Gets the values for the first vector.

-

Gets the values for the second vector.

-

Displays the output out.

-

Displays the magnitude of the cross product.

-

Definition at line 109 of file vector_cross_product.cpp.

-
109 {
-
110
-
112 test();
-
113
-
114 std::array<double, 3> vec1;
-
115 std::array<double, 3> vec2;
-
116
-
118 std::cout << "\nPass the first Vector: ";
-
119 std::cin >> vec1[0] >> vec1[1] >> vec1[2];
-
120
-
122 std::cout << "\nPass the second Vector: ";
-
123 std::cin >> vec2[0] >> vec2[1] >> vec2[2];
-
124
-
126 std::array<double, 3> product = math::vector_cross::cross(vec1, vec2);
-
127 std::cout << "\nThe cross product is: " << product[0] << " " << product[1] << " " << product[2] << std::endl;
-
128
-
130 std::cout << "Magnitude: " << math::vector_cross::mag(product) << "\n" << std::endl;
-
131
-
132 return 0;
-
133}
-
std::array< double, 3 > cross(const std::array< double, 3 > &A, const std::array< double, 3 > &B)
Function to calculate the cross product of the passed arrays containing the direction ratios of the t...
-
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
-
static void test()
namespace math
+

Definition at line 128 of file vector_cross_product.cpp.

+
128 {
+
130 test();
+
131 return 0;
+
132}
+
static void test()
test function.
@@ -313,20 +291,30 @@ Example:
-

namespace math

-

test function.

+

test function.

test the cross() and the mag() functions.

Tests the cross() function.

Tests the mag() function.

+

Tests A ⨯ A = 0

-

Definition at line 94 of file vector_cross_product.cpp.

-
94 {
-
96 std::array<double, 3> t_vec = math::vector_cross::cross({1, 2, 3}, {4, 5, 6});
-
97 assert(t_vec[0] == -3 && t_vec[1] == 6 && t_vec[2] == -3);
-
98
-
100 double t_mag = math::vector_cross::mag({6, 8, 0});
-
101 assert(t_mag == 10);
-
102}
+

Definition at line 103 of file vector_cross_product.cpp.

+
103 {
+
105 std::array<double, 3> t_vec =
+
106 math::vector_cross::cross({1, 2, 3}, {4, 5, 6});
+
107 assert(t_vec[0] == -3 && t_vec[1] == 6 && t_vec[2] == -3);
+
108
+
110 double t_mag = math::vector_cross::mag({6, 8, 0});
+
111 assert(t_mag == 10);
+
112
+
114 std::array<double, 3> t_vec2 =
+
115 math::vector_cross::cross({1, 2, 3}, {1, 2, 3});
+
116 assert(t_vec2[0] == 0 && t_vec2[1] == 0 &&
+
117 t_vec2[2] == 0); // checking each element
+
118 assert(math::vector_cross::mag(t_vec2) ==
+
119 0); // checking the magnitude is also zero
+
120}
+
std::array< double, 3 > cross(const std::array< double, 3 > &A, const std::array< double, 3 > &B)
Function to calculate the cross product of the passed arrays containing the direction ratios of the t...
+
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
diff --git a/df/d66/vector__cross__product_8cpp_source.html b/df/d66/vector__cross__product_8cpp_source.html index 61fa0eaf7..05da583bc 100644 --- a/df/d66/vector__cross__product_8cpp_source.html +++ b/df/d66/vector__cross__product_8cpp_source.html @@ -117,71 +117,64 @@ $(function(){initNavTree('df/d66/vector__cross__product_8cpp_source.html','../..
Go to the documentation of this file.
1
-
47
-
48#include <iostream>
-
49#include <array>
-
50#include <cmath>
-
51#include <cassert>
-
52
-
57namespace math {
-
62 namespace vector_cross {
-
-
69 std::array<double, 3> cross(const std::array<double, 3> &A, const std::array<double, 3> &B) {
-
70 std::array<double, 3> product;
-
72 product[0] = (A[1] * B[2]) - (A[2] * B[1]);
-
73 product[1] = -((A[0] * B[2]) - (A[2] * B[0]));
-
74 product[2] = (A[0] * B[1]) - (A[1] * B[0]);
-
75 return product;
-
76 }
+
52
+
53#include <array>
+
54#include <cassert>
+
55#include <cmath>
+
56
+
61namespace math {
+
66namespace vector_cross {
+
+
74std::array<double, 3> cross(const std::array<double, 3> &A,
+
75 const std::array<double, 3> &B) {
+
76 std::array<double, 3> product;
+
78 product[0] = (A[1] * B[2]) - (A[2] * B[1]);
+
79 product[1] = -((A[0] * B[2]) - (A[2] * B[0]));
+
80 product[2] = (A[0] * B[1]) - (A[1] * B[0]);
+
81 return product;
+
82}
-
77
-
-
83 double mag(const std::array<double, 3> &vec) {
-
84 double magnitude = sqrt((vec[0] * vec[0]) + (vec[1] * vec[1]) + (vec[2] * vec[2]));
-
85 return magnitude;
-
86 }
+
83
+
+
91double mag(const std::array<double, 3> &vec) {
+
92 double magnitude =
+
93 sqrt((vec[0] * vec[0]) + (vec[1] * vec[1]) + (vec[2] * vec[2]));
+
94 return magnitude;
+
95}
-
87 }
-
88}
-
89
-
-
94static void test() {
-
96 std::array<double, 3> t_vec = math::vector_cross::cross({1, 2, 3}, {4, 5, 6});
-
97 assert(t_vec[0] == -3 && t_vec[1] == 6 && t_vec[2] == -3);
+
96} // namespace vector_cross
+
97} // namespace math
98
-
100 double t_mag = math::vector_cross::mag({6, 8, 0});
-
101 assert(t_mag == 10);
-
102}
+
+
103static void test() {
+
105 std::array<double, 3> t_vec =
+
106 math::vector_cross::cross({1, 2, 3}, {4, 5, 6});
+
107 assert(t_vec[0] == -3 && t_vec[1] == 6 && t_vec[2] == -3);
+
108
+
110 double t_mag = math::vector_cross::mag({6, 8, 0});
+
111 assert(t_mag == 10);
+
112
+
114 std::array<double, 3> t_vec2 =
+
115 math::vector_cross::cross({1, 2, 3}, {1, 2, 3});
+
116 assert(t_vec2[0] == 0 && t_vec2[1] == 0 &&
+
117 t_vec2[2] == 0); // checking each element
+
118 assert(math::vector_cross::mag(t_vec2) ==
+
119 0); // checking the magnitude is also zero
+
120}
-
103
-
-
109int main() {
-
110
-
112 test();
-
113
-
114 std::array<double, 3> vec1;
-
115 std::array<double, 3> vec2;
-
116
-
118 std::cout << "\nPass the first Vector: ";
-
119 std::cin >> vec1[0] >> vec1[1] >> vec1[2];
-
120
-
122 std::cout << "\nPass the second Vector: ";
-
123 std::cin >> vec2[0] >> vec2[1] >> vec2[2];
-
124
-
126 std::array<double, 3> product = math::vector_cross::cross(vec1, vec2);
-
127 std::cout << "\nThe cross product is: " << product[0] << " " << product[1] << " " << product[2] << std::endl;
-
128
-
130 std::cout << "Magnitude: " << math::vector_cross::mag(product) << "\n" << std::endl;
-
131
-
132 return 0;
-
133}
+
121
+
+
128int main() {
+
130 test();
+
131 return 0;
+
132}
for assert
Functions for Vector Cross Product algorithms.
-
std::array< double, 3 > cross(const std::array< double, 3 > &A, const std::array< double, 3 > &B)
Function to calculate the cross product of the passed arrays containing the direction ratios of the t...
-
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
-
static void test()
namespace math
-
int main()
Main Function.
+
std::array< double, 3 > cross(const std::array< double, 3 > &A, const std::array< double, 3 > &B)
Function to calculate the cross product of the passed arrays containing the direction ratios of the t...
+
double mag(const std::array< double, 3 > &vec)
Calculates the magnitude of the mathematical vector from it's direction ratios.
+
static void test()
test function.
+
int main()
Main Function.
diff --git a/df/d77/connected__components_8cpp__incl.svg b/df/d77/connected__components_8cpp__incl.svg index 0a7197b66..156561642 100644 --- a/df/d77/connected__components_8cpp__incl.svg +++ b/df/d77/connected__components_8cpp__incl.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/df/dd6/a1z26__cipher_8cpp__incl_org.svg b/df/dd6/a1z26__cipher_8cpp__incl_org.svg index 6e7d94b0b..4787c4d57 100644 --- a/df/dd6/a1z26__cipher_8cpp__incl_org.svg +++ b/df/dd6/a1z26__cipher_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - - - - Directory dependency graph for cll:
-
+

diff --git a/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.map b/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.map index ada171e55..19a18b061 100644 --- a/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.map +++ b/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.map @@ -1,4 +1,4 @@ - - + + diff --git a/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.svg b/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.svg index 36590d381..270108d03 100644 --- a/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.svg +++ b/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep.svg @@ -1,11 +1,11 @@ - - + @@ -22,8 +22,8 @@ clusterdir_2e746e9d06bf2d8ff842208bcc6ebcfc - -data_structures + +data_structures @@ -31,8 +31,8 @@ dir_f1797d0c2a0a12033e7d74efffeb14e1 - -cll + +cll diff --git a/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep_org.svg b/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep_org.svg index 4fecad009..b65cc54bd 100644 --- a/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep_org.svg +++ b/dir_f1797d0c2a0a12033e7d74efffeb14e1_dep_org.svg @@ -1,18 +1,18 @@ - - + data_structures/cll clusterdir_2e746e9d06bf2d8ff842208bcc6ebcfc - -data_structures + +data_structures @@ -20,8 +20,8 @@ dir_f1797d0c2a0a12033e7d74efffeb14e1 - -cll + +cll diff --git a/graph_legend.svg b/graph_legend.svg index 44ca51e8d..030cd5247 100644 --- a/graph_legend.svg +++ b/graph_legend.svg @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -