Пример #1
0
 /** Test of sum method, of class FiniteField. */
 @Test
 public void testSum() {
   System.out.println("sum");
   Polynomial p1 = null;
   Polynomial p2 = null;
   FiniteField instance = null;
   Polynomial expResult = null;
   Polynomial result = instance.sum(p1, p2);
   assertEquals(expResult, result);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
 public boolean equals(Object obj) {
   if (this == obj) {
     return true;
   }
   if (!(obj instanceof GenericPolynomialExtensionField)) {
     return false;
   }
   GenericPolynomialExtensionField other = (GenericPolynomialExtensionField) obj;
   return subfield.equals(other.subfield) && minimalPolynomial.equals(other.minimalPolynomial);
 }
 public int hashCode() {
   return subfield.hashCode() ^ Integers.rotateLeft(minimalPolynomial.hashCode(), 16);
 }
 public int getDimension() {
   return subfield.getDimension() * minimalPolynomial.getDegree();
 }
 public BigInteger getCharacteristic() {
   return subfield.getCharacteristic();
 }