Distance

logic · C333 · starter-package 7.0.1

Purpose

Calculate distance between two numbers or between two equal-size numeric vectors.

Connectors and setting

  • A and B: both finite numbers or both non-empty numeric lists of equal length.
  • Metric: Euclidean, Manhattan, or Chebyshev for vectors. Scalars always use absolute distance.
  • Distance: non-negative number.

Example

Euclidean distance between [0, 0] and [3, 4] is 5.

Exact settings reference

These are the saved settings and defaults. If a value is connected to the matching input, that connected value is used.

IDSettingControlDefaultBounds/options
metricMetrictoggleeuclideanoptions: Euclidean (euclidean), Manhattan (manhattan), Chebyshev (chebyshev)

Failure cases

Mixed scalar/list inputs, unequal dimensions, empty/oversized lists, invalid numbers, unknown metrics, and non-finite results stop execution.

Errors and recovery

When this block reports an error, no downstream output is emitted. Correct the highlighted input or setting described by the message, then run the workflow again.

Connector data types

The type below is the data type that actually travels through the connection. Any additional validation is described separately in this block guide.

DirectionConnectorTypeRequired
Inputa — Aanyyes
Inputb — Banyyes
Outputresult — Distancenumberon success