Skip to content

Join Arrays #141

Description

@ColmBhandal

Requirement

Add functions to join 1D and 2D arrays to get new arrays. This issue could be split up into a number of smaller issues to manage scope. Proposed join functions:

  1. Two 1D arrays joined end-to-end to create a new 1D array whose length is the sum of the two lengths of the input arrays
  2. An enumerable of IArrayJoinable2D objects - for a new type IArrayJoinable2D, which can be joined to get back a new 2D array. A IArrayJoinable2D type can be either a 1D array, in which case it can be regarded as a 2D array with exactly 1 row or 1 column, depending on the join orientation, or it can be a 2D array.

Note: all methods should be eventually exposed for both one-based and zero-based arrays.

Value Proposition

Joining arrays in a tried-and-tested way without loops reduces the burden of doing this in application code.

Design Ideas

For the joining of IArrayJoinable2D objects, could use wrapper types to convert 1D/2D arrays to joinable objects. Probably would want a joiner class to do the work here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions