public void OddFlowers_AreSelfInjective_WithUnusualFirstVertex() { const int FirstVertex = -123; var qps = Utility.InfiniteRange(3, 2).Select(k => UsefulQPs.GetOddFlowerQP(k, FirstVertex)).TakeWhile(qp => qp.Quiver.Vertices.Count <= 35); AssertAreSelfInjective(qps); }
/// <summary> /// Prompts the user for a QP. /// </summary> /// <param name="qp">Output parameter for the QP.</param> /// <param name="periods">Output parameter for the periods of the QP.</param> /// <param name="fixedPoint">Output parameter for the fixed-point of the QP (or /// <see langword="null"/> if there is none).</param> /// <returns><see langword="true"/> if the user specified a QP; /// <see langword="false"/> otherwise.</returns> private bool TryGetQP( out QuiverWithPotential <int> qp, out IEnumerable <IEnumerable <int> > periods, out int?fixedPoint) { if (!TryGetQPType(out var qpType) || !TryGetNumPeriods(qpType, out int numPeriods)) { qp = null; periods = null; fixedPoint = null; return(false); } switch (qpType) { case QPType.OddFlower: qp = UsefulQPs.GetOddFlowerQP(numPeriods, DefaultFirstVertex); periods = UsefulQPs.GetPeriodsOfOddFlowerQP(numPeriods, DefaultFirstVertex); fixedPoint = null; break; case QPType.EvenFlowerType1: qp = UsefulQPs.GetEvenFlowerType1QP(numPeriods, DefaultFirstVertex); periods = UsefulQPs.GetPeriodsOfEvenFlowerType1QP(numPeriods, DefaultFirstVertex); fixedPoint = null; break; case QPType.EvenFlowerType2: qp = UsefulQPs.GetEvenFlowerType2QP(numPeriods, DefaultFirstVertex); periods = UsefulQPs.GetPeriodsOfEvenFlowerType2QP(numPeriods, DefaultFirstVertex); fixedPoint = null; break; case QPType.PointedFlower: qp = UsefulQPs.GetPointedFlowerQP(numPeriods, DefaultFirstVertex); periods = UsefulQPs.GetPeriodsOfPointedFlowerQPWithoutFixedPoint(numPeriods, DefaultFirstVertex); throw new NotImplementedException(); break; default: Debug.Fail($"Invalid QP type ({qpType}) specified."); qp = null; periods = null; fixedPoint = null; return(false); } return(true); }
public void OddFlowers_AreSelfInjective() { var qps = Utility.InfiniteRange(3, 2).Select(k => UsefulQPs.GetOddFlowerQP(k)).TakeWhile(qp => qp.Quiver.Vertices.Count <= 35); AssertAreSelfInjective(qps); }