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

Timo/associated types #4

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

Timo/associated types #4

wants to merge 3 commits into from

Conversation

tbetcke
Copy link
Contributor

@tbetcke tbetcke commented Oct 31, 2022

1.) Implemented associated types for operators and vectors.

OperatorBase now has two associated types In and Out for the scalar input and output type. Vector has an associted scalar type called Item. The trait methods have been adapted accordingly. This gives every object a native type. We could then implement adapters on top to allow conversion between different representations.

2.) I have made a proposal for a scalar trait type. It is a subset of the Num trait from the num crate. It does not require string conversion and only needs addition, multiplication, subtraction, and division. It has no remainder operation as this might not always make sense (consider the scalar type for example itself to be a dense matrix). Not sure yet if this is best but would be good to have a definition that allows arbitrary fields as scalar type.

3.) I updated the test_mult_sketchy test to succeed when the matvec panics.

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.

1 participant