Index of Functions: A B C D E F G H I J K L M N O P Q R S T U V W X
Index Page vtmvg_c

Table of contents

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

       vtmvg_c ( Vector transpose times matrix times vector )

       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 precision 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 0 to
       nrow-1 and 0 to ncol-1, 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

       1)  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

       J. Diaz del Rio     (ODC Space)
       W.M. Owen           (JPL)
       E.D. Wright         (JPL)

#### Version

       -CSPICE Version 1.0.1, 13-AUG-2021 (JDR)

           Edited the header to comply with NAIF standard.

       -CSPICE Version 1.0.0, 01-JUL-1999 (EDW) (WMO)

#### Index_Entries

       n-dimensional vector_transpose times matrix times vector

#### Link to routine vtmvg_c source file vtmvg_c.c

    Fri Dec 31 18:41:15 2021