Esempio n. 1
0
 /// <summary>
 /// Returns a boolean value indicating whether the specified results indicate that the
 /// unbound quiver is self-injective.
 /// </summary>
 /// <param name="results">The results.</param>
 /// <returns><see langword="true"/> if <paramref name="results"/> indicates that the unbound
 /// quiver is self-injective. <see langword="false"/> otherwise.</returns>
 /// <remarks>
 /// <para>If the analysis settings dictate that weak cancellativity should not be checked,
 /// the bound quiver could fail to be weakly 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 IndicatesSelfInjectivity(this SemimonomialUnboundQuiverAnalysisMainResults results)
 {
     return(results.HasFlag(SemimonomialUnboundQuiverAnalysisMainResults.Success) &&
            !results.HasFlag(SemimonomialUnboundQuiverAnalysisMainResults.NotWeaklyCancellative) &&
            !results.HasFlag(SemimonomialUnboundQuiverAnalysisMainResults.MultipleMaximalNonzeroClasses) &&
            !results.HasFlag(SemimonomialUnboundQuiverAnalysisMainResults.NonInjectiveTentativeNakayamaPermutation));
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="SemimonomialUnboundQuiverAnalysisResults{TVertex}"/> class.
        /// </summary>
        /// <param name="mainResults">The main results.</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 analyzed
        /// semimonomial unbound quiver or
        /// <see langword="null"/>, depending on whether the analysis was successful and the
        /// semimonomial unbound quiver has a Nakayama permutation.</param>
        /// <param name="longestPathEncountered">A path of maximal length of the paths encountered
        /// during the analysis, or <see langword="null"/> if no path was encountered during the
        /// analysis (i.e., if the quiver was empty).</param>
        public SemimonomialUnboundQuiverAnalysisResults(
            SemimonomialUnboundQuiverAnalysisMainResults mainResults,
            IReadOnlyDictionary <TVertex, IEnumerable <Path <TVertex> > > maximalPathRepresentatives,
            NakayamaPermutation <TVertex> nakayamaPermutation,
            Path <TVertex> longestPathEncountered)
            : base(mainResults, maximalPathRepresentatives, nakayamaPermutation, longestPathEncountered)
        {
            if (mainResults.HasFlag(SemimonomialUnboundQuiverAnalysisMainResults.Success) && maximalPathRepresentatives is null)
            {
                throw new ArgumentNullException(nameof(maximalPathRepresentatives));
            }

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