コード例 #1
0
 /// <summary>
 /// Returns a boolean value indicating whether the specified results indicate that the QP
 /// is self-injective.
 /// </summary>
 /// <param name="results">The results.</param>
 /// <returns><see langword="true"/> if <paramref name="results"/> indicates that the QP is
 /// self-injective. <see langword="false"/> otherwise.</returns>
 /// <remarks>
 /// <para>This method uses strong cancellativity instead of weak cancellativity to ensure
 /// that the socles of the indecomposable projective modules are spanned by the
 /// corresponding maximal nonzero equivalence classes.</para>
 /// <para>If the analysis settings dictate that cancellativity should not be checked,
 /// the underlying bound quiver could fail to be cancellative without
 /// <paramref name="results"/> indicating this. In that case, the bound quiver algebra could
 /// fail to be self-injective but this method could still return <see langword="true"/>.</para>
 /// </remarks>
 public static bool IndicatesSelfInjectivityUsingStrongCancellativity(this QuiverInPlaneAnalysisMainResults results)
 {
     return(results.HasFlag(QuiverInPlaneAnalysisMainResults.Success) &&
            !results.HasFlag(QuiverInPlaneAnalysisMainResults.QPIsNotCancellative) &&
            !results.HasFlag(QuiverInPlaneAnalysisMainResults.SomeVertexHasMultipleMaximalNonzeroClasses) &&
            !results.HasFlag(QuiverInPlaneAnalysisMainResults.TentativeNakayamaPermutationIsNonInjective));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="QuiverInPlaneAnalysisResults{TVertex}"/> class.
        /// </summary>
        /// <param name="mainResults">The main result.</param>
        /// <param name="maximalPathRepresentatives">A dictionary mapping every vertex of the
        /// quiver to a collection of representatives of all maximal non-zero equivalence classes
        /// of paths starting at the vertex, or <see langword="null"/> depending on whether the
        /// analysis was successful.</param>
        /// <param name="nakayamaPermutation">The Nakayama permutation for the induced QP or
        /// <see langword="null"/>, depending on whether the analysis was successful and the
        /// induced QP has a Nakayama permutation.</param>
        /// <param name="longestPathEncountered">A path of maximal length of the paths encountered
        /// during the analysis.</param>
        public QuiverInPlaneAnalysisResults(
            QuiverInPlaneAnalysisMainResults mainResults,
            IReadOnlyDictionary <TVertex, IEnumerable <Path <TVertex> > > maximalPathRepresentatives,
            NakayamaPermutation <TVertex> nakayamaPermutation,
            Path <TVertex> longestPathEncountered)
            : base(mainResults, maximalPathRepresentatives, nakayamaPermutation, longestPathEncountered)
        {
            if (mainResults.HasFlag(QuiverInPlaneAnalysisMainResults.Success) && maximalPathRepresentatives is null)
            {
                throw new ArgumentNullException(nameof(maximalPathRepresentatives));
            }

            if (mainResults.IndicatesSelfInjectivity() && nakayamaPermutation is null)
            {
                throw new ArgumentNullException(nameof(nakayamaPermutation));
            }
        }