-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExamples.cpp
More file actions
77 lines (73 loc) · 1.52 KB
/
Examples.cpp
File metadata and controls
77 lines (73 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*#include "Matrix.hpp"
#include <stdio.h>
#include <chrono>*/
//
//class Foo
//{
//private:
// void default_bar(int value)
// {
// std::cout << "Nothing entered\n";
// }
// std::function<void(Foo*, int)> the_function = &Foo::default_bar;
// bool Check() {
// std::string r;
// std::cin >> r;
// return std::atoi(r.c_str());
// }
//public:
// void replace_bar(std::function<void(Foo*, int)> new_func)
// {
// the_function = new_func;
// }
//
//
// Foo() {
// if (Check()) {
// the_function = &Foo::baz;
// }
// else {
// the_function = &Foo::default_bar;
// }
// }
//
//
// void bar(int value)
// {
// the_function(this, value);
// }
//
// void baz(int value)
// {
// std::cout << "Something entered\n";
// }
//};
//
//
//void main() {
// Foo cla;
// cla.bar(3);
//}
//
//int main() {
//Matrix A(2, 2);
//A.SetIndex(0, 0, 1);
//A.SetIndex(0, 1, 2);
//A.SetIndex(1, 0, 3);
//A.SetIndex(1, 1, 4);
//Matrix B(2, 2);
//B.SetIndex(0, 0, 1);
//B.SetIndex(0, 1, 2);
//B.SetIndex(1, 0, 3);
//B.SetIndex(1, 1, 4);
///*Matrix A(100, 100);
//Matrix B(100, 100);*/
//
//Matrix C = A.Multiply(B);
//C.print();
//ret rel no ref 65249171
// Average loss: 20.255265Total time taken: 63856722
//ret rel ref Average loss: 33.466297Total time taken: 81040310
// Average loss: 30.068913Total time taken: 71620142
// ret deb ref Average loss: 3.407753Total time taken: 236596657
//}