Skip to content

Add multiset-valued tensors #18

Closed

Description

@ValerianRey

I think the next big step after #17 is adding multiset-valued tensors.
Steps:

  • Add multisets: these are simply collections where multiplicity counts but not order. I don't think we'll need to add a comparison operator to them, so I think we could just implement them using arrays.
  • Add the bar function (or whatever you wanna call it, in the paper it's represented as a bar above its operand), which is a function taking a tensor from A to B and returning a tensor from multisets(A) to multisets(B).
  • Make reduction functions reduce multisets into single values. E.g: sum({{1, 3, 3}}) = 7 (where {{1, 3, 3}} is the multiset with 1, 3 and 3).
  • With those two things, reductions with index mapping f, tensor U and reduction fn omega, can be implemented as: omega ○ bar(U) ○ f

For a better understanding, please refer to the paper https://github.com/SimplexLab/cten_paper, and especially to the figures.

Activity

  1. self-assigned this
    on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions