Skip to main content

BSSeries

Trait BSSeries 

Source
pub trait BSSeries {
    // Required method
    fn term(&self, k: u64) -> (BigInt, BigInt, BigInt, BigInt);
}
Expand description

Trait that defines the per-term factors of a binary-splittable series.

For term index k, implementors return (p_k, q_k, b_k, a_k):

  • p_k — numerator factor at position k.
  • q_k — denominator factor at position k.
  • b_k — auxiliary denominator factor at position k (often 1).
  • a_k — coefficient / weight of the k-th term (can be negative).

The partial sum is then:

Σ a(k) · P(0..k) / (Q(0..k) · B(0..k))

where P(0..k) = p(0)·p(1)·…·p(k), etc.

Required Methods§

Source

fn term(&self, k: u64) -> (BigInt, BigInt, BigInt, BigInt)

Returns (p_k, q_k, b_k, a_k) for term index k.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§