DataSource abstracts item storage and distance calculations. Implementations
must provide three methods:
lenreturns the number of items.nameyields a human-readable identifier surfaced in telemetry and errors.distancecomputes a pairwise distance, returningDataSourceErroron failure.
The default distance_batch helper uses distance to fill an output buffer
and keeps it unchanged if any pair fails. Override when the backend can compute
batches more efficiently.
Empty inputs should be handled by returning DataSourceError::EmptyData or
ZeroDimension during ingestion. Chutoro rejects a DataSource with zero
items, or one with fewer than min_cluster_size items, before invoking the
backend.