public bool Equals(NakayamaPermutation <TVertex> otherPermutation)
        {
            if (otherPermutation is null)
            {
                return(false);
            }

            return(UnderlyingDictionary.EqualUpToOrder(otherPermutation.UnderlyingDictionary));
        }
        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);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="SelfInjectiveQP{TVertex}"/> class.
 /// </summary>
 /// <param name="qp">The quiver with potential.</param>
 /// <param name="nakayamaPermutation">The Nakayama permutation.</param>
 /// <remarks>Almost no sanity checks are performed on the parameters.</remarks>
 public SelfInjectiveQP(QuiverWithPotential <TVertex> qp, NakayamaPermutation <TVertex> nakayamaPermutation)
 {
     QP = qp ?? throw new ArgumentNullException(nameof(qp));
     NakayamaPermutation = nakayamaPermutation ?? throw new ArgumentNullException(nameof(nakayamaPermutation));
 }