public static List<Transduction> Complement(Transduction m) { List<Transduction> moves = Enum.GetValues(typeof(Transduction)).Cast<Transduction>().ToList(); moves.Remove(m); moves.Remove(Transduction.Stay); return moves; }
public static List <Transduction> Complement(Transduction m) { List <Transduction> moves = Enum.GetValues(typeof(Transduction)).Cast <Transduction>().ToList(); moves.Remove(m); moves.Remove(Transduction.Stay); return(moves); }
public void MakeOneStep(Transduction move) { char c = TransductionUtil.ToChar(move); IEnumerable <Move <BvSet> > movesFromCurrent = moveAutomaton.GetMovesFrom(currentState); foreach (Move <BvSet> m in movesFromCurrent) { if (!solver.MkAnd(m.Condition, solver.MkCharConstraint(true, c)).IsEmpty) { currentState = m.TargetState; return; } } throw new Exception("Move not available"); }
public void MakeOneStep(Transduction move) { char c = TransductionUtil.ToChar(move); IEnumerable<Move<BvSet>> movesFromCurrent = moveAutomaton.GetMovesFrom(currentState); foreach (Move<BvSet> m in movesFromCurrent) { if (!solver.MkAnd(m.Condition, solver.MkCharConstraint(true, c)).IsEmpty) { currentState = m.TargetState; return; } } throw new Exception("Move not available"); }
public static char ToChar(Transduction m) { List <Transduction> moves = Enum.GetValues(typeof(Transduction)).Cast <Transduction>().ToList(); return((char)(moves.IndexOf(m) + 96)); }
public static Pen ToColor(Transduction m) { return(pen); }
public TreeBodyPart MakeMove(Transduction move) { IEnumerable <TreeBodyPart> res; switch (move) { case Transduction.ToLeft: { res = toleft(); break; } case Transduction.ToRight: { res = toright(); break; } case Transduction.ToUp: { res = toup(); break; } case Transduction.ToDown: { res = todown(); break; } case Transduction.ToFront: { res = tofront(); break; } case Transduction.RotFroClock: { res = rotFroClock(); break; } case Transduction.RotFroCClock: { res = rotFroCClock(); break; } case Transduction.RotSagClock: { res = rotSagClock(); break; } case Transduction.RotSagCClock: { res = rotSagCClock(); break; } case Transduction.RotHorClock: { res = rotHorClock(); break; } case Transduction.RotHorCClock: { res = rotHorCClock(); break; } case Transduction.LeftST: { res = leftst(); break; } case Transduction.RightST: { res = rightst(); break; } case Transduction.ResetJT: { res = resetjt(); break; } case Transduction.ResetST: { res = resetst(); break; } case Transduction.ResetAT: { res = resetat(); break; } case Transduction.SpineShoulder: { res = spineshoulder(); break; } case Transduction.SpineBase: { res = spinebase(); break; } case Transduction.Hand: { res = hand(); break; } case Transduction.Neck: { res = neck(); break; } case Transduction.Shoulder: { res = shoulder(); break; } case Transduction.Elbow: { res = elbow(); break; } case Transduction.Wrist: { res = wrist(); break; } case Transduction.Hip: { res = hip(); break; } case Transduction.Knee: { res = knee(); break; } case Transduction.Head: { res = head(); break; } case Transduction.HandTip: { res = handtip(); break; } case Transduction.Thumb: { res = thumb(); break; } case Transduction.Foot: { res = foot(); break; } default: throw new Exception("This move doesn't exist"); } foreach (var b in res) { return(b); } return(null); }
public static Pen ToColor(Transduction m) { return pen; }
public static char ToChar(Transduction m) { List<Transduction> moves = Enum.GetValues(typeof(Transduction)).Cast<Transduction>().ToList(); return (char)(moves.IndexOf(m)+96); }
public TreeBodyPart MakeMove(Transduction move) { IEnumerable<TreeBodyPart> res; switch (move) { case Transduction.ToLeft: { res = toleft(); break; } case Transduction.ToRight: { res = toright(); break; } case Transduction.ToUp: { res = toup(); break; } case Transduction.ToDown: { res = todown(); break; } case Transduction.ToFront: { res = tofront(); break; } case Transduction.RotFroClock: { res = rotFroClock(); break; } case Transduction.RotFroCClock: { res = rotFroCClock(); break; } case Transduction.RotSagClock: { res = rotSagClock(); break; } case Transduction.RotSagCClock: { res = rotSagCClock(); break; } case Transduction.RotHorClock: { res = rotHorClock(); break; } case Transduction.RotHorCClock: { res = rotHorCClock(); break; } case Transduction.LeftST: { res = leftst(); break; } case Transduction.RightST: { res = rightst(); break; } case Transduction.ResetJT: { res = resetjt(); break; } case Transduction.ResetST: { res = resetst(); break; } case Transduction.ResetAT: { res = resetat(); break; } case Transduction.SpineShoulder: { res = spineshoulder(); break; } case Transduction.SpineBase: { res = spinebase(); break; } case Transduction.Hand: { res = hand(); break; } case Transduction.Neck: { res = neck(); break; } case Transduction.Shoulder: { res = shoulder(); break; } case Transduction.Elbow: { res = elbow(); break; } case Transduction.Wrist: { res = wrist(); break; } case Transduction.Hip: { res = hip(); break; } case Transduction.Knee: { res = knee(); break; } case Transduction.Head: { res = head(); break; } case Transduction.HandTip: { res = handtip(); break; } case Transduction.Thumb: { res = thumb(); break; } case Transduction.Foot: { res = foot(); break; } default: throw new Exception("This move doesn't exist"); } foreach (var b in res) return b; return null; }