vsubg_c

Index Page vsubg_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void vsubg_c ( ConstSpiceDouble  * v1,
                      ConstSpiceDouble  * v2,
                      SpiceInt            ndim,
                      SpiceDouble       * vout )
#### Abstract
        Compute the difference between two double precision vectors of
        arbitrary dimension.
#### Required_Reading
       None.
#### Keywords
        VECTOR
#### Brief_I/O
        VARIABLE  I/O  DESCRIPTION
        --------  ---  --------------------------------------------------
         v1        I     First vector (minuend).
         v2        I     Second vector (subtrahend).
         ndim      I     Dimension of v1, v2, and vout.
         vout      O     Difference vector, v1 - v2.
                         vout can overwrite either v1 or v2.
#### Detailed_Input
        v1      is a double precision vector of arbitrary dimension which
                is the minuend (i.e. first or left-hand member) in the
                vector subtraction.

        v2      is a double precision vector of arbitrary dimension which
                is the subtrahend (i.e. second or right-hand member) in
                the vector subtraction.

        ndim    is the dimension of v1 and v2 (and vout).
#### Detailed_Output
        vout    is a double precision vector containing the difference
                v1 - v2.
#### Parameters
       None.
#### Exceptions
        Error free.
#### Files
        None.
#### Particulars
        For each value of the index i from 0 to (ndim - 1), this subroutine
        performs the following subtraction:

           vout(i) = v1(i) - v2(i)

        No error checking is performed to guard against numeric overflow
        or underflow.  vout may overwrite v1 or v2.
#### Examples
        The following table shows the results of vsubg_c from various
        inputs.

         v1                v2             ndim         vout
        -----------------------------------------------------------------
        (1, 2, 3, 4)     ( 1, 1, 1, 1 )    4         ( 0, 1, 2, 3 )
        (1, 2, 3, 4)     (-1,-2,-3,-4 )    4         ( 2, 4, 6, 8 )
        (1, 2, 3, 4)     (-1, 2,-3, 4 )    4         ( 2, 0, 6, 0 )
#### Restrictions
        No error checking is performed to guard against numeric overflow.
        The programmer is thus required to insure that the values in v1
        and v2 are reasonable and will not cause overflow.

        It is assumed the proper amount of memory has been allocated for
        v1, v2 and vout.
#### Literature_References
        None.
#### Author_and_Institution
        W.M. Owen       (JPL)
        E.D. Wright     (JPL)
#### Version
       -CSPICE Version 1.1.0, 22-OCT-1998 (NJB)

          Made input vectors const.

       -CSPICE Version 1.0.0, 05-MAR-1998 (EDW)
#### Index_Entries
       n-dimensional vector subtraction
#### Link to routine vsubg_c source file vsubg_c.c

    Thu Apr 16 08:59:37 2009