File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change
1
+ """
2
+ struct MeasureBase.Bind{M,K} <: AbstractMeasure
3
+
4
+ Represents a monatic bind. User code should create instances of `Bind`
5
+ directly, but should call `mbind(k, μ)` instead.
6
+ """
1
7
struct Bind{M,K} <: AbstractMeasure
2
- μ:: M
3
8
k:: K
9
+ μ:: M
10
+ end
11
+
12
+ getdof (d:: Bind ) = NoDOF {typeof(d)} ()
13
+
14
+ function Base. rand (rng:: AbstractRNG , :: Type{T} , d:: Bind ) where {T}
15
+ x = rand (rng, T, d. μ)
16
+ y = rand (rng, T, d. k (x))
17
+ return y
4
18
end
5
19
6
20
@@ -25,11 +39,5 @@ unavailable in Julia.
25
39
end
26
40
```
27
41
"""
28
- mbind (k, μ) = Bind (μ, k )
42
+ mbind (k, μ) = Bind (k, μ )
29
43
export mbind
30
-
31
- function Base. rand (rng:: AbstractRNG , :: Type{T} , d:: Bind ) where {T}
32
- x = rand (rng, T, d. μ)
33
- y = rand (rng, T, d. k (x))
34
- return y
35
- end
You can’t perform that action at this time.
0 commit comments