Replies: 2 comments 2 replies
-
You're on the right track but are missing just a couple of small things. The impl<'a, A, B, S, S2, D, E> Add<ArrayBase<S2, E>> for &'a ArrayBase<S, D>
where
A: Clone + Add<B, Output = B>,
B: Clone,
S: Data<Elem = A>,
S2: DataOwned<Elem = B> + DataMut,
D: Dimension,
E: Dimension + DimMax<D>, The arrays' element types in this signature are #[derive(Clone)]
struct Sc16(Complex<I1F15>); After that change, however, you'll get a new error:
The line You might find this section of the docs on arithmetic operations useful. |
Beta Was this translation helpful? Give feedback.
-
can I somehow use these to define all of those special missing pieces?
Because now I get the complaint about ScalarOperand and it looks as if you have pretty amazing circuitry here I just want to reuse your macro...
when I try to multiply an vector by an Sc16 scalar. |
Beta Was this translation helpful? Give feedback.
-
How would one go about adding support for fixed, I'm really new to Rust but I came across this particular library the plotter and evcxr and I haven't been able to put it down. (I guess I caught the rust bug).
I have tried to do some real basic stuff first just using
Array<num::Complex<[fixed::types::I1F15>,Ix1>
and created some simple arrays no problem got some errors when using with operations and then figured I needed to implement the base traits.so then I can take some signal which I have in the variable 'o' and convert it to its fixed representation.
now 'c' has exactly what I expected.
ok I wanted to just do something simple like element wise + or * but I get this error what is missing?
&c+c
Any useful direction to set me off on would be great...
Beta Was this translation helpful? Give feedback.
All reactions