Returns true if the given CrystalTransform is equivalent to this one.
Two crystal transforms are equivalent if one is the inverse of the other, i.e.
their transformation matrices multiplication is equal to the identity.
@param other
@return
438522
public boolean isEquivalent(CrystalTransform other) {
		Matrix4d mul = new Matrix4d();
		mul.mul(this.matTransform,other.matTransform);

		if (mul.epsilonEquals(IDENTITY, 0.0001)) {
			return true;
		}
		return false;
	}
163472
public int compareSwappedTo(IntDoublePair other) {
    int fdiff = Double.compare(this.second, other.second);
    if(fdiff != 0) {
      return fdiff;
    }
    return this.first - other.first;
  }
1117056
def isdisjoint(self, other):
        
        def isdisjoint_trans_pure(pipe):
            return not pipe.sinter(self.key, other.key)

        def isdisjoint_trans_mixed(pipe):
            self_values = set(self.__iter__(pipe))
            if use_redis:
                other_values = set(other.__iter__(pipe))
            else:
                other_values = set(other)

            return self_values.isdisjoint(other_values)

        if self._same_redis(other):
            return self._transaction(isdisjoint_trans_pure, other.key)
        if self._same_redis(other, RedisCollection):
            use_redis = True
            return self._transaction(isdisjoint_trans_mixed, other.key)

        use_redis = False
        return self._transaction(isdisjoint_trans_mixed)
1134646
public boolean isSameType(AuthenticationMethod other) {
		if (other == null)
			return false;
		return other.getClass().equals(this.getClass());
	}
967606
public boolean followsOrEqualsForAllOffsetTypesInBoth(final OffsetGroup other) {
    return charOffset().followsOrEquals(other.charOffset())
        && edtOffset().followsOrEquals(other.edtOffset())
        && (!byteOffset().isPresent() || !other.byteOffset().isPresent()
                || byteOffset().get().followsOrEquals(other.byteOffset().get()))
        && (!asrTime().isPresent() || !other.asrTime().isPresent()
                || asrTime().get().followsOrEquals(other.asrTime().get()));
  }
124848
function (other) {
        assertNotNull(other);

        if (this.count() === 0) {
            this.unionWith(other);
            return;
        }

        else if (other === this) {
            this.clear();
            return;
        }

        // If other is a HashSet, it has unique elements according to its equality comparer,
        // but if they're using different equality comparers, then assumption of uniqueness
        // will fail. So first check if other is a hashset using the same equality comparer;
        // symmetric except is a lot faster if we can assume uniqueness

        if (areEqualityComparersEqual(this, other)) {
            var table = this.table;

            forOf(other, function (element) {
                if (!table.remove(element)) {
                    table.add(element, null);
                }
            });
        }
        else {
            this.symmetricExceptWith(new HashSet(other, this.comparer));
        }
    }
951125
public static boolean isGE(String base, String other) {
        ComparableVersion v1 = new ComparableVersion(base);
        ComparableVersion v2 = new ComparableVersion(other);
        return v2.compareTo(v1) >= 0;
    }
136627
public boolean merge(AbstractTransition another) {
        if (!isCompatible(another)) {
            return false;
        }
        if (another.mId != null) {
            if (mId == null) {
                mId = another.mId;
            } else {
                StringBuilder sb = new StringBuilder(mId.length() + another.mId.length());
                sb.append(mId);
                sb.append("_MERGED_");
                sb.append(another.mId);
                mId = sb.toString();
            }
        }
        mUpdateStateAfterUpdateProgress |= another.mUpdateStateAfterUpdateProgress;
        mSetupList.addAll(another.mSetupList);
        Collections.sort(mSetupList, new Comparator<S>() {
            @Override
            public int compare(S lhs, S rhs) {
                if (lhs instanceof AbstractTransitionBuilder && rhs instanceof AbstractTransitionBuilder) {
                    AbstractTransitionBuilder left = (AbstractTransitionBuilder) lhs;
                    AbstractTransitionBuilder right = (AbstractTransitionBuilder) rhs;
                    float startLeft = left.mReverse ? left.mEnd : left.mStart;
                    float startRight = right.mReverse ? right.mEnd : right.mStart;
                    return (int) ((startRight - startLeft) * 1000);
                }
                return 0;
            }
        });

        return true;
    }
85715
public boolean isPannableFrom(MapViewState other) {
		return Math.abs(scale - other.getScale()) < EQUAL_CHECK_DELTA
				&& Math.abs(getPanX() - other.getPanX()) < EQUAL_CHECK_DELTA
				&& Math.abs(getPanY() - other.getPanY()) < EQUAL_CHECK_DELTA;
	}
509650
def matches_ordering(self, other):
        

        a = CollinearMagneticStructureAnalyzer(
            self.structure, overwrite_magmom_mode="normalize"
        ).get_structure_with_spin()

        # sign of spins doesn't matter, so we're comparing both
        # positive and negative versions of the structure
        # this code is possibly redundant, but is included out of
        # an abundance of caution
        b_positive = CollinearMagneticStructureAnalyzer(
            other, overwrite_magmom_mode="normalize", make_primitive=False
        )

        b_negative = b_positive.structure.copy()
        b_negative.add_site_property(
            "magmom", np.multiply(-1, b_negative.site_properties["magmom"])
        )

        b_negative = CollinearMagneticStructureAnalyzer(
            b_negative, overwrite_magmom_mode="normalize", make_primitive=False
        )

        b_positive = b_positive.get_structure_with_spin()
        b_negative = b_negative.get_structure_with_spin()

        if a.matches(b_positive) or a.matches(
            b_negative
        ):  # sometimes returns None (bug?)
            return True
        else:
            return False
408043
def _equivalent(self, other):
    """"""
    if other.__class__ is not self.__class__:  # TODO: What about subclasses?
      raise NotImplementedError('Cannot compare different model classes. '
                                '%s is not %s' % (self.__class__.__name__,
                                                  other.__class_.__name__))
    if set(self._projection) != set(other._projection):
      return False
    # It's all about determining inequality early.
    if len(self._properties) != len(other._properties):
      return False  # Can only happen for Expandos.
    my_prop_names = set(self._properties.iterkeys())
    their_prop_names = set(other._properties.iterkeys())
    if my_prop_names != their_prop_names:
      return False  # Again, only possible for Expandos.
    if self._projection:
      my_prop_names = set(self._projection)
    for name in my_prop_names:
      if '.' in name:
        name, _ = name.split('.', 1)
      my_value = self._properties[name]._get_value(self)
      their_value = other._properties[name]._get_value(other)
      if my_value != their_value:
        return False
    return True
1247784
public boolean similar(Object other) {
        try {
            if (!(other instanceof JSONObject)) {
                return false;
            }
            if (!this.keySet().equals(((JSONObject)other).keySet())) {
                return false;
            }
            for (final Entry<String,?> entry : this.entrySet()) {
                String name = entry.getKey();
                Object valueThis = entry.getValue();
                Object valueOther = ((JSONObject)other).get(name);
                if(valueThis == valueOther) {
                	continue;
                }
                if(valueThis == null) {
                	return false;
                }
                if (valueThis instanceof JSONObject) {
                    if (!((JSONObject)valueThis).similar(valueOther)) {
                        return false;
                    }
                } else if (valueThis instanceof JSONArray) {
                    if (!((JSONArray)valueThis).similar(valueOther)) {
                        return false;
                    }
                } else if (!valueThis.equals(valueOther)) {
                    return false;
                }
            }
            return true;
        } catch (Throwable exception) {
            return false;
        }
    }
280916
def equals(self, other):
        """"""
        if isinstance(other, SSAEvent):
            return self.as_dict() == other.as_dict()
        else:
            raise TypeError("Cannot compare to non-SSAEvent object")
905934
function(other) {
		var r0 = this._points();
		var r1 = other._points();
		var axes = [
			toAxis(r0[0], r0[1]),
			toAxis(r0[0], r0[3])
		];
		var i, pr0, pr1;

		if (this._rotation !== other._rotation) {
			// Only separate with r1 axis if the rotation is different,
			// else it's enough to separate r0 and r1 with r0 axis only!
			axes.push(
				toAxis(r1[0], r1[1]),
				toAxis(r1[0], r1[3])
			);
		}

		for (i = 0; i < axes.length; ++i) {
			pr0 = projected(r0, axes[i]);
			pr1 = projected(r1, axes[i]);

			if (pr0.max < pr1.min || pr1.max < pr0.min) {
				return false;
			}
		}

		return true;
	}
129337
public static boolean isEqual(final Object object, final Object other) {
        return object == null ? other == null : object.equals(other);
    }
1012282
public boolean isSameAs( AstNode other ) {
        if (other == null) {
            return false;
        }
        if (!this.name.equals(other.name)) {
            return false;
        }
        if (!this.properties.equals(other.properties)) {
            return false;
        }
        if (this.getChildCount() != other.getChildCount()) {
            return false;
        }
        Iterator<AstNode> thisChildren = this.getChildren().iterator();
        Iterator<AstNode> thatChildren = other.getChildren().iterator();
        while (thisChildren.hasNext() && thatChildren.hasNext()) {
            if (!thisChildren.next().isSameAs(thatChildren.next())) {
                return false;
            }
        }
        return true;
    }
984629
public boolean isConsistentWith(KbState other) {
    // Both states need to have the same functions in the same order.
    // Don't check the names specifically though, because it's expensive.
    Preconditions.checkArgument(other.functionNames.size() == functionNames.size());
    
    List<FunctionAssignment> otherAssignments = other.getAssignments();
    for (int i = 0; i < functionAssignments.size(); i++) {
      FunctionAssignment a1 = functionAssignments.get(i);
      FunctionAssignment a2 = otherAssignments.get(i);
      if (!a1.isConsistentWith(a2)) {
        return false;
      }
    }
    return true;
  }