예제 #1
0
        public static Quiver <int> GetCycleQuiver(int numVertices, int firstVertex = DefaultFirstVertex)
        {
            if (!CycleParameterIsValid(numVertices))
            {
                throw new ArgumentOutOfRangeException(nameof(numVertices));
            }

            // Sort of backwards to construct the entire QP only to return just the quiver
            // But this reduces duplicated logic
            var qp = UsefulQPs.GetCycleQP(numVertices, firstVertex);

            return(qp.Quiver);
        }
        public SelfInjectiveQP <int> GetSelfInjectiveCycleQP(int numVertices, int firstVertex = DefaultFirstVertex)
        {
            if (numVertices < 3)
            {
                throw new ArgumentOutOfRangeException(nameof(numVertices));
            }

            var qp = UsefulQPs.GetCycleQP(numVertices, firstVertex);

            int n    = numVertices;
            var dict = Enumerable.Range(firstVertex, n).ToDictionary(k => k, k => (k - 2 - firstVertex).Modulo(n) + firstVertex);
            var nakayamaPermutation = new NakayamaPermutation <int>(dict);
            var selfInjectiveQp     = new SelfInjectiveQP <int>(qp, nakayamaPermutation);

            return(selfInjectiveQp);
        }