Learn R Programming

tropicalSparse (version 0.1.0)

tropicalsparse.doti: tropicalsparse.doti()

Description

tropicalsparse.doti function multiplies the vector y with the vector x.

Usage

tropicalsparse.doti(x, y, algebraType)

Arguments

x

is a vector.

y

is a vector.

algebraType

is string input that can be minplus or maxplus.

Value

Returns a vector.

Details

The input of this function is x, y and algebraType. If any of the input is missing then the function generates an error. The operation is expressed as: result = yx where x and y must be a vector. 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.

See Also

tropicalsparse.axpyi

Examples

Run this code
# NOT RUN {
a <- c(2, Inf, 5, 0, Inf, Inf, Inf, 10, Inf)
b <- c(0, 5, Inf, Inf, 12, 2, Inf, Inf, 3)

tropicalsparse.doti(a, b, 'minplus')

# [1]   2 Inf Inf Inf Inf Inf Inf Inf Inf

# }

Run the code above in your browser using DataLab