pub fn sum_over<'a, K, D, F>(domain: &D, f: F) -> Expr<'a>👎Deprecated since 0.3.0:
use the sum! macro, the builder API is scheduled for removal in 0.4.0
Expand description
Sum an expression over every element of a domain.
Reads as the mathematical sum_{k in domain} f(k). The closure parameter is
either decoded from the domain’s crate::set::IndexKey via FromIndexKey (when
the domain is a Set) or yielded directly (when the domain is a slice
of Copy keys).
§Panics
Panics if domain is empty, the resulting expression has no arena to
attach to.