File: arithmetic-set.h

package info (click to toggle)
gnuastro 0.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,360 kB
  • sloc: ansic: 185,444; sh: 15,785; makefile: 1,303; cpp: 9
file content (51 lines) | stat: -rw-r--r-- 1,935 bytes parent folder | download
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
/*********************************************************************
Arithmetic operations on data structures.
This is part of GNU Astronomy Utilities (Gnuastro) package.

Original author:
     Mohammad Akhlaghi <mohammad@akhlaghi.org>
Contributing author(s):
Copyright (C) 2021-2025 Free Software Foundation, Inc.

Gnuastro 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 3 of the License, or (at your
option) any later version.

Gnuastro 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 Gnuastro. If not, see <http://www.gnu.org/licenses/>.
**********************************************************************/
#ifndef __ARITHMETIC_SET_H__
#define __ARITHMETIC_SET_H__

#define GAL_ARITHMETIC_SET_PREFIX         "set-"
#define GAL_ARITHMETIC_SET_PREFIX_LENGTH  strlen(GAL_ARITHMETIC_SET_PREFIX)


struct gal_arithmetic_set_params
{
  void               *tokens;   /* Full list of tokens.            */
  size_t        tokencounter;   /* Counter of current token.       */
  gal_data_t          *named;   /* List of named datasets.         */
  void               *params;   /* Internal parameters in caller.  */
  gal_data_t  * (*pop)(void *in_prm);  /* Function to use.         */
  int (*used_later)(void *in_prm, char *name); /* Function to use. */
};

void
gal_arithmetic_set_name(struct gal_arithmetic_set_params *p,
                        char *token);

int
gal_arithmetic_set_is_name(gal_data_t *named, char *token);

gal_data_t *
gal_arithmetic_set_copy_named(struct gal_arithmetic_set_params *p,
                              char *name);

#endif