vtmvg_c

Index Page vtmvg_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
       SpiceDouble vtmvg_c ( const void          * v1,
                             const void          * matrix,
                             const void          * v2,
                             SpiceInt              nrow,
                             SpiceInt              ncol    )
#### Abstract
        Multiply the transpose of a n-dimensional column vector,
        a nxm matrix, and a m-dimensional column vector.
#### Required_Reading
        None.
#### Keywords
        MATRIX
        VECTOR
#### Brief_I/O
        VARIABLE  I/O  DESCRIPTION
        --------  ---  --------------------------------------------------
         v1        I   n-dimensional double precision column vector.
         matrix    I   nxm double precision matrix.
         v2        I   m-dimensional double porecision column vector.
         nrow      I   Number of rows in matrix (number of rows in v1.)
         ncol      I   Number of columns in matrix (number of rows in
                       v2.)

         The function returns the result of (v1**t * matrix * v2 ).
#### Detailed_Input
        v1         is an n-dimensional double precision vector.

        matrix     is an n x m double precision matrix.

        v2         is an m-dimensional double precision vector.

        nrow       is the number of rows in matrix.  this is also
                   equivalent to the number of rows in the vector v1.

        ncol       is the number of columns in matrix. this is also
                   equivalent to the number of rows in the vector v2.
#### Detailed_Output
        The function returns the double precision value of the equation
        (v1**t * matrix * v2 ).

        Notice that vtmvg_c is actually the dot product of the vector
        resulting from multiplying the transpose of V1 and MATRIX and the
        vector V2.
#### Parameters
        None.
#### Exceptions
       Error free.
#### Files
        None.
#### Particulars
        This routine implements the following vector/matrix/vector
        multiplication:

                               T
           vtmvg_c = [   V1   ] |          |  |  |
                                |  MATRIX  |  |V2|
                                |          |  |  |

        by calculating over all values of the indices k and l from 1 to
        nrow and 1 to ncol, respectively, the expression

           vtmvg_c = Summation of ( v1(k)*matrix(k,l)*v2(l) ) .

        v1 is a column vector which becomes a row vector when transposed.
        v2 is a column vector.

        No check performed to determine whether floating point
        overflow has occurred.
#### Examples
        If  v1 = | 1.0 |  matrix = | 2.0  0.0 |  v2 = | 1.0 |
                 |     |           |          |       |     |
                 | 2.0 |           | 1.0  2.0 |       | 2.0 |
                 |     |           |          |
                 | 3.0 |           | 1.0  1.0 |

        nrow = 3
        ncol = 2

        Then the value of the function is  21.0.
#### Restrictions
        Since no error detection or recovery is implemented, the
        programmer is required to insure that the inputs to this routine
        are both valid and within the proper range.
#### Literature_References
        None.
#### Author_and_Institution
        W.M. Owen       (JPL)
        E.D. Wright     (JPL)
#### Version
       -CSPICE Version 1.0.0, 1-JUL-1999
#### Index_Entries
       n-dimensional vector_transpose times matrix times vector
#### Link to routine vtmvg_c source file vtmvg_c.c

    Thu Apr 16 08:59:37 2009