Minus
Inputs: i1 i2
Outputs: o1
Synchronizes two streams (given by i1 and i2) and emits the subtraction of the values for a given .
The synchronization mechanism is inherited from the Join operator. The Minus operator holds a message buffer on i1 and i2respectively, it emits a modified version of the synchronized messages from i1 and i2 as the subtraction of its values through o1 right after the synchronization takes place, if no synchronization occurs then an empty message {} is emitted through o1.
Parameters
id: The id of the operator
Usage
- TypeScript
- Python
- C++
- YAML
- Json
import { Program, Minus } from "@rtbot-dev/rtbot";
const id = "id";
const program = new Program();
program.addOperator(new Minus(id));
import rtbot as rb
id = "id";
program = rb.Program()
program.addOperator(rb.Minus(id))
#include "rtbot/Minus.h"
auto id = "id";
auto op = Minus<std::uint64_t, double>(id)
# minimal RtBot program
operators:
- type: Minus
id: "id"
{
"operators": [
{ "type": "Minus", "id": "id" }
]
}