version 0.0.5-alpha

This commit is contained in:
ton
2023-08-25 09:40:43 +07:00
parent 0af39ee09e
commit c74eea9cdf
14 changed files with 4155 additions and 150 deletions

View File

@@ -21,6 +21,23 @@ function refractoryStatus!(refractoryCounter, refractoryActive, refractoryInacti
end
end
function frobenius_distance(A, B)
# Check if the matrices have the same size
if size(A) != size(B)
error("The matrices must have the same size")
end
# Initialize the distance to zero
distance = 0.0
# Loop over the elements of the matrices and add the squared differences
for i in 1:size(A, 1)
for j in 1:size(A, 2)
distance += (A[i, j] - B[i, j])^2
end
end
# Return the square root of the distance
return sqrt(distance)
end
@@ -59,13 +76,6 @@ end