symbolic.h
2.54 KB
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
// -*- mode:C++ ; compile-command: "g++ -I.. -g -c symbolic.cc" -*-
/*
* Copyright (C) 2000,2014 B. Parisse, Institut Fourier, 38402 St Martin d'Heres
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GIAC_SYMBOLIC_H
#define _GIAC_SYMBOLIC_H
#include "first.h"
#include <iostream>
#include <string>
#include "vector.h"
#include "unary.h"
#include "gen.h"
#ifndef NO_NAMESPACE_GIAC
namespace giac {
#endif // ndef NO_NAMESPACE_GIAC
const unary_function_ptr * archive_function_tab();
extern int archive_function_tab_length;
int archive_function_index(const unary_function_ptr & f);
inline int archive_function_index(const unary_function_ptr * f) { return archive_function_index(*f); };
std::ostream & operator << (std::ostream & os,const symbolic & s);
int equalposcomp(const unary_function_ptr tab[],const unary_function_ptr & f);
inline int equalposcomp(const unary_function_ptr tab[],const unary_function_ptr * f){ return equalposcomp(tab,*f);} ;
int equalposcomp(const std::vector<const unary_function_ptr *> & v,const unary_function_ptr * f);
int equalposcomp(const const_unary_function_ptr_ptr tab[],const unary_function_ptr & f);
inline int equalposcomp(const const_unary_function_ptr_ptr tab[],const unary_function_ptr * f){ return equalposcomp(tab,*f);};
// find the "size" of g but limited by max
unsigned taille(const gen & g,unsigned max);
// find number of symbolic embeddings, limited to max, initial value add
unsigned depth(const gen & g,unsigned add,unsigned max);
extern int print_max_depth;
extern bool print_rewrite_prod_inv;
// try to rewrite arg the argument of a product as a fraction n/d
bool rewrite_prod_inv(const gen & arg,gen & n,gen & d);
std::string & add_print(std::string & s,const gen & g,GIAC_CONTEXT);
// non recursive eval function
gen nr_eval(const gen & g,int level,const context * ct);
#ifndef NO_NAMESPACE_GIAC
} // namespace giac
#endif // ndef NO_NAMESPACE_GIAC
#endif // _GIAC_SYMBOLIC_H