mirror of
https://github.com/13hannes11/UU_la_parallel_programming_practical_assignments.git
synced 2024-09-04 00:50:58 +02:00
add header file for set
This commit is contained in:
@@ -1 +1 @@
|
||||
add_library(sets STATIC Node.h Node.cpp Set.cpp FineList.cpp LazyList.cpp OptimisticList.cpp MultiSet.cpp )
|
||||
add_library(sets STATIC Node.h Node.cpp Set.h Set.cpp FineList.cpp LazyList.cpp OptimisticList.cpp MultiSet.cpp )
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
#include"Node.h"
|
||||
#include"Set.cpp"
|
||||
#include"Set.h"
|
||||
|
||||
class FineSet:public Set {
|
||||
Node* first;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
#include"Node.h"
|
||||
#include"Set.cpp"
|
||||
#include"Set.h"
|
||||
|
||||
class LazySet:public Set {
|
||||
protected:
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
#include"Node.h"
|
||||
#include"Set.cpp"
|
||||
#include"Set.h"
|
||||
|
||||
class MultiSet:public Set {
|
||||
Node* first;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <lib/Node.h>
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
#include"Node.h"
|
||||
#include"Set.cpp"
|
||||
#include"Set.h"
|
||||
|
||||
class OptimisticSet:public Set {
|
||||
protected:
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "Set.h"
|
||||
#include "Node.h"
|
||||
|
||||
class Set {
|
||||
protected:
|
||||
std::string name;
|
||||
Set(std::string _name);
|
||||
Node* first;
|
||||
public:
|
||||
bool add(int element) { return false; };
|
||||
bool rmv(int element) { return false; };
|
||||
bool ctn(int element) { return false; };
|
||||
std::string get_name() { return name; };
|
||||
};
|
||||
|
||||
Set::Set(std::string _name){
|
||||
name = _name;
|
||||
first = Node::Dummy();
|
||||
@@ -21,3 +8,7 @@ Set::Set(std::string _name){
|
||||
first->next = last;
|
||||
}
|
||||
|
||||
bool Set::add(int element) { return false; }
|
||||
bool Set::rmv(int element) { return false; }
|
||||
bool Set::ctn(int element) { return false; }
|
||||
std::string Set::get_name() { return name; }
|
||||
|
||||
15
Assignment_2/lib/Set.h
Normal file
15
Assignment_2/lib/Set.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "Node.h"
|
||||
|
||||
class Set {
|
||||
protected:
|
||||
std::string name;
|
||||
Set(std::string _name);
|
||||
Node* first;
|
||||
public:
|
||||
bool add(int element);
|
||||
bool rmv(int element);
|
||||
bool ctn(int element);
|
||||
std::string get_name();
|
||||
};
|
||||
Reference in New Issue
Block a user