Beispiel #1
0
        void MassagePermutationList()
        {
            int count1 = _arinodMap1To2.Length;
            int count2 = _arinodMap2To1.Length;

            // Permutations to move from VfGraph inods to Graph inods
            int[] armpInodGraphInodVf1 = VfGraph.ReversePermutation(_armpInodVfInodGraph1);
            int[] armpInodGraphInodVf2 = VfGraph.ReversePermutation(_armpInodVfInodGraph2);
            _lstfm = new List <FullMapping>(_lstMappings.Count);

            foreach (FullMapping fm in _lstMappings)
            {
                FullMapping fmTmp = new FullMapping(count1, count2);
                MassagePermutations(fm.arinodMap1To2, fm.arinodMap2To1, armpInodGraphInodVf1, armpInodGraphInodVf2, ref fmTmp.arinodMap1To2, ref fmTmp.arinodMap2To1);
                _lstfm.Add(fmTmp);
            }
        }
Beispiel #2
0
        private void MassagePermutation()
        {
            // Permutations to move from VfGraph inods to Graph inods
            int[] armpInodGraphInodVf1 = VfGraph.ReversePermutation(_armpInodVfInodGraph1);
            int[] armpInodGraphInodVf2 = VfGraph.ReversePermutation(_armpInodVfInodGraph2);

            // Holding areas for new permutations
            _armpNid1Nid2 = new int[_arinodMap1To2.Length];
            _armpNid2Nid1 = new int[_arinodMap2To1.Length];

            for (int i = 0; i < _arinodMap1To2.Length; i++)
            {
                int inodMap = _arinodMap1To2[armpInodGraphInodVf1[i]];
                _armpNid1Nid2[i] = (inodMap == map_Illegal ? map_Illegal : (int)_ldr2.IdFromPos(_armpInodVfInodGraph2[inodMap]));
            }

            for (int i = 0; i < _arinodMap2To1.Length; i++)
            {
                // Shouldn't be any map_illegal values in the second graph's array
                _armpNid2Nid1[i] = _ldr1.IdFromPos(_armpInodVfInodGraph1[_arinodMap2To1[armpInodGraphInodVf2[i]]]);
            }
        }