public Estimate(EstimateSheet SheetParent, CorrelationSheet CorrelParent, int input_count) { this.SheetParent = SheetParent; this.CorrelParent = CorrelParent; Inputs = GetFakeEstimateInputs(input_count); CorrelMatrix = new CorrelationMatrix(this); }
public void PrintCorrelationMatrix() //this should be within a sheet object I think.. { ThisAddIn.MyApp.ScreenUpdating = false; Excel.Range printCell = this.MatrixTopLeft; int columns = GetCorrelationColCount(); for (int row = 0; row < columns; row++) { for (int col = 0; col < columns; col++) { //printCell.Offset[row, -3].Value = CorrelationMatrix.eigenvalues[row]; printCell.Offset[row, col].Value = CorrelationMatrix.Correlations[row, col].Coefficient; } } CorrelationMatrix.FormatMatrix(printCell); for (int row = 0; row < columns; row++) { Excel.Range header = MatrixTopLeft.Offset[-1, row]; if (row > 0) { header.Orientation = Excel.XlOrientation.xlUpward; } header.Value = CorrelationMatrix.Correlations[0, row].input2.Name; MatrixTopLeft.Offset[row, row].Value = CorrelationMatrix.Correlations[row, 0].input1.Name; } printCell.Offset[-1, -7].Value = "Distribution"; printCell.Offset[-1, -6].Value = "Param1"; printCell.Offset[-1, -5].Value = "Param2"; printCell.Offset[-1, -4].Value = "Param3"; printCell.Offset[-1, -3].Value = "Param4"; printCell.Offset[-1, -2].Value = "Param5"; printCell.Offset[-1, -1].Value = "Location"; printCell.Offset[-1, 0].Value = "Variable Name"; ThisAddIn.MyApp.ScreenUpdating = true; }
public Correlation(CorrelationMatrix Parent, EstimateInput input1, EstimateInput input2, double coef) //allows for building these after mass-calculating a correl coef matrix { this.Parent = Parent; this.input1 = input1; this.input2 = input2; this.Coefficient = coef; //this.CoefMin = CalculateMin(); //this.CoefMax = CalculateMax(); }
public Correlation(CorrelationMatrix Parent, EstimateInput input1, EstimateInput input2) { this.Parent = Parent; this.input1 = input1; this.input2 = input2; this.Coefficient = CalculateCoefficient(); //this.CoefMin = CalculateMin(); //this.CoefMax = CalculateMax(); }