Example #1
0
        public SplitModel CalculateSuperSplit(List <Quartet> violted)
        {
            SplitCalculation Splitc;
            SplitModel       SuperSplit = new SplitModel();

            if (violted.Count != 0)
            {
                Splitc = new SplitCalculation();
                if (violted.Count > 1)
                {
                    Splitc.GetFinalSplitCalculation(violted, new SplitModel(), violted.Count);
                    List <SplitModel> FinalSplit = new List <SplitModel>();
                    FinalSplit = Splitc.getFinalSplitList();
                    SuperSplit = Splitc.getSuperSplitModel(FinalSplit);
                }
                else if (violted.Count == 1)
                {
                    SuperSplit = new SplitModel();
                    SuperSplit._InputQuatret = violted[0];
                    SuperSplit._LeftPartOfSplit.Add(violted[0]._First_Taxa_Value);
                    SuperSplit._LeftPartOfSplit.Add(violted[0]._Second_Taxa_Value);
                    SuperSplit._RightPartOfSplit.Add(violted[0]._Third_Taxa_Value);
                    SuperSplit._RightPartOfSplit.Add(violted[0]._Fourth_Taxa_Value);
                    SuperSplit._LeftPartOfSplit.Sort();
                    SuperSplit._RightPartOfSplit.Sort();
                    SuperSplit._CountTaxa = SuperSplit._LeftPartOfSplit.Count() + SuperSplit._RightPartOfSplit.Count();
                }
            }
            return(SuperSplit);
        }