コード例 #1
0
 public List<EraRelation> ConvertAll(List<Stems> stemses, Stems baseStem)
 {
     List<EraRelation> eraRelations = new List<EraRelation>();
     foreach (Stems stems in stemses)
     {
         eraRelations.Add(stems - baseStem);
     }
     return eraRelations;
 }
コード例 #2
0
ファイル: Pillar.cs プロジェクト: stanleyz510/Iwalk
 public Pillar(int stems, int branch)
 {
     this.Stems = new Stems(stems);
     this.Branch = new Branch(branch);
 }
コード例 #3
0
ファイル: Pillar.cs プロジェクト: stanleyz510/Iwalk
 public Pillar(string stemBranch)
 {
     if (stemBranch.Length != 2) return;
     this.Stems = new Stems(stemBranch[0]);
     this.Branch = new Branch(stemBranch[1]);
 }
コード例 #4
0
        public static string QueryWeakStrong(Stems emStems,Branch emBranch)
        {
            int[] startIndex = new int[]{11,4,2,9,2,9,5,0,8,3};
            int start = startIndex[(int) emStems.Element];

            //Math.Sign((int) emStems%2 - 0.5)*(-1) +
            int index = ((-Math.Sign(((int)emStems.Element) % 2 - 0.5))*
                ((int)emBranch.Element - start) + 12) % 12;
            //return WeakStrongs[(int)emStems +]
            return WeakStrongs[index];
        }
コード例 #5
0
 public EraRelation(Stems Foreign, Stems Primary, emEraRelation Value)
 {
     this.Foreign = Foreign;
     this.Primary = Primary;
     this.Value = Value;
 }
コード例 #6
0
 public EraRelation(Stems Foreign, Stems Primary, string Value)
 {
     this.Foreign = Foreign;
     this.Primary = Primary;
     this.Value = (emEraRelation)Enum.Parse(typeof(emEraRelation), Value,true);
 }