check.infinityV: Check Infinity in Vector

Description Usage Arguments Details Value See Also Examples

Description

check.infinityV checks infinite value in a vector based on algebraType input.

Usage

1
check.infinityV(V, algebraType)

Arguments

V

is vector.

algebraType

is string input that can be minplus or maxplus.

Details

The input of this function is a vector and type of tropical algebra. A vector may contain infinite values that can be positive or negative. Both the positive and negative infinite values works differently on each algebra type. Due to the difference between minplus and maxplus tropical algebra, it is important to manage them so they can work in their own bounderies. In minplus -Inf cannot be used while in maxplus Inf cannot be used. So the main purpose of this funnction is to check such possibilities that can cause errors. If this function finds a -Inf in the vector and the type of algebra is minplus then the function generates an error. Similarly, if the function finds a Inf in the vector and the type of algebra is maxplus then the function also generates an error.

Value

Returns nothing but generates an error if specific conditions met.

See Also

check.infinityM

Examples

1
2
a <- c(2, Inf, Inf, 0, Inf, Inf, Inf, 10, Inf)
check.infinityV(a, 'minplus')

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