Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mrc-6176 run discrete system #5

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

mrc-6176 run discrete system #5

wants to merge 16 commits into from

Conversation

EmmaLRussell
Copy link
Contributor

@EmmaLRussell EmmaLRussell commented Feb 6, 2025

This branch builds on the original WIP commit for a discrete system, which applies a generator to a state. Various bits of tidying up, validation and tests.

A couple of things to note:

  • I've added SystemState to represent the multidimensional state array, whose values can be fetched and updated per particle. This is similar to the implementation in original dust-js, and uses the scijs ndarray rather than the stdlib ndarry, which turns out to be unwritable by slice! However, the Packer still uses stdlib's ndarray! I'll fix this in another ticket.
  • Rather than having the DiscreteSystem taking the generator's generic types TShared and TInternal (which seemed weird). it's now taking the generator type TGenerator instead, and using infer to work out the correct Shared and Internal types from whatever Generator gets fed in. The syntax for this is weird, and is oddly tied to conditional types. @M-Kusumgar may have some thoughts on this!

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (789e29e) to head (3b5c9c1).

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #5   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         5    +2     
  Lines           60       139   +79     
  Branches        11        15    +4     
=========================================
+ Hits            60       139   +79     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@EmmaLRussell EmmaLRussell marked this pull request as ready for review February 6, 2025 17:49
@EmmaLRussell EmmaLRussell changed the title mrc-6176 discrete system mrc-6176 run discrete system Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants