Clone/copy trie
Ciao guys,
I'd like to ask you if you know about any way, how to clone/copy trie structure. I have a adt trie which I need to copy (like create a new branch) and modify both the original and copied tries separately. |
Re: Clone/copy trie
Where are you trying to clone it? Website ?
|
Re: Clone/copy trie
This trie in plugin.
|
Re: Clone/copy trie
I don't think its possible in SourceMod 1.6.
In 1.7 it IS possible. This example assumes that all of the tries value types are the same. It also does deep copies of strings and arrays (if the arrays are simple values) if those are the type of value in the trie. PHP Code:
Code:
// For a trie of Values |
Re: Clone/copy trie
Yep... Unfortunately I am using SM 1.6 (might consider to use newer version) :-( Thx Powerlord
|
Re: Clone/copy trie
couldn't you just store the keys (or w/e information it is you're missing in 1.6) in a separate array when you set stuff in the trie?
|
Re: Clone/copy trie
That would work, but I already found a way, how to work around cloning trie in my algorithm.
|
Re: Clone/copy trie
http://vignette3.wikia.nocookie.net/...20150801173505
Code:
enum TrieValueType |
All times are GMT -4. The time now is 15:12. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.