Skip to content

Commit 4057c84

Browse files
authored
Merge pull request #3843 from JuliaReach/auto-juliaformatter-pr
Automatic JuliaFormatter.jl run
2 parents ac5eeaa + ef87e04 commit 4057c84

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/Interfaces/LazySet.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,16 @@ vertices of `X` can be obtained.
162162
"""
163163
function triangulate(X::LazySet; algorithm::String="delaunay", kwargs...)
164164
if algorithm == "delaunay"
165-
require(@__MODULE__, :MiniQhull, fun_name="triangulate")
165+
require(@__MODULE__, :MiniQhull; fun_name="triangulate")
166166
return _triangulate_delaunay(X; kwargs...)
167167
else
168168
throw(ArgumentError("unknown algorithm $algorithm"))
169169
end
170170
end
171171

172172
function triangulate_faces(X)
173-
require(@__MODULE__, :Polyhedra, fun_name="triangulate_faces")
173+
require(@__MODULE__, :Polyhedra; fun_name="triangulate_faces")
174+
throw(ArgumentError("`triangulate_faces` not implemented for $(typeof(X))"))
174175
end
175176

176177
"""

src/Sets/VPolygon/minkowski_sum.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ sorted in counter-clockwise fashion and has linear complexity ``O(m+n)``, where
1414
"""
1515
function minkowski_sum(P::VPolygon, Q::VPolygon)
1616
R = _minkowski_sum_vrep_2d(P.vertices, Q.vertices)
17-
return VPolygon(R, apply_convex_hull=false)
17+
return VPolygon(R; apply_convex_hull=false)
1818
end

test/LazyOperations/AffineMap.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ for N in [Float64, Rational{Int}, Float32]
8888
M = N[0 0;]
8989
@test_throws DimensionMismatch volume(M * B + N[1])
9090

91-
9291
# ==================================
9392
# Type-specific methods
9493
# ==================================

test/Sets/Polygon.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ for N in [Float64, Float32, Rational{Int}]
190190
[N[2, -2], N[6, 0], N[8, 2],
191191
N[8, 4], N[6, 6], N[2, 8]])
192192

193-
P = VPolygon([N[0, -1], N[2, 0], N[1, 1], N[0, 1]], apply_convex_hull=false)
194-
Q1 = VPolygon([N[0, 1], N[0, -1]], apply_convex_hull=false)
195-
Q2 = VPolygon([N[0, 1], N[0, -1]], apply_convex_hull=false)
193+
P = VPolygon([N[0, -1], N[2, 0], N[1, 1], N[0, 1]]; apply_convex_hull=false)
194+
Q1 = VPolygon([N[0, 1], N[0, -1]]; apply_convex_hull=false)
195+
Q2 = VPolygon([N[0, 1], N[0, -1]]; apply_convex_hull=false)
196196
PQ1 = minkowski_sum(P, Q1)
197197
PQ2 = minkowski_sum(P, Q2)
198198
@test length(PQ1.vertices) == 5
@@ -202,21 +202,21 @@ for N in [Float64, Float32, Rational{Int}]
202202
@test length(PQ2.vertices) == 5
203203
@test is_cyclic_permutation(PQ2.vertices,
204204
[N[0, -2], N[2, -1], N[2, 1],
205-
N[1, 2], N[0, 2]])
205+
N[1, 2], N[0, 2]])
206206

207-
P = VPolygon([N[-1, -1], N[2, 0], N[2, 1], N[0, 1]], apply_convex_hull=false)
208-
Q1 = VPolygon([N[0, 1], N[0, -1]], apply_convex_hull=false)
209-
Q2 = VPolygon([N[0, -1], N[0, 1]], apply_convex_hull=false)
207+
P = VPolygon([N[-1, -1], N[2, 0], N[2, 1], N[0, 1]]; apply_convex_hull=false)
208+
Q1 = VPolygon([N[0, 1], N[0, -1]]; apply_convex_hull=false)
209+
Q2 = VPolygon([N[0, -1], N[0, 1]]; apply_convex_hull=false)
210210
PQ1 = minkowski_sum(P, Q1)
211211
PQ2 = minkowski_sum(P, Q2)
212212
@test length(PQ1.vertices) == 5
213213
@test is_cyclic_permutation(PQ1.vertices,
214214
[N[-1, -2], N[2, -1], N[2, 2],
215-
N[0, 2], N[-1, 0]])
215+
N[0, 2], N[-1, 0]])
216216
@test length(PQ2.vertices) == 5
217217
@test is_cyclic_permutation(PQ2.vertices,
218218
[N[-1, -2], N[2, -1], N[2, 2],
219-
N[0, 2], N[-1, 0]])
219+
N[0, 2], N[-1, 0]])
220220

221221
# test for different starting points in vertices_list of minkowski sum
222222
P = VPolygon([N[4, 0], N[6, 2], N[4, 4]])

0 commit comments

Comments
 (0)