-1

More specifically can a patricia trie:

http://search.cpan.org/~plonka/Net-Patricia-1.014/Patricia.pm

Contain duplicate IP addresses (duplicate key IP with different values) and if so how does it handles returning the values from that key?

ie:

123.456.789.0-> {
  'value' => 'hai'
}

123.456.789.0->{
  'value' => 'hey there'
}



patricia-trie->match_string(123.456.789.0)

returns ???

Edit: Yes, I know I can implement my own that supports this behavior. I am asking how this specific trie implementation handles it. The documentation is extremely limited and manual testing appears to show overwrites, but I was hoping someone has a definitive answer.

north.mister
  • 500
  • 1
  • 7
  • 24
  • 2
    Have you tried it? This sounds like a question you could answer yourself with a few more minutes of investigation – Krease Aug 23 '16 at 01:07

1 Answers1

0

A trie (or Patricia tree) is generally a map between keys and values. To make a map into a multimap, use a linked list or array as the value.

rici
  • 234,347
  • 28
  • 237
  • 341