MeasureTransport / MeasureTransport/MParT

Figure out what to do with `MapFactory`

Open
#240 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
C++
Stars
18
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Currently we have a list of files named MapFactory<k> for <k> in 1 through 15. This will make maintaining the code a bit of a chore, plus most of the code is repeated anyway. Unfortunately, partial template specialization of functions using Enums/ints to distinguish is impossible in C++17 (not that it's gotten any better since). Further, the options may not be known until runtime (e.g. from bindings).

However, we can most likely make a bunch of template specializations, which I think would cut down vs. what we have currently. We definitely could make some preprocessor directives to instantiate the template a bunch of times. Just an idea. Very low priority issue, though.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inventorying the MapFactory files for k from 1 through 15 and reviewing how their repeated code is instantiated. Check the C++17 template-specialization constraints and runtime binding requirements described in the issue. Done means a concrete, maintainable replacement strategy is agreed on and the existing MapFactory variants remain supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.