CXXGraph  0.4.0
CXXGraph is a header only, that manages the Graphs and it's algorithm in C++
Globals.hpp
1 /***********************************************************/
2 /*** ______ ____ ______ _ ***/
3 /*** / ___\ \/ /\ \/ / ___|_ __ __ _ _ __ | |__ ***/
4 /*** | | \ / \ / | _| '__/ _` | '_ \| '_ \ ***/
5 /*** | |___ / \ / \ |_| | | | (_| | |_) | | | | ***/
6 /*** \____/_/\_\/_/\_\____|_| \__,_| .__/|_| |_| ***/
7 /*** |_| ***/
8 /***********************************************************/
9 /*** Header-Only C++ Library for Graph ***/
10 /*** Representation and Algorithms ***/
11 /***********************************************************/
12 /*** Author: ZigRazor ***/
13 /*** E-Mail: zigrazor@gmail.com ***/
14 /***********************************************************/
15 /*** Collaboration: ----------- ***/
16 /***********************************************************/
17 /*** License: AGPL v3.0 ***/
18 /***********************************************************/
19 
20 #ifndef __CXXGRAPH_PARTITIONING_GLOBALS_H__
21 #define __CXXGRAPH_PARTITIONING_GLOBALS_H__
22 
23 #pragma once
24 
25 #include <thread>
26 #include "Partitioning/PartitionAlgorithm.hpp"
27 
28 
29 namespace CXXGRAPH {
30  namespace PARTITIONING {
31  class Globals
32  {
33  private:
34  public:
35  Globals(int numberOfPartiton, PartitionAlgorithm algorithm = PartitionAlgorithm::HDRF_ALG, double param1 = 1, double param2 = 1, double param3 = 1, unsigned int threads = std::thread::hardware_concurrency());
36  ~Globals();
37 
38  void print();
39 
40  //CONSTANT
41  const int SLEEP_LIMIT = 16; // In microseconds
42  const int PLACES = 4;
43 
44  int numberOfPartition = 0; //number of partitions
45  //OPTIONAL
46  PartitionAlgorithm partitionStategy;
47  unsigned int threads = 0;
48  double param1 = 0.0;
49  double param2 = 0.0;
50  double param3 = 0.0;
51  unsigned long long edgeCardinality = 0;
52  unsigned long long vertexCardinality = 0;
53  unsigned long long edgeAnalyzed = 0;
54  };
55 
56  inline Globals::Globals(int numberOfPartiton, PartitionAlgorithm algorithm,double param1, double param2, double param3, unsigned int threads)
57  {
58  this->numberOfPartition = numberOfPartiton;
59  this->partitionStategy = algorithm;
60  this->threads = threads;
61  this->param1 = param1;
62  this->param2 = param2;
63  this->param3 = param3;
64  }
65 
66  inline Globals::~Globals()
67  {
68  }
69 
70  }
71 }
72 
73 #endif // __CXXGRAPH_PARTITIONING_GLOBALS_H__
Definition: Globals.hpp:32