"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/pdf417/decoder/ec/ModulusPoly.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

ModulusPoly.java  (zxing-zxing-3.4.1):ModulusPoly.java  (zxing-zxing-3.5.0)
skipping to change at line 203 skipping to change at line 203
return field.getZero(); return field.getZero();
} }
int size = coefficients.length; int size = coefficients.length;
int[] product = new int[size + degree]; int[] product = new int[size + degree];
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
product[i] = field.multiply(coefficients[i], coefficient); product[i] = field.multiply(coefficients[i], coefficient);
} }
return new ModulusPoly(field, product); return new ModulusPoly(field, product);
} }
/*
ModulusPoly[] divide(ModulusPoly other) {
if (!field.equals(other.field)) {
throw new IllegalArgumentException("ModulusPolys do not have same ModulusG
F field");
}
if (other.isZero()) {
throw new IllegalArgumentException("Divide by 0");
}
ModulusPoly quotient = field.getZero();
ModulusPoly remainder = this;
int denominatorLeadingTerm = other.getCoefficient(other.getDegree());
int inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm);
while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) {
int degreeDifference = remainder.getDegree() - other.getDegree();
int scale = field.multiply(remainder.getCoefficient(remainder.getDegree())
, inverseDenominatorLeadingTerm);
ModulusPoly term = other.multiplyByMonomial(degreeDifference, scale);
ModulusPoly iterationQuotient = field.buildMonomial(degreeDifference, scal
e);
quotient = quotient.add(iterationQuotient);
remainder = remainder.subtract(term);
}
return new ModulusPoly[] { quotient, remainder };
}
*/
@Override @Override
public String toString() { public String toString() {
StringBuilder result = new StringBuilder(8 * getDegree()); StringBuilder result = new StringBuilder(8 * getDegree());
for (int degree = getDegree(); degree >= 0; degree--) { for (int degree = getDegree(); degree >= 0; degree--) {
int coefficient = getCoefficient(degree); int coefficient = getCoefficient(degree);
if (coefficient != 0) { if (coefficient != 0) {
if (coefficient < 0) { if (coefficient < 0) {
result.append(" - "); result.append(" - ");
coefficient = -coefficient; coefficient = -coefficient;
} else { } else {
 End of changes. 1 change blocks. 
31 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)