Skip to content

Commit 2141efd

Browse files
committed
Update README and CMakeLists for v1.0 and wiki creation
1 parent b0f8693 commit 2141efd

File tree

2 files changed

+43
-33
lines changed

2 files changed

+43
-33
lines changed

CMakeLists.txt

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
11
## Please modify this file freely to adapt to the production of other
22
## executables than convexhull and testrun
33

4+
# Description of the different builds
5+
# +---------------+--------------+--------------+----------|
6+
# | | optimization | assert works | stripped |
7+
# +---------------+--------------+--------------+----------|
8+
# | Debug | no | yes | no |
9+
# | Release | full | no | yes |
10+
# | RelWithDebInfo| good | no | no |
11+
# | MinSizeRel | size | no | yes |
12+
# +---------------+--------------+--------------+----------|
13+
14+
# Alias for cmake commands
15+
# alias cmakedebug='cmake $1 -DCMAKE_BUILD_TYPE=DEBUG'
16+
# alias cmakerelease='cmake $1 -DCMAKE_BUILD_TYPE=RELEASE'
17+
# alias cmakerelwithdebinfo='cmake $1 -DCMAKE_BUILD_TYPE=RELWITHDEBINFO'
18+
# alias cmakeminsizerel='cmake $1 -DCMAKE_BUILD_TYPE=MINSIZEREL'
19+
20+
# Example for release (first line only if the directory doesn't exist)
21+
# mkdir build_directory
22+
# cd build_directory
23+
# cmakerelease ..
24+
425
# Recent version of CMake required
526
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
627

7-
# Project Name
28+
# Project Name (change it freely)
829
project(smartstack)
930

1031
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)
@@ -40,13 +61,12 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
4061
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL}")
4162

4263
# Basic options for all builds
43-
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Weffc++ -Wshadow -ansi")
4464
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Wextra -Wshadow")
4565
# Might need to be fixed for retrocompatibility or temporary
4666
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++0x-compat -Wno-unused")
4767

4868

49-
# Test directories
69+
# Include directories
5070
get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
5171
message("inc_dirs = ${inc_dirs}")
5272

@@ -78,25 +98,3 @@ file(GLOB SOURCES "examples/testrun/testrunExtras.cpp")
7898
add_executable(testrunextras ${SOURCES})
7999
file(GLOB SOURCES "examples/testrun/generateInputTestRun.cpp")
80100
add_executable(generateInputTestRun ${SOURCES})
81-
82-
83-
# Description of the different builds
84-
# +---------------+--------------+--------------+----------|
85-
# | | optimization | assert works | stripped |
86-
# +---------------+--------------+--------------+----------|
87-
# | Debug | no | yes | no |
88-
# | Release | full | no | yes |
89-
# | RelWithDebInfo| good | no | no |
90-
# | MinSizeRel | size | no | yes |
91-
# +---------------+--------------+--------------+----------|
92-
93-
# Alias for cmake commands
94-
# alias cmakedebug='cmake $1 -DCMAKE_BUILD_TYPE=DEBUG'
95-
# alias cmakerelease='cmake $1 -DCMAKE_BUILD_TYPE=RELEASE'
96-
# alias cmakerelwithdebinfo='cmake $1 -DCMAKE_BUILD_TYPE=RELWITHDEBINFO'
97-
# alias cmakeminsizerel='cmake $1 -DCMAKE_BUILD_TYPE=MINSIZEREL'
98-
99-
# Example for debug (first line only if the directory doesn't exist)
100-
# mkdir build_directory
101-
# cd build_directory
102-
# cmakedebug ..

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ template <class T, class D> void StackAlgo<T, D>::run() {
3535
}
3636
```
3737
## Use case
38-
<p>Concrete examples such as a basic test run and the convex hull problem can be found in the [wiki](https://github.com/Azzaare/CompressedStacks.cpp.wiki.git).</p>
38+
Concrete examples such as a basic test run and the convex hull problem can be found in the [wiki](https://github.com/Azzaare/CompressedStacks.cpp.wiki.git).
3939
4040
### Abstract example : ```Instance<T,D,I>```
41-
<p>An instance of a Stack Algorithm is described by a set of templates parameters T, D, and I and a set of methods used in the run function above. Some of those methods might be left empty.</p>
41+
<p>An instance of a Stack Algorithm is described by a set of templates parameters T, D, and I and a set of methods used in the run function above.</p>
4242
4343
```cpp
4444
// T is the type of the context, D is the type of the input data and I is the type of your integer indexes.
@@ -47,7 +47,8 @@ class Instance: public StackAlgo<T,D,I>{
4747
public:
4848
Instance(std::string filePath) : StackAlgo<T, D, I>(filePath) {}
4949
private:
50-
// Functions to implement according to the problem and input structure
50+
// Methods to implement according to the problem and input structure
51+
// Some of those methods might be left empty
5152
D readInput(std::vector<std::string> line);
5253
std::shared_ptr<T> initStack();
5354
@@ -64,15 +65,26 @@ private:
6465
void reportStack();
6566
};
6667
```
67-
68-
69-
70-
71-
## How to run your problem
68+
### How to run your problem
7269
Suppose the class Instance implements the interface ```StackAlgo<T, D, I>```. You can run an instance of your problem described in the input located at <i>filepath</i>. The last command just print an output in the console of your compressed stack after the run.
7370

7471
```cpp
7572
Instance stack(filePath);
7673
stack.run();
7774
stack.println();
7875
```
76+
77+
## Contributing
78+
This project is far from being complete and would benefit greatly from future contributions. Commented code, following the existing file structure is strongly preferred. Please contact one of the author (or create an issue) in case of need. Here is a short sample of possible contributions :
79+
* Use CI (continuous integration). Definitively the most wanted feature
80+
* Extends the compressed stack structure to a dequeue structure (push and pop from top and bottom)
81+
* Add other problems to the examples folder (following, if possible a similar structure)
82+
* Extends the compressed stack structure to a compressed tree search structure
83+
* Dynamic size compressed stack.
84+
85+
86+
## Credits
87+
Although this project is a joint work, based on the theoretical work in [Barba *et al.*](https://arxiv.org/abs/1208.3663), credits belong to specific authors for part of the implementation. The work covering the implementation of the Stack Algorithm framework, the Comrpessed Stack structure and extras functionalities (```include``` and ```extras``` repositories) has been done by [Jean-Francois Baffier](https://github.com/Azzaarehttps://github.com/Azzaare). All the examples and their generating algorithms, along with all the test have been implemented by [Yago Diez](https://github.com/nicill).
88+
89+
## License
90+
This project is an open source software under the MIT license. Please check the ```LICENSE``` file for further information.

0 commit comments

Comments
 (0)