TABLE OF CONTENTS


fortran/A [ Methods ]

NAME

   A --- time in an interval

FUNCTION

Computes the amount of time in interval (r,s) prior to time t

SYNOPSIS

115       subroutine A(out,time,as,r,s,nr,ns)

INPUTS

    out    output storage
    time   time of interest
    as     nr x ns matrix of breakpoints
    r      stratum
    s      interval
    nr         number of strata
    ns         number of breakpoints

SOURCE

117       integer nr,ns,r,s
118       double precision out,time,as(nr,ns)
119       
120       s=s+1
121       if(s.EQ.0) then
122         out=0.d0
123       else if(time.LT.as(r,s-1)) then
124         out=0.d0
125       else if(time.GE.as(r,s)) then
126         out=as(r,s)-as(r,s-1)
127       else
128         out=time-as(r,s-1)
129       endif
130       s=s-1
131       end