s-news
[Top] [All Lists]

Re: [S] is there a cumouter() like function?

To: Fei Chen <fchen@stern.nyu.edu>, s-news@wubios.wustl.edu
Subject: Re: [S] is there a cumouter() like function?
From: Jack Lewis <jlewis@rsl.psw.fs.fed.us>
Date: Mon, 24 Aug 1998 14:44:38 -0700
Organization: PSW Redwood Sciences Lab, U.S. Forest Service
References: <Pine.GSO.3.96.980823123844.17832A-100000@db.stern.nyu.edu>
Reply-to: jlewis@rsl.psw.fs.fed.us
Sender: owner-s-news@wubios.wustl.edu
Fei Chen wrote:

> ps.  can someone give me an example of unavoidable loop? and under what
> general conditions when this happens?hi all,

Here is a simple example that I think requires looping,
(although I'd be thrilled to find out I'm wrong).
Given a sequence a[i], i=0,1,2,...,n, and some constant k,
with 0 < k < 1, compute the sequence
b[i] = k*a[i-1] + a[i],        i=1,2,...,n

It may be impossible to state general conditions in S-Plus
for unavoidable loops, because "avoidance" often just
means doing the looping with compiled code
(often internal to S-Plus) from another language
such as C or Fortran.
--
Jack Lewis                           Redwood Sciences Laboratory
707-825-2929 voice                   Pacific Southwest Research Station
707-825-2901 fax                     USDA Forest Service
jlewis/psw_rsl@fs.fed.us             http://www.rsl.psw.fs.fed.us

NOTE:
jlewis@rsl.psw.fs.fed.us will be de-activated sometime this summer (1998).
           --------------------------------------------
Thought must be divided against itself before it can come to any
knowledge of itself.                             (Aldous Huxley)


-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>