OEDBReader

Attention

This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.

class OEDBReader

This class defines interface accessing a Brood fragments database from disk.

The OEDBReader class defines the following public methods:

Constructors

OEDBReader()

Constructor.

GetFragCount

unsigned GetFragCount() const

Returns the number of fragments in the database, the reader is currently initialized with.

GetIndices

const std::vector<unsigned> &GetIndices() const

Returns the indices of the databse, the reader is currently initialized with.

GetNextPacket

bool GetNextPacket(OEBroodDBPacket&)

Obtains the next available database packet to be processed.

Init

bool Init(const std::string &prefix)
bool Init(const std::string &prefix,
          const std::vector<unsigned> &vecIdx)
bool Init(const std::string &prefix, OEBroodQuery &query,
          const OEBroodScoreOptions &scoreOpts=OEBroodScoreOptions())

Initializes the reader with database specified by prefix folder name. The first overload sets up the reader to load all of the data packets available in the database. The second overload sets up the reader to only load the data packets from the segments of database specified by the indices. The third overload identifies the database indices relevent to the query and the scoring options, and sets up the reader to only load the corresponding data packets.