Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 204 | chris | 1 | /******************************************************* |
| 2 | * |
||
| 3 | * Author: Shinsaku Hiura, Hirokazu Kato |
||
| 4 | * |
||
| 5 | * shinsaku@sys.es.osaka-u.ac.jp |
||
| 6 | * kato@sys.im.hiroshima-cu.ac.jp |
||
| 7 | * |
||
| 8 | * Revision: 2.1 |
||
| 9 | * Date: 99/07/16 |
||
| 10 | * |
||
| 11 | *******************************************************/ |
||
| 12 | |||
| 13 | #include <stdlib.h> |
||
| 14 | #include <stdio.h> |
||
| 15 | #include <math.h> |
||
| 16 | #include <AR/matrix.h> |
||
| 17 | |||
| 18 | double arVecInnerproduct( ARVec *x, ARVec *y ) |
||
| 19 | { |
||
| 20 | double result = 0.0; |
||
| 21 | int i; |
||
| 22 | |||
| 23 | if( x->clm != y->clm ) exit(0); |
||
| 24 | |||
| 25 | for( i = 0; i < x->clm; i++ ) { |
||
| 26 | result += x->v[i] * y->v[i]; |
||
| 27 | } |
||
| 28 | |||
| 29 | return( result ); |
||
| 30 | } |