Sleipnir
|
Augments a CDat with a dynamically calculated gene set filter. More...
#include <datapair.h>
Public Member Functions | |
bool | Attach (const CDataPair &Dat, const CGenes &Genes, CDat::EFilter eFilter, const CDat *pAnswers=NULL) |
Associates the data filter with the given CDat, gene set, and filter type. | |
bool | Attach (const CDatFilter &Dat, const CGenes &Genes, CDat::EFilter eFilter, const CDat *pAnswers=NULL) |
Associates (overlays0 the data filter with the given pre-existing filter, gene set, and filter type. | |
bool | Attach (const CDataPair &Dat) |
Associates the data filter with the given CDat. | |
size_t | GetValues () const |
Returns the number of values taken by the underlying CDataPair. | |
size_t | GetGene (const std::string &strGene) const |
Returns the index of the requested gene name, or -1 if it does not exist. | |
std::string | GetGene (size_t iGene) const |
Returns the gene name at the requested index. | |
size_t | Quantize (float dValue) const |
Discretizes the given value using the quantization bins of the underlying CDataPair. | |
size_t | Quantize (size_t iY, size_t iX, size_t iZero) const |
float & | Get (size_t iY, size_t iX) const |
Returns the (potentially filtered) value at the requested indices. |
Augments a CDat with a dynamically calculated gene set filter.
A filter wraps an underlying CDat with a dynamically calculated filter using a gene set and CDat::EFilter type. A filtered gene pair will act like missing data; unfiltered gene pairs will be retrieved from the underlying CDat. This allows data to be temporarily hidden without modifying the underlying (potentially memory mapped) CDat.
Definition at line 235 of file datapair.h.
bool Sleipnir::CDatFilter::Attach | ( | const CDataPair & | Dat, |
const CGenes & | Genes, | ||
CDat::EFilter | eFilter, | ||
const CDat * | pAnswers = NULL |
||
) |
Associates the data filter with the given CDat, gene set, and filter type.
Dat | CDat to be associated with the overlaying mask. |
Genes | Gene set used to filter the data. |
eFilter | Way in which to use the given genes to remove gene pairs. |
pAnswers | If non-null, answer set to be used for filter types requiring answers (e.g. CDat::EFilterTerm). |
Definition at line 582 of file datapair.cpp.
Referenced by Attach().
bool Sleipnir::CDatFilter::Attach | ( | const CDatFilter & | Dat, |
const CGenes & | Genes, | ||
CDat::EFilter | eFilter, | ||
const CDat * | pAnswers = NULL |
||
) |
Associates (overlays0 the data filter with the given pre-existing filter, gene set, and filter type.
Dat | Filter with which this mask will associate (and overlay). |
Genes | Gene set used to filter the data. |
eFilter | Way in which to use the given genes to remove gene pairs. |
pAnswers | If non-null, answer set to be used for filter types requiring answers (e.g. CDat::EFilterTerm). |
Definition at line 611 of file datapair.cpp.
References Attach().
bool Sleipnir::CDatFilter::Attach | ( | const CDataPair & | Dat | ) | [inline] |
Associates the data filter with the given CDat.
Dat | CDat to be associated with the overlaying mask. |
Definition at line 256 of file datapair.h.
References Attach(), and Sleipnir::CDat::EFilterInclude.
float& Sleipnir::CDatFilter::Get | ( | size_t | iY, |
size_t | iX | ||
) | const [inline] |
Returns the (potentially filtered) value at the requested indices.
iY | Row of value to retrieve. |
iX | Column of value to retrieve. |
Definition at line 355 of file datapair.h.
References Sleipnir::CDat::EFilterEdge, Sleipnir::CDat::EFilterExclude, Sleipnir::CDat::EFilterInclude, Sleipnir::CDat::EFilterTerm, Sleipnir::CDat::Get(), Get(), Sleipnir::CMeta::GetNaN(), and Sleipnir::CMeta::IsNaN().
Referenced by Get().
size_t Sleipnir::CDatFilter::GetGene | ( | const std::string & | strGene | ) | const [inline] |
Returns the index of the requested gene name, or -1 if it does not exist.
strGene | Gene name whose index is returned. |
Definition at line 287 of file datapair.h.
References GetGene(), and Sleipnir::CDat::GetGene().
Referenced by GetGene().
std::string Sleipnir::CDatFilter::GetGene | ( | size_t | iGene | ) | const [inline] |
Returns the gene name at the requested index.
iGene | Index of gene name to be returned. |
Reimplemented from Sleipnir::CDatFilterImpl.
Definition at line 304 of file datapair.h.
References GetGene().
size_t Sleipnir::CDatFilter::GetValues | ( | ) | const [inline] |
Returns the number of values taken by the underlying CDataPair.
Definition at line 270 of file datapair.h.
References Sleipnir::CDataPair::GetValues(), and GetValues().
Referenced by GetValues().
size_t Sleipnir::CDatFilter::Quantize | ( | float | dValue | ) | const [inline] |
Discretizes the given value using the quantization bins of the underlying CDataPair.
dValue | Continuous value to be discretized. |
Definition at line 321 of file datapair.h.
References Sleipnir::CDataPair::Quantize(), and Quantize().
Referenced by Quantize().