pf_vector.h
Go to the documentation of this file.
1 /*
2  * Player - One Hell of a Robot Server
3  * Copyright (C) 2000 Brian Gerkey & Kasper Stoy
4  * gerkey@usc.edu kaspers@robotics.usc.edu
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  *
20  */
21 /**************************************************************************
22  * Desc: Vector functions
23  * Author: Andrew Howard
24  * Date: 10 Dec 2002
25  * CVS: $Id: pf_vector.h 6345 2008-04-17 01:36:39Z gerkey $
26  *************************************************************************/
27 
28 #ifndef PF_VECTOR_H
29 #define PF_VECTOR_H
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 #include <stdio.h>
36 
37 // The basic vector
38 typedef struct
39 {
40  double v[3];
41 } pf_vector_t;
42 
43 
44 // The basic matrix
45 typedef struct
46 {
47  double m[3][3];
48 } pf_matrix_t;
49 
50 
51 // Return a zero vector
53 
54 // Check for NAN or INF in any component
56 
57 // Print a vector
58 void pf_vector_fprintf(pf_vector_t s, FILE *file, const char *fmt);
59 
60 // Simple vector addition
62 
63 // Simple vector subtraction
65 
66 // Transform from local to global coords (a + b)
68 
69 // Transform from global to local coords (a - b)
71 
72 
73 // Return a zero matrix
75 
76 // Check for NAN or INF in any component
78 
79 // Print a matrix
80 void pf_matrix_fprintf(pf_matrix_t s, FILE *file, const char *fmt);
81 
82 // Compute the matrix inverse. Will also return the determinant,
83 // which should be checked for underflow (indicated singular matrix).
84 //pf_matrix_t pf_matrix_inverse(pf_matrix_t a, double *det);
85 
86 // Decompose a covariance matrix [a] into a rotation matrix [r] and a
87 // diagonal matrix [d] such that a = r * d * r^T.
89 
90 #ifdef __cplusplus
91 }
92 #endif
93 
94 #endif
pf_vector_t pf_vector_coord_sub(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:120
pf_vector_t pf_vector_zero()
Definition: pf_vector.c:38
pf_vector_t pf_vector_sub(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:93
int pf_matrix_finite(pf_matrix_t a)
Definition: pf_vector.c:148
pf_vector_t pf_vector_add(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:80
pf_matrix_t pf_matrix_zero()
Definition: pf_vector.c:134
void pf_vector_fprintf(pf_vector_t s, FILE *file, const char *fmt)
Definition: pf_vector.c:64
pf_vector_t pf_vector_coord_add(pf_vector_t a, pf_vector_t b)
Definition: pf_vector.c:106
int pf_vector_finite(pf_vector_t a)
Definition: pf_vector.c:51
void pf_matrix_unitary(pf_matrix_t *r, pf_matrix_t *d, pf_matrix_t a)
Definition: pf_vector.c:222
void pf_matrix_fprintf(pf_matrix_t s, FILE *file, const char *fmt)
Definition: pf_vector.c:162


nav2d_localizer
Author(s): Sebastian Kasperski
autogenerated on Tue Nov 7 2017 06:02:33