diff --git a/.idea/editor (conflicted copy 2024-11-28 121102).xml b/.idea/editor (conflicted copy 2024-11-28 121102).xml
deleted file mode 100644
index b0d69ef..0000000
--- a/.idea/editor (conflicted copy 2024-11-28 121102).xml
+++ /dev/null
@@ -1,483 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index b7898c9..97695cc 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,8 +3,6 @@
-
-
@@ -30,17 +28,8 @@
-
-
-
-
-
-
-
-
-
diff --git a/.idea/workspace (conflicted copy 2024-11-28 121026).xml b/.idea/workspace (conflicted copy 2024-11-28 121026).xml
deleted file mode 100644
index 7c73077..0000000
--- a/.idea/workspace (conflicted copy 2024-11-28 121026).xml
+++ /dev/null
@@ -1,257 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- "useNewFormat": true
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- "associatedIndex": 7
-}
-
-
-
-
-
- {
- "keyToString": {
- "CMake Application.Assign3 Tests.executor": "Run",
- "CMake Application.COSC-4P80-Assignment-3.executor": "Run",
- "NIXITCH_NIXPKGS_CONFIG": "/etc/nix/nixpkgs-config.nix",
- "NIXITCH_NIX_CONF_DIR": "",
- "NIXITCH_NIX_OTHER_STORES": "",
- "NIXITCH_NIX_PATH": "/home/brett/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels",
- "NIXITCH_NIX_PROFILES": "/run/current-system/sw /nix/var/nix/profiles/default /etc/profiles/per-user/brett /home/brett/.local/state/nix/profile /nix/profile /home/brett/.nix-profile",
- "NIXITCH_NIX_REMOTE": "",
- "NIXITCH_NIX_USER_PROFILE_DIR": "/nix/var/nix/profiles/per-user/brett",
- "RunOnceActivity.RadMigrateCodeStyle": "true",
- "RunOnceActivity.ShowReadmeOnStart": "true",
- "RunOnceActivity.cidr.known.project.marker": "true",
- "RunOnceActivity.readMode.enableVisualFormatting": "true",
- "RunOnceActivity.west.config.association.type.startup.service": "true",
- "SHARE_PROJECT_CONFIGURATION_FILES": "true",
- "cf.advertisement.text.has.clang-format": "true",
- "cf.first.check.clang-format": "false",
- "cidr.known.project.marker": "true",
- "git-widget-placeholder": "main",
- "last_opened_file_path": "/home/brett/Documents/Brock/CS 4P80/COSC-4P80-Assignment-3",
- "node.js.detected.package.eslint": "true",
- "node.js.detected.package.tslint": "true",
- "node.js.selected.package.eslint": "(autodetect)",
- "node.js.selected.package.tslint": "(autodetect)",
- "nodejs_package_manager_path": "npm",
- "run.code.analysis.last.selected.profile": "pProject Default",
- "settings.editor.selected.configurable": "editor.preferences.completion",
- "structure.view.defaults.are.configured": "true",
- "vue.rearranger.settings.migration": "true"
- }
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1730483030448
-
-
- 1730483030448
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ed89e5..6780d58 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
-project(COSC-4P80-Assignment-3 VERSION 0.0.32)
+project(COSC-4P80-Assignment-3 VERSION 0.0.33)
include(FetchContent)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
diff --git a/src/main.cpp b/src/main.cpp
index c9ec951..690b09b 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -453,7 +453,7 @@ void action_test(const std::vector& argv_vector)
", " + std::to_string(task.max_epochs) + " Epochs",
std::to_string(task.width) + "x" + std::to_string(task.height) + " " += shape_name + ", " += init_name + ", Min: " +
std::to_string(min_quant) + ", Max: " +
- std::to_string(max_quant) +", " + std::to_string(task.max_epochs) +
+ std::to_string(max_quant) + ", " + std::to_string(task.max_epochs) +
" Epochs");
BLT_INFO("Task '%s' Complete", path.c_str());
@@ -568,20 +568,29 @@ void action_convert(const std::vector& argv_vector)
std::vector tasks;
std::mutex task_mutex;
+ // for (auto& file : data.files)
+ // {
+ // for (blt::u32 i = 5; i <= 7; i++)
+ // {
+ // for (blt::i32 shape = 0; shape < 4; shape++)
+ // {
+ // auto shape_v = static_cast(shape);
+ // tasks.emplace_back(std::vector{
+ // task_t{&file, i, i, 2000, shape_v, init_t::COMPLETELY_RANDOM, 1.0},
+ // task_t{&file, i, i, 2000, shape_v, init_t::RANDOM_DATA, 1.0},
+ // task_t{&file, i, i, 2000, shape_v, init_t::SAMPLED_DATA, 1.0}
+ // }, "UnUsed");
+ // }
+ // }
+ // }
+
for (auto& file : data.files)
{
- for (blt::u32 i = 5; i <= 7; i++)
- {
- for (blt::i32 shape = 0; shape < 4; shape++)
- {
- auto shape_v = static_cast(shape);
- tasks.emplace_back(std::vector{
- task_t{&file, i, i, 2000, shape_v, init_t::COMPLETELY_RANDOM, 1.0},
- task_t{&file, i, i, 2000, shape_v, init_t::RANDOM_DATA, 1.0},
- task_t{&file, i, i, 2000, shape_v, init_t::SAMPLED_DATA, 1.0}
- }, "UnUsed");
- }
- }
+ tasks.emplace_back(std::vector{
+ task_t{&file, 5, 5, 2000, shape_t::GRID_WRAP, init_t::COMPLETELY_RANDOM, 1.0},
+ task_t{&file, 6, 6, 2000, shape_t::GRID_WRAP, init_t::COMPLETELY_RANDOM, 1.0},
+ task_t{&file, 7, 7, 2000, shape_t::GRID_WRAP, init_t::COMPLETELY_RANDOM, 1.0}
+ }, "UnUsed");
}
for (blt::size_t i = 0; i < std::thread::hardware_concurrency(); i++)
@@ -648,13 +657,18 @@ void action_convert(const std::vector& argv_vector)
std::ofstream stats{filtered_path + "results_table.txt"};
stats << "\\begin{figure}[h!]\n\t\\centering" << std::endl;
- stats << "\t\\makebox[\\textwidth]{\\begin{tabular}{ccc}" << std::endl << "\t\t";
+ stats << "\t\\makebox[\\textwidth]{\\begin{tabular}{cc}" << std::endl << "\t\t";
for (auto [i, task] : blt::enumerate(t.tasks))
{
if (i != 0)
- stats << " & \n\t\t";
- stats << "\\includegraphics[width=0.4\\textwidth]{" << make_path(task) + "errors-topological" << bin_size << "}";
+ {
+ if (i % 2 == 0)
+ stats << "\\\\" << std::endl << "\t\t";
+ else
+ stats << " & \n\t\t";
+ }
+ stats << "\\includegraphics[width=0.6\\textwidth]{" << make_path(task) + "errors-topological" << bin_size << "}";
}
stats << "\\\\" << std::endl;
stats << "\t\\end{tabular}}" << std::endl;
@@ -662,20 +676,30 @@ void action_convert(const std::vector& argv_vector)
stats << "\\end{figure}" << std::endl << std::endl;
stats << "\\begin{figure}[h!]\n\t\\centering" << std::endl;
- stats << "\t\\makebox[\\textwidth]{\\begin{tabular}{ccc}" << std::endl << "\t\t";
+ stats << "\t\\makebox[\\textwidth]{\\begin{tabular}{cc}" << std::endl << "\t\t";
for (auto [i, task] : blt::enumerate(t.tasks))
{
if (i != 0)
- stats << " & \n\t\t";
- stats << "\\includegraphics[width=0.4\\textwidth]{" << make_path(task) + "errors-topological" << bin_size << "}";
+ {
+ if (i % 2 == 0)
+ stats << "\\\\" << std::endl << "\t\t";
+ else
+ stats << " & \n\t\t";
+ }
+ stats << "\\includegraphics[width=0.6\\textwidth]{" << make_path(task) + "errors-topological" << bin_size << "}";
}
stats << "\\\\" << std::endl << "\t\t";
for (auto [i, task] : blt::enumerate(t.tasks))
{
if (i != 0)
- stats << " & \n\t\t";
- stats << "\\includegraphics[width=0.4\\textwidth]{" << make_path(task) + "errors-quantization" << bin_size << "}";
+ {
+ if (i % 2 == 0)
+ stats << "\\\\" << std::endl << "\t\t";
+ else
+ stats << " & \n\t\t";
+ }
+ stats << "\\includegraphics[width=0.6\\textwidth]{" << make_path(task) + "errors-quantization" << bin_size << "}";
}
stats << "\\\\" << std::endl;
stats << "\t\\end{tabular}}" << std::endl;
diff --git a/src/som.cpp b/src/som.cpp
index 011de1e..c8ca01d 100644
--- a/src/som.cpp
+++ b/src/som.cpp
@@ -190,9 +190,6 @@ namespace assign3
for (auto [i, v] : blt::enumerate(array.get_map()))
{
const auto half = find_closest_neighbour_distance(i) / distance;
- // auto sigma = std::sqrt(-(half * half) / (2 * std::log(requested_activation)));
- // auto r = 1 / (2 * sigma * sigma);
- //
const auto scale = user_scale * topology_function->scale(half, activation);
global_scale_avg+=scale;
for (const auto& [is_bad, bins] : file.data_points)