tatami
C++ API for different matrix representations
Loading...
Searching...
No Matches
Public Attributes | List of all members
tatami::Options Struct Reference

Options for accessing data from a Matrix instance. More...

#include <Options.hpp>

Public Attributes

bool sparse_extract_index = true
 
bool sparse_extract_value = true
 
bool sparse_ordered_index = true
 

Detailed Description

Options for accessing data from a Matrix instance.

Member Data Documentation

◆ sparse_extract_index

bool tatami::Options::sparse_extract_index = true

Whether to extract the indices of structural non-zero elements in MyopicSparseExtractor::fetch() or OracularSparseExtractor::fetch(). If set to false, this can be used to avoid unnecessary computation and copying.

Note that the number of structural non-zeros reported by fetch() should be independent of this setting. This means that Matrix implementations should not try to do something overly clever that might cause the results to change depending on whether the indices are extracted - for example, only reporting the structural non-zeros with odd indices - though admittedly this warning is more relevant for sparse_extract_value.

◆ sparse_extract_value

bool tatami::Options::sparse_extract_value = true

Whether to extract the values of structural non-zero elements in MyopicSparseExtractor::fetch() or OracularSparseExtractor::fetch(). If set to false, this can be used to avoid unnecessary computation and copying.

Note that the number of structural non-zeros reported by fetch() should be independent of this setting. This means that Matrix implementations should not try to do something overly clever when reporting results, e.g., like filtering out structural non-zeros with values of zero when sparse_extract_value = true; doing so implies that the same filtering should be performed when sparse_extract_value = false, which requires extraction of the value (and thus defeats the purpose of this flag).

◆ sparse_ordered_index

bool tatami::Options::sparse_ordered_index = true

Whether the structural non-zeros returned by MyopicSparseExtractor::fetch() or OracularSparseExtractor:fetch() should be ordered by increasing index. Setting this to false may reduce computational work in situations where the order of non-zero elements does not matter.

The number and identity of structural non-zeros reported by fetch() should be independent of this setting, only the order is allowed to vary. Note that the order may even vary across separate calls to fetch() for the same extractor, e.g., when pulling data parts asynchronously from a remote source. However, the number and identity of structural non-zeros in each call should not change.


The documentation for this struct was generated from the following file: