stxxl

How to use std::string as key in stxxl::map

淺唱寂寞╮ 提交于 2020-01-05 19:04:30
问题 I am trying to use std::string as a key in the stxxl::map The insertion was fine for small number of strings about 10-100. But while trying to insert large number of strings about 100000 in it, I am getting segmentation fault. The code is as follows: struct CompareGreaterString { bool operator () (const std::string& a, const std::string& b) const { return a > b; } static std::string max_value() { return ""; } }; // template parameter <KeyType, DataType, CompareType, RawNodeSize, RawLeafSize,

Stxxl map with std::string as key and std::vector as value

旧巷老猫 提交于 2019-12-25 14:13:08
问题 I need a large map of sets of numbers. So i'm using stxxl and it's basically something like map<std::string, std::vector<int>> . The key is 3-letters identifier. There are about 3k enteries in the map, and each of them can contain up to 500K numbers. It is important to use vector in the value since i need to change it (add/remove numbers). The problem is that after i insert all my data, when i try to access an element in the map, the vector is currupted. #define MAX_STRING_IN_MAP ("ZZZZZZZ")

Makefile with STXXL

♀尐吖头ヾ 提交于 2019-12-13 20:53:10
问题 I need to use the STXXL library for a software project I am working on, but for some reason, I am having trouble compiling a test file. I am not very familiar with makefiles, so I might have mixed up in linking some of the libraries together. The dummy files I am using are Draw.h, Draw.cpp, and driver.cpp. As you can imagine, Draw.h declares a method draw() that is implemented in Draw.cpp, and driver.cpp contains the main function, and includes Draw.h and calls draw(). The makefile I am using

Is it possible to define the length of the type to sort in STXXL at run time?

南笙酒味 提交于 2019-12-11 23:12:37
问题 I have an application that requires a built-in sort and I'm hoping to replace the existing sort mechanism with the sort provided by STXXL. I have successfully tested it using STXXL, but my problem is that, although a specific run of the sort needs to operate on fixed length strings, the length is determined at run-time and can be anywhere between 10 bytes and 4000 bytes. Always allowing for 4000 bytes will obviously be grossly inefficient if the actual length is small. For those not familiar

STXXL equivalent in Java

大兔子大兔子 提交于 2019-12-05 02:25:48
问题 I'm searching a collection framework designed for huge datasets in Java that behaves transparently, like STXXL does for C++. It should transparently swap to disk, but in a much more efficient manner than plain OS-based VM swapping. A StringBuffer/String drop-in replacement would be a big plus. 回答1: These fill needs only partially: Oracle Berkeley DB Java Edition database backed collections: http://www.oracle.com/technology/documentation/berkeley-db/je/java/index.html Joafip persistent