0
$\begingroup$

What would be the equivalent math concept for associative arrays/maps/dictionaries?

EDIT: Disregard mutability. FYI,off topic, the reason why I ask this question, is that I want to calculate the distance(or similarity) between two maps given that I have a distance function for each entity(or key) in the map.

$\endgroup$
3
$\begingroup$

Function ($A \to B$). If that doesn't work for you, try a set of pairs (subset of $A \times B$).

Note that something like mutable state is not common in maths, outside of computer science.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.