public Collection( Collection inCollection ) { _vectors_name = new List<string>(inCollection._vectors_name); _vectors_visibility = new List<bool>(inCollection._vectors_visibility); _vectors = new List<Vector>(); File = new CFile(_vectors_name, _vectors_visibility, _vectors, FileParam); FileParam.CanalCount = inCollection.FileParam.CanalCount; FileParam.FileVersion = inCollection.FileParam.FileVersion; FileParam.SamplingTime = inCollection.FileParam.SamplingTime; FileParam.ScaleFactor = inCollection.FileParam.ScaleFactor; int ItemsCount = inCollection._vectors.Count; // Копирование содержимого _vectors.Clear(); for (int i = 0; i < ItemsCount; i++) _vectors.Add(new Vector(inCollection._vectors[i])); GC.Collect(); }
/// <summary> /// Метод возрачает коллекцию, с заданими индексами векторов /// </summary> /// <param name="vector_indexes">масив индексов веторов</param> /// <returns>Новая коллекция</returns> public Collection get_SubCollection( int[] vector_indexes) { Collection result = new Collection(vector_indexes.Length); result._vectors.Clear(); for ( int i = 0; i < vector_indexes.Length; i ++) result._vectors.Add( new Vector(this._vectors[vector_indexes[i]])); return result; }