sum {IntervalQuestionStat}R Documentation

Calculate the sum of nn intervals

Description

This function calculates the sum of nn nonempty compact real intervals.

Usage

## S4 method for signature 'IntervalList'
sum(x)

Arguments

x

A list of intervals stored as an IntervalList object.

Details

This function generalizes the Minkowski's sum of two nonempty compact real intervals explained in arithmetic section and implemented through + operator's method for two IntervalData objects.

Value

This function returns an IntervalData object with the calculated sum of the given nn intervals, which is defined as another nonempty compact real interval.

Author(s)

José García-García garciagarjose@uniovi.es

References

Hankin, R.K.S. (2010). A step-by-step guide to writing a simple package that uses S4 methods: a "hello world" example. Technical Report. Auckland University of Technology.

See Also

For further information of the interval arithmetic see arithmetic.

Examples

## The following code calculates the sum
## of a list with two different intervals
list <- IntervalList(c(1, 3), c(2, 5))
sum(list)

[Package IntervalQuestionStat version 0.2.0 Index]