DataSlingers / MoMA

MoMA: Modern Multivariate Analysis in R
https://DataSlingers.github.io/MoMA
GNU General Public License v2.0
22 stars 4 forks source link

Make `X_original` constant #61

Open Banana1530 opened 5 years ago

Banana1530 commented 5 years ago

Any reason these are non-const?

_Originally posted by @michaelweylandt in https://github.com/_render_node/MDE3OlB1bGxSZXF1ZXN0UmV2aWV3Mjc4MDgzMjQ0/pull_request_reviews/more_threads_

Banana1530 commented 5 years ago

The follow code snippet should explain the semantics of these seemingly confusing variables.

class MoMA
{
  private:
    // ......
    arma::mat X;          // on X we perform the algorithm

    arma::mat X_working;  // keep track of deflated matrices
    arma::mat Y_working;

    arma::mat X_original;  // const
    arma::mat Y_original;
}