/** * checks if given object is equal to this permutation. * <p> * The method returns false whenever the given object is not permutation. * * @param other - * permutation * @return true or false */ public boolean equals(Object other) { if (!(other instanceof Permutation)) { return false; } Permutation otherPerm = (Permutation)other; return IntUtils.equals(perm, otherPerm.perm); }
/** * Check if the given object is equal to this vector. * * @param other vector * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2Vector)) { return false; } GF2Vector otherVec = (GF2Vector)other; return (length == otherVec.length) && IntUtils.equals(v, otherVec.v); }
/** * Check if the given object is equal to this vector. * * @param other vector * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2Vector)) { return false; } GF2Vector otherVec = (GF2Vector)other; return (length == otherVec.length) && IntUtils.equals(v, otherVec.v); }
/** * checks if given object is equal to this permutation. * <p> * The method returns false whenever the given object is not permutation. * * @param other - * permutation * @return true or false */ public boolean equals(Object other) { if (!(other instanceof Permutation)) { return false; } Permutation otherPerm = (Permutation)other; return IntUtils.equals(perm, otherPerm.perm); }
/** * Compare this matrix with another object. * * @param other another object * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2Matrix)) { return false; } GF2Matrix otherMatrix = (GF2Matrix)other; if ((numRows != otherMatrix.numRows) || (numColumns != otherMatrix.numColumns) || (length != otherMatrix.length)) { return false; } for (int i = 0; i < numRows; i++) { if (!IntUtils.equals(matrix[i], otherMatrix.matrix[i])) { return false; } } return true; }
/** * Compare this matrix with another object. * * @param other another object * @return the result of the comparison */ @Override public boolean equals(Object other) { if (!(other instanceof GF2MatrixEx)) { return false; } GF2MatrixEx otherMatrix = (GF2MatrixEx)other; if ((numRows != otherMatrix.numRows) || (numColumns != otherMatrix.numColumns) || (length != otherMatrix.length)) { return false; } for (int i = 0; i < numRows; i++) { if (!IntUtils.equals(matrix[i], otherMatrix.matrix[i])) { return false; } } return true; }
/** * Compare this matrix with another object. * * @param other another object * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2Matrix)) { return false; } GF2Matrix otherMatrix = (GF2Matrix)other; if ((numRows != otherMatrix.numRows) || (numColumns != otherMatrix.numColumns) || (length != otherMatrix.length)) { return false; } for (int i = 0; i < numRows; i++) { if (!IntUtils.equals(matrix[i], otherMatrix.matrix[i])) { return false; } } return true; }
/** * Compare this vector with another object. * * @param other the other object * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2mVector)) { return false; } GF2mVector otherVec = (GF2mVector)other; if (!field.equals(otherVec.field)) { return false; } return IntUtils.equals(vector, otherVec.vector); }
/** * Compare this vector with another object. * * @param other the other object * @return the result of the comparison */ public boolean equals(Object other) { if (!(other instanceof GF2mVector)) { return false; } GF2mVector otherVec = (GF2mVector)other; if (!field.equals(otherVec.field)) { return false; } return IntUtils.equals(vector, otherVec.vector); }