示例#1
0
        public FitElement(IRowSelection rowSelection)
        {
            _independentVariables = new IReadableColumnProxy[0];

            _dependentVariables = new IReadableColumnProxy[0];

            _errorEvaluation = new IVarianceScaling[0];

            _rangeOfRows = (IRowSelection)(rowSelection?.Clone()) ?? new AllRows();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="IntersectionOfRowSelections"/> class.
        /// </summary>
        /// <param name="rowSelectionsHead">The first row selections (cloned before stored).</param>
        /// <param name="selection">Another selection (cloned before stored).</param>
        /// <param name="rowSelectionTail">The last row selections (cloned before stored).</param>
        public IntersectionOfRowSelections(IEnumerable <IRowSelection> rowSelectionsHead, IRowSelection selection, IEnumerable <IRowSelection> rowSelectionTail)
        {
            _rowSelections = new List <IRowSelection>(rowSelectionsHead.Select(itemToClone => { var clonedItem = (IRowSelection)itemToClone.Clone(); clonedItem.ParentObject = this; return(clonedItem); }));

            {
                var item = (IRowSelection)selection.Clone();
                item.ParentObject = this;
                _rowSelections.Add(item);
            }

            _rowSelections.AddRange(rowSelectionTail.Select(itemToClone => { var clonedItem = (IRowSelection)itemToClone.Clone(); clonedItem.ParentObject = this; return(clonedItem); }));
        }
		public IntersectionOfRowSelections(IEnumerable<IRowSelection> rowSelectionsHead, IRowSelection selection, IEnumerable<IRowSelection> rowSelectionTail)
		{
			_rowSelections = new List<IRowSelection>(rowSelectionsHead.Select(item => { var result = (IRowSelection)item.Clone(); item.ParentObject = this; return item; }));

			{
				var item = (IRowSelection)selection.Clone();
				item.ParentObject = this;
				_rowSelections.Add(item);
			}

			_rowSelections.AddRange(rowSelectionTail.Select(item => { var result = (IRowSelection)item.Clone(); item.ParentObject = this; return item; }));
		}