/// <summary>
        /// Compares two PSM based on their score.
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public int CompareTo(PeptideSpectralMatch other)
        {
            if (other == null)
            {
                return(1);
            }

            if (!ScoreType.Equals(other.ScoreType))
            {
                throw new ArgumentException("Cannot compare peptide spectral matches with different score types");
            }

            // The sign of the scoretype enum indicates how they should be compared
            return(Score.CompareTo(other.Score) * Math.Sign((int)ScoreType));
        }
 public bool IsTheSameType(BaseResult <T> r)
 {
     return(ScoreType.Equals(r.ScoreType));
 }
Example #3
0
 public bool IsTheSameType(Result r)
 {
     return(ScoreType.Equals(r.ScoreType));
 }