gemv: Genral Matrix-Vector Multiplication

Description Usage Arguments Value Author(s) Examples

Description

Calculates: ans = alpha * op(A).B + beta * C where alpha and beta are scalars, A is a matrix, and B and C are vectors.

Usage

1
gemv(ta, alpha = NULL, A, B, beta = NULL, C = NULL)

Arguments

ta

if > 1 or TRUE op(A) = A**T else op(A) = A

alpha

a reference object of class 'number' with rank 0

A

a reference object of class 'number' with rank 2

B

a reference object of class 'number' with rank 1

beta

a reference object of class 'number' with rank 0

C

a reference number of class 'number' with rank 1

Value

Returns a reference object of class 'number'

Author(s)

Filippo Monari

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
modello.init(10, 10, 10, 10)
alpha = number(1, scalar=TRUE)
beta = number(1, scalar=TRUE)
A = number(matrix(rnorm(9), 3, 3))
B = number(rnorm(3))
C = number(rnorm(3))
ans1 = gemv(0, alpha, A, B, beta, C)
ans2 = gemv(0, alpha, A, B)
ans3 = gemv(0, NULL, A, B, NULL, C)
ans4 = gemv(0, NULL, A, B, NULL, NULL)
print(ans1)
print(ans1$v)
print(ans2)
print(ans2$v)
print(ans3)
print(ans3$v)
print(ans4)
print(ans4$v)
modello.close()

modello documentation built on Feb. 2, 2021, 9:06 a.m.

Related to gemv in modello...