@@ -65,7 +65,10 @@ julia> column_colors(result)
6565- [`ADTypes.row_coloring`](@extref ADTypes.row_coloring)
6666"""
6767struct ConstantColoringAlgorithm{
68- partition,M<: AbstractMatrix ,T,R<: AbstractColoringResult{:nonsymmetric,partition,:direct}
68+ partition,
69+ M<: AbstractMatrix ,
70+ T<: Integer ,
71+ R<: AbstractColoringResult{:nonsymmetric,partition,:direct} ,
6972} <: ADTypes.AbstractColoringAlgorithm
7073 matrix_template:: M
7174 color:: Vector{T}
@@ -77,7 +80,7 @@ function ConstantColoringAlgorithm{:column}(
7780)
7881 bg = BipartiteGraph (matrix_template)
7982 result = ColumnColoringResult (matrix_template, bg, color)
80- T, M, R = eltype (color ), typeof (matrix_template), typeof (result)
83+ T, M, R = eltype (bg ), typeof (matrix_template), typeof (result)
8184 return ConstantColoringAlgorithm {:column,M,T,R} (matrix_template, color, result)
8285end
8386
@@ -86,7 +89,7 @@ function ConstantColoringAlgorithm{:row}(
8689)
8790 bg = BipartiteGraph (matrix_template)
8891 result = RowColoringResult (matrix_template, bg, color)
89- T, M, R = eltype (color ), typeof (matrix_template), typeof (result)
92+ T, M, R = eltype (bg ), typeof (matrix_template), typeof (result)
9093 return ConstantColoringAlgorithm {:row,M,T,R} (matrix_template, color, result)
9194end
9295
0 commit comments