Provide a macro to make it easier to define new scalar types

Offen
#783 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
rust
Bereich
data

Rechercherichtung

Start by reading the ScalarOperand trait and the existing impl_scalar_lhs_op macro referenced in the issue. Determine the public macro interface needed for a user-defined scalar type, then verify that it supports the documented arithmetic operations on both operand sides.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement

Currently, to define a new scalar type usable in arithmetic operations involving scalar operands, the user needs to do the following:

  • Implement ScalarOperand for the scalar type so that it works as a right-side operand.

  • Add implementations for the scalar type on the left side. (In other words, copy the impl_scalar_lhs_op macro and apply it to the scalar type.)

It would be nice to provide a macro to make this easier.

Vorherrschende Sprache
Rust
Sterne
4.3k
Forks
391
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus rust-ndarray/ndarray

Alle Issues in rust-ndarray/ndarray

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.