/// <summary> /// Indicates whether the specified number of periods is valid for the specified QP type. /// </summary> /// <param name="qpType">The QP type.</param> /// <param name="numPeriods">The number of periods.</param> /// <returns><see langword="true"/> if <paramref name="numPeriods"/> is valid for QPs of /// type <paramref name="qpType"/>; <see langword="false"/> otherwise.</returns> private bool NumPeriodsIsValid(QPType qpType, int numPeriods) { switch (qpType) { case QPType.OddFlower: return(UsefulQPs.OddFlowerParameterIsValid(numPeriods)); case QPType.EvenFlowerType1: return(UsefulQPs.EvenFlowerType1ParameterIsValid(numPeriods)); case QPType.EvenFlowerType2: return(UsefulQPs.EvenFlowerType2ParameterIsValid(numPeriods)); case QPType.PointedFlower: return(UsefulQPs.PointedFlowerParameterIsValid(numPeriods)); } Debug.Fail($"Invalid QP type ({qpType}) specified."); return(false); }