Skip to content

Instantly share code, notes, and snippets.

@byzhang
Created April 18, 2014 01:25
Show Gist options
  • Save byzhang/11020228 to your computer and use it in GitHub Desktop.
Save byzhang/11020228 to your computer and use it in GitHub Desktop.
efficient way?
vex::vector<double> h(ctx, n1 * n2);
vex::vector<uint32_t> N(ctx, n1 * n3);
vex::vector<double> V(ctx, n4 * n2);
vex::vector<double> L(ctx, n1 * n3);
for (int i = 0; i < h.rows(); ++i) {
for (int j = 0; j < N.cols(); ++j) {
row(V, N(i,j)) -= L(i, j) * row(h, i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment