amino
Lightweight Robot Utility Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
amino.h
Go to the documentation of this file.
1 /* -*- mode: C; c-basic-offset: 4; -*- */
2 /* ex: set shiftwidth=4 tabstop=4 expandtab: */
3 /*
4  * Copyright (c) 2010-2011, Georgia Tech Research Corporation
5  * All rights reserved.
6  *
7  * Author(s): Neil T. Dantam <ntd@gatech.edu>
8  * Georgia Tech Humanoid Robotics Lab
9  * Under Direction of Prof. Mike Stilman <mstilman@cc.gatech.edu>
10  *
11  *
12  * This file is provided under the following "BSD-style" License:
13  *
14  *
15  * Redistribution and use in source and binary forms, with or
16  * without modification, are permitted provided that the following
17  * conditions are met:
18  *
19  * * Redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer.
21  *
22  * * Redistributions in binary form must reproduce the above
23  * copyright notice, this list of conditions and the following
24  * disclaimer in the documentation and/or other materials provided
25  * with the distribution.
26  *
27  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
28  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
29  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
31  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
32  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
35  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
36  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
38  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
39  * POSSIBILITY OF SUCH DAMAGE.
40  *
41  */
42 
43 #ifndef AMINO_H
44 #define AMINO_H
45 
47 // include everything we'll typically need
48 #ifdef __cplusplus
49 #include <cstdlib>
50 #include <cstring>
51 #include <cmath>
52 #include <cstdio>
53 #include <cassert>
54 #include <ctime>
55 #include <stdint.h>
56 #include <iostream>
57 #include <vector>
58 #include <map>
59 #include <queue>
60 #include <stack>
61 #include <string>
62 #else
63 #include <assert.h>
64 #include <stdlib.h>
65 #include <stdint.h>
66 #include <string.h>
67 #include <stdio.h>
68 #include <math.h>
69 #include <errno.h>
70 #include <stdarg.h>
71 #endif //__cplusplus
72 
73 #include <cblas.h>
74 #include "amino/cblas_order.h"
75 
76 
77 #include <time.h>
78 
79 // for C symbols
80 #ifdef __cplusplus
81 #define AA_API extern "C"
82 #define AA_EXTERN extern "C"
83 #define AA_RESTRICT
84 #else
85 #define AA_API
87 #define AA_EXTERN extern
89 #define AA_RESTRICT restrict
91 #endif //__cplusplus
92 
94 #define AA_DEPRECATED __attribute__ ((deprecated))
95 
97 #define AA_IBILLION 1000000000
98 #define AA_IMILLION 1000000
100 
102 #define AA_QUOTE(X) (#X)
103 
105 #define AA_ENUM_SYM_CASE( res, sym ) case sym: (res) = #sym; break;
106 
108 #define AA_SWAP(a,b) \
109  { \
110  const __typeof__(a) aa_$_tmpa = (a); \
111  const __typeof__(b) aa_$_tmpb = (b); \
112  (a) = aa_$_tmpb; \
113  (b) = aa_$_tmpa; \
114  }
115 
116 
117 // include our own headers
118 #include "amino/mem.h"
119 #include "amino/math.h"
120 #include "amino/la.h"
121 #include "amino/tf.h"
122 #include "amino/lapack.h"
123 #include "amino/clapack.h"
124 #include "amino/time.h"
125 #include "amino/debug.h"
126 #include "amino/plot.h"
127 #include "amino/kin.h"
128 #include "amino/type.h"
129 #include "amino/endconv.h"
130 #include "amino/unit.h"
131 #include "amino/validate.h"
132 #include "amino/io.h"
133 #include "amino/cv.h"
134 #include "amino/const.h"
135 #include "amino/heap.h"
136 
137 
138 #endif //AMINO_H
Routines to convert numbers to different endian formats.
Validation of data.
Simple Heap / Heapsort.
Low-level operations for SE(3) orientations and transformations.