jpayne@69: // Copyright © 2015, Battelle National Biodefense Institute (BNBI); jpayne@69: // all rights reserved. Authored by: Brian Ondov, Todd Treangen, jpayne@69: // Sergey Koren, and Adam Phillippy jpayne@69: // jpayne@69: // See the LICENSE.txt file included with this software for license information. jpayne@69: jpayne@69: #ifndef HashList_h jpayne@69: #define HashList_h jpayne@69: jpayne@69: #include "hash.h" jpayne@69: #include jpayne@69: jpayne@69: class HashList jpayne@69: { jpayne@69: public: jpayne@69: jpayne@69: HashList() {use64 = true;} jpayne@69: HashList(bool use64new) {use64 = use64new;} jpayne@69: jpayne@69: hash_u at(int index) const; jpayne@69: void clear(); jpayne@69: void resize(int size); jpayne@69: void set32(int index, uint32_t value); jpayne@69: void set64(int index, uint64_t value); jpayne@69: void setUse64(bool use64New) {use64 = use64New;} jpayne@69: int size() const {return use64 ? hashes64.size() : hashes32.size();} jpayne@69: void sort(); jpayne@69: void push_back32(hash32_t hash) {hashes32.push_back(hash);} jpayne@69: void push_back64(hash64_t hash) {hashes64.push_back(hash);} jpayne@69: bool get64() const {return use64;} jpayne@69: jpayne@69: private: jpayne@69: jpayne@69: bool use64; jpayne@69: std::vector hashes32; jpayne@69: std::vector hashes64; jpayne@69: }; jpayne@69: jpayne@69: #endif