Skip to content

Conversation

@d-torrance
Copy link
Member

This way, we end up calling the default constructor, which creates a new hash code. Previously, we used the same hash code as the original matrix.

Also add a test to ensure that the hash changes.

Closes: #997

Before

i1 : A = mutableMatrix {{10}}

o1 = | 10 |

o1 : MutableMatrix

i2 : B = submatrix(A, {0}, {0})

o2 = | 10 |

o2 : MutableMatrix

i3 : (hash A, hash B)

o3 = (1845190296659672920, 1845190296659672920)

o3 : Sequence

After

i1 : A = mutableMatrix {{10}}

o1 = | 10 |

o1 : MutableMatrix

i2 : B = submatrix(A, {0}, {0})

o2 = | 10 |

o2 : MutableMatrix

i3 : (hash A, hash B)

o3 = (2554347540320848225, 2672540414264377250)

This way, we end up calling the default constructor, which creates a
new hash code.  Previously, we used the same hash code as the original
matrix.

Also add a test to ensure that the hash changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant