gaptool的C#版本(四)

D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>csc FiniteGroup.cs Un.cs
Microsoft (R) Visual C# Compiler version 4.6.1055.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.

This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer th
e latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=53324
0


D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>FiniteGroup D4.txt
0=>0
1=>1
2=>2
3=>3
4=>4
5=>6
6=>5
7=>7
1 2 3 4 5 6 7 8
2 1 4 3 6 5 8 7
3 4 1 2 7 8 5 6
4 3 2 1 8 7 6 5
5 7 6 8 1 3 2 4
6 8 5 7 2 4 1 3
7 5 8 6 3 1 4 2
8 6 7 5 4 2 3 1
中心:0 3
1 2
2 1
换位子群:0 3
1 2
2 1

D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>csc /d:TESTUN Un.cs
Microsoft (R) Visual C# Compiler version 4.6.1055.0
for C# 5
Copyright (C) Microsoft Corporation. All rights reserved.

This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to C# 5, which is no longer th
e latest version. For compilers that support newer versions of the C# programming language, see http://go.microsoft.com/fwlink/?LinkID=53324
0


D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>Un 8
0->ZmodnZobj(1,8)=>0->ZmodnZobj(1,8)
1->ZmodnZobj(3,8)=>1->ZmodnZobj(3,8)
2->ZmodnZobj(5,8)=>2->ZmodnZobj(5,8)
3->ZmodnZobj(7,8)=>3->ZmodnZobj(7,8)
1 2 3 4
2 1 4 3
3 4 1 2
4 3 2 1

D:\SixCocos2d-xVC2012\Cocos2d-x\XWH\cstest>Un 15
0->ZmodnZobj(1,15)=>0->ZmodnZobj(1,15)
1->ZmodnZobj(2,15)=>4->ZmodnZobj(8,15)
2->ZmodnZobj(4,15)=>2->ZmodnZobj(4,15)
3->ZmodnZobj(7,15)=>6->ZmodnZobj(13,15)
4->ZmodnZobj(8,15)=>1->ZmodnZobj(2,15)
5->ZmodnZobj(11,15)=>5->ZmodnZobj(11,15)
6->ZmodnZobj(13,15)=>3->ZmodnZobj(7,15)
7->ZmodnZobj(14,15)=>7->ZmodnZobj(14,15)
1 2 3 4 5 6 7 8
2 3 5 8 1 4 6 7
3 5 1 7 2 8 4 6
4 8 7 3 6 2 1 5
5 1 2 6 3 7 8 4
6 4 8 2 7 1 5 3
7 6 4 1 8 5 3 2
8 7 6 5 4 3 2 1

using System;
using System.Collections.Generic;

namespace gap
{    
    interface IGroup
    {
        void printSet(); 
        void printTable();
        int mul(int a,int b);
        int size();
        int inv(int a);
    }
    
    // (Z/nZ)^*
    class Un:IGroup
    {
        // 静态函数
        public static List<int> Order(IGroup g,int m){
            List<int> ret=new List<int>();
            int mi=m;
            int m0=0;
            ret.Add(m0);
            while(mi!=m0){
                ret.Add(mi);
                mi=g.mul(mi,m);
            }
            return ret;
        }    

        public static List<Tuple<int,int>> Order(Tuple<int,int> m){
            List&

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值