#14841: Fixed and improved frobby interface
------------------------------------------+---------------------------------
Reporter: mmarco | Owner: mmarco
Type: enhancement | Status: new
Priority: major | Milestone: sage-5.12
Component: packages: experimental | Resolution:
Keywords: frobby | Work issues:
Report Upstream: N/A | Reviewers:
Authors: mmarco | Merged in:
Dependencies: frobby | Stopgaps:
------------------------------------------+---------------------------------
Description changed by mmarco:
Old description:
> Frobby interface didn't work too well. For instance, it didn't parse
> correctly a sequence of several ideals, leading to error messages like
> this:
>
> {{{
>
> sage: R.<x,y,z>=QQ[]
> sage: I=R.ideal([x^2*y,z^2*y,x*z])
> sage: frobby.irreducible_decomposition(I)
> ---------------------------------------------------------------------------
> RuntimeError Traceback (most recent call
> last)
> <ipython-input-11-0bf142b894a8> in <module>()
> ----> 1 frobby.irreducible_decomposition(I)
>
> /usr/lib64/python2.7/site-packages/sage/interfaces/frobby.pyc in
> irreducible_decomposition(self, monomial_ideal)
> 124 frobby_input = self._ideal_to_string(monomial_ideal)
> 125 frobby_output = self('irrdecom', input=frobby_input)
> --> 126 return self._parse_ideals(frobby_output,
> monomial_ideal.ring())
> 127
> 128 def _parse_ideals(self, string, ring):
>
> /usr/lib64/python2.7/site-packages/sage/interfaces/frobby.pyc in
> _parse_ideals(self, string, ring)
> 153 gens = [v ** e for v, e in zip(ring.gens(), exps) if
> e != 0]
> 154 return ring.ideal(gens or ring(1))
> --> 155 return map(to_ideal, self._parse_4ti2_matrix(string)) or
> [ring.ideal()]
> 156
> 157 def _parse_4ti2_matrix(self, string):
>
> /usr/lib64/python2.7/site-packages/sage/interfaces/frobby.pyc in
> _parse_4ti2_matrix(self, string)
> 195
> 196 if term_count * var_count != len(ints):
> --> 197 raise RuntimeError("Format error: incorrect matrix
> dimensions.")
> 198
> 199 exponents = []
>
> RuntimeError: Format error: incorrect matrix dimensions.
> }}}
>
> This patch solves this problem, implements calls to more frobby functions
> (note for instance the speed to compute the alexander dual, it beats the
> SimplicialComplex alexander_dual method by several orders of magnitude),
> and makes the doctets optional dependendent on frobby.
New description:
Frobby interface didn't work too well. For instance, it didn't parse
correctly a sequence of several ideals, leading to error messages like
this:
{{{
sage: R.<x,y,z>=QQ[]
sage: I=R.ideal([x^2*y,z^2*y,x*z])
sage: frobby.irreducible_decomposition(I)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
<ipython-input-11-0bf142b894a8> in <module>()
----> 1 frobby.irreducible_decomposition(I)
/usr/lib64/python2.7/site-packages/sage/interfaces/frobby.pyc in
irreducible_decomposition(self, monomial_ideal)
124 frobby_input = self._ideal_to_string(monomial_ideal)
125 frobby_output = self('irrdecom', input=frobby_input)
--> 126 return self._parse_ideals(frobby_output,
monomial_ideal.ring())
127
128 def _parse_ideals(self, string, ring):
/usr/lib64/python2.7/site-packages/sage/interfaces/frobby.pyc in
_parse_ideals(self, string, ring)
153 gens = [v ** e for v, e in zip(ring.gens(), exps) if e
!= 0]
154 return ring.ideal(gens or ring(1))
--> 155 return map(to_ideal, self._parse_4ti2_matrix(string)) or
[ring.ideal()]
156
157 def _parse_4ti2_matrix(self, string):
/usr/lib64/python2.7/site-packages/sage/interfaces/frobby.pyc in
_parse_4ti2_matrix(self, string)
195
196 if term_count * var_count != len(ints):
--> 197 raise RuntimeError("Format error: incorrect matrix
dimensions.")
198
199 exponents = []
RuntimeError: Format error: incorrect matrix dimensions.
}}}
This patch solves this problem, implements calls to more frobby functions
(note for instance the speed to compute the alexander dual, it beats the
SimplicialComplex alexander_dual method by several orders of magnitude),
and makes the doctets optional dependendent on frobby.
The added methods are: alexander_dual, hilbert, associated_primes,
dimension, associated_primes.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14841#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.