This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
xsFNBFY6SnwBEACt9T+e3ipNodNzGjJRKkrs6/QgBja6PAi4pFsMv/LtgeNe | |
aAsVioDManEvnkp3Ef4LOqH6sPLvoQUkFoDHG41orJHSbPV1m1POe97vox4D | |
wKDWgi2/sbhpSRKsfbTGcqDvggRKugP8/il2gx4zhU2N/wUJzImmIr6moFMX | |
r3dPk1fZd/sIBNmxwzaLDL/MMUUQbrPiQ3awrop/N7aKFixKV5i1I8pRmbvv | |
bCV3XeGzuh65fdTCOI1vlcy/OIUwqZe1vb7BKc1QVsvOYmgc9gYZpzwbqUnR | |
Zot7wuK7QMxW8nYS/mZYOWkjXUTur6ihsIjfNbY77NGTuoX0ceXNI0FhEuc2 | |
4h7P3xVhqNJ72gueJ6TlJcSrgzuSz5HABG9oacSuwG+82Rvr9oHvhG5JkUSv | |
KH35V0ypjwMf+WMF4Y15XQXi2xniBq5nUtXMg2NpZnJ0cBiIz+HhkMB+UquM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# That's a lambda in case you haven't seen this yet: https://blog.honeybadger.io/using-lambdas-in-ruby/ | |
# def sim()... would also work but without an object an functional style (using a lambda) is more idiomatic. | |
sim ->(matrix, base_line, compare_to) do | |
# -> TODO | |
end | |
matrix = Matrix[ # See https://ruby-doc.org/stdlib-2.5.1/libdoc/matrix/rdoc/Matrix.html | |
[1, nil, 3, nil, nil, 5, nil, nil, 5, nil, 4 nil], # first row | |
[] # second row and so on | |
] |