internal float GetStatistic(int indexId, IndexCostSource src, IndexCostType type, IndexCostInformation info, int?theoreticalIndexSize) { IndexInfo <T> index; var i = _indexes.Where(p => p.IndexID == indexId); if (i.Count() != 1) { throw new WronxIndexIdException(indexId); } else { index = i.Single(); } switch (src) { case IndexCostSource.Statistic: return(getStatistics(index, type, info)); case IndexCostSource.Theoretic: return(getTheoretical(GetIndex(indexId), type, info, theoreticalIndexSize)); default: throw new UnexpectedStatisticSourceException(src); } }
public UnexpectedStatisticSourceException(IndexCostSource src) : base(String.Format("Unexpected index statistic source requested: {0}", src.ToString())) { }
public float GetStatistic(int indexID, IndexCostSource src, IndexCostType type, IndexCostInformation info, int?theoreticalIndexSize) { return(global::IndexMechanism.IndexManager.IndexManager <T> .GetInstance().GetStatistic(indexID, src, type, info, theoreticalIndexSize)); }