예제 #1
0
        internal override bool IsSamePartition(PartitionInfo p)
        {
            HashPartition <TKey> p1 = p as HashPartition <TKey>;

            if (p1 == null || this.Count != p1.Count)
            {
                return(false);
            }
            // Check the comparers:
            return(this.m_comparer.Equals(p1.m_comparer));
        }
예제 #2
0
        internal override bool IsSamePartition(PartitionInfo p)
        {
            RangePartition <TKey> p1 = p as RangePartition <TKey>;

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

            // Check the keys:
            if (this.Keys == null ||
                p1.Keys == null ||
                this.Keys.Length != p1.Keys.Length)
            {
                return(false);
            }

            IComparer <TKey> comp1 = TypeSystem.GetComparer <TKey>(p1.m_comparer);

            if (comp1 == null)
            {
                return(false);
            }
            if (this.IsDescending != p1.IsDescending)
            {
                comp1 = new MinusComparer <TKey>(comp1);
            }
            for (int i = 0; i < this.Keys.Length; i++)
            {
                if (this.m_comparer.Compare(this.Keys[i], p1.Keys[i]) != 0)
                {
                    return(false);
                }
            }

            // Check the comparers:
            return(this.m_comparer.Equals(p1.m_comparer));
        }
예제 #3
0
 internal virtual bool IsSameMonotoncity(PartitionInfo pinfo)
 {
     return(false);
 }
예제 #4
0
 internal DataSetInfo(DataSetInfo info)
 {
     this.partitionInfo = info.partitionInfo;
     this.orderByInfo   = info.orderByInfo;
     this.distinctInfo  = info.distinctInfo;
 }
예제 #5
0
        internal override PartitionInfo Create(LambdaExpression keySel)
        {
            Type keyType = keySel.Body.Type;

            return(PartitionInfo.CreateHash(keySel, this.Count, this.m_comparer, keyType));
        }
예제 #6
0
 internal DataSetInfo(PartitionInfo pinfo, OrderByInfo oinfo, DistinctInfo dinfo)
 {
     this.partitionInfo = pinfo;
     this.orderByInfo   = oinfo;
     this.distinctInfo  = dinfo;
 }
예제 #7
0
 internal DataSetInfo()
 {
     this.partitionInfo = OnePartition;
     this.orderByInfo   = NoOrderBy;
     this.distinctInfo  = NoDistinct;
 }
예제 #8
0
        internal override PartitionInfo Create(LambdaExpression keySel)
        {
            Type keyType = keySel.Body.Type;

            return(PartitionInfo.CreateRange(keySel, this.Keys, this.m_comparer, this.m_isDescending, this.Count, keyType));
        }
예제 #9
0
 internal override bool IsSamePartition(PartitionInfo p)
 {
     return(false);
 }
예제 #10
0
 internal abstract bool IsSamePartition(PartitionInfo p);
예제 #11
0
 internal virtual PartitionInfo Concat(PartitionInfo p)
 {
     return(new RandomPartition(this.Count + p.Count));
 }