Sleipnir
|
Augments a compact dataset with a mask to dynamically exclude specific gene pairs. More...
#include <dataset.h>
Public Member Functions | |
bool | Open (const char *szFile) |
Opens a binary DAD file using memory mapping and unmasks it. | |
void | Remove (size_t iY, size_t iX) |
Remove all data for the given dataset position. | |
bool | IsExample (size_t iY, size_t iX) const |
Returns true if some data file can be accessed at the requested position. |
Augments a compact dataset with a mask to dynamically exclude specific gene pairs.
A compact dataset mask memory maps a binary DAD. This saves memory but prevents the underlying dataset from being directly modified. To overcome this, the map adds a binary matrix allowing each gene pair to be individually masked; a masked gene pair will return false from IsExample and act like missing data. Unmasked gene pairs will be retrieved from the underlying dataset. Can be used in combination with CDataFilter.
bool Sleipnir::CDatasetCompactMap::IsExample | ( | size_t | iY, |
size_t | iX | ||
) | const [inline, virtual] |
Returns true if some data file can be accessed at the requested position.
iY | Data row. |
iX | Data column. |
A dataset position is a usable example if at least one data file can be accessed at that position; that is, if some data file provides a non-missing value for that gene pair. Implementations that filter pairs in some manner can also prevent particular positions from being usable examples.
Reimplemented from Sleipnir::CDatasetCompact.
Definition at line 635 of file dataset.h.
References Sleipnir::CBinaryMatrix::Get().
bool Sleipnir::CDatasetCompactMap::Open | ( | const char * | szFile | ) |
Opens a binary DAD file using memory mapping and unmasks it.
szFile | File from which dataset is opened. |
Definition at line 663 of file datasetcompact.cpp.
References Sleipnir::CDatasetCompact::GetGenes(), Sleipnir::CHalfMatrix< tType >::GetSize(), Sleipnir::CBinaryMatrix::Initialize(), Sleipnir::CDatasetCompact::IsExample(), Sleipnir::CMeta::MapRead(), Sleipnir::CBinaryMatrix::Set(), and Sleipnir::CMeta::Unmap().
void Sleipnir::CDatasetCompactMap::Remove | ( | size_t | iY, |
size_t | iX | ||
) | [inline, virtual] |
Remove all data for the given dataset position.
iY | Data row. |
iX | Data column. |
Unloads or masks data from all encapsulated files for the requested gene pair.
Reimplemented from Sleipnir::CDatasetCompact.
Definition at line 631 of file dataset.h.
References Sleipnir::CBinaryMatrix::Set().