Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
name = "RLinearAlgebra"
uuid = "da1d211a-c3bc-43b2-b5d0-ce83f16a0f3a"
authors = [
"Christian Varner <cvarner@wisc.edu>",
"Daniel Adrian Maldonado <maldonadod@anl.gov>",
"Nathaniel Pritchard <Nathaniel.Pritchard@maths.ox.ac.uk>",
"TongTong Jin <ttjin@uchicago.edu>",
"Tunan Wang <tunan.wang@wisc.edu>",
"Vivak Patel <vivak.patel@wisc.edu>"
]
authors = ["Christian Varner <cvarner@wisc.edu>", "Daniel Adrian Maldonado <maldonadod@anl.gov>", "Nathaniel Pritchard <Nathaniel.Pritchard@maths.ox.ac.uk>", "TongTong Jin <ttjin@uchicago.edu>", "Tunan Wang <tunan.wang@wisc.edu>", "Vivak Patel <vivak.patel@wisc.edu>"]
version = "0.2.4"


[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Expand Down
20 changes: 20 additions & 0 deletions src/Compressors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,26 @@ transpose(A::CompressorAdjoint{<:CompressorRecipe}) = A.parent
###################################
# Complete Compressor Interface
###################################
"""
complete_compressor(compressor::Compressor, x::AbstractVector)

$(comp_method_description[:complete_compressor])

# Arguments
- $(comp_arg_list[:compressor])
- $(comp_arg_list[:x])

# Returns
- $(comp_output_list[:compressor_recipe])

# Throws
- $(comp_error_list[:complete_compressor])
"""
function complete_compressor(compressor::Compressor, x::AbstractVector)
# Handle Vector input by reshaping to column matrix
complete_compressor(compressor, reshape(x, :, 1))
end

"""
complete_compressor(compressor::Compressor, A::AbstractMatrix)

Expand Down
2 changes: 1 addition & 1 deletion test/Compressors/compressor_abstract_adjoint.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ s_cols = 4
end
end

end
end
1 change: 1 addition & 0 deletions test/Compressors/compressor_abstract_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ end
x = rand(2)

@test_throws ArgumentError complete_compressor(TestCompressor(), A)
@test_throws ArgumentError complete_compressor(TestCompressor(), b)
@test_throws ArgumentError complete_compressor(TestCompressor(), A, b)
@test_throws ArgumentError complete_compressor(TestCompressor(), x, A, b)
@test_throws ArgumentError update_compressor!(TestCompressorRecipe())
Expand Down
Loading