コード例 #1
0
ファイル: BearingDeletable.cs プロジェクト: agmarchuk/PolarDB
 public BearingDeletable(PType tp_el, Func <Stream> streamGen)
 {
     this.tp_elem = tp_el;
     sequence     = new UniversalSequenceBase(new PTypeRecord(
                                                  new NamedType("deleted", new PType(PTypeEnumeration.boolean)),
                                                  new NamedType("element", tp_el)), streamGen());
 }
コード例 #2
0
 public UniversalSequenceCompKey32(Stream media, Func <object, int> keyfunc, Comparer <object> comp,
                                   UniversalSequenceBase bearing_table) :
     base(new PTypeRecord(
              new NamedType("key", new PType(PTypeEnumeration.integer)),
              new NamedType("offset", new PType(PTypeEnumeration.longinteger))), media, comp, bearing_table)
 {
     this.keyfunc = keyfunc;
 }
コード例 #3
0
 //public Func<object, bool> Filter { get; set; }
 // создаем объект, подсоединяемся к носителям или создаем носители
 public IndexView(Func <Stream> streamGen, IBearing bearing,
                  Func <object, bool> applicable, Comparer <object> comp_d)
 {
     this.streamGen    = streamGen;
     this.bearing      = bearing;
     this.applicable   = applicable;
     this.comp_default = comp_d;
     offset_sequ       = new UniversalSequenceBase(new PType(PTypeEnumeration.longinteger), streamGen());
 }
コード例 #4
0
 // создаем объект, подсоединяемся к носителям или создаем носители
 public IndexViewImmutable(Func <Stream> streamGen, IBearing bearing, Comparer <object> comp_d, string tmpdir, long volume_of_offset_array)
 {
     this.streamGen              = streamGen;
     this.bearing                = bearing;
     this.comp_default           = comp_d;
     this.tmpdir                 = tmpdir;
     offset_sequ                 = new UniversalSequenceBase(new PType(PTypeEnumeration.longinteger), streamGen());
     this.volume_of_offset_array = volume_of_offset_array;
 }
コード例 #5
0
ファイル: IndexKey32Imm.cs プロジェクト: agmarchuk/PolarDB
 public IndexKey32Imm(Func <Stream> streamGen, UniversalSequenceBase bearing, Func <object, IEnumerable <int> > keyFun, Comparer <object> comp)
 {
     this.bearing = bearing;
     this.keyFun  = keyFun;
     this.comp    = comp;
     keyoffsets   = new UniversalSequenceBase(
         new PTypeRecord(
             new NamedType("key", new PType(PTypeEnumeration.integer)),
             new NamedType("off", new PType(PTypeEnumeration.longinteger))),
         streamGen());
     // Шкалу надо вычислять не всегда, о реальном условии еще надо подумать
     if (comp == null)
     {
         scale = new Scale(streamGen());
     }
 }
コード例 #6
0
ファイル: Scale.cs プロジェクト: agmarchuk/PolarDB
        public Scale(Stream stream)
        {
            keylengthminmaxstarts = new UniversalSequenceBase(new PType(PTypeEnumeration.integer), stream);
            int nvalues = (int)keylengthminmaxstarts.Count();

            if (nvalues > 0)
            {
                keysLength = (int)keylengthminmaxstarts.GetByIndex(0);
                min        = (int)keylengthminmaxstarts.GetByIndex(1);
                max        = (int)keylengthminmaxstarts.GetByIndex(2);
                n_scale    = nvalues - 3;
                starts     = new int[n_scale];
                for (int i = 3; i < nvalues; i++)
                {
                    starts[i - 3] = (int)keylengthminmaxstarts.GetByIndex(i);
                }
                SetToPosition();
                SetGetDia();
            }
        }
コード例 #7
0
 public BearingPure(PType tp_el, Func <Stream> streamGen)
 {
     this.tp_elem = tp_el;
     sequence     = new UniversalSequenceBase(tp_el, streamGen());
 }
コード例 #8
0
 //PType tp_elem;
 public UniversalSequenceComp(PType tp_elem, Stream media, Comparer <object> comp, UniversalSequenceBase bearing_table) : base(tp_elem, media)
 {
     this.comp    = comp;
     this.bearing = bearing_table;
 }