/// <summary> /// Объединение матриц /// </summary> /// <param name="matrix"></param> /// <returns></returns> private BoolMatrix Union(BoolMatrix matrix) { var result = new BoolMatrix(this); foreach (var bv in matrix) { result.Add(bv); } if (result.Count > 1) { result.Absorption(); } return(result.Bonding()); }
/// <summary> /// Склеивание матрицы /// </summary> /// <returns></returns> public BoolMatrix Bonding() { var newMatrix = new BoolMatrix(this); for (var i = 0; i < Count - 1; i++) { for (var j = i + 1; j < Count; j++) { var boundVector = this[i].Gluing(this[j]); if (boundVector != null) { newMatrix.Add(boundVector); } } } return(newMatrix.Absorption()); }