pub fn integrate_nested(&self) -> Stream<Circuit<P>, D> {
        self.circuit()
            .cache_get_or_insert_with(NestedIntegralId::new(self.local_node_id()), || {
                self.circuit().region("integrate_nested", || {
                    let feedback = DelayedNestedFeedback::new(self.circuit());
                    let integral = self.circuit().add_binary_operator_with_preference(
                        Plus::new(),
                        feedback.stream(),
                        self,
                        OwnershipPreference::STRONGLY_PREFER_OWNED,
                        OwnershipPreference::PREFER_OWNED,
                    );
                    feedback.connect(&integral);
                    integral
                })
            })
            .clone()
    }
/// Integrate stream of streams.
///
/// Computes the sum of nested streams, i.e., rather than integrating values
/// in each nested stream, this function sums up entire input streams
/// across all parent timestamps, where the sum of streams is defined as
/// a stream of point-wise sums of their elements: `integral[i,j] =
/// sum(input[k,j]), k<=i`, where `stream[i,j]` is the value of `stream`
/// at time `[i,j]`, `i` is the parent timestamp, and `j` is the child
/// timestamp.
///
/// Yields the sum element-by-element as the input stream is fed to the
/// integral.
///
/// # Examples
///
/// Input stream (one row per parent timestamps):
///
/// ```text
/// 1 2 3 4
/// 1 1 1 1 1
/// 2 2 2 0 0
/// ```
///
/// Integral:
///
/// ```text
/// 1 2 3 4
/// 2 3 4 5 1
/// 4 5 6 5 1
/// ```
Integrate stream of streams.

Yields the sum element-by-element as the input stream is fed to the
integral.
Integrate stream of streams . Yields the sum element - by - element as the input stream is fed to the integral .
pub fn integrate_nested(&self) -> Stream<Circuit<P>, D> {
        self.circuit()
            .cache_get_or_insert_with(NestedIntegralId::new(self.local_node_id()), || {
                self.circuit().region("integrate_nested", || {
                    let feedback = DelayedNestedFeedback::new(self.circuit());
                    let integral = self.circuit().add_binary_operator_with_preference(
                        Plus::new(),
                        feedback.stream(),
                        self,
                        OwnershipPreference::STRONGLY_PREFER_OWNED,
                        OwnershipPreference::PREFER_OWNED,
                    );
                    feedback.connect(&integral);
                    integral
                })
            })
            .clone()
    }
pub fn integrate_nested ( & self ) -> Stream < Circuit < P > , D > { self . circuit ( ) . cache_get_or_insert_with ( NestedIntegralId :: new ( self . local_node_id ( ) ) , | | { self . circuit ( ) . region ( " " , | | { let feedback = DelayedNestedFeedback :: new ( self . circuit ( ) ) ; let integral = self . circuit ( ) . add_binary_operator_with_preference ( Plus :: new ( ) , feedback . stream ( ) , self , OwnershipPreference :: STRONGLY_PREFER_OWNED , OwnershipPreference :: PREFER_OWNED , ) ; feedback . connect ( & integral ) ; integral } ) } ) . clone ( ) }
Integrate stream of streams.
Integrate stream of streams .
&self
examples
Input stream (one row per parent timestamps).






Input stream ( one row per parent timestamps ) .