#ifndef frb_types_H #define frb_types_H /* Basic types for information analysis of matched fracture lines. */ /* Last edited on 2005-01-16 14:43:20 by stolfi */ /* Copyright © 2005 Universidade Estadual de Campinas. See note at end of file. */ #define INF MAXDOUBLE #define Pi (3.14159265358979323) #include #include #include /* INTERVALS */ typedef struct frb_range_t { double end[2]; } frb_range_t; /* INTEGER PAIRS */ typedef struct { int c[2]; } i2_t; typedef struct i2_vec_t { nat nel; i2_t *el; } i2_vec_t; i2_vec_t i2_vec_new(nat nel); #define i2_vec_expand(nv,index) \ vec_expand(vec_cast_ref(nv), index, sizeof(i2_t)) #define i2_vec_trim(nv,nel) \ vec_trim(vec_cast_ref(nv), nel, sizeof(i2_t)) /* REAL TRIPLES */ typedef struct r3_vec_t { nat nel; r3_t *el; } r3_vec_t; r3_vec_t r3_vec_new(nat nel); #define r3_vec_expand(nv,index) \ vec_expand(vec_cast_ref(nv), index, sizeof(r3_t)) #define r3_vec_trim(nv,nel) \ vec_trim(vec_cast_ref(nv), nel, sizeof(r3_t)) /* SIGNED BYTES */ typedef signed char sbyte; typedef struct sbyte_vec_t { nat nel; sbyte *el; } sbyte_vec_t; sbyte_vec_t sbyte_vec_new(nat nel); #define sbyte_vec_expand(nv,index) \ vec_expand(vec_cast_ref(nv), index, sizeof(sbyte)) #define sbyte_vec_trim(nv,nel) \ vec_trim(vec_cast_ref(nv), nel, sizeof(sbyte)) #endif /* COPYRIGHT AND AUTHORSHIP NOTICE Copyright © 2005 Universidade Estadual de Campinas (UNICAMP). Created by Helena C. G. Leitão and Jorge Stolfi in 1995--2005. This source file can be freely distributed, used, and modified, provided that this copyright and authorship notice is preserved in all copies, and that any modified versions of this file are clearly marked as such. This software has NO WARRANTY of correctness or applicability for any purpose. Neither the authors nor their employers shall be held responsible for any losses or damages that may result from its use. END OF NOTICE */