| 66 | } |
| 67 | |
| 68 | Ref<ModulusPoly> ModulusGF::buildMonomial(int degree, int coefficient) |
| 69 | { |
| 70 | if (degree < 0) { |
| 71 | throw IllegalArgumentException("monomial: degree < 0!"); |
| 72 | } |
| 73 | if (coefficient == 0) { |
| 74 | return zero_; |
| 75 | } |
| 76 | int nCoefficients = degree + 1; |
| 77 | ArrayRef<int> coefficients (new Array<int>(nCoefficients)); |
| 78 | coefficients[0] = coefficient; |
| 79 | Ref<ModulusPoly> result(new ModulusPoly(*this,coefficients)); |
| 80 | return result; |
| 81 | } |
| 82 | |
| 83 | |
| 84 |
no test coverage detected