vtmvg_c |
Table of contents
Procedurevtmvg_c ( Vector transpose times matrix times vector ) SpiceDouble vtmvg_c ( const void * v1, const void * matrix, const void * v2, SpiceInt nrow, SpiceInt ncol ) AbstractMultiply the transpose of a n-dimensional column vector, a nxm matrix, and a m-dimensional column vector. Required_ReadingNone. KeywordsMATRIX VECTOR Brief_I/OVARIABLE 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_Inputv1 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_OutputThe 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'. ParametersNone. ExceptionsError free. FilesNone. ParticularsThis 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. ExamplesIf 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. Restrictions1) 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_ReferencesNone. Author_and_InstitutionJ. 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_Entriesn-dimensional vector_transpose times matrix times vector |
Fri Dec 31 18:41:15 2021