public ConnectableObjectsContainer(IContainer <TCloudItem> objects, IContainer <SlamLine> connects, string displayName = "", SparseSquareMatrix <bool> table = null) { _connects = connects; _objects = objects; _table = table ?? new SparseSquareMatrix <bool>(); Children = new[] { (ISourceTree)_connects, (ISourceTree)_objects, }; DisplayName = string.IsNullOrEmpty(displayName) ? GetType().Name : displayName; }
public SparseSquareMatrix <TElemType> DeepCopy() { var res = new SparseSquareMatrix <TElemType>(); foreach (var row in _table) { if (!res._table.ContainsKey(row.Key)) { res._table[row.Key] = new SortedDictionary <int, TElemType>(); } foreach (var col in row.Value) { res._table[row.Key][col.Key] = col.Value; } } return(res); }