Skip to content

Make addDimension(RAI) result Iterable #268

@hinerm

Description

@hinerm

Currently, transform.addDimensionView(RA) with no extra params calls Views.addDimension.

This makes sense from a "directly mapping API" perspective, but is very unfortunate because a MixedTransformView is not Iterable, and thus can't be used in many places. All RAIs are of course RAs so they happily match this signature but are giving up essential functionality.

I think it would be reasonable to have a transform.addDimensionView(RAI) that simply calls Views.addDimension(RAI, 0, 0) to get a new dimension of length 1 (I believe). Then the current addDimensionView would have its priority dropped down, similar to the other pairs of RA/RAI methods.

This is just a problem for addDimension because it seems to be to be the only case where the MixedTransformView and IntervalView versions of a given signature actually have different parameters.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions