Skip to content

Commit 16b6c76

Browse files
committed
Improve docs on enumerate_policy_tree
The docs for `enumerate_policy_tree` are referenced by other functions but because `enumerate_policy_tree` is private we cannot link to the docs of this method. In preparation for duplicating the docs in multiple places; improve the docs on `enumerate_policy_tree` by doing: - Separate brief and long sections - Fix links
1 parent 90dc766 commit 16b6c76

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/policy/concrete.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -537,12 +537,14 @@ impl<Pk: MiniscriptKey> PolicyArc<Pk> {
537537
}
538538
}
539539

540-
/// Generates a root-level disjunctive tree over the given policy tree, by using fixed-point
541-
/// algorithm to enumerate the disjunctions until exhaustive root-level enumeration or limits
542-
/// exceed.
543-
/// For a given [policy][`Policy`], we maintain an [ordered set][`BTreeSet`] of `(prob, policy)`
544-
/// (ordered by probability) to maintain the list of enumerated sub-policies whose disjunction
545-
/// is isomorphic to initial policy (*invariant*).
540+
/// Generates a root-level disjunctive tree over the given policy tree.
541+
///
542+
/// Uses a fixed-point algorithm to enumerate the disjunctions until exhaustive root-level
543+
/// enumeration or limits exceed. For a given [`Policy`], we maintain an [ordered
544+
/// set](`BTreeSet`) of `(prob, policy)` (ordered by probability) to maintain the list of
545+
/// enumerated sub-policies whose disjunction is isomorphic to initial policy (*invariant*).
546+
///
547+
/// [`Policy`]: crate::policy::concrete::Policy
546548
#[cfg(feature = "compiler")]
547549
fn enumerate_policy_tree(self, prob: f64) -> Vec<(f64, Arc<Self>)> {
548550
let mut tapleaf_prob_vec = BTreeSet::<(Reverse<OrdF64>, Arc<Self>)>::new();

0 commit comments

Comments
 (0)