tropicalsparse.axpyi: tropicalsparse.axpyi()

Description Usage Arguments Details Value See Also Examples

Description

tropicalsparse.axpyi function multiplies the vector x by the constant alpha and adds the result to the vector y.

Usage

1
tropicalsparse.axpyi(y, alpha, x, algebraType)

Arguments

y

is a vector.

alpha

is a constant.

x

is a vector.

algebraType

is string input that can be minplus or maxplus.

Details

The input of the function tropicalsparse.axpyi is two vectors, a constant and type of Tropical Algebra. algebraType is used to specify type of Tropical Algebra. This can be minplus or maxplus. For more details about algebraType, see detail section of check.infinityM or check.infinityV. All inputs of this method are compulsory. The operation is expressed as: y = y + alpha * x where x and y must be a vector while alpha must be a constant.

Value

Returns a vector.

See Also

tropicalsparse.doti

Examples

1
2
3
4
5
6
7
a <- c(2, Inf, 5, 0, Inf, Inf, Inf, 10, Inf)
b <- c(0, 5, Inf, Inf, 12, 2, Inf, Inf, 3)
alpha <- 5

tropicalsparse.axpyi(a, alpha, b, 'minplus')

# [1]   2  10   5   0  17   7 Inf  10   8

tropicalSparse documentation built on May 1, 2019, 8:02 p.m.