Skip to content

Commit 2f89ab5

Browse files
authored
Fix docstring TruncationIntersection (#21)
Small change to docstring and add missing constructor.
1 parent e9df0b2 commit 2f89ab5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/implementations/truncation.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,17 @@ Truncation strategy to discard the values that are larger than `atol` in absolut
9090
truncabove(atol) = TruncationKeepFiltered((atol) abs)
9191

9292
"""
93-
TruncationIntersection(trunc1::TruncationStrategy, trunc2::TruncationStrategy)
93+
TruncationIntersection(trunc::TruncationStrategy, truncs::TruncationStrategy...)
9494
95-
Compose two truncation strategies, keeping values common between the two strategies.
95+
Composition of multiple truncation strategies, keeping values common between them.
9696
"""
9797
struct TruncationIntersection{T<:Tuple{Vararg{TruncationStrategy}}} <:
9898
TruncationStrategy
9999
components::T
100100
end
101+
TruncationIntersection(trunc::TruncationStrategy, truncs::TruncationStrategy...) =
102+
TruncationIntersection((trunc, truncs...))
103+
101104
function Base.:&(trunc1::TruncationStrategy, trunc2::TruncationStrategy)
102105
return TruncationIntersection((trunc1, trunc2))
103106
end

0 commit comments

Comments
 (0)