GiNaC  1.8.0
flags.h
Go to the documentation of this file.
1 
5 /*
6  * GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef GINAC_FLAGS_H
24 #define GINAC_FLAGS_H
25 
26 namespace GiNaC {
27 
30 public:
31  enum {
32  expand_indexed = 0x0001,
34  expand_rename_idx = 0x0004,
35  expand_transcendental = 0x0008
36  };
37 };
38 
40 class has_options {
41 public:
42  enum {
43  algebraic = 0x0001
44  };
45 };
46 
48 class subs_options {
49 public:
50  enum {
51  no_pattern = 0x0001,
52  subs_no_pattern = 0x0001, // for backwards compatibility
53  algebraic = 0x0002,
54  subs_algebraic = 0x0002, // for backwards compatibility
55  pattern_is_product = 0x0004,
58  // To indicate that we want to substitute an index by something that
59  // is not an index. Without this flag the index value would be
60  // substituted in that case.
61  really_subs_idx = 0x0020
62  };
63 };
64 
66 class domain {
67 public:
68  enum {
71  positive
72  };
73 };
74 
77 public:
78  enum {
83  suppress_branchcut = 0x0001
84  };
85 };
86 
89 public:
90  enum {
136  bareiss
137  };
138 };
139 
141 class solve_algo {
142 public:
143  enum {
193  markowitz
194  };
195 };
196 
200 public:
201  enum {
202  dynallocated = 0x0001,
203  evaluated = 0x0002,
204  expanded = 0x0004,
205  hash_calculated = 0x0008,
206  not_shareable = 0x0010,
207  has_indices = 0x0020,
208  has_no_indices = 0x0040, // ! (has_indices || has_no_indices) means "don't know"
209  is_positive = 0x0080,
210  is_negative = 0x0100,
211  purely_indefinite = 0x0200 // If set in a mul, then it does not contains any terms with determined signs, used in power::expand()
212  };
213 };
214 
216 class info_flags {
217 public:
218  enum {
219  // answered by class numeric, add, mul, function and symbols/constants in particular domains
235 
236  // answered by class relation
244 
245  // answered by class symbol
247 
248  // answered by class lst
250 
251  // answered by class exprseq
253 
254  // answered by classes numeric, symbol, add, mul, power
261 
262  // answered by class indexed
263  indexed, // class can carry indices
264  has_indices, // object has at least one index
265 
266  // answered by class idx
268 
269  // answered by classes numeric, symbol, add, mul, power
271 
272  // is meaningful for mul only
273  indefinite
274  };
275 };
276 
278 public:
279  enum {
283  };
284 };
285 
289 public:
290  enum {
295  };
296 };
297 
300 public:
301  enum {
302  polynomial = 0x0000,
303  all = 0x0001
304  };
305 };
306 
307 } // namespace GiNaC
308 
309 #endif // ndef GINAC_FLAGS_H
GiNaC::status_flags::is_positive
@ is_positive
Definition: flags.h:209
GiNaC::info_flags::real
@ real
Definition: flags.h:221
GiNaC::info_flags::relation_greater_or_equal
@ relation_greater_or_equal
Definition: flags.h:243
GiNaC::info_flags::idx
@ idx
Definition: flags.h:267
GiNaC::info_flags::exprseq
@ exprseq
Definition: flags.h:252
GiNaC::status_flags::not_shareable
@ not_shareable
don't share instances of this object between different expressions unless explicitly asked to (used b...
Definition: flags.h:206
GiNaC::info_flags::integer
@ integer
Definition: flags.h:223
GiNaC::info_flags::relation
@ relation
Definition: flags.h:237
GiNaC::factor_options::all
@ all
factor all polynomial subexpressions
Definition: flags.h:303
GiNaC::info_flags::odd
@ odd
Definition: flags.h:233
GiNaC::info_flags::negative
@ negative
Definition: flags.h:227
GiNaC::determinant_algo::automatic
@ automatic
Let the system choose.
Definition: flags.h:93
GiNaC::domain::complex
@ complex
Definition: flags.h:69
GiNaC::return_types
Definition: flags.h:277
GiNaC::status_flags::expanded
@ expanded
.expand(0) has already done its job (other expand() options ignore this flag)
Definition: flags.h:204
GiNaC::domain::positive
@ positive
Definition: flags.h:71
GiNaC::remember_strategies::delete_lru
@ delete_lru
Least recently used.
Definition: flags.h:292
GiNaC::determinant_algo::bareiss
@ bareiss
Bareiss fraction-free elimination.
Definition: flags.h:136
GiNaC::info_flags::even
@ even
Definition: flags.h:232
GiNaC::remember_strategies::delete_never
@ delete_never
Let table grow undefinitely.
Definition: flags.h:291
GiNaC::status_flags::dynallocated
@ dynallocated
heap-allocated (i.e. created by new if we want to be clever and bypass the stack,
Definition: flags.h:202
GiNaC::info_flags::relation_equal
@ relation_equal
Definition: flags.h:238
GiNaC::expand_options::expand_transcendental
@ expand_transcendental
expands transcendental functions like log and exp
Definition: flags.h:35
GiNaC::info_flags::rational_polynomial
@ rational_polynomial
Definition: flags.h:258
GiNaC::info_flags::cinteger_polynomial
@ cinteger_polynomial
Definition: flags.h:257
GiNaC::expand_options::expand_rename_idx
@ expand_rename_idx
used internally by mul::expand()
Definition: flags.h:34
GiNaC::status_flags::evaluated
@ evaluated
.eval() has already done its job
Definition: flags.h:203
GiNaC::has_options::algebraic
@ algebraic
enable algebraic matching
Definition: flags.h:43
GiNaC::remember_strategies::delete_cyclic
@ delete_cyclic
First (oldest) one in list.
Definition: flags.h:294
GiNaC::expand_options::expand_indexed
@ expand_indexed
expands (a+b).i to a.i+b.i
Definition: flags.h:32
GiNaC::info_flags::relation_less
@ relation_less
Definition: flags.h:240
GiNaC::info_flags::nonnegative
@ nonnegative
Definition: flags.h:228
GiNaC::subs_options::pattern_is_not_product
@ pattern_is_not_product
used internally by expairseq::subschildren()
Definition: flags.h:56
GiNaC::determinant_algo::divfree
@ divfree
Division-free elimination.
Definition: flags.h:114
GiNaC::info_flags::positive
@ positive
Definition: flags.h:226
GiNaC::status_flags
Flags to store information about the state of an object.
Definition: flags.h:199
GiNaC::status_flags::has_indices
@ has_indices
Definition: flags.h:207
GiNaC::remember_strategies
Strategies how to clean up the function remember cache.
Definition: flags.h:288
GiNaC
Definition: add.cpp:38
GiNaC::domain
Domain of an object.
Definition: flags.h:66
GiNaC::info_flags::relation_not_equal
@ relation_not_equal
Definition: flags.h:239
GiNaC::subs_options::subs_no_pattern
@ subs_no_pattern
Definition: flags.h:52
GiNaC::return_types::noncommutative
@ noncommutative
Definition: flags.h:281
GiNaC::determinant_algo::laplace
@ laplace
Laplace elimination.
Definition: flags.h:120
GiNaC::info_flags::symbol
@ symbol
Definition: flags.h:246
GiNaC::info_flags::nonnegint
@ nonnegint
Definition: flags.h:231
GiNaC::factor_options
Flags to control the polynomial factorization.
Definition: flags.h:299
GiNaC::info_flags::crational_polynomial
@ crational_polynomial
Definition: flags.h:259
GiNaC::subs_options
Flags to control the behavior of subs().
Definition: flags.h:48
GiNaC::expand_options
Flags to control the behavior of expand().
Definition: flags.h:29
GiNaC::subs_options::subs_algebraic
@ subs_algebraic
Definition: flags.h:54
GiNaC::solve_algo::bareiss
@ bareiss
Bareiss fraction-free elimination.
Definition: flags.h:185
GiNaC::solve_algo::automatic
@ automatic
Let the system choose.
Definition: flags.h:146
GiNaC::subs_options::algebraic
@ algebraic
enable algebraic substitutions
Definition: flags.h:53
GiNaC::info_flags::indexed
@ indexed
Definition: flags.h:263
GiNaC::status_flags::hash_calculated
@ hash_calculated
.calchash() has already done its job
Definition: flags.h:205
GiNaC::info_flags::list
@ list
Definition: flags.h:249
GiNaC::status_flags::has_no_indices
@ has_no_indices
Definition: flags.h:208
GiNaC::info_flags::prime
@ prime
Definition: flags.h:234
GiNaC::info_flags::rational
@ rational
Definition: flags.h:222
GiNaC::determinant_algo
Switch to control algorithm for determinant computation.
Definition: flags.h:88
GiNaC::status_flags::is_negative
@ is_negative
Definition: flags.h:210
GiNaC::remember_strategies::delete_lfu
@ delete_lfu
Least frequently used.
Definition: flags.h:293
GiNaC::info_flags::numeric
@ numeric
Definition: flags.h:220
GiNaC::info_flags
Possible attributes an object can have.
Definition: flags.h:216
GiNaC::info_flags::polynomial
@ polynomial
Definition: flags.h:255
GiNaC::return_types::commutative
@ commutative
Definition: flags.h:280
GiNaC::determinant_algo::gauss
@ gauss
Gauss elimination.
Definition: flags.h:102
GiNaC::domain::real
@ real
Definition: flags.h:70
GiNaC::info_flags::expanded
@ expanded
Definition: flags.h:270
GiNaC::subs_options::no_pattern
@ no_pattern
disable pattern matching
Definition: flags.h:51
GiNaC::subs_options::no_index_renaming
@ no_index_renaming
Definition: flags.h:57
GiNaC::solve_algo::gauss
@ gauss
Gauss elimination.
Definition: flags.h:156
GiNaC::solve_algo::divfree
@ divfree
Division-free elimination.
Definition: flags.h:168
GiNaC::series_options
Flags to control series expansion.
Definition: flags.h:76
GiNaC::status_flags::purely_indefinite
@ purely_indefinite
Definition: flags.h:211
GiNaC::info_flags::rational_function
@ rational_function
Definition: flags.h:260
GiNaC::factor_options::polynomial
@ polynomial
factor only expressions that are polynomials
Definition: flags.h:302
GiNaC::info_flags::has_indices
@ has_indices
Definition: flags.h:264
GiNaC::subs_options::pattern_is_product
@ pattern_is_product
used internally by expairseq::subschildren()
Definition: flags.h:55
GiNaC::info_flags::negint
@ negint
Definition: flags.h:230
GiNaC::info_flags::relation_greater
@ relation_greater
Definition: flags.h:242
GiNaC::info_flags::relation_less_or_equal
@ relation_less_or_equal
Definition: flags.h:241
GiNaC::info_flags::cinteger
@ cinteger
Definition: flags.h:225
GiNaC::info_flags::posint
@ posint
Definition: flags.h:229
GiNaC::subs_options::really_subs_idx
@ really_subs_idx
Definition: flags.h:61
GiNaC::expand_options::expand_function_args
@ expand_function_args
expands the arguments of functions
Definition: flags.h:33
GiNaC::info_flags::crational
@ crational
Definition: flags.h:224
GiNaC::info_flags::integer_polynomial
@ integer_polynomial
Definition: flags.h:256
GiNaC::solve_algo::markowitz
@ markowitz
Markowitz-ordered Gaussian elimination.
Definition: flags.h:193
GiNaC::return_types::noncommutative_composite
@ noncommutative_composite
Definition: flags.h:282
GiNaC::series_options::suppress_branchcut
@ suppress_branchcut
Suppress branch cuts in series expansion.
Definition: flags.h:83
GiNaC::solve_algo
Switch to control algorithm for linear system solving.
Definition: flags.h:141
GiNaC::has_options
Flags to control the behavior of has().
Definition: flags.h:40
GiNaC::info_flags::indefinite
@ indefinite
Definition: flags.h:273

This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.