public IFullAnalysis <IAnalysisDataRow> GetFullAnalysis(long analysisDataId)
        {
            var analysisInfo = controller.GetEntityById <AnalysisInformation>(analysisDataId);

            var analysisData = analysisInfo.Data;
            var xArray       = analysisData.XData.ToArray();
            var yArray       = analysisData.YData.ToArray();

            var analysisDataSet = new List <IAnalysisDataRow>();

            for (int i = 0; i < xArray.Length; i++)
            {
                analysisDataSet.Add(new AnalysisDataRow(i + 1, xArray[i], yArray[i]));
            }


            var fullAnalysis = new FullAnalysis <IAnalysisDataRow>(analysisDataId, analysisInfo.Title, analysisInfo.Descrioption, analysisData.XMeaning, analysisData.YMeaning, analysisDataSet);

            return(fullAnalysis);
        }
        public AnalysisCalculations(Model.AnalysisCalculations entity, IModelController <LinearRegressionDbContext> controller) : base(entity, controller)
        {
            this.AnalysisData = controller.GetEntityById <AnalysisData>(entity.AnalysisDataID);

            this.B0 = entity.B0;
            this.B1 = entity.B1;

            this.AdjustedY = entity.GetAdjustedYArray();

            this.ResidualDispersion = entity.ResidualDispersion;

            this.ExplainedDispersion = entity.ExplainedDispersion;

            this.FEmpirical   = entity.FEmpirical;
            this.FTheoretical = entity.FTheoretical;

            this.AverageErrorB0 = entity.AverageErrorB0;
            this.AverageErrorB1 = entity.AverageErrorB1;

            this.MaximalErrorB0 = entity.MaximalErrorB0;
            this.MaximalErrorB1 = entity.MaximalErrorB1;
        }