/// <summary> /// <inheritdoc/> /// </summary> /// <param name="obj"><inheritdoc/></param> /// <returns><inheritdoc/></returns> public override bool Equals(Object obj) { if (this == obj) { return(true); } if (!base.Equals(obj)) { return(false); } if (this.GetType() != obj.GetType()) { return(false); } SparseObjectMatrix <T> other = obj as SparseObjectMatrix <T>; if (other == null) { return(false); } if (m_SparseMap == null) { if (other.m_SparseMap != null) { return(false); } } else if (!m_SparseMap.Equals(other.m_SparseMap)) { return(false); } if (ModuleTopology == null) { if (other.ModuleTopology != null) { return(false); } } else if (!ModuleTopology.Equals(other.ModuleTopology)) { return(false); } if (IsRemotelyDistributed != other.IsRemotelyDistributed) { return(false); } return(true); }
public bool Equals(SparseBinaryMatrix obj) { if (this == obj) { return(true); } if (obj == null) { return(false); } if (backingArray == null) { if (obj.backingArray != null) { return(false); } } else if (!backingArray.Equals(obj.backingArray)) { return(false); } if (ModuleTopology == null) { if (obj.ModuleTopology != null) { return(false); } } else if (!ModuleTopology.Equals(obj.ModuleTopology)) { return(false); } if (this.trueCounts != obj.trueCounts) { return(false); } return(true); }
public bool Equals(AbstractSparseBinaryMatrix obj) { if (this == obj) { return(true); } if (!base.Equals(obj)) { return(false); } if ((obj.GetType() != this.GetType())) { return(false); } AbstractSparseBinaryMatrix other = (AbstractSparseBinaryMatrix)obj; if (other.trueCounts != null && trueCounts != null) { if (!other.trueCounts.SequenceEqual(trueCounts)) { return(false); } } if (ModuleTopology == null) { if (obj.ModuleTopology != null) { return(false); } } else if (!ModuleTopology.Equals(obj.ModuleTopology)) { return(false); } return(true); }