itsdawei / dpvis

A simple and flexible visualization library for dynamic programs
https://dpvis.readthedocs.io/en/latest/
MIT License
4 stars 1 forks source link

[FEATURE REQUEST] Allow string as data type for DPArray #61

Closed itsdawei closed 6 months ago

itsdawei commented 6 months ago

Problem

In the Knapsack example, the secondary array displays the capacity and value of the items. However, since we cannot make the DPArray store tuples or strings. The current workaround is to put this information in the column labels, which does accept strings.

image

It would be more ideal if the capacity and value are displayed on the cells in the format (2,4) or capacity=2, value=4.

Solution

Allow DPArray to accept string as datatype.

itsdawei commented 6 months ago

Closed by #53