private bool _ALSXZ_DoublyLinked(UALS UA, UALS UB, int RCC) // *=*=* DoublyLinked subroutine *=*=* //----- RCC ----- { Bit81 UEz = new Bit81(); //Covered cells bool solF = false; foreach (int no in RCC.IEGet_BtoNo()) { int noB = 1 << no; UEz.Clear(); foreach (var P in UA.UCellLst.Where(p => (p.FreeB & noB) > 0)) { UEz.BPSet(P.rc); } foreach (var P in UB.UCellLst.Where(p => (p.FreeB & noB) > 0)) { UEz.BPSet(P.rc); } Bit81 Elm = (new Bit81(pBDL, noB)) - (UA.B81 | UB.B81); //Scan Cells foreach (var rc in Elm.IEGet_rc()) { if ((UEz - ConnectedCells[rc]).IsZero()) { pBDL[rc].CancelB |= noB; solF = true; } } } //----- ALS element digit other than RCC ----- int nRCC = UA.FreeB.DifSet(RCC); foreach (int no in nRCC.IEGet_BtoNo()) { int noB = 1 << no; UEz.Clear(); foreach (var P in UA.UCellLst.Where(p => (p.FreeB & noB) > 0)) { UEz.BPSet(P.rc); } Bit81 Elm = (new Bit81(pBDL, noB)) - (UA.B81 | UB.B81); //Scan Cells foreach (var rc in Elm.IEGet_rc()) { if ((UEz - ConnectedCells[rc]).IsZero()) { pBDL[rc].CancelB |= noB; solF = true; } } } nRCC = UB.FreeB.DifSet(RCC); foreach (int no in nRCC.IEGet_BtoNo()) { int noB = 1 << no; UEz.Clear(); foreach (var P in UB.UCellLst.Where(p => (p.FreeB & noB) > 0)) { UEz.BPSet(P.rc); } Bit81 Elm = (new Bit81(pBDL, noB)) - (UA.B81 | UB.B81); //Scan Cells foreach (var rc in Elm.IEGet_rc()) { if ((UEz - ConnectedCells[rc]).IsZero()) { pBDL[rc].CancelB |= noB; solF = true; } } } return(solF); }