Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
mir.sparse.blas.axpy
License:
Authors:
Ilya Yaroshenko
- void
axpy
(CR, V1 : Series!(I1, T1), I1, T1, V2)(in CRalpha
, V1x
, V2y
)
if (isDynamicArray!V2 || isSlice!V2); - Constant times a vector plus a vector.Parameters:
V1 x
sparse vector V2 y
dense vector CR alpha
scalar Returns:y
=alpha
*x
+y
Examples:import mir.series; auto x = series([0, 3, 5, 9, 10], [1.0, 3, 4, 9, 13]); auto y = [0.0, 1.0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; axpy(2.0, x, y); assert(y == [2.0, 1.0, 2, 9, 4, 13, 6, 7, 8, 27, 36, 11, 12]);
Copyright © 2016-2020 by Ilya Yaroshenko | Page generated by
Ddoc on Sun Nov 15 09:37:39 2020