symengine / symengine

Compare 2849633 ... +4 ... ad376ce

Coverage Reach
printers/strprinter.cpp printers/unicode.cpp printers/latex.cpp printers/codegen.cpp printers/mathml.cpp printers/stringbox.cpp printers/sbml.cpp printers/strprinter.h printers/stringbox.h functions.cpp polys/upolybase.h polys/basic_conversions.h polys/msymenginepoly.h polys/uintpoly_flint.h polys/uexprpoly.h polys/msymenginepoly.cpp polys/basic_conversions.cpp polys/uintpoly.h polys/usymenginepoly.h polys/uexprpoly.cpp polys/uintpoly.cpp polys/uratpoly.cpp polys/uintpoly_flint.cpp polys/cancel.h polys/uratpoly.h dense_matrix.cpp sets.cpp ntheory.cpp cwrapper.cpp fields.cpp parser/parser_old.cpp parser/sbml/sbml_parser.cpp parser/sbml/sbml_parser.h parser/parser.cpp parser/parser.h eval_double.cpp test_visitors.cpp real_mpfr.cpp complex_mpc.cpp llvm_double.cpp logic.cpp derivative.cpp sparse_matrix.cpp solve.cpp lambda_double.h flint_wrapper.h series.h mul.cpp subs.h serialize-cereal.h infinity.cpp cse.cpp fields.h eval_mpfr.cpp expand.cpp complex_double.h series_visitor.h real_double.h eval_mpc.cpp real_double.cpp add.cpp mp_wrapper.h pow.cpp as_real_imag.cpp complex_mpc.h visitor.cpp mp_class.h real_mpfr.h set_funcs.cpp test_visitors.h complex.h refine.cpp rewrite.cpp assumptions.cpp sets.h series_generic.cpp rational.cpp functions.h type_codes.inc complex.cpp rational.h series_flint.cpp ntheory_funcs.cpp nan.cpp visitor.h series_flint.h dict.h expression.h numer_denom.cpp prime_sieve.cpp diophantine.cpp integer.cpp integer.h basic-inl.h constants.cpp rings.cpp dict.cpp basic.cpp symbol.cpp number.h finitediff.cpp eval.cpp simplify.cpp complex_double.cpp matrix.h tuple.cpp symengine_exception.h infinity.h matrix.cpp symengine_casts.h series.cpp nan.h symengine_rcp.h number.cpp basic.h symbol.h mp_wrapper.cpp series_generic.h logic.h expression.cpp pow.h monomials.cpp constants.h simplify.h refine.h derivative.h add.h tuple.h mul.h

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -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());

@@ -428,12 +428,15 @@
Loading
428 428
    ar(num, den);
429 429
    return Complex::from_two_nums(*num, *den);
430 430
}
431 -
template <class Archive>
432 -
RCP<const Basic> load_basic(Archive &ar, RCP<const ComplexBase> &)
431 +
template <class Archive, class T>
432 +
RCP<const Basic>
433 +
load_basic(Archive &ar, RCP<const T> &,
434 +
           typename std::enable_if<std::is_base_of<ComplexBase, T>::value,
435 +
                                   int>::type * = nullptr)
433 436
{
434 437
    RCP<const Number> num, den;
435 438
    ar(num, den);
436 -
    return num->div(*den);
439 +
    return addnum(num, mulnum(I, den));
437 440
}
438 441
template <class Archive>
439 442
RCP<const Basic> load_basic(Archive &ar, RCP<const Interval> &)
@@ -644,6 +647,7 @@
Loading
644 647
RCP<const Basic> load_basic(
645 648
    Archive &ar, RCP<const T> &,
646 649
    typename std::enable_if<not(std::is_base_of<Relational, T>::value
650 +
                                or std::is_base_of<ComplexBase, T>::value
647 651
                                or std::is_base_of<OneArgFunction, T>::value
648 652
                                or std::is_base_of<MultiArgFunction, T>::value
649 653
                                or std::is_base_of<TwoArgFunction, T>::value),

Learn more Showing 1 files with coverage changes found.

Changes in symengine/serialize-cereal.h
-2
+2
Loading file...
Files Coverage
symengine 0.01% 89.47%
Project Totals (129 files) 89.47%
Loading