I have a use case where I want to create a co-occurrence matrix. Essentially it is going to be something like Map<String, Map<String, Long>>
. I wish to use Chronicle-Map for this task.
I checked Multimaps in ChronicleMap and https://github.com/OpenHFT/Chronicle-Map/issues/100. However, I am unable to follow the discussion to make a suitable change.
It would be also okay to have it like a multi-key like Map<String, String, Long>
. I looked up the graph example of add and remove edge (in chronicle-map tutorial) which was again too detailed and complicated for me to adapt to my setting.
The way this will be used is to query:
- Getting the long value for a very specific combination if key1 and key2.
- For a specific key1 return all the key2 along with their respective long value.
Can someone please advise and provide a simple working example.