public double GetValue(int columnIndex)
{
if (RowIndex == -1 && columnIndex == -1)
{
if (Owner.Proportions)
return 1;
else return Owner.Matrix.Samples;
}
if (RowIndex == -1)
{
if (Owner.Proportions)
return Owner.Matrix.ColumnProportions[columnIndex];
else return Owner.Matrix.ColumnTotals[columnIndex];
}
else if (columnIndex == -1)
{
if (Owner.Proportions)
return Owner.Matrix.RowProportions[RowIndex];
else return Owner.Matrix.RowTotals[RowIndex];
}
else
{
if (Owner.Proportions)
return Owner.Matrix.ProportionMatrix[RowIndex, columnIndex];
else return Owner.Matrix.Matrix[RowIndex, columnIndex];
}
}