亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? orderedset.cs

?? C#寫的類似于STL的集合類,首先是C#編寫,可以用于.net變程.
?? CS
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
            return new View(this, tree.DoubleBoundedRangeTester(from, fromInclusive, to, toInclusive), false, false);
        }

        /// <summary>
        /// Returns a View collection that can be used for enumerating a range of the items in the set..
        /// Only items that are greater than (and optionally, equal to) <paramref name="from"/> are included. 
        /// The items are enumerated in sorted order. Items equal to <paramref name="from"/> can be included
        /// or excluded depending on the <paramref name="fromInclusive"/> parameter.
        /// </summary>
        ///<remarks>
        ///<p>Typically, this method is used in conjunction with a foreach statement. For example:
        ///<code>
        /// foreach(T item in set.RangeFrom(from, true)) {
        ///    // process item
        /// }
        ///</code></p>
        /// <p>If an item is added to or deleted from the set while the View is being enumerated, then 
        /// the enumeration will end with an InvalidOperationException.</p>
        ///<p>Calling RangeFrom does not copy the data in the tree, and the operation takes constant time.</p>
        ///</remarks>
        /// <param name="from">The lower bound of the range.</param>
        /// <param name="fromInclusive">If true, the lower bound is inclusive--items equal to the lower bound will
        /// be included in the range. If false, the lower bound is exclusive--items equal to the lower bound will not
        /// be included in the range.</param>
        /// <returns>An OrderedSet.View of items in the given range.</returns>
        public View RangeFrom(T from, bool fromInclusive)  // A partial view that can be enumerated
        {
            return new View(this, tree.LowerBoundedRangeTester(from, fromInclusive), false, false);
        }

        /// <summary>
        /// Returns a View collection that can be used for enumerating a range of the items in the set..
        /// Only items that are less than (and optionally, equal to) <paramref name="to"/> are included. 
        /// The items are enumerated in sorted order. Items equal to <paramref name="to"/> can be included
        /// or excluded depending on the <paramref name="toInclusive"/> parameter.
        /// </summary>
        ///<remarks>
        ///<p>Typically, this method is used in conjunction with a foreach statement. For example:
        ///<code>
        /// foreach(T item in set.RangeTo(to, false)) {
        ///    // process item
        /// }
        ///</code></p>
        /// <p>If an item is added to or deleted from the set while the View is being enumerated, then 
        /// the enumeration will end with an InvalidOperationException.</p>
        ///<p>Calling RangeTo does not copy the data in the tree, and the operation takes constant time.</p>
        ///</remarks>
        /// <param name="to">The upper bound of the range. </param>
        /// <param name="toInclusive">If true, the upper bound is inclusive--items equal to the upper bound will
        /// be included in the range. If false, the upper bound is exclusive--items equal to the upper bound will not
        /// be included in the range.</param>
        /// <returns>An OrderedSet.View of items in the given range.</returns>
        public View RangeTo(T to, bool toInclusive)  // A partial view that can be enumerated
        {
            return new View(this, tree.UpperBoundedRangeTester(to, toInclusive), false, false);
        }

        #endregion
        
        #region View nested class
   
        /// <summary>
        /// The OrderedSet&lt;T&gt;.View class is used to look at a subset of the Items
        /// inside an ordered set. It is returned from the Range, RangeTo, RangeFrom, and Reversed methods. 
        /// </summary>
        ///<remarks>
        /// <p>Views are dynamic. If the underlying set changes, the view changes in sync. If a change is made
        /// to the view, the underlying set changes accordingly.</p>
        ///<p>Typically, this class is used in conjunction with a foreach statement to enumerate the items 
        /// in a subset of the OrderedSet. For example:</p>
        ///<code>
        /// foreach(T item in set.Range(from, to)) {
        ///    // process item
        /// }
        ///</code>
        ///</remarks>
        [Serializable]
        public class View : CollectionBase<T>, ICollection<T>
        {
            private OrderedSet<T> mySet;
            private RedBlackTree<T>.RangeTester rangeTester;   // range tester for the range being used.
            private bool entireTree;                   // is the view the whole tree?
            private bool reversed;                     // is the view reversed?

            /// <summary>
            /// Initialize the view.
            /// </summary>
            /// <param name="mySet">OrderedSet being viewed</param>
            /// <param name="rangeTester">Range tester that defines the range being used.</param>
            /// <param name="entireTree">If true, then rangeTester defines the entire tree. Used to optimize some operations.</param>
            /// <param name="reversed">Is the view enuemerated in reverse order?</param>
            internal View(OrderedSet<T> mySet, RedBlackTree<T>.RangeTester rangeTester, bool entireTree, bool reversed)
            {
                this.mySet = mySet;
                this.rangeTester = rangeTester;
                this.entireTree = entireTree;
                this.reversed = reversed;
            }

            /// <summary>
            /// Determine if the given item lies within the bounds of this view.
            /// </summary>
            /// <param name="item">Item to test.</param>
            /// <returns>True if the item is within the bounds of this view.</returns>
            private bool ItemInView(T item)
            {
                return rangeTester(item) == 0;
            }

            /// <summary>
            /// Enumerate all the items in this view.
            /// </summary>
            /// <returns>An IEnumerator&lt;T&gt; with the items in this view.</returns>
            public sealed override IEnumerator<T> GetEnumerator()
            {
                if (reversed)
                    return mySet.tree.EnumerateRangeReversed(rangeTester).GetEnumerator();
                else
                    return mySet.tree.EnumerateRange(rangeTester).GetEnumerator();
            }

            /// <summary>
            /// Number of items in this view.
            /// </summary>
            /// <value>Number of items that lie within the bounds the view.</value>
            public sealed override int Count
            {
                get {
                    if (entireTree)
                        return mySet.Count;
                    else {
                        // Note: we can't cache the result of this call because the underlying
                        // set can change, which would make the cached value incorrect.
                        return mySet.tree.CountRange(rangeTester);
                    }
                }
            }

            /// <summary>
            /// Removes all the items within this view from the underlying set.
            /// </summary>
            /// <example>The following removes all the items that start with "A" from an OrderedSet.
            /// <code>
            /// set.Range("A", "B").Clear();
            /// </code>
            /// </example>
            public sealed override void Clear()
            {
                if (entireTree) {
                    mySet.Clear();   // much faster than DeleteRange
                }
                else {
                    mySet.tree.DeleteRange(rangeTester);
                }
            }

            /// <summary>
            /// Adds a new item to the set underlying this View. If the set already contains an item equal to
            /// <paramref name="item"/>, that item is replaces with <paramref name="item"/>. If
            /// <paramref name="item"/> is outside the range of this view, an InvalidOperationException
            /// is thrown.
            /// </summary>
            /// <remarks>
            /// <para>Equality between items is determined by the comparison instance or delegate used
            /// to create the set.</para>
            /// <para>Adding an item takes time O(log N), where N is the number of items in the set.</para></remarks>
            /// <param name="item">The item to add.</param>
            /// <returns>True if the set already contained an item equal to <paramref name="item"/> (which was replaced), false 
            /// otherwise.</returns>
            public new bool Add(T item)
            {
                if (!ItemInView(item))
                    throw new ArgumentException(Strings.OutOfViewRange, "item");
                else
                    return mySet.Add(item);
            }

            /// <summary>
            /// Adds a new item to the set underlying this View. If the set already contains an item equal to
            /// <paramref name="item"/>, that item is replaces with <paramref name="item"/>. If
            /// <paramref name="item"/> is outside the range of this view, an InvalidOperationException
            /// is thrown.
            /// </summary>
            /// <remarks>
            /// <para>Equality between items is determined by the comparison instance or delegate used
            /// to create the set.</para>
            /// <para>Adding an item takes time O(log N), where N is the number of items in the set.</para></remarks>
            /// <param name="item">The item to add.</param>
            void ICollection<T>.Add(T item)
            {
                Add(item);
            }

            /// <summary>
            /// Searches the underlying set for an item equal to <paramref name="item"/>, and if found,
            /// removes it from the set. If not found, the set is unchanged. If the item is outside
            /// the range of this view, the set is unchanged.
            /// </summary>
            /// <remarks>
            /// <para>Equality between items is determined by the comparison instance or delegate used
            /// to create the set.</para>
            /// <para>Removing an item from the set takes time O(log N), where N is the number of items in the set.</para></remarks>
            /// <param name="item">The item to remove.</param>
            /// <returns>True if <paramref name="item"/> was found and removed. False if <paramref name="item"/> was not in the set, or
            /// was outside the range of this view.</returns>
            public sealed override bool Remove(T item)
            {
                if (!ItemInView(item))
                    return false;
                else
                    return mySet.Remove(item);
            }

            /// <summary>
            /// Determines if this view of the set contains an item equal to <paramref name="item"/>. The set
            /// is not changed. If 
            /// </summary>
            /// <remarks>Searching the set for an item takes time O(log N), where N is the number of items in the set.</remarks>
            /// <param name="item">The item to search for.</param>
            /// <returns>True if the set contains <paramref name="item"/>, and <paramref name="item"/> is within
            /// the range of this view. False otherwise.</returns>
            public sealed override bool Contains(T item)
            {
                if (!ItemInView(item))
                    return false;
                else
                    return mySet.Contains(item);
            }

            /// <summary>
            /// Get the index of the given item in the view. The smallest item in the view has index 0,
            /// the next smallest item has index 1, and the largest item has index Count-1. 
            /// </summary>
            /// <remarks>Finding the index takes time O(log N), which N is the number of items in 
            /// the set.</remarks>
            /// <param name="item">The item to get the index of.</param>
            /// <returns>The index of the item in the view, or -1 if the item is not present
            /// in the view.</returns>
            public int IndexOf(T item)
            {
                if (entireTree) {
                    if (reversed) {
                        int indexInSet = mySet.tree.FindIndex(item, false);
                        if (indexInSet < 0)
                            return -1;

                        return mySet.Count - 1 - indexInSet;
                    }
                    else {
                        return mySet.tree.FindIndex(item, true);
                    }
                }
                else {
                    T dummy;

                    if (!ItemInView(item))
                        return -1;

                    if (reversed) {
                        int indexInSet = mySet.tree.FindIndex(item, false);
                        if (indexInSet < 0)
                            return -1;
                        int indexOfEnd = mySet.tree.LastItemInRange(rangeTester, out dummy);
                        return indexOfEnd - indexInSet;

                    }
                    else {
                        int indexInSet = mySet.tree.FindIndex(item, true);
                        if (indexInSet < 0)
                            return -1;
                        int indexOfStart = mySet.tree.FirstItemInRange(rangeTester, out dummy);
      

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久综合久久99| 91蜜桃在线观看| 91精品一区二区三区久久久久久| 一区二区三区精品在线| 一本到不卡免费一区二区| 自拍偷拍欧美精品| 色婷婷av一区二区| 亚洲一区二区在线免费观看视频| 欧美亚洲免费在线一区| 秋霞国产午夜精品免费视频| 欧美变态tickling挠脚心| 国产成人在线视频网站| 国产精品国产三级国产a| 91国在线观看| 久久电影网站中文字幕| 久久精品欧美一区二区三区麻豆| 成人av电影在线| 一二三区精品视频| 91精品国产一区二区| 久久国产人妖系列| 中文字幕在线一区免费| 欧美日韩国产经典色站一区二区三区 | 欧美一区二区网站| 亚洲电影一区二区三区| 91精品久久久久久久91蜜桃| 国产一区在线看| 国产精品久久夜| 在线中文字幕一区| 首页国产欧美久久| 欧美xxxxxxxx| 成人福利电影精品一区二区在线观看| 亚洲欧美日韩国产一区二区三区| 色偷偷久久一区二区三区| 午夜精品福利在线| 久久亚洲二区三区| 国产综合久久久久久久久久久久| 久久伊99综合婷婷久久伊| 国产精品小仙女| 中文av一区二区| 欧美综合天天夜夜久久| 日本美女一区二区三区| 欧美成人aa大片| 成人美女视频在线观看| 亚洲大型综合色站| 精品国产乱码久久久久久免费| av成人免费在线| 中文字幕一区免费在线观看| 欧美日韩国产成人在线免费| 国产一区二区在线免费观看| 亚洲欧美日韩国产综合| 日韩欧美黄色影院| 91无套直看片红桃| 看片网站欧美日韩| 亚洲精品一二三| 久久久亚洲综合| 欧美色视频一区| 国产麻豆日韩欧美久久| 亚洲午夜三级在线| 国产亚洲精品福利| 欧美日韩高清一区二区不卡| 粉嫩av亚洲一区二区图片| 亚洲成人av电影在线| 久久久久亚洲蜜桃| 欧美喷水一区二区| 成人av影视在线观看| 久久精品二区亚洲w码| 亚洲精选免费视频| 久久久精品影视| 欧美精品 日韩| 国产夫妻精品视频| 午夜影视日本亚洲欧洲精品| 国产欧美精品一区| 91精品久久久久久蜜臀| 91久久精品午夜一区二区| 成人午夜在线免费| 久久国产精品一区二区| 亚洲国产精品久久人人爱蜜臀| 亚洲国产高清不卡| 久久免费精品国产久精品久久久久| 欧美日韩国产美| 欧美制服丝袜第一页| 成人av资源网站| 国产成人精品综合在线观看| 免费成人结看片| 香蕉影视欧美成人| 亚洲国产一区在线观看| 亚洲精品中文字幕乱码三区| 一区免费观看视频| ㊣最新国产の精品bt伙计久久| 久久久五月婷婷| 精品第一国产综合精品aⅴ| 91精品在线麻豆| 7777女厕盗摄久久久| 欧美日韩高清在线播放| 欧美日韩成人一区| 欧美日韩你懂得| 91亚洲精品一区二区乱码| 国产精品一区专区| 高清beeg欧美| www.日韩在线| www.欧美精品一二区| www.av精品| 97se亚洲国产综合自在线不卡| 波多野结衣亚洲一区| 91热门视频在线观看| 色综合夜色一区| 在线亚洲人成电影网站色www| 色综合色综合色综合| 91女人视频在线观看| 在线免费观看成人短视频| 欧美丝袜丝交足nylons| 在线播放欧美女士性生活| 欧美最猛黑人xxxxx猛交| 粉嫩av亚洲一区二区图片| 国产69精品久久777的优势| 成人动漫在线一区| 91免费观看在线| 欧美日韩一卡二卡三卡| 日韩亚洲欧美在线| 久久免费视频色| 国产精品对白交换视频| 亚洲黄色小说网站| 石原莉奈在线亚洲二区| 国产综合久久久久影院| 成人黄色a**站在线观看| 91在线视频播放| 欧美精选一区二区| 久久亚洲影视婷婷| 亚洲私人黄色宅男| 日日夜夜免费精品视频| 国产精品18久久久久久久久久久久| 欧美日本在线播放| 欧美精品一区二区三| 国产精品久久久久久福利一牛影视| 91蜜桃网址入口| 日本不卡在线视频| 午夜精品久久久久久久99水蜜桃| 精品制服美女丁香| 欧美主播一区二区三区美女| 久久综合久久综合亚洲| 国产很黄免费观看久久| 国产亚洲午夜高清国产拍精品| 不卡电影免费在线播放一区| 久久久精品tv| 亚洲成人av资源| 亚洲超碰精品一区二区| 另类小说视频一区二区| 色综合久久久久| 91精品国产乱码| 久久精品视频免费观看| 亚洲成人免费看| 成人黄色在线网站| 欧美日本乱大交xxxxx| 久久你懂得1024| 亚洲成年人影院| 94色蜜桃网一区二区三区| 欧美精品一区二区久久婷婷| 亚洲最大成人网4388xx| 粉嫩13p一区二区三区| 精品美女在线观看| 亚洲aaa精品| 一道本成人在线| 欧美韩国日本综合| 麻豆精品新av中文字幕| 一本大道久久精品懂色aⅴ| 亚洲国产精品高清| 精品亚洲porn| 欧美日韩一区三区四区| 亚洲综合另类小说| 91在线高清观看| 中文一区二区完整视频在线观看| 免费观看在线综合色| 欧美中文字幕亚洲一区二区va在线| 国产欧美久久久精品影院 | 久久久久久久一区| 欧美a级一区二区| 欧美精品久久久久久久久老牛影院| 一区二区三区在线观看动漫| 91免费观看视频| 亚洲欧美综合网| 国产精品88888| 久久久精品中文字幕麻豆发布| 日韩不卡一区二区| 欧美一区二区三区视频免费| 日韩经典中文字幕一区| 欧美日韩精品一区二区天天拍小说| 亚洲国产精品一区二区www| 欧美在线免费播放| 国产精品不卡一区| 91浏览器打开| 亚洲综合精品久久| 欧美日韩三级视频| 老司机午夜精品| 亚洲精品一区二区三区四区高清| 狠狠久久亚洲欧美| 日韩午夜在线播放| 国产一区二区三区黄视频| 久久亚洲春色中文字幕久久久| 国产盗摄一区二区三区| 国产精品美女久久久久久久久久久 |