43# include "operators_example.hpp"
50void vectorOperators_Ex(
84 cout <<
"DEMO: OPERATORS FOR STL VECTORS" << endl;
85 cout <<
" Select operators: " << endl;
86 cout <<
" ""+"" operator" << endl;
87 cout <<
" ""-"" operator" << endl;
88 cout <<
" ""*"" operator" << endl;
89 cout <<
" ""/"" operator" << endl;
96if (selection.compare(
"+") == 0) {
105 x[0] = 1.0; x[1] = 2.0; x[2] = 3.0;
107 X.resize(3, dvector1D(2, 0.0));
108 X[0][0] = 1.0; X[0][1] = 2.0;
109 X[1][0] = 3.0; X[1][1] = 4.0;
110 X[2][0] = 5.0; X[2][1] = 6.0;
114 cout <<
"a = " << a << endl;
115 cout <<
"b = " << b << endl;
126 cout <<
"sum between 1D vectors --------------------------- " << endl;
130 cout <<
"sum between 2D vectors --------------------------- " << endl;
134 cout <<
"sum between 1D/2D vectors ------------------------ " << endl;
141 cout <<
"sum between const and 1D vectors ----------------- " << endl;
148 cout <<
"sum between const and 2D vectors ----------------- " << endl;
160else if (selection.compare(
"-") == 0) {
169 x[0] = 1.0; x[1] = 2.0; x[2] = 3.0;
171 X.resize(3, dvector1D(2, 0.0));
172 X[0][0] = 1.0; X[0][1] = 2.0;
173 X[1][0] = 3.0; X[1][1] = 4.0;
174 X[2][0] = 5.0; X[2][1] = 6.0;
178 cout <<
"a = " << a << endl;
179 cout <<
"b = " << b << endl;
190 cout <<
"diff between 1D vectors --------------------------- " << endl;
194 cout <<
"diff between 2D vectors --------------------------- " << endl;
198 cout <<
"diff between 1D/2D vectors ------------------------ " << endl;
205 cout <<
"diff between const and 1D vectors ----------------- " << endl;
212 cout <<
"diff between const and 2D vectors ----------------- " << endl;
224else if (selection.compare(
"*") == 0) {
233 x[0] = 1.0; x[1] = 2.0; x[2] = 3.0;
235 X.resize(3, dvector1D(2, 0.0));
236 X[0][0] = 1.0; X[0][1] = 2.0;
237 X[1][0] = 3.0; X[1][1] = 4.0;
238 X[2][0] = 5.0; X[2][1] = 6.0;
242 cout <<
"a = " << a << endl;
243 cout <<
"b = " << b << endl;
254 cout <<
"prod between 1D vectors --------------------------- " << endl;
258 cout <<
"prod between 2D vectors --------------------------- " << endl;
262 cout <<
"prod between 1D/2D vectors ------------------------ " << endl;
269 cout <<
"prod between const and 1D vectors ----------------- " << endl;
276 cout <<
"prod between const and 2D vectors ----------------- " << endl;
288else if (selection.compare(
"/") == 0) {
297 x[0] = 1.0; x[1] = 2.0; x[2] = 3.0;
299 X.resize(3, dvector1D(2, 0.0));
300 X[0][0] = 1.0; X[0][1] = 2.0;
301 X[1][0] = 3.0; X[1][1] = 4.0;
302 X[2][0] = 5.0; X[2][1] = 6.0;
306 cout <<
"a = " << a << endl;
307 cout <<
"b = " << b << endl;
308 cout <<
"x = " << endl;
318 cout <<
"div between 1D vectors --------------------------- " << endl;
322 cout <<
"div between 2D vectors --------------------------- " << endl;
326 cout <<
"div between 1D/2D vectors ------------------------ " << endl;
333 cout <<
"div between const and 1D vectors ----------------- " << endl;
340 cout <<
"div between const and 2D vectors ----------------- " << endl;
353 cout <<
" Operator not available!" << endl;
360 cout <<
"DEMO: done!!" << endl;
366void vectorMathFunct_Ex(
400 cout <<
"DEMO: MATH FUNCTIONS FOR STL VECTORS" << endl;
401 cout <<
" Select operators: " << endl;
402 cout <<
" 'min' operator" << endl;
403 cout <<
" 'max' operator" << endl;
404 cout <<
" 'minval' operator" << endl;
405 cout <<
" 'maxval' operator" << endl;
406 cout <<
" 'sum' operator" << endl;
407 cout <<
" 'abs' operator" << endl;
408 cout <<
" 'pow' operator" << endl;
409 cout <<
" 'norm' operator" << endl;
410 cout <<
" 'dotProduct' operator" << endl;
411 cout <<
" 'crossProduct' operator" << endl;
419if (selection.compare(
"min") == 0) {
423 dvector1D x(3), t(3);
424 dvector2D y(3, dvector1D(3)), z(3, dvector1D(3));
427 x[0] = 3.0; x[1] = 3.0; x[2] = 3.0;
428 t[0] = 1.0; t[1] = 4.0; t[2] = 2.0;
429 y[0][0] = 0.0; y[0][1] = 1.0; y[0][2] = 2.0;
430 y[1][0] = 3.0; y[1][1] = 4.0; y[1][2] = 5.0;
431 y[2][0] = 6.0; y[2][1] = 7.0; y[2][2] = 8.0;
432 z[0][0] = 2.0; z[0][1] = 2.0; z[0][2] = 2.0;
433 z[1][0] = 2.0; z[1][1] = 2.0; z[1][2] = 2.0;
434 z[2][0] = 2.0; z[2][1] = 2.0; z[2][2] = 2.0;
435 cout <<
"a = " << a << endl;
436 cout <<
"x = " << x << endl;
437 cout <<
"t = " << t << endl;
438 cout <<
"y = " << y << endl;
439 cout <<
"z = " << z << endl;
442 cout <<
"min(t, a) = " <<
min(t,a) << endl;
445 cout <<
"min(x, t) = " <<
min(x, t) << endl;
448 cout <<
"min(y, a) = " <<
min(y, a) << endl;
451 cout <<
"min(y, x) = " <<
min(y, x) << endl;
454 cout <<
"min(y, z) = " <<
min(y, z) << endl;
461if (selection.compare(
"minval") == 0) {
468 ivector2D y(3, ivector1D(3, 0));
471 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
472 i[0] = 4; i[1] = 1; i[2] = 4;
478 cout <<
"a = " << a << endl;
479 cout <<
"x = " << x << endl;
480 cout <<
"y = " << y << endl;
484 cout <<
"minval(a) = " << mm << endl;
488 cout <<
"minval(x) = " << mm << endl;
492 cout <<
"minval(y) = " << nn << endl;
499else if (selection.compare(
"max") == 0) {
503 dvector1D x(3), t(3);
504 dvector2D y(3, dvector1D(3)), z(3, dvector1D(3));
507 x[0] = 3.0; x[1] = 3.0; x[2] = 3.0;
508 t[0] = 1.0; t[1] = 4.0; t[2] = 2.0;
509 y[0][0] = 0.0; y[0][1] = 1.0; y[0][2] = 2.0;
510 y[1][0] = 3.0; y[1][1] = 4.0; y[1][2] = 5.0;
511 y[2][0] = 6.0; y[2][1] = 7.0; y[2][2] = 8.0;
512 z[0][0] = 2.0; z[0][1] = 2.0; z[0][2] = 2.0;
513 z[1][0] = 2.0; z[1][1] = 2.0; z[1][2] = 2.0;
514 z[2][0] = 2.0; z[2][1] = 2.0; z[2][2] = 2.0;
515 cout <<
"a = " << a << endl;
516 cout <<
"x = " << x << endl;
517 cout <<
"t = " << t << endl;
518 cout <<
"y = " << y << endl;
519 cout <<
"z = " << z << endl;
522 cout <<
"max(t, a) = " <<
max(t,a) << endl;
525 cout <<
"max(x, t) = " <<
max(x, t) << endl;
528 cout <<
"max(y, a) = " <<
max(y, a) << endl;
531 cout <<
"max(y, x) = " <<
max(y, x) << endl;
534 cout <<
"max(y, z) = " <<
max(y, z) << endl;
541if (selection.compare(
"maxval") == 0) {
548 ivector2D y(3, ivector1D(3, 0));
551 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
552 i[0] = 1; i[1] = 2; i[2] = 4;
558 cout <<
"a = " << a << endl;
559 cout <<
"x = " << x << endl;
560 cout <<
"y = " << y << endl;
564 cout <<
"maxval(a) = " << mm << endl;
568 cout <<
"maxval(x) = " << mm << endl;
572 cout <<
"maxval(y) = " << nn << endl;
579else if (selection.compare(
"sum") == 0) {
587 vector<uint32_t> u(3, 0);
589 ivector2D y(3, ivector1D(3, 0));
592 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
593 u[0] = 1; u[1] = 2; u[2] = 3 ;
594 i[0] = 1; i[1] = 2; i[2] = 4;
600 cout <<
"a = " << a << endl;
601 cout <<
"x = " << x << endl;
602 cout <<
"u = " << x << endl;
603 cout <<
"y = " << y << endl;
607 cout <<
"sum(a) = " << mm << endl;
611 cout <<
"sum(x) = " << mm << endl;
615 cout <<
"sum(u) = " << su << endl;
620 cout <<
"sum(y) = " << nn << endl;
628else if (selection.compare(
"abs") == 0) {
634 ivector2D y(3, ivector1D(3, 0));
637 x[0] = 1.05; x[1] = -1.1; x[2] = 3.0;
638 i[0] = 1; i[1] = 2; i[2] = 4;
644 cout <<
"a = " << a << endl;
645 cout <<
"x = " << x << endl;
646 cout <<
"y = " << y << endl;
649 cout <<
"abs(a) = " <<
abs(a) << endl;
652 cout <<
"abs(x) = " <<
abs(x) << endl;
655 cout <<
"abs(y) = " <<
abs(y) << endl;
662else if (selection.compare(
"pow") == 0) {
668 ivector2D y(3, ivector1D(3, 0));
671 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
672 i[0] = 1; i[1] = 2; i[2] = 4;
678 cout <<
"a = " << a << endl;
679 cout <<
"x = " << x << endl;
680 cout <<
"y = " << y << endl;
683 cout <<
"pow(a,2) = " <<
pow(a,2.0) << endl;
686 cout <<
"pow(x,2) = " <<
pow(x,2.0) << endl;
689 cout <<
"pow(y,2) = " <<
pow(y,2.0) << endl;
696else if (selection.compare(
"norm") == 0) {
703 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
704 i[0] = 1; i[1] = -2; i[2] = -4;
707 cout <<
"x = " << x << endl;
708 cout <<
"i = " << i << endl;
711 cout <<
"norm(x,2) = " <<
norm(x,2) << endl;
712 cout <<
"norm(x,3) = " <<
norm(x,3) << endl;
716 cout <<
"norm(i,2) = " <<
norm(i,2) << endl;
717 cout <<
"norm(i,3) = " <<
norm(i,3) << endl;
725else if (selection.compare(
"dotProduct") == 0) {
728 dvector1D x(3, 0.0), y(3, 0.0);
729 ivector1D i(3, 1), j(3, 0);
732 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
734 i[0] = 1; i[1] = -2; i[2] = 4;
738 cout <<
"x = " << x << endl;
739 cout <<
"y = " << x << endl;
740 cout <<
"i = " << i << endl;
741 cout <<
"j = " << i << endl;
754else if (selection.compare(
"crossProduct") == 0) {
757 dvector1D x(3, 0.0), y(3, 0.0);
758 ivector1D i(3, 1), j(3, 0);
761 x[0] = 1.05; x[1] = 0.0; x[2] = 0.0;
762 y[0] = 0.00; y[1] = 2.1; y[2] = 0.0;
763 i[0] = 0; i[1] = -2; i[2] = 0;
764 j[0] = 4; j[1] = 0; j[2] = 0;
767 cout <<
"x = " << x << endl;
768 cout <<
"y = " << x << endl;
769 cout <<
"i = " << i << endl;
770 cout <<
"j = " << i << endl;
786 cout <<
"DEMO: done!!" << endl;
792void arrayOperators_Ex(
826 cout <<
"DEMO: OPERATORS FOR STL ARRAYS" << endl;
827 cout <<
" Select operators: " << endl;
828 cout <<
" ""+"" operator" << endl;
829 cout <<
" ""-"" operator" << endl;
830 cout <<
" ""*"" operator" << endl;
831 cout <<
" ""/"" operator" << endl;
838if (selection.compare(
"+") == 0) {
842 array<double, 2> x, y, z;
843 array<array<double, 2>, 2> X, Y, Z;
846 x[0] = 1.0; x[1] = 2.0;
848 X[0][0] = 1.0; X[0][1] = 2.0;
849 X[1][0] = 3.0; X[1][1] = 4.0;
853 cout <<
"a = " << a << endl;
854 cout <<
"b = " << b << endl;
865 cout <<
"sum between 1D arrays ----------------------------- " << endl;
869 cout <<
"sum between 2D arrays ---------------------------- " << endl;
873 cout <<
"sum between 1D/2D arrays ------------------------- " << endl;
880 cout <<
"sum between const and 1D arrays ------------------ " << endl;
887 cout <<
"sum between const and 2D arrays ------------------ " << endl;
899else if (selection.compare(
"-") == 0) {
903 array<double, 2> x, y, z;
904 array<array<double, 2>, 2> X, Y, Z;
907 x[0] = 1.0; x[1] = 2.0;
909 X[0][0] = 1.0; X[0][1] = 2.0;
910 X[1][0] = 3.0; X[1][1] = 4.0;
914 cout <<
"a = " << a << endl;
915 cout <<
"b = " << b << endl;
926 cout <<
"diff between 1D arrays ---------------------------- " << endl;
930 cout <<
"diff between 2D arrays ---------------------------- " << endl;
934 cout <<
"diff between 1D/2D arrays ------------------------- " << endl;
941 cout <<
"diff between const and 1D arrays ------------------ " << endl;
948 cout <<
"diff between const and 2D arrays ------------------ " << endl;
960else if (selection.compare(
"*") == 0) {
964 array<double, 2> x, y, z;
965 array<array<double, 2>, 2> X, Y, Z;
968 x[0] = 1.0; x[1] = 2.0;
970 X[0][0] = 1.0; X[0][1] = 2.0;
971 X[1][0] = 3.0; X[1][1] = 4.0;
975 cout <<
"a = " << a << endl;
976 cout <<
"b = " << b << endl;
987 cout <<
"prod between 1D arrays ---------------------------- " << endl;
991 cout <<
"prod between 2D arrays ---------------------------- " << endl;
995 cout <<
"prod between 1D/2D arrays ------------------------- " << endl;
1002 cout <<
"prod between const and 1D arrays ------------------ " << endl;
1009 cout <<
"prod between const and 2D arrays ------------------ " << endl;
1021else if (selection.compare(
"/") == 0) {
1024 double a = 1, b = 2;
1025 array<double, 2> x, y, z;
1026 array<array<double, 2>, 2> X, Y, Z;
1029 x[0] = 1.0; x[1] = 2.0;
1031 X[0][0] = 1.0; X[0][1] = 2.0;
1032 X[1][0] = 3.0; X[1][1] = 4.0;
1036 cout <<
"a = " << a << endl;
1037 cout <<
"b = " << b << endl;
1038 cout <<
"x = " << endl;
1048 cout <<
"div between 1D arrays ---------------------------- " << endl;
1052 cout <<
"div between 2D arrays ---------------------------- " << endl;
1056 cout <<
"div between 1D/2D arrays ------------------------- " << endl;
1063 cout <<
"div between const and 1D arrays ------------------ " << endl;
1070 cout <<
"div between const and 2D arrays ------------------ " << endl;
1083 cout <<
" Operator not available!" << endl;
1090 cout <<
"DEMO: done!!" << endl;
1096void arrayMathFunct_Ex(
1130 cout <<
"DEMO: MATH FUNCTIONS FOR STL ARRAYS" << endl;
1131 cout <<
" Select operators: " << endl;
1132 cout <<
" 'min' operator" << endl;
1133 cout <<
" 'max' operator" << endl;
1134 cout <<
" 'minval' operator" << endl;
1135 cout <<
" 'maxval' operator" << endl;
1136 cout <<
" 'sum' operator" << endl;
1137 cout <<
" 'abs' operator" << endl;
1138 cout <<
" 'pow' operator" << endl;
1139 cout <<
" 'norm' operator" << endl;
1140 cout <<
" 'dotProduct' operator" << endl;
1141 cout <<
" 'crossProduct' operator" << endl;
1149if (selection.compare(
"min") == 0) {
1153 array<double, 3> x, t;
1154 array<array<double, 3>, 3> y, z;
1157 x[0] = 3.0; x[1] = 3.0; x[2] = 3.0;
1158 t[0] = 1.0; t[1] = 4.0; t[2] = 2.0;
1159 y[0][0] = 0.0; y[0][1] = 1.0; y[0][2] = 2.0;
1160 y[1][0] = 3.0; y[1][1] = 4.0; y[1][2] = 5.0;
1161 y[2][0] = 6.0; y[2][1] = 7.0; y[2][2] = 8.0;
1162 z[0][0] = 2.0; z[0][1] = 2.0; z[0][2] = 2.0;
1163 z[1][0] = 2.0; z[1][1] = 2.0; z[1][2] = 2.0;
1164 z[2][0] = 2.0; z[2][1] = 2.0; z[2][2] = 2.0;
1165 cout <<
"a = " << a << endl;
1166 cout <<
"x = " << x << endl;
1167 cout <<
"t = " << t << endl;
1168 cout <<
"y = " << y << endl;
1169 cout <<
"z = " << z << endl;
1172 cout <<
"min(t, a) = " <<
min(t,a) << endl;
1175 cout <<
"min(x, t) = " <<
min(x, t) << endl;
1178 cout <<
"min(y, a) = " <<
min(y, a) << endl;
1181 cout <<
"min(y, x) = " <<
min(y, x) << endl;
1184 cout <<
"min(y, z) = " <<
min(y, z) << endl;
1191if (selection.compare(
"minval") == 0) {
1198 array<array<int, 3>, 3> y;
1201 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
1202 i[0] = 4; i[1] = 1; i[2] = 4;
1208 cout <<
"a = " << a << endl;
1209 cout <<
"x = " << x << endl;
1210 cout <<
"y = " << y << endl;
1214 cout <<
"minval(a) = " << mm << endl;
1218 cout <<
"minval(x) = " << mm << endl;
1222 cout <<
"minval(y) = " << nn << endl;
1229else if (selection.compare(
"max") == 0) {
1233 array<double, 3> x, t;
1234 array<array<double, 3>, 3> y, z;
1237 x[0] = 3.0; x[1] = 3.0; x[2] = 3.0;
1238 t[0] = 1.0; t[1] = 4.0; t[2] = 2.0;
1239 y[0][0] = 0.0; y[0][1] = 1.0; y[0][2] = 2.0;
1240 y[1][0] = 3.0; y[1][1] = 4.0; y[1][2] = 5.0;
1241 y[2][0] = 6.0; y[2][1] = 7.0; y[2][2] = 8.0;
1242 z[0][0] = 2.0; z[0][1] = 2.0; z[0][2] = 2.0;
1243 z[1][0] = 2.0; z[1][1] = 2.0; z[1][2] = 2.0;
1244 z[2][0] = 2.0; z[2][1] = 2.0; z[2][2] = 2.0;
1245 cout <<
"a = " << a << endl;
1246 cout <<
"x = " << x << endl;
1247 cout <<
"t = " << t << endl;
1248 cout <<
"y = " << y << endl;
1249 cout <<
"z = " << z << endl;
1252 cout <<
"max(t, a) = " <<
max(t,a) << endl;
1255 cout <<
"max(x, t) = " <<
max(x, t) << endl;
1258 cout <<
"max(y, a) = " <<
max(y, a) << endl;
1261 cout <<
"max(y, x) = " <<
max(y, x) << endl;
1264 cout <<
"max(y, z) = " <<
max(y, z) << endl;
1271if (selection.compare(
"maxval") == 0) {
1278 array<array<int, 3>, 3> y;
1281 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
1282 i[0] = 1; i[1] = 2; i[2] = 4;
1288 cout <<
"a = " << a << endl;
1289 cout <<
"x = " << x << endl;
1290 cout <<
"y = " << y << endl;
1294 cout <<
"maxval(a) = " << mm << endl;
1298 cout <<
"maxval(x) = " << mm << endl;
1302 cout <<
"maxval(y) = " << nn << endl;
1309else if (selection.compare(
"sum") == 0) {
1316 array<array<int, 3>, 3> y;
1319 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
1320 i[0] = 1; i[1] = 2; i[2] = 4;
1326 cout <<
"a = " << a << endl;
1327 cout <<
"x = " << x << endl;
1328 cout <<
"y = " << y << endl;
1332 cout <<
"sum(a) = " << mm << endl;
1336 cout <<
"sum(x) = " << mm << endl;
1340 cout <<
"sum(y) = " << nn << endl;
1347else if (selection.compare(
"abs") == 0) {
1353 array<array<int, 3>, 3> y;
1356 x[0] = 1.05; x[1] = -1.1; x[2] = 3.0;
1357 i[0] = 1; i[1] = 2; i[2] = 4;
1363 cout <<
"a = " << a << endl;
1364 cout <<
"x = " << x << endl;
1365 cout <<
"y = " << y << endl;
1368 cout <<
"abs(a) = " <<
abs(a) << endl;
1371 cout <<
"abs(x) = " <<
abs(x) << endl;
1374 cout <<
"abs(y) = " <<
abs(y) << endl;
1381else if (selection.compare(
"pow") == 0) {
1387 array<array<int, 3>, 3> y;
1390 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
1391 i[0] = 1; i[1] = 2; i[2] = 4;
1397 cout <<
"a = " << a << endl;
1398 cout <<
"x = " << x << endl;
1399 cout <<
"y = " << y << endl;
1402 cout <<
"pow(a,2) = " <<
pow(a,2.0) << endl;
1405 cout <<
"pow(x,2) = " <<
pow(x,2.0) << endl;
1408 cout <<
"pow(y,2) = " <<
pow(y,2.0) << endl;
1415else if (selection.compare(
"norm") == 0) {
1422 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
1423 i[0] = 1; i[1] = -2; i[2] = -4;
1426 cout <<
"x = " << x << endl;
1427 cout <<
"i = " << i << endl;
1430 cout <<
"norm(x,2) = " <<
norm(x,2) << endl;
1431 cout <<
"norm(x,3) = " <<
norm(x,3) << endl;
1435 cout <<
"norm(i,2) = " <<
norm(i,2) << endl;
1436 cout <<
"norm(i,3) = " <<
norm(i,3) << endl;
1444else if (selection.compare(
"dotProduct") == 0) {
1447 array<double, 3> x, y;
1451 x[0] = 1.05; x[1] = 1.1; x[2] = 3.0;
1453 i[0] = 1; i[1] = -2; i[2] = 4;
1457 cout <<
"x = " << x << endl;
1458 cout <<
"y = " << x << endl;
1459 cout <<
"i = " << i << endl;
1460 cout <<
"j = " << i << endl;
1473else if (selection.compare(
"crossProduct") == 0) {
1476 dvector1D x(3, 0.0), y(3, 0.0);
1477 ivector1D i(3, 1), j(3, 0);
1480 x[0] = 1.05; x[1] = 0.0; x[2] = 0.0;
1481 y[0] = 0.00; y[1] = 2.1; y[2] = 0.0;
1482 i[0] = 0; i[1] = -2; i[2] = 0;
1483 j[0] = 4; j[1] = 0; j[2] = 0;
1486 cout <<
"x = " << x << endl;
1487 cout <<
"y = " << x << endl;
1488 cout <<
"i = " << i << endl;
1489 cout <<
"j = " << i << endl;
1505 cout <<
"DEMO: done!!" << endl;
1523cout <<
"SELECT DEMO: " << endl;
1524cout <<
"0. Basic Operators for STL vectors" << endl;
1525cout <<
"1. Math Operators for STL vectors" << endl;
1526cout <<
"2. Basic Operators for STL array" << endl;
1527cout <<
"3. Math Operators for STL array" << endl;
1530 switch (selection) {
1531 case 0: { vectorOperators_Ex();
break; }
1532 case 1: { vectorMathFunct_Ex();
break; }
1533 case 2: { arrayOperators_Ex();
break; }
1534 case 3: { arrayMathFunct_Ex();
break; }
1536}
catch (
const std::exception &exception) {
1537 std::cout << exception.what();
std::array< T, d > abs(const std::array< T, d > &x)
void sum(const std::array< T, d > &x, T1 &s)
double norm(const std::array< T, d > &x, int p)
std::array< T, 3 > crossProduct(const std::array< T, 3 > &x, const std::array< T, 3 > &y)
void maxval(const std::array< T, d > &x, T1 &max_value)
void minval(const std::array< T, d > &x, T1 &min_value)
T dotProduct(const std::array< T, d > &x, const std::array< T, d > &y)
std::array< T, d > max(const std::array< T, d > &x, const std::array< T, d > &y)
double normInf(const std::array< T, d > &x)
std::array< T, d > pow(std::array< T, d > &x, double p)
std::array< T, d > min(const std::array< T, d > &x, const std::array< T, d > &y)
Logger & cout(log::Level defaultSeverity, log::Visibility defaultVisibility)