Ejemplo n.º 1
0
            /// <summary>
            /// Simple constructor.
            /// </summary>
            /// <param name="oidhm"></param>
            internal Iterator(OpenIntToDoubleHashMap oidhm)
            {
                this.o = oidhm;
                // preserve the modification count of the map to detect concurrent modifications later
                referenceCount = o.count;

                // initialize current index
                next = -1;
                MoveNext();
            }
Ejemplo n.º 2
0
 protected virtual void Dispose(Boolean disposing)
 {
     if (!this.disposed)
     {
         if (disposing)
         {
             o        = null;
             disposed = true;
         }
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Copy constructor.
        /// </summary>
        /// <param name="source">map to copy</param>
        public OpenIntToDoubleHashMap(OpenIntToDoubleHashMap source)
        {
            int length = source.keys.Length;

            keys = new int[length];
            Array.Copy(source.keys, 0, keys, 0, length);
            values = new double[length];
            Array.Copy(source.values, 0, values, 0, length);
            states = new byte[length];
            Array.Copy(source.states, 0, states, 0, length);
            missingEntries = source.missingEntries;
            Size           = source.Size;
            mask           = source.mask;
            count          = source.count;
        }