Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Typo and C comments

  • Loading branch information...
commit 9a535ad1515ed3d50c129bda23b34dea1ce200d4 1 parent bbaf343
@willcannings authored
Showing with 3 additions and 3 deletions.
  1. +2 −2 ext/svd.c
  2. +1 −1  lib/svd_matrix.rb
View
4 ext/svd.c
@@ -18,13 +18,13 @@ VALUE decompose(VALUE module, VALUE matrix_ruby, VALUE m_ruby, VALUE n_ruby) {
VALUE w_output = rb_ary_new();
VALUE output = rb_ary_new();
- // precondition
+ /* precondition */
if((m*n) != RARRAY_LEN(matrix_ruby)) {
rb_raise(rb_eRangeError, "Size of the array is not equal to m * n");
return;
}
- // convert to u matrix
+ /* convert to u matrix */
for(i = 1; i <= m; i++) {
for(j = 1; j <= n; j++) {
offset = ((i-1)*n) + (j-1);
View
2  lib/svd_matrix.rb
@@ -43,7 +43,7 @@ def decompose(reduce_dimensions_to = nil)
u = SVDMatrix.new(row_size, reduce_dimensions_to || column_size)
row_size.times {|i| u.set_row(i, u_array.slice!(0, column_size)[0...reduce_dimensions_to])}
- # recompose V matric
+ # recompose V matrix
v = SVDMatrix.new(column_size, reduce_dimensions_to || column_size)
column_size.times {|i| v.set_row(i, v_array.slice!(0, column_size)[0...reduce_dimensions_to])}
Please sign in to comment.
Something went wrong with that request. Please try again.