diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index bf8431e..0a294a1 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -3,5 +3,6 @@
+
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4cf2dc8..90f583a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
-project(COSC-4P80-Assignment-1 VERSION 0.0.5)
+project(COSC-4P80-Assignment-1 VERSION 0.0.6)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)
diff --git a/lib/blt b/lib/blt
index 39fd5a7..b5ea7a1 160000
--- a/lib/blt
+++ b/lib/blt
@@ -1 +1 @@
-Subproject commit 39fd5a73d67d2e911746ffe1cb0ed6d297a4d86e
+Subproject commit b5ea7a1e1500dc695490c730dcedbc93dae3ba73
diff --git a/src/main.cpp b/src/main.cpp
index 9ef7991..8c5efbd 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -48,10 +48,10 @@ auto weight_4 = input_4.transpose() * output_4;
auto inputs = std::array{input_1, input_2, input_3, input_4};
auto outputs = std::array{output_1, output_2, output_3, output_4};
-auto weights = std::array{weight_1, weight_2, weight_3, weight_4};
auto weight_total_a = weight_1 + weight_2 + weight_3;
auto weight_total_c = weight_total_a + weight_4;
+auto weights = std::array{weight_total_a, weight_total_c};
crosstalk_t crosstalk_values{};
@@ -67,28 +67,33 @@ blt::generalized_matrix normalize(const blt::generalized_matri
return result;
}
-void test_recall(blt::size_t index)
+auto calculate_recall()
+{
+
+}
+
+void test_recall(blt::size_t index, blt::size_t weight_index)
{
auto& input = inputs[index];
auto& output = outputs[index];
- auto& associated_weights = weights[index];
+ auto& associated_weights = weights[weight_index];
auto output_recall = normalize(input * associated_weights);
auto input_recall = normalize(output * associated_weights.transpose());
if (output_recall != output)
{
- BLT_ERROR_STREAM << "Output recalled failed!" << "\n";
- BLT_ERROR_STREAM << "Expected: " << output << "\n";
- BLT_ERROR_STREAM << "Found: " << output_recall << "\n";
+ BLT_ERROR_STREAM << "Output recalled failed!" << '\n';
+ BLT_ERROR_STREAM << "Expected: " << output << '\n';
+ BLT_ERROR_STREAM << "Found: " << output_recall << '\n';
} else
BLT_INFO("Output %ld recall passed!", index + 1);
if (input_recall != input)
{
BLT_ERROR_STREAM << "Input recalled failed!" << "\n";
- BLT_ERROR_STREAM << "Expected: " << input << "\n";
- BLT_ERROR_STREAM << "Found: " << input_recall << "\n";
+ BLT_ERROR_STREAM << "Expected: " << input << '\n';
+ BLT_ERROR_STREAM << "Found: " << input_recall << '\n';
} else
BLT_INFO("Input %ld recall passed!", index + 1);
}
@@ -96,9 +101,9 @@ void test_recall(blt::size_t index)
void part_a()
{
blt::log_box_t box(BLT_INFO_STREAM, "Part A", 8);
- test_recall(0);
- test_recall(1);
- test_recall(2);
+ test_recall(0, 0);
+ test_recall(1, 0);
+ test_recall(2, 0);
}
void part_b()