Comments (8)
Should it return the number of variable of the ring, or the actual number of variables used in that particular polynomial?
from abstractalgebra.jl.
Sorry I mean, should it return the variables for the ring or the poly.
from abstractalgebra.jl.
I was thinking the number of variables in the ring, but I hadn't thought about this ambiguity. So maybe it's better to only implement these functions for the ring?
from abstractalgebra.jl.
from abstractalgebra.jl.
Sounds good, then I think the method nvars should be defined for the ring instead of the elements.
It came up here BTW, and I think using the vars of the parent object is the only reasonable thing here right?
function AbstractAlgebra.subst(p::MPolyElem, v::Vector)
@assert length(vars(parent(p))) == length(v)
r = zero(p)
for i = 1:length(p)
r += p.coeffs[i] * prod(v[k]^p.exps[k, i] for k = 1:length(vars(parent(p))))
end
r
end
from abstractalgebra.jl.
Yes, I think that's the only reasonable thing here. We'll have to add some more methods for substitution of only certain variables, since that is also a reasonable use case.
from abstractalgebra.jl.
from abstractalgebra.jl.
I agree. vars
and nvars
are too ambiguous for elements. They should be defined for the parent.
from abstractalgebra.jl.
Related Issues (20)
- Missing `Lowercase` in some printing functions HOT 2
- Implement `algebraic_closure(QQ)`
- Add a variant of `allow_unicode` which does not modify `LocalPreferences.toml` and only enables/disables unicode for the current session
- Invalidations caused by `lock(io::IOCustom)` HOT 2
- Documentation of aliases seems to fail on nightly? HOT 3
- Typo in incompatible rational function field error message
- Rename `UniversalPolynomialRing` to `universal_polynomial_ring`
- `@polynomial_ring` is broken for coefficient rings not in `AbstractAlgebra`. HOT 1
- `@polynomial_ring` support for key-value pairs is broken
- Add matrix conjugation method
- An example of bad behaviour of multivariate gcd HOT 4
- Methods for finding factors and roots of a polynomial in AbstractAlgebra.jl HOT 3
- Issues with `normalise` for polynomials.
- Make the GF function thread-safe HOT 4
- Use `WeakKeyIdDicts.jl` HOT 4
- Add conformance tests for `Generic.SparsePoly` HOT 1
- Add conformance tests for `Generic.FunctionField` / fix bugs this reveals HOT 1
- Move banner hiding code to a separate package? HOT 2
- cannot multiply elements in polynomial ring over a field of fractions HOT 1
- Invalid code in `ModuleIsomorphism`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abstractalgebra.jl.