コード例 #1
0
ファイル: PrecursorTextId.cs プロジェクト: rfellers/pwiz
 public bool Equals(PrecursorTextId other)
 {
     return(PrecursorMz.Equals(other.PrecursorMz) &&
            Equals(IonMobility, other.IonMobility) &&
            Equals(Target, other.Target) &&
            Extractor == other.Extractor);
 }
コード例 #2
0
 private bool Equals(Chromatogram other)
 {
     return
         (PrecursorMz.Equals(other.PrecursorMz) &&
          ProductMz.Equals(other.ProductMz) &&
          Times.SequenceEqual(other.Times) &&
          Intensities.SequenceEqual(other.Intensities) &&
          Color.Equals(other.Color));
 }
コード例 #3
0
ファイル: PrecursorTextId.cs プロジェクト: tomas-pluskal/pwiz
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = PrecursorMz.GetHashCode();
         hashCode = (hashCode * 397) ^ (TextId != null ? TextId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Extractor;
         return(hashCode);
     }
 }
コード例 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (ModifiedSequence != null ? ModifiedSequence.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ PrecursorMz.GetHashCode();
         hashCode = (hashCode * 397) ^ PrecursorCharge.GetHashCode();
         return(hashCode);
     }
 }
コード例 #5
0
ファイル: PrecursorTextId.cs プロジェクト: rfellers/pwiz
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = PrecursorMz.GetHashCode();
         hashCode = (hashCode * 397) ^ IonMobility.GetHashCode();
         hashCode = (hashCode * 397) ^ (Target != null ? Target.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (int)Extractor;
         return(hashCode);
     }
 }
コード例 #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = PrecursorMz.GetHashCode();
         hashCode = (hashCode * 397) ^ ProductMz.GetHashCode();
         hashCode = (hashCode * 397) ^ Times.GetHashCode();
         hashCode = (hashCode * 397) ^ Intensities.GetHashCode();
         hashCode = (hashCode * 397) ^ Color.GetHashCode();
         return(hashCode);
     }
 }
コード例 #7
0
        /// <summary>
        /// Generates a hash code.
        /// </summary>
        /// <returns>Hash code based on stored data.</returns>
        public override int GetHashCode()
        {
            var hashCode =
                PrecursorMz.GetHashCode() ^
                PrecursorChargeState.GetHashCode() ^
                Scan.GetHashCode() ^
                Id.GetHashCode() ^
                GroupId.GetHashCode() ^
                TotalIonCurrent.GetHashCode() ^
                RetentionTime.GetHashCode();

            return(hashCode);
        }
コード例 #8
0
ファイル: DbSpectrum.cs プロジェクト: tomas-pluskal/pwiz
 public override int GetHashCode()
 {
     unchecked
     {
         var result = base.GetHashCode();
         result = (result * 397) ^ ResultsFile.GetHashCode();
         result = (result * 397) ^ PrecursorMz.GetHashCode();
         result = (result * 397) ^ MatchedPrecursorMz.GetHashCode();
         result = (result * 397) ^ RetentionTime.GetHashCode();
         result = (result * 397) ^ MzBytes.GetHashCode();
         result = (result * 397) ^ IntensityBytes.GetHashCode();
         return(result);
     }
 }
コード例 #9
0
        /// <summary>
        /// Compares two objects' values.
        /// </summary>
        /// <param name="obj">Other to compare with.</param>
        /// <returns>True if values are the same, false if not.</returns>
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            var other = obj as MSSpectra;

            if (other == null)
            {
                return(false);
            }

            if (!GroupId.Equals(other.GroupId))
            {
                return(false);
            }
            if (!MsLevel.Equals(other.MsLevel))
            {
                return(false);
            }
            if (!PrecursorChargeState.Equals(other.PrecursorChargeState))
            {
                return(false);
            }
            if (!PrecursorMz.Equals(other.PrecursorMz))
            {
                return(false);
            }
            if (!Net.Equals(other.Net))
            {
                return(false);
            }
            if (!Scan.Equals(other.Scan))
            {
                return(false);
            }
            if (!TotalIonCurrent.Equals(other.TotalIonCurrent))
            {
                return(false);
            }
            if (!CollisionType.Equals(other.CollisionType))
            {
                return(false);
            }
            return(true);
        }
コード例 #10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = base.GetHashCode();
         result = (result * 397) ^ ResultsFile.GetHashCode();
         result = (result * 397) ^ PrecursorMz.GetHashCode();
         result = (result * 397) ^ MatchedPrecursorMz.GetHashCode();
         result = (result * 397) ^ (DocumentPeptide == null ? 0 : DocumentPeptide.GetHashCode());
         result = (result * 397) ^ DocumentPrecursorCharge.GetHashCode();
         result = (result * 397) ^ RetentionTime.GetHashCode();
         result = (result * 397) ^ MzBytes.GetHashCode();
         result = (result * 397) ^ IntensityBytes.GetHashCode();
         return(result);
     }
 }
コード例 #11
0
ファイル: PrecursorTextId.cs プロジェクト: tomas-pluskal/pwiz
 public bool Equals(PrecursorTextId other)
 {
     return(PrecursorMz.Equals(other.PrecursorMz) &&
            string.Equals(TextId, other.TextId) &&
            Extractor == other.Extractor);
 }
コード例 #12
0
 protected bool Equals(PsmKey other)
 {
     return(string.Equals(ModifiedSequence, other.ModifiedSequence) &&
            PrecursorMz.Equals(other.PrecursorMz) &&
            PrecursorCharge == other.PrecursorCharge);
 }