Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vec_rec2c(A) — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vec_$rec2

vec_$rec2c_i

vec_$drec2c

vec_$drec2c_i

vec_$irec2c

vec_$irec2c_i

vec_$irec2c16

vec_$irec2c16_i

VEC_$REC2C                        Domain/OS                         VEC_$REC2C


NAME
     vec_$rec2c - calculate second-order linear recurrence of single-precision
     vector with constant coefficients

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/vec.h>

     void vec_$rec2c(
          float *start_vec,
          long int &count,
          float &mult_constant,
          float &mult_constant_2,
          float *result_vec)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/vec.ins.pas';

     procedure vec_$rec2c(
          in start_vec: univ vec_$real_vector;
          in count: integer32;
          in mult_constant: real;
          in mult_constant_2: real;
          var result_vec: univ vec_$real_vector);

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/vec.ins.ftn'

           parameter (nvec = 10)

           real start_vec(nvec), result_vec(nvec), mult_constant, mult_constant_2
           integer*4 count

           call vec_$rec2c(start_vec, count, mult_constant, mult_constant_2, result_vec)

DESCRIPTION
     Vec_$rec2c calculates a second-order linear recurrence with constant
     coefficients based on start_vec.

     This routine reads the first two entries in the array result_vec; it then
     writes count entries into result_vec based on the following formula:

     For each integer I such that 1 <= I <= count,
     result_vec(I+2) = start_vec(I) + (mult_constant x result_vec(I+1))
                        + (mult_constant_2 x result_vec(I))

     Notice that result_vec is used both for input and output, and that it
     must be large enough to hold count + 2 entries.

     start_vec
          An input vector.

     mult_constant
          A scalar multiplier.

     mult_constant_2
          A scalar multiplier.

     count
          The number of elements to be operated on.

     result_vec
          The vector containing two input values and the result of the
          recurrence calculation.

NOTES
     When vec_$rec2c is used to operate on matrixes in C and Pascal, start_vec
     and result_vec are row vectors; in FORTRAN, they are column vectors.

     As in all the vec_$ calls,  the result array must not overlap any of the
     input arrays; the result array may be identical to an input, but must not
     contain any smaller subset of an input.   Because of pipelining, using
     overlapping input and output arrays may cause incorrect results.


SEE ALSO
     vec_$rec2, vec_$rec2c_i, vec_$drec2c, vec_$drec2c_i, vec_$irec2c,
     vec_$irec2c_i, vec_$irec2c16, vec_$irec2c16_i.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026