Skip to content

Arithmetic operations with reference semantics #35

Open
@cohomology

Description

@cohomology

In the implementation of complex, the Add, Sub, etc. for references are forwarded via clone() for values. This is very bad for types which are expensive to copy. In my example, I use Complex<Ratio<BigInt>>.

Can the code be refactored in such a way, that no clone() is necessary? I guess the different arithmetic operations have to be coded out and not forwarded.

I could try that, if there is no objection against that ...

Metadata

Metadata

Assignees

No one assigned

    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