Skip to contents

Elementwise map. fn is an R function over scalars/arrays; it will be composed with neighbouring fusable nodes and wrapped in anvl::jit() at plan time. Created by lazy_map().

Usage

MapNode(
  id = integer(0),
  parents = integer(0),
  grid = GridSpec(),
  role = character(0),
  fn = function() NULL
)

Arguments

id

Integer node id (assigned by graph_add()).

parents

Integer ids of parent nodes (may be empty).

grid

Output GridSpec of this node.

role

Optional semantic role tag (e.g. "mask", set by mask()). Pure metadata: never read by the planner or executors; surfaced by draw() and plan_view().

fn

Elementwise R function.

Value

A MapNode.