//Method
        public void MatchSelectionFrom(List <ColibriParam> ColibriParams)
        {
            this.TotalCounts  = ColibriBase.CalTotalCounts(ColibriParams);
            this._totalDomain = new GH_Interval(new Interval(0, this.TotalCounts - 1));
            this._paramNames  = ColibriBase.getAllNames(ColibriParams);

            this._paramsPositions       = ColibriBase.AllParamsPositions(ColibriParams);
            this._paramsDivisionNumbers = iniTakeNumbers(this._userParamsTakeNumbers, ColibriParams);

            //_paramsSelectedPositions is used to fly params
            this._paramsSelectedPositions = calParamsSelectedPositions(this._paramsPositions, this._paramsDivisionNumbers, ColibriParams);


            var selectedPositionCounts = calSelectedPositionsCount(this._paramsSelectedPositions);
            var selectedTotalDomain    = new GH_Interval(new Interval(0, selectedPositionCounts - 1));

            //_domains is used to fly params
            this._domains = iniDomains(this._userDomains, selectedTotalDomain);

            this.SelectedCounts = calSelectedTotalCount(this._domains, selectedPositionCounts);
        }
Beispiel #2
0
        public IteratorFlyParam(List <ColibriParam> sourceParams, IteratorSelection selections, string studyFolder, OverrideMode overrideFolderMode)
        {
            this._inputParams        = sourceParams;
            this._selections         = selections == null? new IteratorSelection(): selections;
            this._overrideFolderMode = overrideFolderMode;
            //this._studyFoler = studyFolder;

            this._totalCounts           = ColibriBase.CalTotalCounts(this._inputParams);
            this._selectedCounts        = _selections.SelectedCounts > 0 ? _selections.SelectedCounts : _totalCounts;
            this._allPositions          = ColibriBase.AllParamsPositions(this._inputParams);
            this._allSelectedPositions  = _selections.ParamsSelectedPositions == null? this._allPositions : _selections.ParamsSelectedPositions;
            this._currentPositionsIndex = Enumerable.Repeat(0, _inputParams.Count()).ToList();
            Count = 0;

            createWatchFile(studyFolder);

            //get studied Fly ID from folder
            if (this._overrideFolderMode == OverrideMode.FinishTheRest)
            {
                this._studiedFlyID = getStudiedFlyID(studyFolder);
            }
        }