@@ -70,6 +70,14 @@ function group_by_color(color::AbstractVector{<:Integer})
7070 return group
7171end
7272
73+ get_matrix (result:: AbstractColoringResult ) = result. matrix
74+
75+ column_colors (result:: AbstractColoringResult{s,:column} ) where {s} = result. color
76+ column_groups (result:: AbstractColoringResult{s,:column} ) where {s} = result. group
77+
78+ row_colors (result:: AbstractColoringResult{s,:row} ) where {s} = result. color
79+ row_groups (result:: AbstractColoringResult{s,:row} ) where {s} = result. group
80+
7381# # Concrete subtypes
7482
7583"""
@@ -103,10 +111,64 @@ function DefaultColoringResult{structure,partition,decompression}(
103111 )
104112end
105113
106- get_matrix (result:: DefaultColoringResult ) = result. matrix
114+ """
115+ $TYPEDEF
116+
117+ Storage for the result of a symmetric coloring algorithm with direct decompression.
118+
119+ Similar to [`DefaultColoringResult`](@ref) but contains an additional [`StarSet`](@ref).
120+
121+ # Fields
122+
123+ $TYPEDFIELDS
124+
125+ # See also
126+
127+ - [`AbstractColoringResult`](@ref)
128+ """
129+ struct StarSetColoringResult{partition,M} < :
130+ AbstractColoringResult{:symmetric ,partition,:direct ,M}
131+ matrix:: M
132+ color:: Vector{Int}
133+ group:: Vector{Vector{Int}}
134+ star_set:: StarSet
135+ end
136+
137+ function StarSetColoringResult {partition} (
138+ matrix:: M , color:: Vector{Int} , star_set:: StarSet
139+ ) where {partition,M}
140+ return StarSetColoringResult {partition,M} (
141+ matrix, color, group_by_color (color), star_set
142+ )
143+ end
144+
145+ """
146+ $TYPEDEF
147+
148+ Storage for the result of a symmetric coloring algorithm with decompression by substitution.
107149
108- column_colors (result:: DefaultColoringResult{s,:column} ) where {s} = result. color
109- column_groups (result:: DefaultColoringResult{s,:column} ) where {s} = result. group
150+ Similar to [`DefaultColoringResult`](@ref) but contains an additional [`TreeSet`](@ref).
110151
111- row_colors (result:: DefaultColoringResult{s,:row} ) where {s} = result. color
112- row_groups (result:: DefaultColoringResult{s,:row} ) where {s} = result. group
152+ # Fields
153+
154+ $TYPEDFIELDS
155+
156+ # See also
157+
158+ - [`AbstractColoringResult`](@ref)
159+ """
160+ struct TreeSetColoringResult{partition,M} < :
161+ AbstractColoringResult{:symmetric ,partition,:substitution ,M}
162+ matrix:: M
163+ color:: Vector{Int}
164+ group:: Vector{Vector{Int}}
165+ tree_set:: TreeSet
166+ end
167+
168+ function TreeSetColoringResult {partition} (
169+ matrix:: M , color:: Vector{Int} , tree_set:: TreeSet
170+ ) where {partition,M}
171+ return TreeSetColoringResult {partition,M} (
172+ matrix, color, group_by_color (color), tree_set
173+ )
174+ end
0 commit comments