Skip to content

Comparing ImageSpec #3968

Answered by lgritz
ashwinbhat asked this question in Q&A
Aug 28, 2023 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

That's an interesting application. I think your strategy is sound, but currently, you'd need to roll your own. I think this would be great for somebody to add, basically you want several steps:

  1. Add a hash() method to ParamValue that just straightforwardly hashes the name, type, and data values. It probably would also not hurt to also have operator== and != for ParamValue.

  2. Add a hash() method to ParamValueList, which sequentially hashes each ParamValue of the list. Again, it probably would be handy to have == and !=.

2.1. I could see utility in also having options to (a) perform the hashing in sorted order (by attribute name) so that two PVLs that have identical attributes but in dif…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@lgritz
Comment options

Answer selected by ashwinbhat
@ashwinbhat
Comment options

@lgritz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants