CXXGraph  0.2.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, unsigned int threads = std::thread::hardware_concurrency(), double lambda = 1);
36  ~Globals();
37 
38  void print();
39 
40  //CONSTANT
41  const int SLEEP_LIMIT = 16;
42  const int PLACES = 4;
43 
44  int numberOfPartition; //number of partitions
45  //OPTIONAL
46  PartitionAlgorithm partitionStategy;
47  double lambda;
48  unsigned int threads;
49  };
50 
51  inline Globals::Globals(int numberOfPartiton, PartitionAlgorithm algorithm, unsigned int threads,double lambda)
52  {
53  this->numberOfPartition = numberOfPartiton;
54  this->partitionStategy = algorithm;
55  this->lambda = lambda;
56  this->threads = threads;
57  }
58 
59  inline Globals::~Globals()
60  {
61  }
62  }
63 }
64 
65 #endif // __CXXGRAPH_PARTITIONING_GLOBALS_H__
Definition: Globals.hpp:32