Skip to content

Commit a25d0cd

Browse files
authored
Remove TestImage dependency. (#38)
remove TestImage dependency and stabilize random_point on SPD.
1 parent 41a97ee commit a25d0cd

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "Manopt"
22
uuid = "0fc0a36d-df90-57f3-8f93-d78a9fc72bb5"
33
authors = ["Ronny Bergmann <manopt@ronnybergmann.net>"]
4-
version = "0.2.7"
4+
version = "0.2.8"
55

66
[deps]
77
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
@@ -17,7 +17,6 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1717
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1818
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1919
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
20-
TestImages = "5e47fb64-e119-507b-a336-dd2b206d9990"
2120

2221
[compat]
2322
ColorSchemes = "3.5.0"
@@ -26,7 +25,6 @@ Colors = "0.11.2, 0.12"
2625
Manifolds = "0.4.1"
2726
ManifoldsBase = "0.9"
2827
StaticArrays = "0.12"
29-
TestImages = "1.0.0"
3028
julia = "1.0"
3129

3230
[extras]

src/data/artificialDataFunctions.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ function artificial_SPD_image(pts::Int=64, stepsize=1.5)
324324
1 + v3[row + col] - stepsize * (col > pts / 2 ? 1 : 0)
325325
4 - v3[row + col] + stepsize * (row > pts / 2 ? 1 : 0)
326326
]
327-
data[row, col] = A * B * C * Diagonal(scale) * C' * B' * A'
327+
data[row, col] = Matrix(Symmetric(A * B * C * Diagonal(scale) * C' * B' * A'))
328328
end
329329
end
330330
return data
@@ -342,7 +342,7 @@ function artificial_SPD_image2(pts=64, fraction=0.66)
342342
β = π / 3
343343
B = [1.0 0.0 0.0; 0.0 cos(β) -sin(β); 0.0 sin(β) cos(β)]
344344
A = [cos(α) -sin(α) 0.0; sin(α) cos(α) 0.0; 0.0 0.0 1.0]
345-
Zo = A * B * Diagonal([2.0, 4.0, 8.0]) * B' * A'
345+
Zo = Matrix(Symmetric(A * B * Diagonal([2.0, 4.0, 8.0]) * B' * A'))
346346
# create a second matrix
347347
α = -4.0 * π / 3
348348
β = -π / 3
@@ -367,7 +367,9 @@ function artificial_SPD_image2(pts=64, fraction=0.66)
367367
C = exp(
368368
M,
369369
C,
370-
vector_transport_to(M, Zo, log(M, Zo, Zl), C, ParallelTransport()),
370+
vector_transport_to(
371+
M, Symmetric(Zo), log(M, Zo, Zl), Symmetric(C), ParallelTransport()
372+
),
371373
(col - 1.0) / (pts - 1),
372374
)
373375
end

src/random.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function random_point(
118118
) where {N}
119119
D = Diagonal(1 .+ rand(N)) # random diagonal matrix
120120
s = qr* randn(N, N)) # random q
121-
return s.Q * D * transpose(s.Q)
121+
return Matrix(Symmetric(s.Q * D * transpose(s.Q)))
122122
end
123123

124124
@doc raw"""

0 commit comments

Comments
 (0)