Esempio n. 1
0
 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());
 }
Esempio n. 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;
 }
Esempio n. 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());
 }
Esempio n. 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;
 }
Esempio n. 5
0
 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());
     }
 }
Esempio n. 6
0
        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();
            }
        }
Esempio n. 7
0
 public BearingPure(PType tp_el, Func <Stream> streamGen)
 {
     this.tp_elem = tp_el;
     sequence     = new UniversalSequenceBase(tp_el, streamGen());
 }
Esempio n. 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;
 }