Copy() public method

public Copy ( ) : Gate
return Gate
コード例 #1
0
ファイル: LPSorting.cs プロジェクト: mahdiz/mpclib
        // Lemma 4.2
        private PermutationNetwork CreateTournament(int sortInaccuracy)
        {
            PermutationNetwork pn = new PermutationNetwork(1 << K);

            int blockSize = 1 << sortInaccuracy;

            // for the permutation rho
            PermutationGate permuteGate = new PermutationGate(GenerateArbitraryPermutation(blockSize));

            pn.AppendGate(permuteGate.Copy() as Gate, 0);
            pn.AppendNetwork(SortingNetworkFactory.CreateButterflyTournament(blockSize), 0);
            return(pn);
        }
コード例 #2
0
ファイル: LPSorting.cs プロジェクト: mahdiz/mpclib
        // Lemma 4.2
        private PermutationNetwork CreateTournament(int sortInaccuracy)
        {
            PermutationNetwork pn = new PermutationNetwork(1 << K);

            int blockSize = 1 << sortInaccuracy;

            // for the permutation rho
            PermutationGate permuteGate = new PermutationGate(GenerateArbitraryPermutation(blockSize));

            pn.AppendGate(permuteGate.Copy() as Gate, 0);
            pn.AppendNetwork(SortingNetworkFactory.CreateButterflyTournament(blockSize), 0);
            return pn;
        }