Fix substituting I
Showing 1 of 2 files from the diff.
symengine/subs.h
changed.
Other files ignored by Codecov
symengine/tests/basic/test_subs.cpp
has changed.
@@ -296,6 +296,17 @@
Loading
296 | 296 | result_ = subs(expr, new_subs_dict); |
|
297 | 297 | } |
|
298 | 298 | ||
299 | + | void bvisit(const ComplexBase &x) |
|
300 | + | { |
|
301 | + | auto it = subs_dict_.find(I); |
|
302 | + | if (it != subs_dict_.end()) { |
|
303 | + | result_ = add(apply(x.real_part()), |
|
304 | + | mul(apply(x.imaginary_part()), it->second)); |
|
305 | + | } else { |
|
306 | + | result_ = x.rcp_from_this(); |
|
307 | + | } |
|
308 | + | } |
|
309 | + | ||
299 | 310 | RCP<const Basic> apply(const Basic &x) |
|
300 | 311 | { |
|
301 | 312 | return apply(x.rcp_from_this()); |
Files | Coverage |
---|---|
symengine | 89.45% |
Project Totals (129 files) | 89.45% |
2569761164
2569761164
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.