-
Notifications
You must be signed in to change notification settings - Fork 0
/
exemple.cpp
41 lines (35 loc) · 1.09 KB
/
exemple.cpp
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
/*
* Felipe Gimenez da Silva
* 02 - 13 - 2019
* algorithm: How to use CompareMethods object
* to compile: g++ exemple.cpp -fopenmp
*/
#include "methods.h"
int main()
{
/* creating object pointer
* parameters:
* initial matrix size ( 1 )
* increment size (200)
* average of ( 5 )
*/
//CompareMethods *compare = new CompareMethods(1,1,1);
CompareMethods compare(1,200,5);
/*
* adding list of (objects) Methods to compare
* # to create new object, put your class
* # in methods.h
*/
compare.add(new JacobiSequential()); // gauss jacobi sequential
compare.add(new JacobiParallel()); // gauss jacobi parallel
compare.add(new SeidelSequential()); // gauss seidel sequential
compare.add(new SeidelParallel()); // gauss seidel parallel (change matrix)
compare.add(new SeidelSemiParallel()); // gauss seidel semi parallel
compare.add(new SeidelParallel2()); // gauss seidel parallel 2 (no change matrix)
compare.add(new SeidelUnstable()); // gauss seidel unistable (fast and random)
/*
* starting comparation
* # this is a loop, whitout END.
*/
compare.start();
}