Skip to content

SWFRecomp/swap-vector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swap-vector

A swap-vector for the SWFRecomp runtime with a violent insistence on speed.

This is a very simple variant of the typical dynamic array, except neither order nor the addresses of elements in memory are preserved.

The only difference between this and what you'd expect from something like std::vector is the ability to remove any element in the vector with a time complexity of $O(1)$. This is done simply via the swap-and-remove strategy. Switch the element you'd like to remove with the last one in the array, decrement the length, and you've removed the element.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors