-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70ef55f
commit 769f862
Showing
3 changed files
with
29 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,18 @@ uuid = "925ea013-038b-5ab6-a1ab-e0849925e528" | |
authors = ["Nathan Allaire <[email protected]> and contributors"] | ||
version = "0.1.0" | ||
|
||
[compat] | ||
julia = "1.9" | ||
|
||
[deps] | ||
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2" | ||
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" | ||
LAPACK_jll = "51474c39-65e3-53ba-86ba-03b1b862ec14" | ||
proxTV_jll = "700117f8-5dbb-54dd-9908-6f3eb0e21f87" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2" | ||
proxTV_jll = "700117f8-5dbb-54dd-9908-6f3eb0e21f87" | ||
|
||
[compat] | ||
julia = "1.9" | ||
|
||
[extras] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
[deps] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
using ProxTV | ||
using Test | ||
using LinearAlgebra | ||
|
||
@testset "ProxTV.jl" begin | ||
@test ProxTV.hello_world() == "Hello, World!" | ||
# test on a basic function : | ||
n = 4 | ||
x = rand(n) | ||
p = 2.0 | ||
@test isapprox(ProxTV.LPnorm(x, n, p), norm(x), atol = 1e-5) | ||
|
||
# test on a more advanced function : | ||
lambda = 0.18 | ||
info = [] | ||
y = rand(n) | ||
x = zeros(n) | ||
ws = ProxTV.newWorkspace(n) | ||
@test ProxTV.TV(y, lambda, x, info, n, p, ws) == 1 # 1 is the expected return value of the function | ||
|
||
end |