Here are the examples of the csharp api class ZXing.PDF417.Internal.EC.ModulusPoly.add(ZXing.PDF417.Internal.EC.ModulusPoly) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
5 Examples
0
1. Example
View licenseinternal ModulusPoly subtract(ModulusPoly other) { if (!field.Equals(other.field)) { throw new ArgumentException("ModulusPolys do not have same ModulusGF field"); } if (other.isZero) { return this; } return add(other.negative()); }
0
2. Example
View licenseinternal ModulusPoly subtract(ModulusPoly other) { if (!field.Equals(other.field)) { throw new ArgumentException("ModulusPolys do not have same ModulusGF field"); } if (other.isZero) { return this; } return add(other.getNegative()); }
0
3. Example
View licenseinternal ModulusPoly subtract(ModulusPoly other) { if (!field.Equals(other.field)) { throw new ArgumentException("ModulusPolys do not have same ModulusGF field"); } if (other.isZero) { return this; } return add(other.getNegative()); }
0
4. Example
View licenseinternal ModulusPoly[] divide(ModulusPoly other) { if (!field.Equals(other.field)) { throw new ArgumentException("ModulusPolys do not have same ModulusGF field"); } if (other.isZero) { throw new ArgumentException("Divide by 0"); } ModulusPoly quotient = field.getZero(); ModulusPoly remainder = this; int denominatorLeadingTerm = other.getCoefficient(other.Degree); int inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm); while (remainder.Degree >= other.Degree && !remainder.isZero) { int degreeDifference = remainder.Degree - other.Degree; int scale = field.multiply(remainder.getCoefficient(remainder.Degree), inverseDenominatorLeadingTerm); ModulusPoly term = other.multiplyByMonomial(degreeDifference, scale); ModulusPoly iterationQuotient = field.buildMonomial(degreeDifference, scale); quotient = quotient.add(iterationQuotient); remainder = remainder.subtract(term); } return new ModulusPoly[] { quotient, remainder }; }
0
5. Example
View licenseinternal ModulusPoly[] divide(ModulusPoly other) { if (!field.Equals(other.field)) { throw new ArgumentException("ModulusPolys do not have same ModulusGF field"); } if (other.isZero) { throw new DivideByZeroException(); } ModulusPoly quotient = field.Zero; ModulusPoly remainder = this; int denominatorLeadingTerm = other.getCoefficient(other.Degree); int inverseDenominatorLeadingTerm = field.inverse(denominatorLeadingTerm); while (remainder.Degree >= other.Degree && !remainder.isZero) { int degreeDifference = remainder.Degree - other.Degree; int scale = field.multiply(remainder.getCoefficient(remainder.Degree), inverseDenominatorLeadingTerm); ModulusPoly term = other.multiplyByMonomial(degreeDifference, scale); ModulusPoly iterationQuotient = field.buildMonomial(degreeDifference, scale); quotient = quotient.add(iterationQuotient); remainder = remainder.subtract(term); } return new ModulusPoly[] { quotient, remainder }; }