lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.util.Averager Class Reference

Average asynchronously reported numbers and do something with them. More...

Public Member Functions

 Averager (int n)
 Create an averager of reports from n processes.
synchronized void report (int id, int x, Procedure1< Integer > callback)
 Receive x from process id and invoke callback on the mean of the numbers most recently reported by the processes.

Detailed Description

Average asynchronously reported numbers and do something with them.

Constructor & Destructor Documentation

◆ Averager()

org.lflang.util.Averager.Averager ( int n)

Create an averager of reports from n processes.

Member Function Documentation

◆ report()

synchronized void org.lflang.util.Averager.report ( int id,
int x,
Procedure1< Integer > callback )

Receive x from process id and invoke callback on the mean of the numbers most recently reported by the processes.


The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/util/Averager.java