@@ -17,7 +17,7 @@ nodes on which to sample.
1717 nodes are sampled uniformly. For a `GraphNode`, nodes are also
1818 sampled uniformly (e.g., in `sin(x) + {x}`, the `x` has equal
1919 probability of being sampled from the `sin` or the `+` node, because
20- it is shared), unless `break_sharing` is set to `true` or ` Val(true)`.
20+ it is shared), unless `break_sharing` is set to `Val(true)`.
2121- `filter::Function`: A function that takes a node and returns a boolean
2222 indicating whether the node should be sampled. Defaults to `Returns(true)`.
2323- `weighting::Union{Nothing,Function}`: A function that takes a node and
@@ -38,11 +38,11 @@ Base.@kwdef struct NodeSampler{
3838end
3939
4040"""
41- rand(rng::AbstractRNG, tree::AbstractNode; break_sharing::Val=Val(false) )
41+ rand(rng::AbstractRNG, tree::AbstractNode)
4242
43- Sample a node from a tree according to the default sampler `NodeSampler(; tree, break_sharing )`.
43+ Sample a node from a tree according to the default sampler `NodeSampler(; tree)`.
4444"""
45- rand (rng:: AbstractRNG , tree:: AbstractNode ; break_sharing :: Val = Val ( false )) = rand (rng, NodeSampler (; tree, break_sharing ))
45+ rand (rng:: AbstractRNG , tree:: AbstractNode ) = rand (rng, NodeSampler (; tree))
4646
4747"""
4848 rand(rng::AbstractRNG, sampler::NodeSampler)
0 commit comments