コード例 #1
0
ファイル: NodeData.cs プロジェクト: michael-kotliar/MSPC
        public int CompareTo(NodeData <I> other)
        {
            int c = Peak.CompareTo(other.Peak);

            if (c != 0)
            {
                return(c);
            }
            c = SampleID.CompareTo(other.SampleID);
            if (c != 0)
            {
                return(c);
            }
            /// At this point two NodeData are
            /// exactly same and does not matter
            /// which one proceedds the other,
            /// hence return -1 or 1. However,
            /// should not return 0, because
            /// that would fail adding them to
            /// the intervals list (two items
            /// with same key).
            return(-1);
        }