145: ask for the boundaries of the underlying time interval

Description Arguments Value Author(s) Examples

Description

The method returns the time range of the given object It is probably mostly used internally to make sure that time dependent functions retrieved from data are not used outside the interval where they are valid.

Arguments

object

An object of class TimeMap or one that inherits from TimeMap

Value

a vector of length two c(t_min,t_max) containing start and end time of the time interval for which the TimeMap object has been defined.

Author(s)

Carlos A. Sierra, Markus Mueller

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# set up some variables 
t_start=0 
t_end=10 

# Create an explicit example of a TimeMap
c0=c(0.5, 0.5, 0.5)
inputFluxes=TimeMap.new(
  t_start,
  t_end,
  function(t0){matrix(nrow=n,ncol=1,c(0.0,0,0))}
) 
# now it you only have the inputFluxes
# you can ask it for which time interval it was specified

#print(getTimeRange(inputFluxes))


# Construct a less explicit example of a TimeMap  with an object 
# of class # BoundLinDecompOp which is subclass of TimeMap
n=3
At=new("BoundLinDecompOp",
  t_start,
  t_end,
  function(t0){
        matrix(nrow=n,ncol=n,byrow=TRUE,
          c(-0.2,    0,    0, 
             0  , -0.3,    0,   
             0,      0,   -0.4/t0)
        )
  }
) 
#print(getTimeRange(At))

SoilR documentation built on May 4, 2017, 9:08 p.m.

Related to 145 in SoilR...