Пример #1
0
        public GroupedLink(UGrCells UGCellsA, UGrCells UGCellsB, int tfx, int type) : this()
        {
            this.UGCellsA = UGCellsA; this.UGCellsB = UGCellsB; //this.tfx=tfx;
            this.type     = type;

            FreeB = UGCellsA.Aggregate(0, (Q, P) => Q | P.FreeB);
            FreeB = UGCellsB.Aggregate(FreeB, (Q, P) => Q | P.FreeB);
        }
Пример #2
0
        public GroupedLink(UCellLink LK) : this()
        {
            UCelLK    = LK;
            UGCellsA  = new UGrCells(LK.tfx, LK.no, LK.UCe1);
            UGCellsB  = new UGrCells(LK.tfx, LK.no, LK.UCe2);
            this.type = LK.type;
            this.tfx  = LK.tfx;

            FreeB = UGCellsA.Aggregate(0, (Q, P) => Q | P.FreeB);
            FreeB = UGCellsB.Aggregate(FreeB, (Q, P) => Q | P.FreeB);
        }
Пример #3
0
        public GroupedLink(UCell UC, int no1, int no2, int type, bool rootF = false) : this()
        {
            this.rootF = rootF;
            int F = (1 << no1) | (1 << no2);

            // if( no1==no2 || (UC.FreeB&(1<<no1))==0 || (UC.FreeB&(1<<no2))==0 ){
            if ((UC.FreeB & (1 << no1)) == 0 || (UC.FreeB & (1 << no2)) == 0)
            {
                UGCellsA = UGCellsB = null;
                return;
            }

            UGCellsA  = new UGrCells(-1, no1, UC);
            UGCellsB  = new UGrCells(-1, no2, UC);
            UCelLK    = null;
            this.type = (UC.FreeBC == 2)? type: 2;          //2:WeakLink

            FreeB = UGCellsA.Aggregate(0, (Q, P) => Q | P.FreeB);
            FreeB = UGCellsB.Aggregate(FreeB, (Q, P) => Q | P.FreeB);
        }