Skip to content

Commit

Permalink
Change from Exponent to PositiveExponent for compatibility with lates…
Browse files Browse the repository at this point in the history
…t symbolica
  • Loading branch information
ValentinHirschi committed Dec 2, 2024
1 parent 91e8082 commit 9e52ae1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
12 changes: 5 additions & 7 deletions src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use symbolica::atom::PowView;
// use log::trace;
use serde::{Deserialize, Serialize};
use slotmap::{new_key_type, DenseSlotMap, Key, SecondaryMap};
use symbolica::poly::PositiveExponent;
#[cfg(feature = "shadowing")]
use symbolica::{
atom::{representation::FunView, AddView, Atom, AtomView, MulView, Symbol},
Expand All @@ -30,10 +31,7 @@ use symbolica::{
ExpressionEvaluator, FunctionMap, InlineASM,
},
id::{Condition, MatchSettings, Pattern, PatternOrMap, PatternRestriction, Replacement},
poly::{
factor::Factorize, gcd::PolynomialGCD, polynomial::MultivariatePolynomial, Exponent,
Variable,
},
poly::{factor::Factorize, gcd::PolynomialGCD, polynomial::MultivariatePolynomial, Variable},
state::State,
};

Expand Down Expand Up @@ -1671,7 +1669,7 @@ impl<S: TensorStructure<Slot: Serialize + for<'a> Deserialize<'a>> + Clone>
/// specified by `var_map`. If new variables are encountered, they are
/// added to the variable map. Similarly, non-polynomial parts are automatically
/// defined as a new independent variable in the polynomial.
pub fn to_polynomial<R: EuclideanDomain + ConvertToRing, E: Exponent>(
pub fn to_polynomial<R: EuclideanDomain + ConvertToRing, E: PositiveExponent>(
&self,
field: &R,
var_map: Option<Arc<Vec<Variable>>>,
Expand All @@ -1697,7 +1695,7 @@ impl<S: TensorStructure<Slot: Serialize + for<'a> Deserialize<'a>> + Clone>
pub fn to_rational_polynomial<
R: EuclideanDomain + ConvertToRing,
RO: EuclideanDomain + PolynomialGCD<E>,
E: Exponent,
E: PositiveExponent,
>(
&self,
field: &R,
Expand Down Expand Up @@ -1726,7 +1724,7 @@ impl<S: TensorStructure<Slot: Serialize + for<'a> Deserialize<'a>> + Clone>
pub fn to_factorized_rational_polynomial<
R: EuclideanDomain + ConvertToRing,
RO: EuclideanDomain + PolynomialGCD<E>,
E: Exponent,
E: PositiveExponent,
>(
&self,
field: &R,
Expand Down
10 changes: 5 additions & 5 deletions src/parametric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ use symbolica::{
},
id::{Condition, MatchSettings, Pattern, PatternOrMap, PatternRestriction, Replacement},
poly::{
factor::Factorize, gcd::PolynomialGCD, polynomial::MultivariatePolynomial, Exponent,
Variable,
factor::Factorize, gcd::PolynomialGCD, polynomial::MultivariatePolynomial,
PositiveExponent, Variable,
},
state::State,
};
Expand Down Expand Up @@ -570,7 +570,7 @@ impl<S: TensorStructure> ParamTensor<S> {
/// specified by `var_map`. If new variables are encountered, they are
/// added to the variable map. Similarly, non-polynomial parts are automatically
/// defined as a new independent variable in the polynomial.
pub fn to_polynomial<R: EuclideanDomain + ConvertToRing, E: Exponent>(
pub fn to_polynomial<R: EuclideanDomain + ConvertToRing, E: PositiveExponent>(
&self,
field: &R,
var_map: Option<Arc<Vec<Variable>>>,
Expand All @@ -589,7 +589,7 @@ impl<S: TensorStructure> ParamTensor<S> {
pub fn to_rational_polynomial<
R: EuclideanDomain + ConvertToRing,
RO: EuclideanDomain + PolynomialGCD<E>,
E: Exponent,
E: PositiveExponent,
>(
&self,
field: &R,
Expand All @@ -614,7 +614,7 @@ impl<S: TensorStructure> ParamTensor<S> {
pub fn to_factorized_rational_polynomial<
R: EuclideanDomain + ConvertToRing,
RO: EuclideanDomain + PolynomialGCD<E>,
E: Exponent,
E: PositiveExponent,
>(
&self,
field: &R,
Expand Down

0 comments on commit 9e52ae1

Please sign in to comment.