/usr/include/cpl_table.h is in libcpl-dev 6.4.1-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | /* $Id: cpl_table.h,v 1.68 2013-01-23 16:06:32 rpalsa Exp $
*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2008 European Southern Observatory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* $Author: rpalsa $
* $Date: 2013-01-23 16:06:32 $
* $Revision: 1.68 $
* $Name: not supported by cvs2svn $
*/
#ifndef CPL_TABLE_H
#define CPL_TABLE_H
#include <stdio.h>
#include "cpl_io.h"
#include "cpl_type.h"
#include "cpl_propertylist.h"
#include "cpl_array.h"
CPL_BEGIN_DECLS
typedef struct _cpl_table_ cpl_table;
/*
* Legal logical operators for selections:
*/
typedef enum _cpl_table_select_operator_
{
CPL_EQUAL_TO = 0,
CPL_NOT_EQUAL_TO,
CPL_GREATER_THAN,
CPL_NOT_GREATER_THAN,
CPL_LESS_THAN,
CPL_NOT_LESS_THAN
} cpl_table_select_operator;
/*
* Constructors and destructors:
*/
cpl_table *cpl_table_new(cpl_size);
cpl_error_code cpl_table_new_column(cpl_table *, const char *, cpl_type);
cpl_error_code cpl_table_new_column_array(cpl_table *, const char *,
cpl_type, cpl_size);
cpl_error_code cpl_table_set_column_savetype(cpl_table *,
const char *name, cpl_type);
cpl_error_code cpl_table_wrap_int(cpl_table *, int *, const char *);
cpl_error_code cpl_table_wrap_long_long(cpl_table *, long long *, const char *);
cpl_error_code cpl_table_wrap_float(cpl_table *, float *, const char *);
cpl_error_code cpl_table_wrap_double(cpl_table *, double *, const char *);
#ifdef _Complex_I
cpl_error_code cpl_table_wrap_float_complex(cpl_table *,
_Complex float *, const char *);
cpl_error_code cpl_table_wrap_double_complex(cpl_table *,
_Complex double *, const char *);
#endif
cpl_error_code cpl_table_wrap_string(cpl_table *, char **, const char *);
void *cpl_table_unwrap(cpl_table *, const char *);
cpl_error_code cpl_table_copy_structure(cpl_table *, const cpl_table *);
void cpl_table_delete(cpl_table *);
/*
* Methods:
*/
cpl_size cpl_table_get_nrow(const cpl_table *);
cpl_size cpl_table_get_ncol(const cpl_table *);
cpl_type cpl_table_get_column_type(const cpl_table *, const char *name);
cpl_error_code cpl_table_set_column_unit(cpl_table *, const char *name,
const char *unit);
const char *cpl_table_get_column_unit(const cpl_table *, const char *name);
cpl_error_code cpl_table_set_column_format(cpl_table *, const char *name,
const char *format);
const char *cpl_table_get_column_format(const cpl_table *, const char *name);
cpl_error_code cpl_table_set_column_depth(cpl_table *, const char *, cpl_size);
cpl_size cpl_table_get_column_depth(const cpl_table *, const char *);
cpl_size cpl_table_get_column_dimensions(const cpl_table *, const char *);
cpl_error_code cpl_table_set_column_dimensions(cpl_table *, const char *,
const cpl_array *);
cpl_size cpl_table_get_column_dimension(const cpl_table *,
const char *, cpl_size);
int *cpl_table_get_data_int(cpl_table *, const char *name);
const int *cpl_table_get_data_int_const(const cpl_table *,
const char *name);
long long *cpl_table_get_data_long_long(cpl_table *, const char *name);
const long long *cpl_table_get_data_long_long_const(const cpl_table *,
const char *name);
float *cpl_table_get_data_float(cpl_table *, const char *name);
const float *cpl_table_get_data_float_const(const cpl_table *,
const char *name);
double *cpl_table_get_data_double(cpl_table *, const char *name);
const double *cpl_table_get_data_double_const(const cpl_table *,
const char *name);
#ifdef _Complex_I
_Complex float *cpl_table_get_data_float_complex(cpl_table *, const char *name);
const _Complex float *cpl_table_get_data_float_complex_const(const cpl_table *,
const char *name);
_Complex double *cpl_table_get_data_double_complex(cpl_table *, const char *);
const _Complex double *cpl_table_get_data_double_complex_const(const cpl_table *,
const char *);
#endif
char **cpl_table_get_data_string(cpl_table *, const char *name);
const char **cpl_table_get_data_string_const(const cpl_table *,
const char *name);
cpl_array **cpl_table_get_data_array(cpl_table *, const char *);
const cpl_array **cpl_table_get_data_array_const(const cpl_table *,
const char *);
double cpl_table_get(const cpl_table *, const char *, cpl_size, int *null);
int cpl_table_get_int(const cpl_table *, const char *, cpl_size, int *null);
long long cpl_table_get_long_long(const cpl_table *, const char *, cpl_size,
int *null);
float cpl_table_get_float(const cpl_table *, const char *, cpl_size, int *null);
double cpl_table_get_double(const cpl_table *, const char *, cpl_size,
int *null);
#ifdef _Complex_I
_Complex double cpl_table_get_complex(const cpl_table *,
const char *, cpl_size, int *);
_Complex float cpl_table_get_float_complex(const cpl_table *,
const char *, cpl_size, int *null);
_Complex double cpl_table_get_double_complex(const cpl_table *,
const char *, cpl_size, int *null);
#endif
const char *cpl_table_get_string(const cpl_table *, const char *, cpl_size);
const cpl_array *cpl_table_get_array(const cpl_table *, const char *, cpl_size);
cpl_error_code cpl_table_set(cpl_table *, const char *, cpl_size, double);
cpl_error_code cpl_table_set_int(cpl_table *, const char *, cpl_size, int);
cpl_error_code cpl_table_set_long_long(cpl_table *, const char *, cpl_size,
long long);
cpl_error_code cpl_table_set_float(cpl_table *, const char *, cpl_size, float);
cpl_error_code cpl_table_set_double(cpl_table *, const char *, cpl_size,
double);
#ifdef _Complex_I
cpl_error_code cpl_table_set_complex(cpl_table *,
const char *, cpl_size, _Complex double);
cpl_error_code cpl_table_set_float_complex(cpl_table *,
const char *, cpl_size, _Complex float);
cpl_error_code cpl_table_set_double_complex(cpl_table *,
const char *, cpl_size, _Complex double);
#endif
cpl_error_code cpl_table_set_string(cpl_table *, const char *, cpl_size,
const char *);
cpl_error_code cpl_table_set_array(cpl_table *, const char *, cpl_size,
const cpl_array *);
cpl_error_code cpl_table_fill_column_window(cpl_table *, const char *,
cpl_size, cpl_size, double);
cpl_error_code cpl_table_fill_column_window_int(cpl_table *, const char *,
cpl_size, cpl_size, int);
cpl_error_code cpl_table_fill_column_window_long_long(cpl_table *, const char *,
cpl_size, cpl_size,
long long);
cpl_error_code cpl_table_fill_column_window_float(cpl_table *, const char *,
cpl_size, cpl_size, float);
cpl_error_code cpl_table_fill_column_window_double(cpl_table *, const char *,
cpl_size, cpl_size, double);
#ifdef _Complex_I
cpl_error_code cpl_table_fill_column_window_complex(cpl_table *, const char *,
cpl_size, cpl_size, _Complex double);
cpl_error_code cpl_table_fill_column_window_float_complex(cpl_table *,
const char *, cpl_size, cpl_size, _Complex float);
cpl_error_code cpl_table_fill_column_window_double_complex(cpl_table *,
const char *, cpl_size, cpl_size, _Complex double);
#endif
cpl_error_code cpl_table_fill_column_window_string(cpl_table *, const char *,
cpl_size, cpl_size, const char *);
cpl_error_code cpl_table_fill_column_window_array(cpl_table *, const char *,
cpl_size, cpl_size, const cpl_array *);
cpl_error_code cpl_table_copy_data_int(cpl_table *, const char *, const int *);
cpl_error_code cpl_table_copy_data_long_long(cpl_table *, const char *,
const long long *);
cpl_error_code cpl_table_copy_data_float(cpl_table *, const char *,
const float *);
cpl_error_code cpl_table_copy_data_double(cpl_table *, const char *,
const double *);
#ifdef _Complex_I
cpl_error_code cpl_table_copy_data_float_complex(cpl_table *, const char *,
const _Complex float *);
cpl_error_code cpl_table_copy_data_double_complex(cpl_table *, const char *,
const _Complex double *);
#endif
cpl_error_code cpl_table_copy_data_string(cpl_table *, const char *,
const char **);
cpl_error_code cpl_table_shift_column(cpl_table *, const char *, cpl_size);
cpl_error_code cpl_table_set_invalid(cpl_table *, const char *, cpl_size);
cpl_error_code cpl_table_set_column_invalid(cpl_table *,
const char *, cpl_size, cpl_size);
int cpl_table_is_valid(const cpl_table *, const char *, cpl_size);
cpl_size cpl_table_count_invalid(const cpl_table *, const char *);
int cpl_table_has_invalid(const cpl_table *table, const char *name);
int cpl_table_has_valid(const cpl_table *table, const char *name);
cpl_error_code cpl_table_fill_invalid_int(cpl_table *, const char *,
int);
cpl_error_code cpl_table_fill_invalid_long_long(cpl_table *, const char *,
long long);
cpl_error_code cpl_table_fill_invalid_float(cpl_table *, const char *,
float);
cpl_error_code cpl_table_fill_invalid_double(cpl_table *, const char *,
double);
#ifdef _Complex_I
cpl_error_code cpl_table_fill_invalid_float_complex(cpl_table *, const char *,
_Complex float);
cpl_error_code cpl_table_fill_invalid_double_complex(cpl_table *, const char *,
_Complex double);
#endif
cpl_error_code cpl_table_erase_column(cpl_table *, const char *);
cpl_error_code cpl_table_move_column(cpl_table *, const char *, cpl_table *);
cpl_error_code cpl_table_duplicate_column(cpl_table *, const char *,
const cpl_table *, const char *);
cpl_error_code cpl_table_name_column(cpl_table *, const char *, const char *);
int cpl_table_has_column(const cpl_table *, const char *);
const char *cpl_table_get_column_name(const cpl_table *) CPL_ATTR_DEPRECATED;
cpl_array *cpl_table_get_column_names(const cpl_table *table);
cpl_error_code cpl_table_set_size(cpl_table *, cpl_size);
cpl_table *cpl_table_duplicate(const cpl_table *);
cpl_table *cpl_table_extract(const cpl_table *, cpl_size, cpl_size);
cpl_table *cpl_table_extract_selected(const cpl_table *);
cpl_array *cpl_table_where_selected(const cpl_table *);
cpl_error_code cpl_table_erase_selected(cpl_table *);
cpl_error_code cpl_table_erase_window(cpl_table *, cpl_size, cpl_size);
cpl_error_code cpl_table_insert_window(cpl_table *, cpl_size, cpl_size);
int cpl_table_compare_structure(const cpl_table *, const cpl_table *);
cpl_error_code cpl_table_insert(cpl_table *, const cpl_table *, cpl_size);
cpl_error_code cpl_table_cast_column(cpl_table *,
const char *, const char *, cpl_type);
cpl_error_code cpl_table_add_columns(cpl_table *,
const char *, const char *);
cpl_error_code cpl_table_subtract_columns(cpl_table *,
const char *, const char *);
cpl_error_code cpl_table_multiply_columns(cpl_table *,
const char *, const char *);
cpl_error_code cpl_table_divide_columns(cpl_table *,
const char *, const char *);
cpl_error_code cpl_table_add_scalar(cpl_table *, const char *, double);
cpl_error_code cpl_table_subtract_scalar(cpl_table *, const char *, double);
cpl_error_code cpl_table_multiply_scalar(cpl_table *, const char *, double);
cpl_error_code cpl_table_divide_scalar(cpl_table *, const char *, double);
#ifdef _Complex_I
cpl_error_code cpl_table_add_scalar_complex(cpl_table *,
const char *, _Complex double);
cpl_error_code cpl_table_subtract_scalar_complex(cpl_table *,
const char *, _Complex double);
cpl_error_code cpl_table_multiply_scalar_complex(cpl_table *,
const char *, _Complex double);
cpl_error_code cpl_table_divide_scalar_complex(cpl_table *,
const char *, _Complex double);
#endif
cpl_error_code cpl_table_abs_column(cpl_table *, const char *);
cpl_error_code cpl_table_logarithm_column(cpl_table *, const char *, double);
cpl_error_code cpl_table_power_column(cpl_table *, const char *, double);
cpl_error_code cpl_table_exponential_column(cpl_table *, const char *, double);
cpl_error_code cpl_table_conjugate_column(cpl_table *, const char *);
cpl_error_code cpl_table_real_column(cpl_table *, const char *);
cpl_error_code cpl_table_imag_column(cpl_table *, const char *);
cpl_error_code cpl_table_arg_column(cpl_table *, const char *);
cpl_error_code cpl_table_erase_invalid_rows(cpl_table *);
cpl_error_code cpl_table_erase_invalid(cpl_table *);
double cpl_table_get_column_max(const cpl_table *, const char *);
double cpl_table_get_column_min(const cpl_table *, const char *);
cpl_error_code cpl_table_get_column_maxpos(const cpl_table *,
const char *, cpl_size *);
cpl_error_code cpl_table_get_column_minpos(const cpl_table *,
const char *, cpl_size *);
#ifdef _Complex_I
_Complex double cpl_table_get_column_mean_complex(const cpl_table *,
const char *);
#endif
double cpl_table_get_column_mean(const cpl_table *, const char *);
double cpl_table_get_column_median(const cpl_table *, const char *);
double cpl_table_get_column_stdev(const cpl_table *, const char *);
cpl_error_code cpl_table_sort(cpl_table *, const cpl_propertylist *);
cpl_size cpl_table_and_selected_window(cpl_table *, cpl_size, cpl_size);
cpl_size cpl_table_or_selected_window(cpl_table *, cpl_size, cpl_size);
cpl_size cpl_table_not_selected(cpl_table *);
cpl_error_code cpl_table_select_row(cpl_table *, cpl_size);
cpl_error_code cpl_table_unselect_row(cpl_table *, cpl_size);
cpl_error_code cpl_table_select_all(cpl_table *);
cpl_error_code cpl_table_unselect_all(cpl_table *);
cpl_size cpl_table_and_selected_invalid(cpl_table *, const char *);
cpl_size cpl_table_or_selected_invalid(cpl_table *, const char *);
cpl_size cpl_table_and_selected_int(cpl_table *, const char *,
cpl_table_select_operator, int);
cpl_size cpl_table_or_selected_int(cpl_table *, const char *,
cpl_table_select_operator, int);
cpl_size cpl_table_and_selected_long_long(cpl_table *, const char *,
cpl_table_select_operator, long long);
cpl_size cpl_table_or_selected_long_long(cpl_table *, const char *,
cpl_table_select_operator, long long);
cpl_size cpl_table_and_selected_float(cpl_table *, const char *,
cpl_table_select_operator, float);
cpl_size cpl_table_or_selected_float(cpl_table *, const char *,
cpl_table_select_operator, float);
cpl_size cpl_table_and_selected_double(cpl_table *, const char *,
cpl_table_select_operator, double);
cpl_size cpl_table_or_selected_double(cpl_table *, const char *,
cpl_table_select_operator, double);
#ifdef _Complex_I
cpl_size cpl_table_and_selected_float_complex(cpl_table *, const char *,
cpl_table_select_operator, _Complex float);
cpl_size cpl_table_or_selected_float_complex(cpl_table *, const char *,
cpl_table_select_operator, _Complex float);
cpl_size cpl_table_and_selected_double_complex(cpl_table *, const char *,
cpl_table_select_operator, _Complex double);
cpl_size cpl_table_or_selected_double_complex(cpl_table *, const char *,
cpl_table_select_operator, _Complex double);
#endif
cpl_size cpl_table_and_selected_string(cpl_table *, const char *,
cpl_table_select_operator, const char *);
cpl_size cpl_table_or_selected_string(cpl_table *, const char *,
cpl_table_select_operator, const char *);
cpl_size cpl_table_and_selected(cpl_table *, const char *,
cpl_table_select_operator, const char *);
cpl_size cpl_table_or_selected(cpl_table *, const char *,
cpl_table_select_operator, const char *);
int cpl_table_is_selected(const cpl_table *, cpl_size);
cpl_size cpl_table_count_selected(const cpl_table *);
void cpl_table_dump_structure(const cpl_table *, FILE *);
void cpl_table_dump(const cpl_table *, cpl_size, cpl_size, FILE *);
cpl_table *cpl_table_load(const char *, int, int);
cpl_table *cpl_table_load_window(const char *, int, int, const cpl_array *,
cpl_size, cpl_size);
cpl_error_code cpl_table_save(const cpl_table *, const cpl_propertylist *,
const cpl_propertylist *, const char *filename,
unsigned mode);
CPL_END_DECLS
#endif
/* end of cpl_table.h */
|