mirror of
https://github.com/aicodix/code.git
synced 2026-04-27 14:30:36 +00:00
we have the - operator now
This commit is contained in:
parent
fe25fb2a69
commit
60b9dbf2c0
1 changed files with 4 additions and 4 deletions
|
|
@ -44,9 +44,9 @@ struct CauchyReedSolomonErasureCoding
|
|||
ValueType col_k(ValueType::N - k);
|
||||
prod_xy *= index(rows[j] + col_k) * index(rows[k] + col_i);
|
||||
if (k != j)
|
||||
prod_x *= index(rows[j] + rows[k]);
|
||||
prod_x *= index(rows[j] - rows[k]);
|
||||
if (k != i)
|
||||
prod_y *= index(col_i + col_k);
|
||||
prod_y *= index(col_i - col_k);
|
||||
}
|
||||
return prod_xy / (index(rows[j] + col_i) * prod_x * prod_y);
|
||||
#else
|
||||
|
|
@ -57,7 +57,7 @@ struct CauchyReedSolomonErasureCoding
|
|||
ValueType col_k(ValueType::N - k);
|
||||
num *= index(rows[k] + col_i);
|
||||
if (k != i)
|
||||
den *= index(col_i + col_k);
|
||||
den *= index(col_i - col_k);
|
||||
}
|
||||
row_num = num;
|
||||
row_den = den;
|
||||
|
|
@ -67,7 +67,7 @@ struct CauchyReedSolomonErasureCoding
|
|||
ValueType col_k(ValueType::N - k);
|
||||
num *= index(rows[j] + col_k);
|
||||
if (k != j)
|
||||
den *= index(rows[j] + rows[k]);
|
||||
den *= index(rows[j] - rows[k]);
|
||||
}
|
||||
return num / (index(rows[j] + col_i) * den);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue