1#ifndef GSDECON_COMPUTE_HPP
2#define GSDECON_COMPUTE_HPP
44template<
typename Value_,
typename Index_,
typename Float_>
46 if (internal::check_edge_cases(matrix, options.
rank, output)) {
58 double shift = std::accumulate(res.center.begin(), res.center.end(), 0.0) / matrix.
nrow();
59 std::fill_n(output.
scores, matrix.
ncol(), shift);
60 internal::process_output(res.rotation, res.components, options.
scale, res.scale, output);
77template<
typename Float_ =
double,
typename Value_,
typename Index_>
87 compute(matrix, options, buffers);
Classes for storing the results.
virtual Index_ ncol() const=0
virtual Index_ nrow() const=0
Gene set scoring with gsdecon.
Definition blocked.hpp:21
void compute(const tatami::Matrix< Value_, Index_ > &matrix, const Options &options, const Buffers< Float_ > &output)
Definition compute.hpp:45
void simple_pca(const tatami::Matrix< Value_, Index_ > &mat, const SimplePcaOptions &options, SimplePcaResults< EigenMatrix_, EigenVector_ > &output)
Buffers for the results of compute() and compute_blocked().
Definition Results.hpp:18
Float_ * scores
Definition Results.hpp:23
Float_ * weights
Definition Results.hpp:29
Options for compute() and compute_blocked().
Definition Options.hpp:17
bool realize_matrix
Definition Options.hpp:61
int rank
Definition Options.hpp:31
int num_threads
Definition Options.hpp:55
irlba::Options irlba_options
Definition Options.hpp:66
bool scale
Definition Options.hpp:37
Results of compute() and compute_blocked().
Definition Results.hpp:37
std::vector< double > scores
Definition Results.hpp:42
std::vector< double > weights
Definition Results.hpp:49
irlba::Options irlba_options