Example #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;
 }
Example #2
0
 public Pillar(int stems, int branch)
 {
     this.Stems = new Stems(stems);
     this.Branch = new Branch(branch);
 }
Example #3
0
 public Pillar(string stemBranch)
 {
     if (stemBranch.Length != 2) return;
     this.Stems = new Stems(stemBranch[0]);
     this.Branch = new Branch(stemBranch[1]);
 }
Example #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];
        }
Example #5
0
 public EraRelation(Stems Foreign, Stems Primary, emEraRelation Value)
 {
     this.Foreign = Foreign;
     this.Primary = Primary;
     this.Value = Value;
 }
Example #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);
 }