Treatment resize

flow/vec/bool::resize


Parameters

↳ var default: bool = false

Inputs

⇥ size: Stream<u64>
⇥ vector: Stream<Vec<bool>>

Outputs

↦ resized: Stream<Vec<bool>>


Resize vectors according to given streamed size.

If a vector is smaller than expected size, it is extended using the default value.

graph LR
     T("resize(default=🟨)")
     V["[🟦 🟦][🟦][][🟦 🟦 🟦]…"] -->|vector| T
     S["3️⃣ 2️⃣ 3️⃣ 2️⃣ …"] -->|size| T
     
     T -->|resized| P["[🟦 🟦 🟨][🟦 🟨][🟨 🟨 🟨][🟦 🟦]…"]

     style V fill:#ffff,stroke:#ffff
     style S fill:#ffff,stroke:#ffff
     style P fill:#ffff,stroke:#ffff