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 <stdio.h> |
||
| 14 | #ifndef __APPLE__ |
||
| 15 | #include <malloc.h> |
||
| 16 | #else |
||
| 17 | #include <stdlib.h> |
||
| 18 | #endif |
||
| 19 | #include <math.h> |
||
| 20 | #include <AR/matrix.h> |
||
| 21 | |||
| 22 | ARVec *arVecAlloc( int clm ) |
||
| 23 | { |
||
| 24 | ARVec *v; |
||
| 25 | |||
| 26 | v = (ARVec *)malloc(sizeof(ARVec)); |
||
| 27 | if( v == NULL ) return NULL; |
||
| 28 | |||
| 29 | v->v = (double *)malloc(sizeof(double) * clm); |
||
| 30 | if( v->v == NULL ) { |
||
| 31 | free(v); |
||
| 32 | return NULL; |
||
| 33 | } |
||
| 34 | |||
| 35 | v->clm = clm; |
||
| 36 | |||
| 37 | return v; |
||
| 38 | } |