...
 
Commits (2)
......@@ -4,6 +4,8 @@ project(complete_ads)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "-static-libgcc -static-libstdc++ -static")
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
MATH(EXPR stack_size "512 * 1024 * 1024") # 512 Mb
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--stack,${stack_size}")
set(SOURCE_FILES main.cpp)
#add_subdirectory("lib")
......
No preview for this file type
@echo off
IF EXIST "do_copy" copy ..\cmake-build-debug\main.exe main.exe
IF EXIST "all_benchmarks_compare_results.txt" del "all_benchmarks_compare_results.txt"
IF EXIST "..\outputs\compare_results\all_benchmarks_compare_results.txt" del "..\outputs\compare_results\all_benchmarks_compare_results.txt"
for /R "..\benchmarks\" %%i in (*) do (
echo running agorithm for %%~nxi
main.exe -c -C "all_benchmarks_compare_results.txt" -a -f %%i
echo running algorithm for %%~nxi
main.exe -c -C "all_benchmarks_compare_results.txt" -a -t -f %%i
echo.
)
pause
\ No newline at end of file
file(GLOB_RECURSE sources "*.cpp")
file(GLOB_RECURSE headers "*.hpp")
set(libs)
add_library(common ${headers} ${sources})
target_link_libraries(common ${libs})
target_include_directories(common PUBLIC ".")
......@@ -8,7 +8,7 @@
#include <vector>
#include <string>
namespace analysys{
namespace analysis{
//calculate the total number of symbols in the test suite where the cost of a reset can be chosen manually.
template<typename T>
......
This diff is collapsed.
//
// Created by gijsc on 2-1-2019.
//
#ifndef COMPLETE_ADS_RESULTS_ANALYSIS_H
#define COMPLETE_ADS_RESULTS_ANALYSIS_H
#include <string>
namespace analysis{
void analyze_results(std::string input_filename,std::string output_directory);
}
#endif //COMPLETE_ADS_RESULTS_ANALYSIS_H
//
// Created by Gijs van Cuyck on 19/12/2018.
//
#ifndef COMPLETE_ADS_SPLIT_TREE_ANALYSYS_HPP
#define COMPLETE_ADS_SPLIT_TREE_ANALYSYS_HPP
#include "../hybrid_lib/splitting_tree.hpp"
#include <algorithm>
namespace analysis
{
int count_leaves(const hybrid::splitting_tree & tree)
{
if(tree.children.empty())
return 1;
else
{
int counter = 0;
for(const hybrid::splitting_tree & child: tree.children)
{
counter += count_leaves(child);
}
return counter;
}
}
double average_uncertainty(const hybrid::splitting_tree & tree)
{
return static_cast<double> (tree.states.size())/count_leaves(tree);
}
int maximum_uncertainty(const hybrid::splitting_tree & tree)
{
if(tree.children.empty())
{
return tree.states.size();
} else
{
int max = 0;
for(const hybrid::splitting_tree & child: tree.children)
{
max = std::max(max,maximum_uncertainty(child));
}
return max;
}
}
}
#endif //COMPLETE_ADS_SPLIT_TREE_ANALYSYS_HPP
This diff is collapsed.