示例#1
0
        /// <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());
        }
示例#2
0
        /// <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());
        }