formula.h
Go to the documentation of this file.
1 // Simple mathematical formula processing library
2 // Written by Atsushi Watanabe
3 // Intelligent Robot Laboratory, University of Tsukuba
4 //
5 // Copyright 2011 Atsushi Watanabe, All rights reserved.
6 //
7 // Redistribution and use in source and binary forms, with or without
8 // modification, are permitted provided that the following conditions are met:
9 //
10 // * Redistributions of source code must retain the above copyright notice, this
11 // list of conditions and the following disclaimer.
12 // * Redistributions in binary form must reproduce the above copyright notice,
13 // this list of conditions and the following disclaimer in the documentation
14 // and/or other materials provided with the distribution.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
17 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
19 // EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
20 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 
27 #ifndef FORMULA_H
28 #define FORMULA_H
29 
30 #include <formula-calc.h>
31 
32 struct stack_t
33 {
34  int rank;
36  void *value;
37 };
38 
40 {
41  char op[8];
42  int rank;
44  double (*func)(double **);
45  int narg;
46 };
47 
48 struct rpf_t *rpf_push(struct rpf_t *rpf, struct stack_t *obj);
49 struct rpf_t *rpf_join(struct rpf_t *rpf, struct rpf_t *rpf2);
50 int rpf_count_num(struct rpf_t *rpf);
51 struct rpf_t *rpf_last(struct rpf_t *rpf);
52 struct rpf_t *formula_output(struct stack_t *num, int *sp_num, struct stack_t *op, int *sp_op, int rank);
53 
54 #endif // FORMULA_H
int rank
Definition: formula.h:42
int narg
Definition: formula.h:45
rpf_type_t
Definition: formula-calc.h:39
struct rpf_t * rpf_push(struct rpf_t *rpf, struct stack_t *obj)
int rpf_count_num(struct rpf_t *rpf)
struct rpf_t * formula_output(struct stack_t *num, int *sp_num, struct stack_t *op, int *sp_op, int rank)
int rank
Definition: formula.h:34
void * value
Definition: formula.h:36
enum rpf_type_t type
Definition: formula.h:35
struct rpf_t * rpf_join(struct rpf_t *rpf, struct rpf_t *rpf2)
struct rpf_t * rpf_last(struct rpf_t *rpf)


yp-spur
Author(s):
autogenerated on Sat May 11 2019 02:08:24