This library provides the ability to compute the median, circular median, mean and standard deviation of a dataset stored in a circular buffer
util.h@6:df815bdada09, 2013-05-28 (annotated)
- Committer:
- greletj
- Date:
- Tue May 28 17:50:55 2013 +0000
- Revision:
- 6:df815bdada09
- Parent:
- 3:27019c77bf90
add default in switch(mode) to suppress compiler warning: ; enumeration value 'SETF' not handled in switch
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
greletj | 1:a4c87bc5b008 | 1 | /* Copyright (c) <2012> <copyright J. Grelet>, MIT License |
greletj | 1:a4c87bc5b008 | 2 | * |
greletj | 1:a4c87bc5b008 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
greletj | 1:a4c87bc5b008 | 4 | * and associated documentation files (the "Software"), to deal in the Software without restriction, |
greletj | 1:a4c87bc5b008 | 5 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
greletj | 1:a4c87bc5b008 | 6 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
greletj | 1:a4c87bc5b008 | 7 | * furnished to do so, subject to the following conditions: |
greletj | 1:a4c87bc5b008 | 8 | * |
greletj | 1:a4c87bc5b008 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
greletj | 1:a4c87bc5b008 | 10 | * substantial portions of the Software. |
greletj | 1:a4c87bc5b008 | 11 | * |
greletj | 1:a4c87bc5b008 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
greletj | 1:a4c87bc5b008 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
greletj | 1:a4c87bc5b008 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
greletj | 1:a4c87bc5b008 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
greletj | 1:a4c87bc5b008 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
greletj | 1:a4c87bc5b008 | 17 | */ |
greletj | 1:a4c87bc5b008 | 18 | |
greletj | 1:a4c87bc5b008 | 19 | /* anciennement sys.h */ |
greletj | 0:b3a2e39a13ad | 20 | |
greletj | 0:b3a2e39a13ad | 21 | typedef void *pointeur; |
greletj | 0:b3a2e39a13ad | 22 | |
greletj | 0:b3a2e39a13ad | 23 | #ifndef FALSE |
greletj | 0:b3a2e39a13ad | 24 | # define FALSE 0 |
greletj | 0:b3a2e39a13ad | 25 | #endif |
greletj | 0:b3a2e39a13ad | 26 | #ifndef TRUE |
greletj | 0:b3a2e39a13ad | 27 | # define TRUE 1 |
greletj | 0:b3a2e39a13ad | 28 | #endif |
greletj | 0:b3a2e39a13ad | 29 | |
greletj | 0:b3a2e39a13ad | 30 | #define ALLOUE( nb,type ) (type *) calloc( nb,sizeof( type ) ) |
greletj | 0:b3a2e39a13ad | 31 | #define LIBERE( var ) if( var ) free( (void *) var ) |
greletj | 0:b3a2e39a13ad | 32 | |
greletj | 0:b3a2e39a13ad | 33 | #define FARALLOUE( nb,type ) (type *) calloc( nb, sizeof( type ) ) |
greletj | 0:b3a2e39a13ad | 34 | #define FARLIBERE( var ) if( var ) free( (void *) var ) |
greletj | 0:b3a2e39a13ad | 35 | |
greletj | 0:b3a2e39a13ad | 36 | /* util.h */ |
greletj | 0:b3a2e39a13ad | 37 | |
greletj | 0:b3a2e39a13ad | 38 | typedef char STRING[ 41 ]; |
greletj | 0:b3a2e39a13ad | 39 | #define MAX_CHAR_POOL 4096 /* 4Ko de chaines */ |
greletj | 0:b3a2e39a13ad | 40 | |
greletj | 0:b3a2e39a13ad | 41 | |
greletj | 0:b3a2e39a13ad | 42 | double convert_position( double data ); |
greletj | 0:b3a2e39a13ad | 43 | double temps( unsigned jour_julien, double heure ); |
greletj | 0:b3a2e39a13ad | 44 | |
greletj | 0:b3a2e39a13ad | 45 | |
greletj | 0:b3a2e39a13ad | 46 | STRING *gen_str( unsigned taille /*= 80*/ ); |
greletj | 0:b3a2e39a13ad | 47 |